Skip to content

feat(BA-6701): expose allow-list rank on the v2 API surface#12517

Merged
HyeockJinKim merged 4 commits into
mainfrom
feat/BA-6628-allow-list-rank-api
Jul 6, 2026
Merged

feat(BA-6701): expose allow-list rank on the v2 API surface#12517
HyeockJinKim merged 4 commits into
mainfrom
feat/BA-6628-allow-list-rank-api

Conversation

@jopemachine

@jopemachine jopemachine commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Exposes the allow-list rank (introduced in #12516) on the v2 API surface. Pure API-layer change — no schema or behavior change beyond the new field:

  • DTO (common/dto/manager/v2/app_config_allow_list): optional rank on CreateAppConfigAllowListInput (defaults to the scope type's default rank when omitted), required rank on AppConfigAllowListNode, and a RANK order field.
  • Adapter: maps rank between the DTO and the creator spec / domain data, and handles the RANK ordering.
  • GraphQL: rank on the AppConfigAllowList node and CreateAppConfigAllowListInput (version-tagged with NEXT_RELEASE_VERSION), RANK in AppConfigAllowListOrderField; supergraph / v2 schema regenerated.
  • CLI: ./bai admin app-config-allow-list create --rank.
  • New update operation (rank only) — with rank on the allow list, re-ordering the merge needs a post-create adjustment (purge now cascades to fragments, so purge+recreate is not a substitute): AppConfigAllowListUpdaterSpec + service action/processor, PATCH /v2/app-config-allow-list/{id}, adminUpdateAppConfigAllowList GQL mutation, SDK admin_update, and ./bai admin app-config-allow-list update <id> --rank. The identity pair (config_name, scope_type) stays immutable.
  • The SDK create/get/search need no code change (they share the DTOs).

Verified against the live server: REST/GQL/CLI create with default (user=300) and explicit (--rank 250) ranks, rank ordering in both directions, and rank update via both the CLI (update --rank 275) and the GQL mutation.

📚 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-6702): move fragment rank to the allow list with scope defaults #12516feat(BA-6628): move fragment rank to the allow list with scope defaults (replaces feat(BA-6628): conditional-bulk repository primitives #12429)
  7. 👉 feat(BA-6701): expose allow-list rank on the v2 API surface #12517feat(BA-6701): expose allow-list rank on the v2 API surface ← you are here
  8. feat(BA-6704): cascade app config subtree deletion from the definition #12518feat(BA-6628): cascade fragment deletion from the allow list
  9. feat(BA-6626): app_config_fragment bulk repository layer #12426feat(BA-6626): app_config_fragment bulk repository layer
  10. feat(BA-6618): app_config_fragment bulk CRUD service layer #12401feat(BA-6618): AppConfigFragment bulk CRUD service layer
  11. feat(BA-6555): add app_config read service (merge engine + bulk resolve) #12359feat(BA-6555): app_config service layer (merge engine)
  12. feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update) #12377feat(BA-6556): AppConfig REST v2 API

🤖 Generated with Claude Code


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


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


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


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


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


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


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


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


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


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

