feat(BA-6628): assign scope-type default ranks to allow-list entries#12539
Closed
jopemachine wants to merge 2 commits into
Closed
feat(BA-6628): assign scope-type default ranks to allow-list entries#12539jopemachine wants to merge 2 commits into
jopemachine wants to merge 2 commits into
Conversation
Move the merge-priority `rank` from `app_config_fragments` to the admin-owned `app_config_allow_list`. Fragment writes are partly user-owned, so a rank on the fragment would let a fragment owner re-order the merge; the allow-list entry is admin-owned, making it the right carrier for merge priority. A new entry's rank defaults to a fixed value (per-scope-type defaults follow in a later PR); an explicit rank may be passed through `AppConfigAllowListCreatorSpec`. Drops the per-`config_name` next-value rank assignment (`NextValuePolicy`, lock on the definition row) from fragment create — `AppConfigFragmentCreatorSpec` becomes a plain `CreatorSpec`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Give a new allow-list entry a per-scope-type default `rank` instead of a single fixed value: `public`=100, `domain`=200, `user`=300 (via `AppConfigScopeType.default_rank()`). The defaults order the scopes so a user's own fragment overrides the domain default, which overrides the public value; the 100 gap leaves room for admins to place custom ranks in between. An explicit `rank` still overrides the default. The migration backfills existing allow-list rows by the same scope-type defaults. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
5d94c57 to
2d1cb8c
Compare
This was referenced Jul 6, 2026
974923c to
76f61f2
Compare
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.
Summary
Second half of the AppConfigFragment rank redesign (BA-6628), split out of #12516. #12516 moves the merge
rankfromapp_config_fragmentsto the admin-ownedapp_config_allow_listwith a single fixed default; this PR makes that default depend on the scope type.AppConfigScopeType.default_rank()— a new allow-list entry defaults itsrankfrom its scope type:public=100,domain=200,user=300. The defaults order the scopes so a user's own fragment overrides the domain default, which overrides the public value; the 100 gap leaves room for admins to place custom ranks in between. An explicitrankstill overrides the default.66d0f891ed20— the backfill (added in feat(BA-6702): move fragment rank to the allow list with scope defaults #12516) switches from the fixed default to the per-scope-type defaults for existing allow-list rows.📚 Stacked PRs
Part of the AppConfigFragment / AppConfig stack under BEP-1052 (epic BA-5781). Merge in order:
feat(BA-6552): app_config_fragments DB model and Alembic migrationfeat(BA-6553): repository layerrefactor(BA-6619): consolidate AppConfigScopeType into common.datarefactor(BA-6620): ExistsQuerier + AppConfigAllowList.existsfeat(BA-6554): AppConfigFragment service layerfeat(BA-6628): move fragment rank to the allow listfeat(BA-6628): assign scope-type default ranks to allow-list entries← you are herefeat(BA-6628): expose allow-list rank on the v2 API surfacefeat(BA-6628): cascade fragment deletion from the allow listfeat(BA-6626): app_config_fragment bulk repository layerfeat(BA-6618): AppConfigFragment bulk CRUD service layerfeat(BA-6555): app_config service layer (merge engine)feat(BA-6556): AppConfig REST v2 API🤖 Generated with Claude Code