Skip to content

docs(approvals): descriptions name the four-leaf viewer block; the automation skill says who admin_rescue opens on - #35066

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-34839-approve-override-descriptions
Nov 18, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-34839-approve-override-descriptions

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34839

Clause-②: no
Metadata-protocol: none
Served-tier: CONTRACT_REVIEW_TIER

维护者速读

  • 改了什么:只改文字和一处测试整理,不改运行时行为。① 三处代码注释、三条 QA 清单条目改成和服务端一致:审批请求的 viewer 块有四个字段(can_act、is_submitter、can_override、can_override_approve),「批准」读 can_override_approve,「驳回 / 改派 / 撤回」仍读 can_override。② 对外发布的自动化技能里 onEmptyApprovers 一行,原来说 admin_rescue 下「只有特权管理员能通过改派处理」,现在改成运行时的真实行为:请求直接落到本组织管理员的待办里。③ 一条测试用例把替换掉的 find 在 finally 里放回去。
  • 为什么改:fix(plugin-approvals)!: the administrator override never approves a request its actor submitted #34755 合并后服务端多了 can_override_approve,这些描述还停在三个字段;技能那一句会让照着技能搭审批的 AI 向用户讲错 admin_rescue 的行为。
  • 风险与回滚:没有行为变化;技能文件比原来短 9 字节,token 棘轮上限没动。回滚就是还原这一个 PR。
  • 先看:skills/objectstack-automation/references/state-machines-and-approvals.md 的 onEmptyApprovers 行(对外发布,唯一受治理的文件);docs/qa/platform-checklist/areas/approvals.json 里 approvals.record-page-decisions 的 steps[9] 和 acceptance[4](期望从「菜单里有 Override Approve」改成「没有 Approve」,依据是源码,没有在浏览器里重跑);ui/packages/app-shell/src/utils/approvalOverride.ts 的文件头注释。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期看到 state-machines-and-approvals.md is 5913 tokens (ceiling 5916; headroom 3) 且整体通过。
  • 需要你做的:审阅后合并本 PR,或给出批准评审后由席位落地。落地档位是 Tier H(人合):check-governed-merges --branch 的实测输出是 landing tier: H(人合) — the maintainer's hand, or an authorized APPROVED review (GOVERNED_APPROVERS) and then the owning seat lands it。低风险技能通道用不上,原因见 Acceptance notes 第 1 条。

What changes

No behaviour change. Seven files.

The served block, as read from the runtime. ApprovalService.attachViewers (packages/plugins/plugin-approvals/src/approval-service.ts) sets four leaves on every request it serves: can_act, is_submitter, can_override and can_override_approve. The object declares the same four under attachedOnRead (sys-approval-request.object.ts). can_override_approve is can_override minus an approval of the viewer's own request. Of the nine declared actions, approval_approve reads can_override_approve in its override arm; approval_reject, approval_reassign and approval_recall read can_override.

