feat(BA-5827): AppConfigFragment foundation (DB + repository + errors)#11282
Draft
jopemachine wants to merge 5 commits intoBA-5844from
Draft
feat(BA-5827): AppConfigFragment foundation (DB + repository + errors)#11282jopemachine wants to merge 5 commits intoBA-5844from
jopemachine wants to merge 5 commits intoBA-5844from
Conversation
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 24, 2026
jopemachine
commented
Apr 25, 2026
jopemachine
commented
Apr 25, 2026
jopemachine
commented
Apr 25, 2026
jopemachine
commented
Apr 25, 2026
jopemachine
added a commit
that referenced
this pull request
Apr 25, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 25, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 25, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
jopemachine
added a commit
that referenced
this pull request
Apr 25, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
jopemachine
commented
Apr 26, 2026
jopemachine
commented
Apr 26, 2026
jopemachine
commented
Apr 26, 2026
jopemachine
added a commit
that referenced
this pull request
Apr 26, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
3 tasks
jopemachine
added a commit
that referenced
this pull request
Apr 26, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
Lands the `app_config_fragments` storage layer per BEP-1052 §1·§2: table + Alembic migration, ORM row, data types, the repository slice (reads + writes via Creator/Updater/Purger helpers), domain errors, and the repository unit tests. The shared `Resilience` policy + DB metric layer are wired here too. The service / adapter / DTO / GQL+REST / SDK+CLI verticals layer on top in subsequent PRs.
…ssing key Mirrors the Policy-side test fix on BA-5814: the repository now raises rather than returning `None` for an unresolved natural key, so flip the assertion accordingly.
- Wrap AppConfigFragment repository / admin_repository methods with their own Resilience instances (mirrors the policy side from BA-5814). - Drop BEP-1052 §X references from doctrings, comments, the migration module, and the regression test — keep BEP wording only in the news fragment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…dater/Purger, rename extra_config - Drop `AppConfigFragmentPolicyMissing` (and the FK-violation integrity_error_check that mapped to it). The required-policy invariant is enforced upstream by the service layer; the DB-level FK is the defense-in-depth backstop and now surfaces as a generic `ForeignKeyViolationError`. The typed exception was premature for the DB+repository foundation slice — re-introduce later if a service/API layer needs it. - Refactor the admin_repository / db_source split: db_source now accepts pre-built `Updater` / `Purger` objects (mirroring `scaling_group`, `vfolder`, etc.), with the natural-key → PK resolution exposed as `resolve_pk_by_key`. `admin_repository` builds the `Updater` / `Purger` and translates the missing-row case into `AppConfigFragmentNotFound`. - Rename the JSONB column / Row attribute / Data field / Creator+Updater spec / admin-repository parameter from `extra_config` to `config` end-to-end (DB column included). The legacy-drop migration's downgrade keeps `extra_config` because it recreates the historical schema. - Update the regression test to expect the generic `ForeignKeyViolationError`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jopemachine
added a commit
that referenced
this pull request
Apr 27, 2026
…apter, bulk-aware) Layers the service / adapter / DTO surface on top of the AppConfigFragment foundation that BA-5827 (#11282) lands. Per BEP-1052 §3, all writes are bulk-only (admin + self-service) with partial-success semantics; reads expose `get`, scope-bound `search`, and cross-scope `admin_search`. - v2 DTOs (`common/dto/manager/v2/app_config_fragment/`) — shared by the GQL and REST surfaces in subsequent PRs. - Service + 8 action files + processor package; bulk actions extend `BaseBulkAction[T]` so `BulkActionProcessor` can route per-item validators (RBAC etc. — none wired yet, no-op forward). - Adapter (`api/adapters/app_config_fragment.py`) flesh-out, registered in the adapter registry; `bulk_create_my` / `bulk_update_my` pull `user_id` from `current_user()` instead of accepting it on the action. - Filter `conditions.py` and `orders.py` for typed Fragment search. - `services/factory.py` + `services/processors.py` wiring.
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.
📚 Stacked PRs
This PR is part of a 10-PR stack delivering BEP-1052. Merge in order:
chore(BA-5822): drop legacy AppConfig layerfeat(BA-5814): AppConfigPolicy foundationfeat(BA-5815): AppConfigPolicy GraphQLfeat(BA-5844): AppConfigPolicy REST v2feat(BA-5827): AppConfigFragment foundation← you are herefeat(BA-5836): AppConfigFragment service verticalfeat(BA-5829): AppConfigFragment + AppConfig GraphQLfeat(BA-5830): AppConfigFragment + AppConfig REST v2feat(BA-5832): AppConfig v2 SDK + CLIfeat(BA-5837): ValkeyCache for AppConfigFragment merged-view readsCI on intermediate PRs may show test churn since each one only lands a slice of the new layer. The full picture is guaranteed to build at the tip (#11298).
Summary
Lands the AppConfigFragment storage layer per BEP-1052 §1·§2:
app_config_fragmentstable + Alembic migrationAppConfigFragmentRowdata/app_config_fragment/value typesAppConfigFragmentRepository,AppConfigFragmentAdminRepository) with the shared Creator / Updater / Purger helpers; mutating methods use theResiliencepolicy + DB metrics layerAppConfigFragmentConflict,AppConfigFragmentPolicyMissing,AppConfigFragmentNotFound)The service / adapter / DTO surface and everything above (GQL, REST, SDK, CLI) layer on top in the subsequent stack PRs:
Test plan
pants checkclean on the foundation slice📚 Documentation preview 📚: https://sorna--11282.org.readthedocs.build/en/11282/
📚 Documentation preview 📚: https://sorna-ko--11282.org.readthedocs.build/ko/11282/