@github-actions github-actions Bot added size:M 30~100 LoC area:docs Documentations comp:manager Related to Manager component comp:client Related to Client component comp:common Related to Common component comp:cli Related to CLI component labels Jul 3, 2026
jopemachine added a commit that referenced this pull request Jul 3, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank-api branch from 0f29c09 to 82c26ae Compare July 3, 2026 07:37
@github-actions github-actions Bot added size:XL 500~ LoC and removed size:M 30~100 LoC labels Jul 3, 2026
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank branch from 76f61f2 to 974923c Compare July 6, 2026 01:23
jopemachine added a commit that referenced this pull request Jul 6, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank-api branch from 4afa2cb to ec8f884 Compare July 6, 2026 01:30
@github-actions github-actions Bot added the require:db-migration Automatically set when alembic migrations are added or updated label Jul 6, 2026
@jopemachine jopemachine changed the base branch from feat/BA-6628-allow-list-rank to feat/BA-6628-scope-default-rank July 6, 2026 01:31
@jopemachine jopemachine changed the base branch from feat/BA-6628-scope-default-rank to feat/BA-6628-allow-list-rank July 6, 2026 01:49
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank branch from 974923c to 76f61f2 Compare July 6, 2026 01:49
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank-api branch from ec8f884 to 4afa2cb Compare July 6, 2026 01:49
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank branch from 76f61f2 to 367f886 Compare July 6, 2026 01:59
Base automatically changed from feat/BA-6628-allow-list-rank to main July 6, 2026 02:24
jopemachine and others added 2 commits July 6, 2026 11:26
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jopemachine and others added 2 commits July 6, 2026 11:26
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: octodog <mu001@lablup.com>
@jopemachine jopemachine force-pushed the feat/BA-6628-allow-list-rank-api branch from 4afa2cb to 2177b3f Compare July 6, 2026 02:27
@jopemachine jopemachine marked this pull request as ready for review July 6, 2026 02:34
@jopemachine jopemachine requested a review from a team as a code owner July 6, 2026 02:34
Copilot AI review requested due to automatic review settings July 6, 2026 02:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes the app config allow-list merge rank (introduced in the stacked #12516) across the v2 API surface, and adds a rank-only update operation so admins can re-order the merge post-create (needed because purge now cascades to fragments, making purge+recreate unsuitable). It's a pure API-layer change with no new schema/behavior beyond surfacing the field and the new operation. It fits into the larger BEP-1052 AppConfigFragment/AppConfig stack (epic BA-5781).

Changes:

  • Surface rank on CreateAppConfigAllowListInput (optional, scope-type default when omitted), AppConfigAllowListNode (required), and a new RANK order field, across DTO/adapter/GraphQL/OpenAPI.
  • Add a rank-only admin update path end-to-end: AppConfigAllowListUpdaterSpec, repository/db_source update, service action/processor, PATCH /v2/app-config-allow-list/{id}, adminUpdateAppConfigAllowList mutation, SDK admin_update, and ./bai admin app-config-allow-list update --rank.
  • Regenerate GraphQL/OpenAPI schema docs and add repository/service/GraphQL/client tests plus a changelog fragment.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
common/dto/manager/v2/app_config_allow_list/request.py Adds optional rank to create input and new UpdateAppConfigAllowListInput.
common/dto/manager/v2/app_config_allow_list/response.py Adds rank to node and new UpdateAppConfigAllowListPayload.
common/dto/manager/v2/app_config_allow_list/types.py Adds RANK order field.
manager/api/adapters/app_config_allow_list/adapter.py Maps rank in create/node, adds admin_update, handles RANK ordering.
manager/api/gql/app_config_allow_list/types.py Adds rank GQL field, RANK order enum, and update input/payload GQL types.
manager/api/gql/app_config_allow_list/resolver.py Adds admin_update_app_config_allow_list mutation.
manager/api/gql/app_config_allow_list/__init__.py, api/gql/schema.py Exports/wires the new mutation.
manager/api/rest/v2/app_config_allow_list/handler.py, registry.py Adds PATCH route + admin_update handler.
manager/repositories/app_config_allow_list/updaters.py New AppConfigAllowListUpdaterSpec (rank-only).
manager/repositories/app_config_allow_list/repository.py, db_source/db_source.py Adds update with not-found handling.
manager/services/app_config_allow_list/actions/update.py, service.py, processors.py New update action/service method/processor wiring.
client/v2/domains_v2/app_config_allow_list.py, client/cli/v2/admin/app_config_allow_list.py SDK admin_update and CLI --rank/update.
docs/manager/{rest,graphql}-reference/* Regenerated OpenAPI/GraphQL schema docs.
changes/12517.feature.md, .claude/skills/bai-cli/SKILL.md Changelog fragment and CLI entity reference update.
tests/unit/.../{repositories,services,api/gql,client_v2}/... Update/rank test coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jopemachine jopemachine changed the title feat(BA-6628): expose allow-list rank on the v2 API surface feat(BA-6701): expose allow-list rank on the v2 API surface Jul 6, 2026
@jopemachine jopemachine requested review from a team and HyeockJinKim July 6, 2026 04:43
@HyeockJinKim HyeockJinKim merged commit f00c172 into main Jul 6, 2026
38 checks passed
@HyeockJinKim HyeockJinKim deleted the feat/BA-6628-allow-list-rank-api branch July 6, 2026 06:03
jopemachine added a commit that referenced this pull request Jul 6, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jopemachine added a commit that referenced this pull request Jul 7, 2026
Co-Authored-By: Claude Fable 5 <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:cli Related to CLI component comp:client Related to Client component 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.

3 participants