Skip to content

feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update)#12377

Draft
jopemachine wants to merge 1 commit into
feat/BA-6555-app-config-merge-enginefrom
feat/BA-6556-app-config-rest-v2
Draft

feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update)#12377
jopemachine wants to merge 1 commit into
feat/BA-6555-app-config-merge-enginefrom
feat/BA-6556-app-config-rest-v2

Conversation

@jopemachine

@jopemachine jopemachine commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Adds the AppConfig REST v2 API (BA-6556, BEP-1052 / epic BA-5781), mirroring the layered app_config_allow_list / app_config_definition stacks. This is the API surface over the fragment write/search service (BA-6554) and the merged-AppConfig read service (BA-6555).

Endpoints

METHOD path auth operation
POST /v2/app-config-fragments/ superadmin create a fragment at any scope
GET /v2/app-config-fragments/{fragment_id} superadmin get by id
PATCH /v2/app-config-fragments/{fragment_id} superadmin update the config document
DELETE /v2/app-config-fragments/{fragment_id} superadmin purge by id
POST /v2/app-config-fragments/search superadmin paginated cross-scope search
POST /v2/app-config-fragments/scoped-search auth fragments visible to the calling (domain, user)
POST /v2/app-config/resolve auth merged AppConfig for a principal
GET /v2/app-config/public/{config_name} anonymous public-only merged read (no auth middleware)

Layers

  • DI wiring — register AppConfigFragmentRepositories + AppConfigService / AppConfigFragmentService + processors into Repositories / Services / Processors / factory.
  • scoped_search — now principal-visibility aware: VisibleConfigTarget + AppConfigVisibleScope resolve to public + the principal's domain + the principal's own user fragment (reusing the by_*_visibility conditions), unconditional like resolve.
  • public resolveAppConfigService.resolve_public + list_public_fragments merge only public-scope fragments for an anonymous (pre-login) caller.
  • API — shared AppConfigAdapter, v2 DTOs (app_config, app_config_fragment), route registries + tree wiring, AppConfigResolveNotAllowed (403).

Notes

  • app_config processors carry no RBAC validator (per the agreed phase plan) — auth is gated at the REST route. resolve / scoped-search additionally reject a request whose user_id is not the authenticated caller, a temporary stand-in until the validator lands. domain is not yet guarded.
  • GQL / SDK / CLI for AppConfig follow in subsequent PRs.

📚 Stacked PRs

Part of the AppConfigFragment / AppConfig stack under BEP-1052 (epic BA-5781). Merge in order:

  1. feat(BA-6552): add app_config_fragments DB model and Alembic migration #12306feat(BA-6552): app_config_fragments DB model and Alembic migration
  2. feat(BA-6553): add app_config_fragments repository layer #12307feat(BA-6553): repository layer
  3. refactor(BA-6619): consolidate AppConfigScopeType into common.data (single definition) #12403refactor(BA-6619): consolidate AppConfigScopeType into common.data
  4. refactor(BA-6620): ExistsQuerier ops primitive + AppConfigAllowList.exists #12405refactor(BA-6620): ExistsQuerier + AppConfigAllowList.exists
  5. feat(BA-6554): add app_config_fragment service layer #12358feat(BA-6554): AppConfigFragment service layer
  6. feat(BA-6628): conditional-bulk repository primitives #12429feat(BA-6628): conditional-bulk repository primitives
  7. feat(BA-6626): app_config_fragment bulk repository layer #12426feat(BA-6626): app_config_fragment bulk repository layer
  8. feat(BA-6618): app_config_fragment bulk CRUD service layer #12401feat(BA-6618): AppConfigFragment bulk CRUD service layer
  9. feat(BA-6555): add app_config service layer #12359feat(BA-6555): app_config service layer
  10. 👉 feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update) #12377feat(BA-6556): AppConfig REST v2 API ← you are here