Descriptions brought to that reading (items 1 to 4):

  • packages/spec/src/data/object.zod.ts: the docblock over the attachedOnRead schema names the four leaves and which action reads which override leaf. Comment only; the docblock sits on a non-exported const.
  • packages/platform-objects/src/apps/account.app.ts: the comment over the Approvals nav entry said all eight actions gate on can_act || can_override. It now says every action gates on a leaf of the served block, and names the four.
  • ui/packages/app-shell/src/utils/approvalOverride.ts: the module docblock, the ViewerBlockLike docblock and the actionAdmittedByOverride docblock say that the override test is a substring match on can_override, which both leaf names carry. No code line changes.
  • docs/qa/platform-checklist/areas/approvals.json: three items, each with its revision bumped and a history entry dated 2026-11-18, ref Approvals viewer-block descriptions: name can_override_approve (follow-up to #34755) #34839.
    • approvals.inbox-metadata-actions (9 to 10): steps[3], steps[4] and acceptance[2].verify name the four leaves.
    • approvals.viewer-gating-submitter-side (7 to 8): acceptance[0].verify no longer says Approve is visible on can_override.
    • approvals.record-page-decisions (8 to 9): steps[9], acceptance[4].verify and source[4]. The admin of this item submitted the request, so off the slate the row reads can_override true and can_override_approve false, and the folded override menu lists Override Reject, Override Reassign and the plain Recall, and no Approve. The text listed Override Approve.

The skill row (item 5). skills/objectstack-automation/references/state-machines-and-approvals.md, the onEmptyApprovers row: "request opens, only a privileged admin can act via Reassign" becomes "request opens on the organization's administrators". The rest of the row is unchanged. This matches content/docs/automation/approvals.mdx (the manager callout, the onEmptyApprovers paragraph and the section "When a slate names no one") and the runtime: the admin_rescue branch of openNodeRequest resolves organizationAdministrators and opens the request on them as ordinary approvers.

Test hygiene (item 6). approval-override-audit.test.ts: the letter-case case keeps the double's original find and puts it back in a finally block.

Changeset. .changeset/34839-approvals-viewer-block-descriptions.md, patch for @objectstack/skills and @objectstack/platform-objects.

Tests

Head 77dbe40f6e.

  • pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2 src/approval-override-audit.test.ts: 20 of 20 passed on the base copy of the file (367e324eeb), and 20 of 20 on the edited copy.
  • pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2: Test Files 122 passed (122), Tests 1741 passed (1741).
  • pnpm --filter @objectstack/plugin-approvals typecheck: exit 0.
  • pnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date, against a dist built from this branch.
  • No ablation: no tested behaviour changed.

Acceptance notes

  1. Low-risk skills arm. check-governed-merges --branch prints low-risk skills arm: NOT MEASURED — no reading of the pull request was handed in and answers Tier H, fail closed. Read against the arm's own allowlist in the same script (LOW_RISK_RIDER_PATTERNS, LOW_RISK_ARM_FILE_PATTERNS), the arm cannot apply to this PR: every changed path has to lie under a hit catalog row or be a changeset or docs Markdown, and five of the seven paths are neither (packages/spec, packages/platform-objects, packages/plugins/plugin-approvals, ui/packages/app-shell, and the checklist JSON under docs/). The changeset also releases @objectstack/platform-objects, and the arm admits nothing but a skills patch.
  2. Item 6, premise. The double in that describe block is already rebuilt before every case (beforeEach calls makeFakeEngine()), so the replaced find could not reach another case. The finally makes the case self-contained; it fixes no observed leak.
  3. Item 7, no pin added. A live MySQL lane exists, Temporal Conformance (live PG + MySQL) in ci.yml, and it runs the driver-sql suite only. No lane runs ApprovalService on a store whose collation folds letter case: plugin-approvals' integration tests use driver-sql on SQLite, which compares text case-exactly. A pin for the email-target rule would need a new lane, so none was added.
  4. Checklist item approvals.record-page-decisions. The new expectation (no Approve in the override menu for the admin who submitted the request) is read from source: attachViewers, the approval_approve predicate, and DeclaredActionsBar drawing each action by its own declared visible. It was not re-run in a browser.
  5. What ships. Built and searched: the packages/spec docblock does not reach packages/spec/dist (0 files carry the new sentence; control attachedOnRead, 12 files). The platform-objects comment does reach packages/platform-objects/dist (4 files), so the changeset names that package. @object-ui/app-shell is private.
  6. Token ratchet. The reference file is priced: scripts/check-skills-token-ratchet.mjs holds a row for it at 5916, and it sat at 5916 with headroom 0. The edit shortens the file from 23661 to 23652 bytes (5913 tokens), so the row is not touched. The whole published bundle moves by the same 9 bytes; no SKILL.md changes.
  7. Open PR docs(skills): teach the fault edge on a write after an approval decision and the RESUME_FAILED refusal members #35002 edits another section of the same skill file. overlap-check merges it cleanly with this branch.
  8. Body shape. This body opens with the attribution comment and ends with the signed trailer, as the dispatch order and the relay's PR-body rule ask. The developer agent file says a body carries no HTML comment of the agent's own writing; the two rules disagree and this PR follows the dispatch order.

Verification

Derived gates (dispatch-gates --commands, then --ran)

dispatch-gates --commands derived 113 families from the tree at 77dbe40f6e. Each was run with its exit code captured before any pipe.

  • 110 exited 0.
  • pnpm check:dual-build-cjs-loads: exit 3, PREREQUISITE NOT MET (needs a full workspace build). NOT MEASURED locally.
  • pnpm check:i18n: exit 3, PREREQUISITE NOT MET (the workspace CLI is not built). NOT MEASURED locally.
  • pnpm --dir ui exec vitest run scripts/: exit 1. Test Files 1 failed, 170 passed, 2 skipped. The one failure, unit-registry-absence-collision.test.ts, could not resolve @objectstack/client, which was not built in this worktree. After building that package's closure the file was re-run alone: 15 of 15 passed, exit 0. The full family was not re-run.
  • dispatch-gates --ran: 113 derived famil(ies) accounted for — 111 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3), exit 0.

Outside the derived list:

Not run locally, left to CI
  • The full test suites of @objectstack/spec, @objectstack/platform-objects and @object-ui/app-shell: their diffs are comments only.
  • test:repo, the repo-wide lint run and the full dogfood battery (the title carries no ! and the declaration carries no narrowing arm).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (a comment changed, no schema)
  • 2. Every name I added uses the casing for its kind. (no name added)
  • 3. No formatter ran; pnpm lint passes. (the repo-wide lint run is CI's)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (check:generated reports all 14 up to date)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…ill says who admin_rescue opens on

The served approval `viewer` block carries `can_act`, `is_submitter`,
`can_override` and `can_override_approve`. Approve's override arm reads
`can_override_approve`; Reject, Reassign and Recall read `can_override`.
Three in-code descriptions and three platform-checklist items still named
three leaves or tied Approve to `can_override`.

The automation skill's `onEmptyApprovers` row said that under
`admin_rescue` only a privileged admin can act via Reassign. The runtime
opens the request on the organization's administrators.

The letter-case case in approval-override-audit.test.ts puts the double's
`find` back in a finally block.

No behaviour change.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
…he edited comment

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:data tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/spec/src/data/object.zod.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 2 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/src/data/object.zod.ts) — pages documenting those are invisible to this run
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json c21945d227b2a5e680af14635865f891108e10a8 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB

