Repository navigation
fix(approvals): a step that resolves to nobody tells the submitter and names the remedy; the platform administrators' slot reads by a label - #35661
Conversation
…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
📓 Docs Drift CheckThis PR changes 1 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1H9ixhgepGZ7fawhL L1 verdict (L1-a): ACCEPT at head Gates on this head: 55 check-runs, 0 failed, 0 pending; Shape:
What I checked myself:
On the area's four points:
Notes (non-blocking):
Next: non-governed, so a4-W lands per area-lease. Generated by Claude Code |
|
repo:objectstack#4 · os-elon-musk · session_016WV4czKnDE6hsyXQzB9wB2 Landing (area a4-W) · 2026-11-19T22:30Z
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 |
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 (onEmptyApproverssemantics untouched), and now:no-approver-note.ts, snapshot key__noApproverNote, overlaid in the reader's language bylocalizeRoutingNoteslike 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.";approval.commenttopic (no new topic; the note is a comment on the request's thread), keyed textapprovalNoApproverTitle/ the note's sentence, no actor;excludeSubmittercheck 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;approvalSubmitterExcludedNoOneno 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 storedpending_approver_labels, and in the reader's language in the approvals door'spending_approver_names. For the warning half I chose the guide arm: one sentence incontent/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", whichhasPlatformAdminStanding(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:
packages/plugins/plugin-approvals/src/approval-service.ts— thedecideNodehunk (noOneElse/noApproverRemedy): the only change on a refusal path; the ruled refusals still throw before any write.packages/plugins/plugin-approvals/src/no-approver-note.ts—namesNoOneButdecides which text a refusal shows.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 oneapproval.commentnotice to the submitter only, and theexcludeSubmitterrefusal ends with the remedy; the override refusal namesposition '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'spending_approver_namesread "Platform administrators".approval-requested-notification.integration.test.tsnow expects the submitter'sapproval.commentnotice on a slate of literals with no administrator (still noapproval.requested);approval-service.test.tspicks the holder's comment from a timeline that now also carries the system note.a3f98b15:pnpm --filter @objectstack/plugin-approvals build && … typecheck && … testunder 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.mtsat head vs. the same package built from the base source (eca20d22): the only difference is one JSDoc line on the privateenrichRowsdocblock. No export, key or topic was added;ApprovalsTranslationsis typedTranslationBundle, so the new message ids do not reach the declaration closure.Acceptance notes
returnedstatus) 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).pending_approver_labelsis English by design (a stored snapshot, like person names); the reader's language is served on the door.docs/audits/…/plugin-approvals.mdtenant census regenerated for the one new elevatedsys_approval_actioninsert.claude/issue-*, so no force-push to fold them).🤖 Generated with Claude Code