Skip to content

Commit 274560f

Browse files
jopemachineclaude
andcommitted
refactor(BA-5815): drop BEP refs from AppConfigPolicy GQL/REST surface
Strip `BEP-1052 §X` mentions from docstrings, comments, and inline notes across the GQL resolver / types and the REST v2 handler / registry. News fragment retains the BEP wording. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5f43932 commit 274560f

8 files changed

Lines changed: 18 additions & 20 deletions

File tree

src/ai/backend/manager/api/gql/app_config_policy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Queries
1919
"app_config_policy",
2020
"app_config_policies",
21-
# Bulk mutations (BEP-1052 §3 — bulk-only)
21+
# Bulk mutations (bulk-only)
2222
"admin_bulk_create_app_config_policies",
2323
"admin_bulk_update_app_config_policies",
2424
"admin_bulk_purge_app_config_policies",

src/ai/backend/manager/api/gql/app_config_policy/resolver/mutation.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""AppConfigPolicy GQL mutation resolvers (bulk-only, BEP-1052 §3)."""
1+
"""AppConfigPolicy GQL mutation resolvers (bulk-only)."""
22

33
from __future__ import annotations
44

@@ -40,8 +40,7 @@ async def admin_bulk_create_app_config_policies(
4040
BackendAIGQLMeta(
4141
added_version=NEXT_RELEASE_VERSION,
4242
description=(
43-
"Replace `scope_sources`; `config_name` is immutable (BEP-1052 §1). "
44-
"Admin only, per-item transaction."
43+
"Replace `scope_sources`; `config_name` is immutable. Admin only, per-item transaction."
4544
),
4645
)
4746
)
@@ -58,8 +57,7 @@ async def admin_bulk_update_app_config_policies(
5857
BackendAIGQLMeta(
5958
added_version=NEXT_RELEASE_VERSION,
6059
description=(
61-
"Rejects items whose `config_name` still has referencing fragment rows "
62-
"(BEP-1052 §1). Admin only."
60+
"Rejects items whose `config_name` still has referencing fragment rows. Admin only."
6361
),
6462
)
6563
)

src/ai/backend/manager/api/gql/app_config_policy/types/bulk_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""AppConfigPolicy bulk-mutation GQL input types (BEP-1052 §3)."""
1+
"""AppConfigPolicy bulk-mutation GQL input types."""
22

33
from __future__ import annotations
44

src/ai/backend/manager/api/gql/app_config_policy/types/bulk_payloads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""AppConfigPolicy bulk-mutation GQL payload types (BEP-1052 §3)."""
1+
"""AppConfigPolicy bulk-mutation GQL payload types."""
22

33
from __future__ import annotations
44

src/ai/backend/manager/api/gql/app_config_policy/types/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@gql_node_type(
2222
BackendAIGQLMeta(
2323
added_version=NEXT_RELEASE_VERSION,
24-
description="Scoped app-config policy (BEP-1052 §1).",
24+
description="Scoped app-config policy.",
2525
),
2626
name="AppConfigPolicy",
2727
)

src/ai/backend/manager/api/gql/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ class Mutation:
790790
admin_unblock_user = admin_unblock_user
791791
# IP allowlist self-service mutation
792792
update_my_allowed_client_ip = update_my_allowed_client_ip
793-
# App Config Policy - Bulk admin mutations (BEP-1052 §3 — bulk-only)
793+
# App Config Policy - Bulk admin mutations (bulk-only)
794794
admin_bulk_create_app_config_policies = admin_bulk_create_app_config_policies
795795
admin_bulk_update_app_config_policies = admin_bulk_update_app_config_policies
796796
admin_bulk_purge_app_config_policies = admin_bulk_purge_app_config_policies

src/ai/backend/manager/api/rest/v2/app_config_policy/handler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""REST v2 handler for the app-config policy domain (BEP-1052 §4).
1+
"""REST v2 handler for the app-config policy domain.
22
3-
Writes are **bulk-only** per BEP §3 — the single-item create / update /
4-
purge endpoints were removed in favour of `/bulk-create`,
5-
`/bulk-update`, `/bulk-purge` (admin-only).
3+
Writes are **bulk-only** — the single-item create / update / purge
4+
endpoints were removed in favour of `/bulk-create`, `/bulk-update`,
5+
`/bulk-purge` (admin-only).
66
"""
77

88
from __future__ import annotations
@@ -51,7 +51,7 @@ async def search(
5151
result = await self._adapter.search(body.parsed)
5252
return APIResponse.build(status_code=HTTPStatus.OK, response_model=result)
5353

54-
# ── Admin bulk writes (BEP-1052 §3) ──────────────────────────
54+
# ── Admin bulk writes ────────────────────────────────────────
5555

5656
async def admin_bulk_create(
5757
self,

src/ai/backend/manager/api/rest/v2/app_config_policy/registry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Route registration for v2 app-config policy endpoints (BEP-1052 §4)."""
1+
"""Route registration for v2 app-config policy endpoints."""
22

33
from __future__ import annotations
44

@@ -17,18 +17,18 @@ def register_v2_app_config_policy_routes(
1717
handler: V2AppConfigPolicyHandler,
1818
route_deps: RouteDeps,
1919
) -> RouteRegistry:
20-
"""Register all v2 app-config policy routes (BEP-1052 §4).
20+
"""Register all v2 app-config policy routes.
2121
2222
Reads (`GET /{config_name}`, `POST /search`) are available to any
23-
authenticated user. Writes are bulk-only and admin-only per BEP
24-
§3 — `/bulk-create`, `/bulk-update`, `/bulk-purge`.
23+
authenticated user. Writes are bulk-only and admin-only
24+
`/bulk-create`, `/bulk-update`, `/bulk-purge`.
2525
"""
2626
reg = RouteRegistry.create("app-config-policies", route_deps.cors_options)
2727

2828
# Reads
2929
reg.add("POST", "/search", handler.search, middlewares=[auth_required])
3030
reg.add("GET", "/{config_name}", handler.get, middlewares=[auth_required])
31-
# Admin bulk writes (BEP-1052 §3)
31+
# Admin bulk writes
3232
reg.add("POST", "/bulk-create", handler.admin_bulk_create, middlewares=[superadmin_required])
3333
reg.add("POST", "/bulk-update", handler.admin_bulk_update, middlewares=[superadmin_required])
3434
reg.add("POST", "/bulk-purge", handler.admin_bulk_purge, middlewares=[superadmin_required])

0 commit comments

Comments
 (0)