@github-actions github-actions Bot added size:XL 500~ LoC comp:manager Related to Manager component comp:common Related to Common component labels Jun 23, 2026
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 8647d4b to 818444b Compare June 24, 2026 08:06
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 39bb559 to 7d4e0cc Compare June 24, 2026 08:10
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 818444b to 13b4d40 Compare June 24, 2026 08:19
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 7d4e0cc to 8168065 Compare June 24, 2026 08:21
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 13b4d40 to 67fe4c6 Compare June 24, 2026 08:34
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 8168065 to 304ddcd Compare June 24, 2026 08:36
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 67fe4c6 to de63b73 Compare June 24, 2026 09:42
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch 2 times, most recently from caf0913 to f208ae6 Compare June 24, 2026 10:11
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from bb05c39 to 547d235 Compare June 25, 2026 00:58
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from f208ae6 to e20123e Compare June 25, 2026 00:59
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 547d235 to 8c6c5a9 Compare June 25, 2026 01:03
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from e20123e to 2e6fdbe Compare June 25, 2026 01:03
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 8c6c5a9 to 74a7d2e Compare June 25, 2026 01:13
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 2e6fdbe to 39e5265 Compare June 25, 2026 01:13
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 74a7d2e to 15ce5fb Compare June 25, 2026 01:36
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 39e5265 to 98932dc Compare June 25, 2026 01:38
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 15ce5fb to 1d15924 Compare June 25, 2026 01:45
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 98932dc to fa7cabe Compare June 25, 2026 01:47
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch 2 times, most recently from 13e7c44 to 1e71fac Compare June 25, 2026 02:05
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from fa7cabe to b273700 Compare June 25, 2026 02:09
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 1e71fac to 27061c1 Compare June 25, 2026 02:47
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from b273700 to 56586f7 Compare June 25, 2026 02:49
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 6d5b0cc to 18135f0 Compare June 25, 2026 03:42
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from abbbc6d to a082d62 Compare June 25, 2026 03:42
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 18135f0 to 24c5952 Compare June 25, 2026 04:06
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from a082d62 to 7b3771c Compare June 25, 2026 04:06
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 704bd3f to 05aeedf Compare June 25, 2026 07:33
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from fe6d37a to 89c884b Compare June 25, 2026 07:37
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 05aeedf to 961eeff Compare June 25, 2026 10:31
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 89c884b to fa8c651 Compare June 25, 2026 11:00
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 961eeff to 5c94da3 Compare June 26, 2026 05:26
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from fa8c651 to 85f9c6b Compare June 26, 2026 05:28
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 5c94da3 to 5499abb Compare June 26, 2026 07:15
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 85f9c6b to b2f00a9 Compare June 26, 2026 07:15
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 5499abb to 82bc893 Compare June 26, 2026 07:30
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from b2f00a9 to d2e3a45 Compare June 26, 2026 07:30
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 82bc893 to 14e30cf Compare June 26, 2026 07:37
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from d2e3a45 to e46f918 Compare June 26, 2026 07:37
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 14e30cf to ab5c6fd Compare June 26, 2026 08:03
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from e46f918 to e4b88ed Compare June 26, 2026 08:03
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from ab5c6fd to b0fed49 Compare June 26, 2026 08:12
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from e4b88ed to 0067659 Compare June 26, 2026 08:12
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from b0fed49 to 3a9f1a1 Compare June 26, 2026 09:10
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 0067659 to eba2d47 Compare June 26, 2026 09:10
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 3a9f1a1 to 43f39c1 Compare June 26, 2026 09:29
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from eba2d47 to 65561d7 Compare June 26, 2026 09:29
DI wiring (Repositories/Services/Processors/factory), the public/anonymous resolve
(resolve_public + list_public_fragments), and the REST v2 surface: admin fragment CRUD +
admin_search (superadmin), scoped-search keyed by domain/user scope (auth), merged
resolve (auth, with the temporary user_id==caller guard), and anonymous public read.

Scoped-search uses the domain/user scope targets from BA-6554 (audit_log pattern): the
request carries a scope of domain ids and/or user ids, OR-combined — no config_name or
RBAC validator (per the BA-6614 decision).

Squash of the BA-6556 development history, re-based onto the updated BA-6555.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 43f39c1 to b05d6c4 Compare June 26, 2026 09:52
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 65561d7 to 4b5fb3a Compare June 26, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant