Skip to content

Commit a121e29

Browse files
fix(qa): approver-resolution-matrix gains the platform_admin variant (main red since #34300) (#34435)
Clause-②: no Metadata-protocol: none No card: this is a main-red stopgap ordered by the objectstack PM seat (seat post #34366), not a card dispatch, so this PR closes no issue. ## 维护者速读 - 改了什么:平台测试清单 `approvals.approver-resolution-matrix` 补上 `platform_admin` 审批人类型这一行,条目修订号 9→10,枚举计数 10→11,并补一条历史记录。 - 为什么改:上一个合入的 PR 给 `ApproverType` 新增了 `platform_admin`,清单没跟上,`pnpm check:platform-checklist` 在 main 上报 VARIANTS STALE 退出 1,挡住所有 PR 的 Lint & Repo Gates。 - 风险与回滚:只改一个 QA 清单 JSON 文件,不发布任何包、不改运行时;回滚即撤这个 PR。 - 先看:`docs/qa/platform-checklist/areas/approvals.json` 中该条目的 `variants`、`enumSource.expect` 和最后一条 `history`。 - 两分钟验证:`pnpm check:platform-checklist`,预期退出 0,末行为 `check-platform-checklist: OK`。 - 需要你做的:无,席位落地。 ## What changes `ApproverType` (`packages/spec/src/automation/approval.zod.ts`) gained an 11th member, `platform_admin`, in commit 27c0b20. The checklist item `approvals.approver-resolution-matrix` pins that enum with `enumSource`, so the gate went red on `main` with `VARIANTS STALE`. This PR does what the gate prescribes, and nothing else: - `variants` gains `platform_admin`, described from the merged spec docblock only: the deployment's platform administrators, asked per caller and never enumerated; it takes no value; it is accepted only in a flow shipped by a code-registered package; and designers never offer it. - `revision` 9 to 10, with a `history` row saying what changed and that no clause changed. - `enumSource.expect` 10 to 11. - `source[0]` recounts the enum at 11 members (it said 10). One file, +10 / -4. `coverage.json` needs no change: the item is already mapped there and the gate does not ask for a row. ## Tests No code or test changed; the evidence is the gate itself. `skip-changeset`: the diff touches only `docs/qa/**`, which no package's `files[]` ships. ## Acceptance notes - The matrix is brought level with the enum only. No step or acceptance leg for `platform_admin` is authored in this revision, so `acceptance[0]`'s per-variant clause has no driven leg for the new variant yet. Authoring that leg is a `checklist-author` pass, outside a main-red stopgap. ## Verification Read at head 5c101f9 (base 2becfd6). <details> <summary>check:platform-checklist before (origin/main 2becfd6): exit 1</summary> ```text check-platform-checklist: 1 problem(s) ✗ approvals.json · approvals.approver-resolution-matrix: VARIANTS STALE — ApproverType in packages/spec/src/automation/approval.zod.ts now has 11 members but this item's variants were authored against 10. The platform grew/shrank this surface: revise the variants matrix, bump the item revision, and set enumSource.expect to 11. ELIFECYCLE Command failed with exit code 1. ``` </details> <details> <summary>check:platform-checklist after (5c101f9): exit 0</summary> ```text ✓ checklist-select self-test: 45 cases pass. ✓ qa-rollup --self-test: 82 assertions over 5 canonical shapes and 16 retired ones ✓ retest-owed --self-test: 57 assertions in 9 batteries. ✓ check-platform-checklist --self-test: 265 assertions — (long line elided) check-platform-checklist: OK — 16 areas, 433 items (425 active, 3 planned); coverage: 40 kinds mapped, 4 waived; traps: 19 documented, 19 in use; provisioning: 10 area recipes, 18 item references resolved (5 area-qualified), 10/10 recipes referenced ``` </details> <details> <summary>Derived gate families (dispatch-gates --commands, 17 families): all exit 0</summary> ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 (first run exit 3, PREREQUISITE NOT MET; re-run after building formula + lint) pnpm check:adr-anchors :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:platform-checklist :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 dispatch-gates --ran: 17 derived famil(ies) accounted for — 17 run, 0 NOT-MEASURED (a DERIVED zero — all 17 recorded an exit code and none of them is 3). ``` </details> Every family CI runs beyond these is read from this PR's check-runs, not re-run locally. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5pmEYLVFDcQ1Z1CS8H)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent fe19c97 commit a121e29

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎docs/qa/platform-checklist/areas/approvals.json‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@
15161516
"title": "Every approver type resolves the slate it declares — department includes all descendants, deprecated role warns and resolves, and a slate with no concrete person takes the declared onEmptyApprovers fork, never a fake approval",
15171517
"since": "v16",
15181518
"status": "active",
1519-
"revision": 9,
1519+
"revision": 10,
15201520
"priority": "P1",
15211521
"surface": "api",
15221522
"personas": ["dev admin (authors the scratch flows; org owner)", "Ada Auditor / Mei Phone (real logins since #9308 — directory rows the graph legs resolve to)"],
@@ -1533,8 +1533,8 @@
15331533
"sys_team is EMPTY on a stock boot (the seeded 'Team' rows are the demo showcase_team object, not the platform sys_team) — the team leg blocks(fixture) until the run creates a team and its members at runtime, through the organization team doors (fixtures.requires)"
15341534
]
15351535
},
1536-
"enumSource": { "file": "packages/spec/src/automation/approval.zod.ts", "export": "ApproverType", "expect": 10 },
1537-
"variants": ["manager", "position", "department (+ ALL descendant units)", "team", "field (multi-value fan-out)", "expression", "org_membership_level", "role (deprecated → org_membership_level: warn + resolve)", "user", "queue (the queue's members at node entry, ADR-0142 D6)"],
1536+
"enumSource": { "file": "packages/spec/src/automation/approval.zod.ts", "export": "ApproverType", "expect": 11 },
1537+
"variants": ["manager", "position", "department (+ ALL descendant units)", "team", "field (multi-value fan-out)", "expression", "org_membership_level", "role (deprecated → org_membership_level: warn + resolve)", "user", "queue (the queue's members at node entry, ADR-0142 D6)", "platform_admin (the deployment's platform administrators, asked per caller and never enumerated; takes no value; accepted only in a flow shipped by a code-registered package; never offered by a designer)"],
15381538
"steps": [
15391539
"boot the showcase on its own port and DB (dogfood §0); sign in as the dev admin; provision the directory rows — BU memberships over the data API, a team and its members through the organization team doors, a manager chain through set-user-manager (fixtures.requires names each door) — and record their ids",
15401540
"author + register the scratch flows through POST /api/v1/automation (fixtures.requires: a record trigger on a stock object, no writable package); per leg: trigger the flow by creating one record of its trigger object, GET /api/v1/approvals/requests?status=pending, GET /:id and read pending_approvers (and pending_approver_names); deregister the flow before the next leg",
@@ -1593,7 +1593,7 @@
15931593
],
15941594
"traps": ["seed-data-thin", "wrong-persona"],
15951595
"source": [
1596-
"packages/spec/src/automation/approval.zod.ts#ApproverType (ApproverType, 10 members incl. deprecated role + queue, live since ADR-0142 D6), (DEPRECATED_APPROVER_TYPES role→org_membership_level + canonicalApproverType), (NON_AUTHORABLE_APPROVER_TYPES), (onEmptyApprovers admin_rescue|fail|auto_approve|fallback, default admin_rescue), (fallbackApprovers — same shape as approvers, required iff 'fallback' and refused under any other policy: checkFallbackApproversPairing)",
1596+
"packages/spec/src/automation/approval.zod.ts#ApproverType (ApproverType, 11 members incl. deprecated role, queue (live since ADR-0142 D6) and platform_admin), (DEPRECATED_APPROVER_TYPES role→org_membership_level + canonicalApproverType), (NON_AUTHORABLE_APPROVER_TYPES), (onEmptyApprovers admin_rescue|fail|auto_approve|fallback, default admin_rescue), (fallbackApprovers — same shape as approvers, required iff 'fallback' and refused under any other policy: checkFallbackApproversPairing)",
15971597
"packages/plugins/plugin-approvals/src/approval-service.ts#expandApprovers (expandApprovers — per-spec group tagging; expression resolved outside the flat contract), (resolveApproverSpec — role warn, per-type branches, queue branch over the ownership-queue service and its expanded-to-nobody warn, ADR-0142 D6, #3807 expanded-to-nobody warn, literal type:value fallback), (expandBusinessUnitUsers — active-descendant BFS + membership union), (the empty-slate fork: 'empty' = no concrete person, NO_APPROVERS / autoApproved / fallbackApprovers re-expansion / admin_rescue warn)",
15981598
"packages/plugins/plugin-approvals/src/approval-service.ts#organizationAdministrators (#22824 — the slate an empty admin_rescue request opens on: the request organization's members holding its TENANT_ADMIN rung, the authority the override's tenant arm trusts; platform administrators are not added for being one; no administrator ⇒ the nameless request and its loud WARN), (emptySlateReason — the reason kept in __resolvedFrom and the routed-to-administrators timeline comment)",
15991599
"packages/plugins/plugin-approvals/src/admin-rescue-named-slate.integration.test.ts (the #22824 pin: the administrators' slate, each one's queue and bell, an ordinary approval rather than an override, the reason on the request, and the fallback / auto_approve / fail / no-administrator controls)",
@@ -1645,6 +1645,12 @@
16451645
"date": "2026-10-28",
16461646
"change": "steps[6], acceptance[5], variants[9] and the queue notes in source[0] and source[1] follow the queue approver to ADR-0142 D6 (PR #26337). A queue approver now expands to the queue's members at node entry through the ownership-queue service (approval-service.ts resolveApproverSpec, expandQueueUsers), and a queue that expands to nobody warns \"approver 'queue:VALUE' expanded to nobody\" and adds NO slot. The #3508 'not implemented' warn and the queue:VALUE literal slot are gone, so on an empty queue the admin_rescue request's abandoned slate is [] with the reason 'no approver on the node resolved to a person', not ['queue:VALUE']. The leg gains a staffed arm (planted sys_queue and sys_queue_member rows), steps[6] drops the designer note (queue is no longer xEnumDeprecated), and acceptance[5]'s oracle is the api; the clause changed meaning, so a prior verdict on it does not carry. Re-measured at base f2fdac5d: the service code read, and its service-layer pin run — approval-service.test.ts, describe 'a queue approver routes to the queue's members (ADR-0142 D6)', 4 passed; not driven live. Wave anchor #25807, slice C; lead from slice B's report 6457925443",
16471647
"ref": "#25807"
1648+
},
1649+
{
1650+
"revision": 10,
1651+
"date": "2026-11-16",
1652+
"change": "variants gains platform_admin and enumSource.expect goes from 10 to 11, after PR #34300 added that member to ApproverType: the deployment's platform administrators, asked per caller and never enumerated; it takes no value, is accepted only in a flow shipped by a code-registered package, and is never offered by a designer (NON_AUTHORABLE_APPROVER_TYPES). source[0] now counts 11 members. The matrix is brought level with the enum only: no step or acceptance leg for platform_admin is authored in this revision, so no clause changed. Read at base 2becfd61",
1653+
"ref": "#34300"
16481654
}
16491655
]
16501656
},

0 commit comments

Comments
 (0)