Skip to content

feat(BA-5836): AppConfigFragment service vertical (service / DTO / adapter)#11296

Draft
jopemachine wants to merge 5 commits intoBA-5827from
BA-5836
Draft

feat(BA-5836): AppConfigFragment service vertical (service / DTO / adapter)#11296
jopemachine wants to merge 5 commits intoBA-5827from
BA-5836

Conversation

@jopemachine
Copy link
Copy Markdown
Member

@jopemachine jopemachine commented Apr 25, 2026

📚 Stacked PRs

This PR is part of a 10-PR stack delivering BEP-1052. Merge in order:

  1. ⬇️ chore(BA-5822): drop legacy AppConfig layer (preparation for BEP-1052) #11265chore(BA-5822): drop legacy AppConfig layer
  2. ⬇️ feat(BA-5814): AppConfigPolicy foundation (data / repository / service / adapter, bulk-aware) #11266feat(BA-5814): AppConfigPolicy foundation
  3. ⬇️ feat(BA-5815): AppConfigPolicy GraphQL #11269feat(BA-5815): AppConfigPolicy GraphQL
  4. ⬇️ feat(BA-5844): AppConfigPolicy REST v2 surface #11312feat(BA-5844): AppConfigPolicy REST v2
  5. ⬇️ feat(BA-5827): AppConfigFragment foundation (DB + repository + errors) #11282feat(BA-5827): AppConfigFragment foundation
  6. 👉 feat(BA-5836): AppConfigFragment service vertical (service / DTO / adapter) #11296feat(BA-5836): AppConfigFragment service vertical ← you are here
  7. ⬇️ feat(BA-5829): AppConfigFragment + AppConfig GraphQL #11285feat(BA-5829): AppConfigFragment + AppConfig GraphQL
  8. ⬇️ feat(BA-5830): AppConfigFragment + AppConfig REST v2 #11286feat(BA-5830): AppConfigFragment + AppConfig REST v2
  9. ⬇️ feat(BA-5832): AppConfig v2 SDK + CLI (BEP-1052) #11295feat(BA-5832): AppConfig v2 SDK + CLI
  10. ⬇️ feat(BA-5837): ValkeyCache for AppConfigFragment merged-view reads #11298feat(BA-5837): ValkeyCache for AppConfigFragment merged-view reads

CI 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

Splits the AppConfigFragment service vertical out of #11282 (BA-5827) so each PR stays under ~2k lines.

What's in here

  • v2 DTOs (common/dto/manager/v2/app_config_fragment/) — shared input/output models for the GQL + REST surfaces in subsequent PRs
  • Service + 8 action files + processor package
  • Bulk actions inherit BaseBulkAction[T] and run through BulkActionProcessor for per-item validator routing (RBAC etc. — none wired yet, no-op forward)
  • AppConfigFragmentAdapter flesh-out and registration in the adapter registry
  • bulk_create_my / bulk_update_my resolve user_id from current_user() rather than accepting it on the action
  • Filter conditions.py and orders.py for typed Fragment search
  • services/factory.py + services/processors.py wiring

Stack

main
 └─ BA-5822 #11265  legacy AppConfig drop
     └─ BA-5814 #11266  AppConfigPolicy foundation
         └─ BA-5815 #11269  AppConfigPolicy GQL + REST
             └─ BA-5827 #11282  AppConfigFragment foundation  ← base of this PR
                 └─ BA-5836        AppConfigFragment service vertical  ← THIS PR
                     └─ BA-5829 #11285  AppConfigFragment + AppConfig GQL
                         └─ BA-5830 #11286  AppConfigFragment + AppConfig REST
                             └─ BA-5832 #11295  v2 SDK + CLI

Test plan

  • CI passes
  • Stack rebases cleanly
  • Manager schema build verifies (covered by downstream BA-5829 / BA-5830 E2E)

📚 Documentation preview 📚: https://sorna--11296.org.readthedocs.build/en/11296/


📚 Documentation preview 📚: https://sorna-ko--11296.org.readthedocs.build/ko/11296/

@github-actions github-actions Bot added size:XL 500~ LoC comp:manager Related to Manager component comp:common Related to Common component labels Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
@github-actions github-actions Bot added the area:docs Documentations label Apr 25, 2026
@jopemachine jopemachine marked this pull request as draft April 25, 2026 09:43
jopemachine added a commit that referenced this pull request Apr 25, 2026
jopemachine added a commit that referenced this pull request Apr 25, 2026
Comment thread src/ai/backend/manager/api/adapters/app_config_fragment.py Outdated
Comment thread src/ai/backend/manager/services/app_config_fragment/processors.py Outdated
@jopemachine
Copy link
Copy Markdown
Member Author

Please add service-level tests by referring to the existing code.

jopemachine added a commit that referenced this pull request Apr 26, 2026
@github-actions github-actions Bot added the require:db-migration Automatically set when alembic migrations are added or updated label Apr 26, 2026
jopemachine and others added 5 commits April 27, 2026 11:39
…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.
…num match

- Rename `bulk_create_my` / `bulk_update_my` → `my_bulk_create` /
  `my_bulk_update` across action classes, files, service methods,
  processors, and the request DTO module to match the existing `my_`
  prefix convention used elsewhere in the v2 surface (e.g. `my_keypair`).
- Switch order-field dispatch in `AppConfigFragmentAdapter` from string
  `.value` matching to direct StrEnum matching against
  `AppConfigFragmentOrderField`.
- Promote per-item bulk failure logs from `log.debug` to `log.warning`.
- Drop BEP-1052 §X references from doctrings, comments, and inline
  notes across the service / adapter / DTO modules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e / adapter

Propagate the BA-5827 column rename through the service vertical:
the bulk-mutation DTOs, the service's bulk methods, the bulk-item
data classes, the adapter's data-to-DTO mapping, and the bulk-error
field all now reference `config` instead of `extra_config`. Tracks
the underlying JSONB column name for naming consistency end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant