Bugfix/entire - #12
Merged
Merged
Conversation
The wheel shipped no migration, so the documented `migrate rebac` created nothing and the first save() on a synced model hit a missing table. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds rebac.mixins/structs/adapters re-export shims and a PEP 562 lazy __getattr__ at the package root. Lazy is required: rebac is in INSTALLED_APPS, so an eager model import raises AppRegistryNotReady. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The RebacViewConfig example passed create_parent_type/create_parent_field, which are not fields on the dataclass, so it raised TypeError as written. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing imported rebac.signals, so the setting_changed receiver never registered and get_rebac_client's lru_cache was never invalidated. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The failure path re-queried PENDING rows and charged retries against rows it never sent, eventually marking them FAILED. MAX_RETRIES also moves out of the decorator so it is read per call instead of frozen at import. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
conf.get_setting reads settings.REBAC_CONFIG, so the block was dead and real settings resolution had never been exercised. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The adapter iterates ClientBatchCheckResponse.result, so the mock's .responses left the parse loop silently iterating nothing. Also drops the unused serializer helper carrying the same mistake. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pre-existing E501 violations that would fail the lint job added next. No behavior change. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The package advertises strict typing but shipped no PEP 561 marker, so consumers' type checkers ignored every annotation. The MIT classifier contradicted both the license field and the GPLv3 LICENSE file. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing ran pytest, ruff or mypy before a release; publish.yml fired on a tag and uploaded straight to PyPI. Adds a 3.11-3.13 x Django 4.2/5.2 matrix plus a makemigrations --check gate, and makes publishing need it. Closes #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
uv rewrote the lockfile format and dropped the ppc64le/s390x wheel entries. Committed so CI resolves deterministically. Refs #11
mypy aborted with "Source file found twice under different module names". With explicit_package_bases and no mypy_path the only package base is the repo root, so src/rebac/x.py is named src.rebac.x -- while the editable install in the CI venv makes the same file reachable as rebac.x. Pre-commit never hit this: its mypy runs in an isolated env where rebac is not installed. Also pins mypy to 1.19.1 to match the mirrors-mypy rev in .pre-commit-config.yaml, since the unpinned install pulled 2.3.1, and mirrors the hook's migrations exclude so both see the same file set. Refs #11
7 tasks
aerosadegh
pushed a commit
that referenced
this pull request
Aug 25, 2026
commit b49fddb Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue Aug 25 12:26:33 2026 +0330 Bugfix/entire (#12) * fix(migrations): add initial migration for RebacSyncOutbox The wheel shipped no migration, so the documented `migrate rebac` created nothing and the first save() on a synced model hit a missing table. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(api): expose the documented flat import paths Adds rebac.mixins/structs/adapters re-export shims and a PEP 562 lazy __getattr__ at the package root. Lazy is required: rebac is in INSTALLED_APPS, so an eager model import raises AppRegistryNotReady. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(readme): use create_scope_type/create_scope_field The RebacViewConfig example passed create_parent_type/create_parent_field, which are not fields on the dataclass, so it raised TypeError as written. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(apps): connect signal receivers from ready() Nothing imported rebac.signals, so the setting_changed receiver never registered and get_rebac_client's lru_cache was never invalidated. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(tasks): scope retry bookkeeping to the claimed batch The failure path re-queried PENDING rows and charged retries against rows it never sent, eventually marking them FAILED. MAX_RETRIES also moves out of the decorator so it is read per call instead of frozen at import. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(settings): rename rebac to REBAC_CONFIG conf.get_setting reads settings.REBAC_CONFIG, so the block was dead and real settings resolution had never been exercised. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(openfga): mock batch_check .result, not .responses The adapter iterates ClientBatchCheckResponse.result, so the mock's .responses left the parse loop silently iterating nothing. Also drops the unused serializer helper carrying the same mistake. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * style: wrap lines over the 100-char limit Pre-existing E501 violations that would fail the lint job added next. No behavior change. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * build: add py.typed and drop the MIT classifier The package advertises strict typing but shipped no PEP 561 marker, so consumers' type checkers ignored every annotation. The MIT classifier contradicted both the license field and the GPLv3 LICENSE file. Refs #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci: run tests, lint and build on push and PR Nothing ran pytest, ruff or mypy before a release; publish.yml fired on a tag and uploaded straight to PyPI. Adds a 3.11-3.13 x Django 4.2/5.2 matrix plus a makemigrations --check gate, and makes publishing need it. Closes #11 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore(deps): refresh uv.lock to revision 3 uv rewrote the lockfile format and dropped the ppc64le/s390x wheel entries. Committed so CI resolves deterministically. Refs #11 * chore: ignore the local commit helper script Refs #11 * fix(ci): set mypy_path so the src layout resolves to one module name mypy aborted with "Source file found twice under different module names". With explicit_package_bases and no mypy_path the only package base is the repo root, so src/rebac/x.py is named src.rebac.x -- while the editable install in the CI venv makes the same file reachable as rebac.x. Pre-commit never hit this: its mypy runs in an isolated env where rebac is not installed. Also pins mypy to 1.19.1 to match the mirrors-mypy rev in .pre-commit-config.yaml, since the unpinned install pulled 2.3.1, and mirrors the hook's migrations exclude so both see the same file set. Refs #11 --------- Co-authored-by: Sadegh Yazdani <m.s.yazdani86@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> commit dec2915 Merge: 3f57de2 2ff8c57 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 18:02:50 2026 +0330 Merge branch 'main' into dev commit 3f57de2 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 18:01:16 2026 +0330 Docs/refine3 (#9) * docs: fix readme for middleware * docs: improve and remove some unusable comments * bump: version 0.1.3 --------- Co-authored-by: Sadegh Yazdani <m.s.yazdani86@gmail.com> commit 544ebe7 Author: Sadegh Yazdani <m.s.yazdani86@gmail.com> Date: Tue May 5 16:58:55 2026 +0330 bump: version 0.1.2 commit cf274d7 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 16:57:00 2026 +0330 docs: refine 2 (#7) Co-authored-by: Sadegh Yazdani <m.s.yazdani86@gmail.com> commit 7480d39 Merge: 842fcba 412f6a2 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 14:46:47 2026 +0330 Merge branch 'main' into dev commit 842fcba Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 14:45:06 2026 +0330 Docs/refine (#5) * docs: refine * bump: version 0.1.1 --------- Co-authored-by: Sadegh Yazdani <m.s.yazdani86@gmail.com> commit 6efb6bb Merge: 297a080 a5be0e4 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 14:12:27 2026 +0330 Merge branch 'main' into dev commit 297a080 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 14:10:38 2026 +0330 Docs/refine (#3) * docs: refine * bump: version 0.1.1 --------- Co-authored-by: Sadegh Yazdani <m.s.yazdani86@gmail.com> commit d520348 Author: Sadegh Yazdani <silverstar10@gmail.com> Date: Tue May 5 13:39:17 2026 +0330 Feature/start project (#1) * feat: add project files with passed tests * fix: some old code to new code * fix: improve adaptor for other openfga codes * test: add more passed tests * style: apply pre-commit * docs: improve docs for `django-rebac` * ci: add github workflow * docs: improve based on the new code * ci: update pre-commit config * fix: add init for migrations * refactor: project structure files * test: passed test due to refactor * refactor: move a signal receiver to `signals.py` * test: add a test for `signals.py` * docs: improve some parts * test: add some test for delete * feat: add some capabilities for delete action * fix: imports for rebac.core * fix: `batch_check` in `OpenFGABackend` --------- Co-authored-by: Sadegh Yazdani <m.s.yazdani86@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.