Repository navigation
docs(approvals): a reject reason is required at every human door — contract docblock, docs, checklist and skill reference - #35803
Conversation
The contract docblock, the approval_reject comment, the approvals docs page, the platform checklist and the skill reference stated the reject reason as optional or action-only; they now state the shipped rule. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
📓 Docs Drift CheckThis PR changes 2 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 174 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 6030bf004ed2bfff7c0b15d8a66cfff8fcf9d2cf && git checkout 6030bf004ed2bfff7c0b15d8a66cfff8fcf9d2cf
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 65fddc8435c6bb58335a716af45ced8b47dcf97f 1b1cc7fc97a963c8bb4fcfa8cc33803c56414fef && git checkout -B drift-repro 65fddc8435c6bb58335a716af45ced8b47dcf97f && git merge --no-ff 1b1cc7fc97a963c8bb4fcfa8cc33803c56414fef
node scripts/docs-audit/affected-docs.mjs --json 65fddc8435c6bb58335a716af45ced8b47dcf97f
|
|
repo:objectstack#4 · os-elon-musk · session_016WV4czsTwiYB5WxgWqEVcu L1 verdict (L1-a): ACCEPT at head Gates on this head: 60 success, 10 expected skip, 0 unexpected skip, 0 failed, 0 pending. What I checked (holds):
Note (no action owed on this PR): #35673 also edits Landing: governed ( Generated by Claude Code |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF Served-tier: Contract review — PASS at 6d93210Head-sha: Isolated, read-only sub-agent record, written 2026-11-20T09:40Z. Faces: published schema ( F: none. No must-fix. One should-fix, S1, open on this head. N1 to N3 are nits. The verdict below is on the texts: each one is true of the merged code. S1 is about where the skills hunk rides, and it keeps this record from clearing the head until it is closed.
① Derived judgments
② Semver levelOne changeset, three ③ Boundary flags
④ Design judgment
Notes:
Implemented-by: VERDICT: PASS |
…card The skills/ edit and its changeset line leave this product-lane PR; the skill reference is carried by a domain:skills card. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
|
repo:objectstack#4 · os-elon-musk · session_016WV4czsTwiYB5WxgWqEVcu L1 delta verdict (L1-a): ACCEPT at head Gates on this head: 62 success, 12 expected skip, 0 unexpected skip, 0 failed, 0 pending. All four checks still pending at the request time (Check Changeset, Test Core 1/10, 9/10, 10/10) finished green before this verdict. What I checked (holds):
Landing: the area reports Generated by Claude Code |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF Served-tier: TIER_DEFAULT Contract review — PASS at 1b1cc7f (delta over 6d93210)Seat delta read (2026-11-20T10:14Z): one commit, two files. The |
|
repo:objectstack#4 · os-elon-musk · session_016WV4czKnDE6hsyXQzB9wB2 Landing (area a4-W) · 2026-11-20T10:15Z
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: #35772 closes via |
Requested by Elon · project thread
Fixes #35772
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Text only; no behaviour change. On
origin/mainatd9be915f40,ApprovalService.decide()refuses a reject whosecommentis missing, blank or not a string with400 VALIDATION_ERRORbefore anything is read or written;client.approvals.rejectrequires the comment;approval_rejectdeclares it required; the console inbox keeps Reject disabled until a reason is typed. The email action link still records the fixed text "Via action link" (tracked separately). Five texts said otherwise:packages/spec/src/contracts/approval-service.ts—ApprovalDecisionInput.commentgains a docblock stating the rule (required, non-blank string on a reject; optional on an approve), in the style of theoutputsmember's own rule; theIApprovalService.decidedocblock states it too. Docblock only: the type is unchanged (comment?: string), since narrowing it would be a contract change.packages/plugins/plugin-approvals/src/sys-approval-request.object.ts— theapproval_rejectcomment said "The target route itself does not judge the reason." It now says the route judges it again throughApprovalService.decide().content/docs/automation/approvals.mdx— the reject body in "The decision" showscommentwithout?and says it is the required reason; the decision-surface table row says a reject'scommentis required at every human door; theapproval_rejectparagraph names every human door (action door, MCPrun_action, the param dialog, the/rejectroute and the SDK throughdecide(), the inbox) and the email action link as the one exception.docs/qa/platform-checklist/areas/approvals.json—approvals.quorum-m-of-nsteps[7] sends a reason with the veto'sPOST /reject(revision 12 to 13);approvals.inbox-keyboard-flowsteps[2] types a reason before confirming ther-key reject (revision 3 to 4). Each item gains a history row; no clause changed.Changeset
.changeset/35772-reject-reason-required-texts.md:@objectstack/specand@objectstack/plugin-approvalspatch (both in the onefixedgroup). The spec docblock ships: afterpnpm --filter @objectstack/spec build, its new sentence is inpackages/spec/dist/contracts/index.d.tsandindex.d.mts. The plugin comment ships too: esbuild's transform of the source file keeps the new comment (1 hit, controlapproval_reject4 hits).Verification
Two-minute check:
git grep -n "comment? }" content/docs/automation/approvals.mdxfinds nothing (the reject body line now readscomment });grep -c "A REJECT must carry it" packages/spec/dist/contracts/index.d.tsprints 1 after a spec build.Local readings at head
1b1cc7fc97(fix round; the product files are byte-identical to6d93210aee, whose readings are kept):Builds, typecheck and tests
pnpm --filter '@objectstack/plugin-approvals^...' --filter '@objectstack/client-react...' build(lock VERDICT command-exit 0).6d93210aee, unchanged by this round:pnpm --filter @objectstack/plugin-approvals --filter @objectstack/spec typecheckbothDone(VERDICT command-exit 0);pnpm --filter @objectstack/plugin-approvals testTest Files 125 passed (125), Tests 1786 passed (1786);pnpm --filter @objectstack/spec check:generatedexit 0. The@objectstack/specunit suite is CI'sTest Core(docblock-only change).Gates (dispatch-gates --commands for the new diff, 108)
check:platform-checklist,check:docs,check:doc-authoring,check:issue-citations,check:nul-bytes,check:skill-examplesandcheck:dts-closure.check:dual-build-cjs-loadsandcheck:i18n, exit 3 PREREQUISITE NOT MET (whole-repo build); CI'sLint & Repo Gatesruns both.dispatch-gates --ran: "108 derived famil(ies) accounted for — 106 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".check-empty-changeset --base origin/main0,check-changeset-no-major --base origin/main0,check-adr-0087-registration --base origin/main0,pnpm check:changeset-gate-self-tests0.check-skills-token-ratchet0 (the reference file is back atorigin/main: 5933 / 5936).overlap-check --branch=claude/area-a4W-35772: VERDICT clean exit 0.check-governed-merges --pr 35803: "0 of 5 path(s) hit the register … NOT governed"; 58 changed lines (+47 / -11).Acceptance notes
The skill reference moves to domain:skills sub-card skills: the automation skill reference teaches decide() and POST …/reject without the reject reason that #35741 now requires (sub-card of #35772) #35817 (contract review S1 7036174996). Commit
1b1cc7fc97restoresskills/objectstack-automation/references/state-machines-and-approvals.mdtoorigin/mainand drops the@objectstack/skillsline from the changeset, so this PR touches noskills/**path.Sweep of
content/docs,skills/anddocs/qa(excluding run records and the release-owned trees) for any other sentence calling a reject reason optional: none left in these trees. The skill reference does not call the reason optional; it only does not state the rule yet, which is skills: the automation skill reference teaches decide() and POST …/reject without the reject reason that #35741 now requires (sub-card of #35772) #35817's.content/docs/api/client-sdk.mdxalready passes a comment toclient.approvals.reject. Theapprovals.record-page-decisionssource line describes the action's own declaration and stays true. Thedocs/qa/scenarios/builds/travel_expense.json"optional comment" belongs to that scenario app's own action, not the platform reject.approvals.jsonchanges were read from source at based9be915f40and not re-run live; each history row says so.The docs link the email action link's fixed text to its own follow-up card; that card owns the confirm-page reason field.
🤖 Generated with Claude Code