L1 review (#34839) · 2026-11-18T01:27Z

L1: ACCEPT
Head-sha: 77dbe40

I ran check-governed-merges --branch at this head. It reads tier H: one path is under skills/**, and 124 changed lines is under the 3000-line threshold. The low-risk skills arm reads NOT MEASURED, and it cannot apply here, because six of the seven paths are off the arm's allowlist. Landing goes to the seat's at-tier review and then to the governed approver. This verdict does not ready the PR.

Must-fix

None.

Should-fix

None.

What I checked

  • Shape and scope.
    • Fixes #34839 is present. Clause-② no and Metadata-protocol none match claim 6964781167.
    • All seven files are on the claim's file surface. The ratchet script is untouched, as the claim allows when the edit pays for itself.
    • Both commits are text only, plus the test edit the card asks for in item 6.
  • The served block, read from the runtime at this head.
    • approval-service.ts#attachViewers sets four leaves.
    • can_override_approve is computed as canOverride && !overrideApprovesOwnRequest(row, person). So the server never serves it true beside a false can_override, as the new approvalOverride.ts text says.
    • The predicates in sys-approval-request.object.ts match the text in all four places:
      • approval_approve ORs in can_override_approve.
      • approval_reject, approval_reassign and approval_recall OR in can_override.
      • send_back and request_info read can_act alone.
      • remind and resubmit read is_submitter alone.
      • comment reads can_act or a pending is_submitter.
    • So the new account.app.ts sentence, "every one is gated on a leaf of the served record.viewer block", is true. The old sentence, "all eight … can_act || can_override", was false.
  • approvalOverride.ts. actionAdmittedByOverride is predicateSource(visible).includes('can_override'). That substring catches both leaf names, as the docblock now says. No code line changed.
  • Checklist (item 4).
    • Three items each carry a revision bump and a dated history entry, ref Approvals viewer-block descriptions: name can_override_approve (follow-up to #34755) #34839.
    • approvals.record-page-decisions steps[9] and acceptance[4]: the item's admin submitted the request. Earlier steps say this already ("Reply … the admin holds it as the submitter"), and so does revision 5. So off the slate the admin reads can_override_approve false, and the approval_approve predicate hides Approve. Dropping "Override Approve" from the folded menu follows from source. The PR body and the dev report both say this was not re-run in a browser, and both name the run it is owed.
    • I grepped the tree at this head for text the PR could leave false.
      • approvals.inbox-metadata-actions acceptance[1] still names "Override Approve". That is correct: it is the dev admin on another submitter's request, where can_override_approve is true.
      • content/docs/automation/approvals.mdx:945-967 already names all four leaves.
      • The other hits are history entries and CHANGELOGs, which stay as they were.
  • The skill row (item 5). openNodeRequest's admin_rescue branch opens the request on organizationAdministrators, which are the TENANT_ADMIN rung holders of the request's organization. "Opens on the organization's administrators" is accurate. The file goes from 23661 to 23652 bytes, the dev measured 5913 tokens against a 5916 ceiling, and the row is unchanged.
  • Item 6. Both describe blocks rebuild the double in beforeEach (makeFakeEngine(), lines 106 and 242). The body's note that the finally fixes no observed leak is correct. The restore is harmless.
  • Item 7. The Temporal Conformance (live PG + MySQL) job builds and runs @objectstack/driver-sql only. With no lane that runs ApprovalService on a case-folding store, no pin is correct, and it is reported rather than invented.
  • Changeset.
    • It covers @objectstack/skills and @objectstack/platform-objects at patch, the right level for Metadata-protocol none.
    • The spec docblock sits on a non-exported const. The dev measured that it does not reach dist, which I did not re-run.
    • @object-ui/app-shell is "private": true. plugin-approvals moved only a test file.
  • Tests. The body gives real commands with counts: 1741 of 1741 in plugin-approvals, the audit file at 20/20 both before and after, typecheck, and check:generated. It names the two NOT MEASURED families and the one ui scripts/ failure with its cause, and it does not round them up to a pass.
  • CI on this head, read at review time. Nothing is red.
    • Concluded green: PR-body guards, Check Changeset, Check PR Size, Governed Surface Queue Guard, Check Documentation Links, Flag docs affected by code changes, Spec property liveness, Type Check · source gates, Dogfood Regression Gate, and the plan jobs.
    • Still running: Test Core 1-10, Build Core, Build UI Deps, Live E2E UI, and the remaining Lint and Type Check families.
    • Landing waits for these to go green.

Notes (nit-level, may stay open)

  • N1. In approvalOverride.ts:38-39, the quoted shape … can_act == true || … can_override == true is said to be what "Reject, Reassign and Recall read". Recall's first arm is the pending-or-returned is_submitter term, not can_act, so the quote fits Reject and Reassign only. The test reads only the can_override substring, so the conclusion stands.
  • N2. The skill row leaves out the rescue path's own fallback. With no organization, or when the administrators read fails, the request opens on the slate that names no one, and only the override acts on it (organizationAdministrators docblock). That is fine for a one-line table row. approvals.mdx carries the detail.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head 77dbe40f6e18a56616c6a325c2b30288f6454cb0 · 2026-11-18T01:29Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 77dbe40f6e18a56616c6a325c2b30288f6454cb0
Local-runs: none
Scope: packages/spec/src/data/object.zod.ts, skills/objectstack-automation/references/state-machines-and-approvals.md + packages/platform-objects/src/apps/account.app.ts, ui/packages/app-shell/src/utils/approvalOverride.ts, docs/qa/platform-checklist/areas/approvals.json, packages/plugins/plugin-approvals/src/approval-override-audit.test.ts
Security-touching: yes

Inputs read: card #34839 body and its three comments (triage 6949955415, claim 6964781167, os-dev-report 6966130282); PR #35066 body, its seven-file list, the net diff origin/main...77dbe40f6e (merge base 367e324eeb, 84 insertions, 40 deletions); the check-runs on the head. Code outside the diff was read at the head, not reviewed.

① Derived judgments

  • Accept-set: no change. No schema line, no .describe() string, no predicate and no runtime statement moves. The object.zod.ts hunk is the jsdoc over the non-exported ATTACHED_ON_READ_NAME / attachedOnRead schema const (:2879-2890). Right.
  • Generated surface: nothing owed. No .describe() moved, and no file under content/docs/references/ or the spec's generated output carries the edited sentence (searched at the head). Spec property liveness is success on the head. Right.
  • Public surface: one published sentence changes, the onEmptyApprovers row of the automation skill (:375). The comment in account.app.ts ships in @objectstack/platform-objects build output as text only. @object-ui/app-shell is private. Right.
  • Checklist: three items re-pointed, each with a revision bump and a dated history entry (inbox-metadata-actions 9 to 10, viewer-gating-submitter-side 7 to 8, record-page-decisions 8 to 9). One of them changes an expected outcome (see ④); the other two only name the leaves. Right.
  • Test file: one case restructured, assertions unchanged (see ④). Right.

② Semver level

Changeset .changeset/34839-approvals-viewer-block-descriptions.md: patch for @objectstack/skills and @objectstack/platform-objects. Patch matches what publishes: a corrected skill sentence and a comment. @objectstack/spec is not named, which is right for a jsdoc on a non-exported const with no generated artifact moved. Check Changeset is success on the head.

Clause-②: no — the PR body and the changeset both carry it, and it holds: nothing a consumer could author or call is narrowed, widened or re-typed.

③ Boundary flags

  • open_questions: empty in the os-dev-report. Nothing to answer.
  • Dev flag, card item 6 premise partly false: confirmed. Both describe blocks rebuild the double in beforeEach (approval-override-audit.test.ts :106-107, :242-243), so the replaced find could not leak. The finally is harmless and is what the card asked for.
  • Dev flag, card item 7 no pin added: accepted as reported. The card conditions the pin on a case-folding lane that runs this service; the dev reports none does. Not verified beyond the card and PR text; it stays an out-of-scope note, not a finding on this diff.
  • Dev flag, record-page-decisions expectation read from source and not run in a browser: answered in ④, true by code. The browser run stays owed the next time the item is executed, as the history entry itself says.
  • Dev flag, PR-body HTML comment rule conflict: process question for the seat, outside this record.
  • SQL push-down: not applicable. The diff adds no query, no id materialisation and no in-app join.
  • Check-runs on the head when this record was written: 23 success, 10 skipped, 34 in progress, none failed or cancelled. Completed green includes Governed Surface Queue Guard, Check Changeset, Spec property liveness, Lint · docs & code guards, Lint · ESLint, Type Check · source gates, Check Documentation Links, PR-body guards. Still running: every Test Core and Test UI shard, Build Core, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Lint · PM dispatch-gates, Lint · scoped · slot lookup & corpus, Build & E2E UI, Live E2E UI, Lint UI, Type Check UI. This verdict is the design judgment; it does not stand in for those gates, and the seat reads their conclusions before it lands anything.

④ Design judgment

Read against the head tree. S = packages/plugins/plugin-approvals/src/approval-service.ts, O = packages/plugins/plugin-approvals/src/sys-approval-request.object.ts.

The facts every changed sentence rests on:

  • Four leaves served: attachViewers sets can_act, is_submitter, can_override, can_override_approve (S:10888-10893). The object declares the same four under attachedOnRead (O:543).
  • can_override_approve is canOverride && !overrideApprovesOwnRequest(row, person) (S:10892); overrideApprovesOwnRequest is the submitter test over the context's recorded actor (S:1270-1272). So it is never true beside a false can_override.
  • The submitter exclusion at the door: decideNode refuses decision === 'approve' && viaOverride && overrideApprovesOwnRequest(raw, decider) with FORBIDDEN (S:5754-5759), the same predicate as the flag.
  • Predicates: approval_approve ORs in can_override_approve (O:659-661); approval_reject (O:705-707), approval_reassign (O:734-736) and approval_recall (O:853-856) OR in can_override; approval_send_back and approval_request_info read can_act alone (O:765, O:786); approval_remind and approval_resubmit read is_submitter (O:813, O:880); approval_comment reads can_act or is_submitter (O:933-936). All nine gate on a leaf of record.viewer.

packages/spec/src/data/object.zod.ts (hits). The docblock names the four leaves and says predicates gate on can_act for an approver's actions, is_submitter for the submitter's, and an override arm reading can_override_approve on Approve and can_override on Reject, Reassign and Recall. Each clause is true against the lines above. It implements the maintainer ruling of 2026-11-17 (option B) as the first consumer, plugin-approvals, carries it. Holds.

skills/objectstack-automation/references/state-machines-and-approvals.md (hits). admin_rescue now reads "request opens on the organization's administrators; never waves through, never kills the run". True: the empty-slate branch resolves organizationAdministrators(requestOrg) and adopts them as the slate, as ordinary user approvers in the ordinary inbox (S:5176-5240; resolver at S:4275, tenant-admin rung of the request's organization, platform administrators not added). The removed text ("only a privileged admin can act via Reassign") was false after #22824. The new wording matches content/docs/automation/approvals.mdx :118-119, :304-305 and :341-342, which is what the card told it to align with. An authoring agent following the row now tells the user the right thing, which is the card's acceptance scenario. The rest of the row is unchanged, and the neighbouring excludeSubmitter row stays consistent with it. Holds.

packages/platform-objects/src/apps/account.app.ts (implementing). "Every one is gated on a leaf of the served record.viewer block" is true for all nine declared actions. The old text ("all eight ... can_act || can_override") was wrong on both the count and the gate. The override-arm clause matches O. Holds.

ui/packages/app-shell/src/utils/approvalOverride.ts (implementing). Comment only, no code line moved. Module docblock: two override leaves, which action reads which, the second never true beside a false first, and "the test is a substring match on can_override, which both leaf names carry" — the code is predicateSource(...).includes('can_override') (:122-125), so it is exact. ViewerBlockLike docblock: the interface declares three leaves and the module reads the fourth only through Approve's predicate text; true, no code reads viewer.can_override_approve. actionAdmittedByOverride docblock: true. Tried to break it: an override-only viewer who submitted the request has can_override true and can_override_approve false; isOverrideOnlyViewer is true and Approve matches the substring, but Approve's own visible is false, so it is never drawn and never mislabelled. Holds.

docs/qa/platform-checklist/areas/approvals.json (implementing). The two leaf-naming items are true against O and S. The re-pointed expectation in approvals.record-page-decisions steps[9] and acceptance[4]: the item's admin is the request's submitter (the unchanged text has the admin hold Reply and Recall as the submitter). Off the slate that viewer is served can_act false, can_override true, can_override_approve false (S:10888-10893). DeclaredActionsBar folds the levers that actionAdmittedByOverride matches for an override-only viewer (:965-966) and each folded lever keeps its own visible verdict (:141-147, :228-232), so Approve, whose override arm reads the false leaf, is absent; Override Reject, Override Reassign and the plain Recall remain. The new expectation is true by code, and the old one ("lists Override Approve") would now fail against a correct build. The server refuses the forged call too (S:5754-5759). Source[4] reads can_override_approve correctly. Holds; the history entries say plainly it was not re-run.

packages/plugins/plugin-approvals/src/approval-override-audit.test.ts (implementing). The case keeps the double's own find reference, runs the same four assertions with the same regexes and the same expected slates inside try, and puts the reference back in finally. No assertion is removed, loosened or made conditional; a failing expect still throws through the finally. Not a weakening. Holds.

No must-fix, no should-fix.

Nits:

  • N1 (nit) — the skill row no longer says what happens when the organization has no administrator to open on (no organization, or the only administrator is the submitter): the request then keeps the slate that names no one and only the administrator override moves it (S:4268-4272, S:5199-5220; docs section "When a slate names no one", approvals.mdx :547 onward). The card ruled the wording to match the docs' one-line form, and the file sits 3 tokens under its ratchet ceiling, so this is a follow-up at most, not a defect of this change.
  • N2 (nit) — packages/platform-objects/src/apps/account-approvals-nav.test.ts :10 still carries the old can_act || can_override comment that this PR corrected in account.app.ts. Outside the diff and outside the card's list; a follow-up, not owed here.

Security-touching is yes and meant: the skill hunk teaches who may decide an approval request with an empty slate, and the other hunks describe the administrator override and the rule that it never approves its actor's own request. The seat adopting this record adds the security label.

Implemented-by: claude/issue-34839-approve-override-descriptions
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

席位记录 · 2026-11-18T01:32Z

Head-sha: 77dbe40f6e18a56616c6a325c2b30288f6454cb0

维护者速读(终稿)

  • 改了什么:审批记录上的「查看者四个判断」(能处理、是提交人、能越权、能越权批准)的说明文字写清楚 can_override_approve:管理员越权时不能批准自己提交的申请。同步改了自动化技能里「无审批人时由组织管理员接手」那一行、审批测试清单里一条预期(提交申请的管理员在越权菜单里看不到「批准」),以及一个测试替身的还原写法。只改文字和测试,124 行。
  • 为什么改:Approvals viewer-block descriptions: name can_override_approve (follow-up to #34755) #34839。
  • 风险与回滚:不改运行时行为。但它在教谁能处理无人审批的申请、越权不能批自己的规则,席位评审判 Security-touching: yes,需要你审批。清单那条预期是按代码改的,还没在浏览器里实测(PR 正文已声明)。回滚即 revert。
  • 先看:skills/objectstack-automation/references/state-machines-and-approvals.md 改动的那一行。
  • 需要你做的:Tier H,请在这个 head 上审批,批准后由 o3-C 在 CI 全绿时落地。

席位意见:建议批准。每句说明都对照了审批服务代码(approval-service.ts:10888-10893、:5754-5759、:5176-5240)。

席位核对

  • 形态:Fixes #34839;7 个文件,124 行。
  • 评审:L1-a ACCEPT 6966200070;席位评审(fable,CONTRACT_REVIEW_TIER)PASS 6966273412,没有 must-fix 或 should-fix。
  • 门禁:评审时 34 个 check-run 仍在跑、0 failed;落地前须全部完成且全绿。
  • nit:技能行没写「没有可接手的管理员」(无组织,或唯一管理员就是提交人)时只能靠越权推进;文件离 token 上限只剩 3。account-approvals-nav.test.ts:10 还留着旧注释。
  • 落地条款:Tier H,批准前 ⛔ 不 ready、不入队、不开自动合并。head 如果再变,补 L1 和席位评审 delta。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 18, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 18, 2026 02:01
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit b85dff0 Nov 18, 2026
76 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-34839-approve-override-descriptions branch November 18, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:data size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Approvals viewer-block descriptions: name can_override_approve (follow-up to #34755)

3 participants