Skip to content

fix(approvals): a step that resolves to nobody tells the submitter and names the remedy; the platform administrators' slot reads by a label - #35661

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/area-a4W-35316
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/area-a4W-35316

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #35316
Fixes #34410
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:一人组织里提交的审批(工时、报销等)没人能批时,提交人会收到通知,请求时间线也写明「暂时没有其他人能审批,需要组织管理员添加一名能审批的成员」;提交人自己点批准被拒时,拒绝文案也给出同样的办法;平台管理员审批位在列表里显示为「平台管理员」而不是一串内部地址。
  • 为什么做:审批流程里「审批人解析为空」的问题(一人组织的工时审批卡住,和平台级审批在没有平台管理员的部署上卡住)。
  • 出错会怎样:最坏是提交人多收到一条通知或提示文字不准确,审批规则本身不变(提交人仍不能批自己的请求),可直接撤回。
  • 要你做什么:无。

What changes

#35316 — a request no one can approve tells its submitter and names the remedy. When an approval step resolves to no one and no administrator other than the submitter can take it (the HotCRM one-person organization with excludeSubmitter: true), the request still opens on the slate that names no one (onEmptyApprovers semantics untouched), and now:

  • writes a system note on its timeline (no-approver-note.ts, snapshot key __noApproverNote, overlaid in the reader's language by localizeRoutingNotes like its two sibling notes): "No one else can approve this request yet. An organization administrator must add a member who can approve it, then reassign the request to them." When the slate kept an unstaffed literal, it names it: "…must add a member who holds position 'legal'; that member can then decide it.";
  • tells the submitter under the existing approval.comment topic (no new topic; the note is a comment on the request's thread), keyed text approvalNoApproverTitle / the note's sentence, no actor;
  • the two refusals of the submitter's own approval (the excludeSubmitter check and the option-B override refusal) end with that same remedy when no one but the submitter is on the slate, and keep their current text when someone is;
  • approvalSubmitterExcludedNoOne no longer promises "only a privileged override can decide it": it reads "…because this step sets excludeSubmitter, and no one else could take it." The ruling stands: no self-approval, not even through the override.

#34410 — the platform administrators' slot. platform_admin:* is labelled "Platform administrators": in English on the stored pending_approver_labels, and in the reader's language in the approvals door's pending_approver_names. For the warning half I chose the guide arm: one sentence in content/docs/automation/approvals.mdx (Routing to the platform administrators, "Nobody is told"). A runtime warning would need the population question "does anyone hold platform standing", which hasPlatformAdminStanding (core) is deliberately not built to answer and whose only implementation lives in plugin-auth; a second derivation here is what that predicate's header forbids.

All new sentences ship in the eleven locales the package ships. The guide's "When a slate names no one" paragraph is updated to say the submitter is told.

Evals

No eval surface: this is server copy and notification behaviour, pinned by the tests below.

Verification

Two-minute check: pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2 src/exclude-submitter.integration.test.ts — expect the describe "a request no one but its submitter can decide names the remedy" (3 tests) green.

Files to read first, by risk:

  1. packages/plugins/plugin-approvals/src/approval-service.ts — the decideNode hunk (noOneElse / noApproverRemedy): the only change on a refusal path; the ruled refusals still throw before any write.
  2. packages/plugins/plugin-approvals/src/no-approver-note.ts — namesNoOneBut decides which text a refusal shows.
  3. packages/plugins/plugin-approvals/src/translations/messages.ts — eleven locales.
Tests
  • exclude-submitter.integration.test.ts: new describe — the no-one slate writes the note, sends one approval.comment notice to the submitter only, and the excludeSubmitter refusal ends with the remedy; the override refusal names position 'legal' when only that literal is left; CONTROL: with another approver on the slate both refusals keep their old text and no notice is sent. The existing solo-organization pin is updated to the corrected note.
  • platform-admin-approver-34218.test.ts: the slot's stored label and the door's pending_approver_names read "Platform administrators".
  • Two fixtures updated as consequences (not loosened): approval-requested-notification.integration.test.ts now expects the submitter's approval.comment notice on a slate of literals with no administrator (still no approval.requested); approval-service.test.ts picks the holder's comment from a timeline that now also carries the system note.
  • At head a3f98b15: pnpm --filter @objectstack/plugin-approvals build && … typecheck && … test under the verify lock: VERDICT command-exit 0, Test Files 124 passed (124), Tests 1770 passed (1770); test-typecheck ledger held. Diff: 11 files, +335 / -36.
Clause-② measurement

Built dist/index.d.ts / index.d.mts at head vs. the same package built from the base source (eca20d22): the only difference is one JSDoc line on the private enrichRows docblock. No export, key or topic was added; ApprovalsTranslations is typed TranslationBundle, so the new message ids do not reach the declaration closure.

Acceptance notes

  • Ruling consistency: the 2026-11-17 option-B ruling holds (both refusals still throw for the submitter); ADR-0044 D1 (returned status) untouched; ADR-0068 D2 (platform_admin is a built-in identity, no new boolean) untouched — only a display label; ADR-0055 §1/§2 (master-detail) and ADR-0061 D2 (record search) govern nothing this diff touches; ADR-0027 has no §14 on this tree (sections 1–9; §6 governs publish approvals, not runtime slates).
  • A submitter who is not an administrator and holds no slot still gets the generic "not a pending approver" refusal; only the two refusals the card names carry the remedy.
  • The stored pending_approver_labels is English by design (a stored snapshot, like person names); the reader's language is served on the door.
  • docs/audits/…/plugin-approvals.md tenant census regenerated for the one new elevated sys_approval_action insert.
  • Commits: one per card, plus a fixture commit and a census commit for approvals: when an approval step resolves to nobody (excludeSubmitter removes the only candidate), the request sits pending silently and the submitter is never told; the refusal text misleads a one-person organization #35316 found by the post-commit test and gate runs (the branch is not claude/issue-*, so no force-push to fold them).

🤖 Generated with Claude Code

…names the remedy

A step that resolves to nobody, where no administrator other than the
submitter can take it, now writes a no-approver note on the request's
timeline (rendered in the reader's language) and tells the submitter under
the approval.comment topic. The submitter's refused approval, through
excludeSubmitter or the administrator override, names the same remedy when
no one else is on the slate, and keeps its old text when someone is. The
excludeSubmitter no_one note no longer promises an override the submitter
cannot use.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…nd the guide warns of a deployment with none

The platform_admin:* slot is labelled "Platform administrators" on the
stored pending_approver_labels and, in the reader's language, in the
approvals door's pending_approver_names. The approvals guide says that a
platform_admin step on a deployment where no one holds platform standing
waits with no warning.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…now see the submitter's notice and note

The request-opened notification control counts the submitter's no-approver
notice, and the slot-reader test picks the holder's comment from a
timeline that also carries the system's no-approver note.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…rite

Regenerated with node scripts/tenant-audit-census.mjs --write: one more
elevated sys_approval_action insert in plugin-approvals' approval-service.

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

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-approvals, touching 26 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/plugins/plugin-approvals/src/submitter-exclusion-note.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/connect-mcp.mdx (via sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/automation/approvals.mdx (via sys_approval_action (literal, a string literal in openNodeRequest), sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/automation/flows.mdx (via ApprovalService (symbol, a top-level class), sys_approval_action (literal, a string literal in openNodeRequest), sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/automation/workflows.mdx (via sys_approval_action (literal, a string literal in openNodeRequest), sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/data-modeling/field-types.mdx (via sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/plugins/packages.mdx (via sys_approval_action (literal, a string literal in openNodeRequest), sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/ui/translations.mdx (via sys_approval_request (literal, a string literal in openNodeRequest))

⛔ 5 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via sys_approval_action (literal, a string literal in openNodeRequest), sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/releases/v17/17-6.mdx (via ApprovalService (symbol, a top-level class), sys_approval_request (literal, a string literal in openNodeRequest))
  • content/docs/releases/v17/17-7.mdx (via sys_approval_action (literal, a string literal in openNodeRequest))
  • content/docs/releases/v18/18-1.mdx (via ApprovalService (symbol, a top-level class))
  • content/docs/releases/v18/18-4.mdx (via sys_approval_request (literal, a string literal in openNodeRequest))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/plugins/plugin-approvals/src/submitter-exclusion-note.ts) — pages documenting those are invisible to this run
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • 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 — 6 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 5dd856f40c141947b63709cab0db235088f829a9 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 33e748faad6632e3a03d79a5c61549666f616bf5 — the merge of head a3f98b15e78aa7c9719969f9a4b8d19efccb0c5c into base 5dd856f40c141947b63709cab0db235088f829a9, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 33e748faad6632e3a03d79a5c61549666f616bf5 && git checkout 33e748faad6632e3a03d79a5c61549666f616bf5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5dd856f40c141947b63709cab0db235088f829a9 a3f98b15e78aa7c9719969f9a4b8d19efccb0c5c && git checkout -B drift-repro 5dd856f40c141947b63709cab0db235088f829a9 && git merge --no-ff a3f98b15e78aa7c9719969f9a4b8d19efccb0c5c

node scripts/docs-audit/affected-docs.mjs --json 5dd856f40c141947b63709cab0db235088f829a9

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 5dd856f40c141947b63709cab0db235088f829a9 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1H9ixhgepGZ7fawhL

L1 verdict (L1-a): ACCEPT at head a3f98b15e78aa7c9719969f9a4b8d19efccb0c5c.

Gates on this head: 55 check-runs, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success; all ten Test Core shards success.

Shape:

  • Draft, base main. Fixes #35316 and Fixes #34410, both delivered in full; the approvals: a platform_admin step on a deployment with no platform administrator opens a slot nobody can take, with no warning #34410 warning half took the guide arm, which the order allows.
  • @objectstack/plugin-approvals patch changeset. 371 changed lines including tests, within the soft ≤ 400.
  • Clause-②: no holds: the body's .d.ts diff of a base build against a head build shows no new export, key or topic. The message ids reach no declaration (TranslationBundle), and __noApproverNote is an internal snapshot key, the __flowLabel precedent. Metadata-protocol: none.
  • The docs/audits/…/plugin-approvals.md census moves by exactly the one new elevated sys_approval_action insert, 16 → 17.

What I checked myself:

  • Ruling holds (option B, 2026-11-17). Both submitter refusals still throw before any write. Only their closing sentence changes, and only when namesNoOneBut(pendingApprovers, submitter) holds. onEmptyApprovers semantics are untouched: the note is set only inside the existing slateSource = 'no_one' branch.
  • Platform slot stays out of the remedy text. slateNamesAPerson counts platform_admin:* as a person (approver-address.ts:265-266). A platform-admin slate therefore keeps the old refusal text and never gets the "an organization administrator must add a member" text. noApproverWho also filters the platform address out of who.
  • Existing notice path reused (point 2). The submitter is told under the existing approval.comment topic, with a per-request dedupKey, audience the submitter only, and no actor. No new topic.
  • Timeline note. It follows the shape of its two sibling notes: an action: 'comment' row with actor_id: null, the English sentence stored, and the reader's language overlaid in localizeRoutingNotes.
  • Corrected sentence. approvalSubmitterExcludedNoOne no longer promises an override the submitter cannot use, and the change is made in all eleven locales. The four new ids are present in all eleven.
  • Tests pin the order's cases. The no-one slate writes the note, sends one approval.comment to the submitter, and the refusal ends with the remedy, asserted with its full text. The override refusal names position 'legal'. CONTROL: with another approver on the slate, both old texts are kept and no notice goes out. The platform slot label is read both on the stored row and on the door. The two fixture updates follow from the new notice and note; neither one loosens a check.
  • Docs. Both approvals.mdx paragraphs match the code: the solo-admin plus excludeSubmitter route opens on the no-one slate, and the platform_admin waits with no warning when no one holds standing.

On the area's four points:

  1. approvals: a platform_admin step on a deployment with no platform administrator opens a slot nobody can take, with no warning #34410 guide arm. Accepted. The order offers it, and the body gives the reason in one line: hasPlatformAdminStanding does not answer the population question, and a second derivation is what its header forbids.
  2. approval.comment reuse. Accepted. It is the order's preferred path.
  3. Four commits. Accepted. There is one commit per card, plus a fixture follow-up and a census follow-up found by the post-commit runs. The branch policy forbids a force-push, and the body says so.
  4. ADR-0027 §14. Confirmed as a mis-number. ADR-0027 is the metadata-authoring lifecycle with sections 1–9, and no approvals source cites a §14. The body already records this. Nothing in the diff contradicts ADR-0027 §6 (publish approvals) or the other ADRs the order lists.

Notes (non-blocking):

  • The refusal's code/status are unchanged (FORBIDDEN: prefix). The new assertions pin the message only, and this PR adds no new refusal.
  • The stored pending_approver_labels is English by design; the reader's language is served on the door.

Next: non-governed, so a4-W lands per area-lease.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4czKnDE6hsyXQzB9wB2

Landing (area a4-W) · 2026-11-19T22:30Z

Probe Reading
L1 verdict ACCEPT 7024014298 (L1-a) at head a3f98b15
Checks at head a3f98b15 55 check-runs: 40 success, 15 skipped, 0 failed, 0 pending
Governed surface check-governed-merges.mjs --pr 35661: 0 of 11 paths governed; 371 changed lines ≤ 3000

State change: ready for review + auto-merge on the maintainer's area line 「本区通过复审的 PR 都可以 ready + auto-merge」 (a4-W thread, 2026-11-19T21:59Z). On MERGED: #35316 and #34410 close via Fixes.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 22:30
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 03865ae Nov 19, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-a4W-35316 branch November 19, 2026 22:54
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 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

2 participants