Repository navigation
docs(skills): teach the fault edge on a write after an approval decision and the RESUME_FAILED refusal members - #35002
Conversation
…ion and the RESUME_FAILED refusal members The approvals reference gains one bullet in Branching, side-effects and rejection: a step on the approve / reject branch whose write a record hook, a validation rule or a permission may refuse draws a fault edge to a handler, and without it the decision route answers 500 RESUME_FAILED with the decision recorded, the run stranded, and innerRefusal plus the hook's declared userMessage in the body. One eval case covers it. Paid in place: four restatements cut, the token ceiling does not move. Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C Co-authored-by: Claude <noreply@anthropic.com>
…rMessage reads as the hook's declared sentence The eval case also requires the approve out-edge label, which an answer written without the skill does not produce. The reference and the changeset name userMessage as the member carrying the hook's declared sentence, so it does not read as a hook authoring key. Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C Co-authored-by: Claude <noreply@anthropic.com>
…e approver spelling An answer that draws the fault edge and explains why a labelled edge does not catch a failure quotes that label, so it is not a usable forbidden token for this case. The case forbids the deprecated approver spelling instead, which names nobody for a position. Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C Co-authored-by: Claude <noreply@anthropic.com>
… file The shared flows eval file is left as main has it, so this branch no longer meets another open pull request that appends a case to its tail. Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C 维护者速读(席位终稿 · Head-sha: fcf9e05 · 2026-11-17T22:45Z)
席位意见:建议批准。「500」开发对照了合并代码( 席位核对 · L1 ACCEPT · Head-sha: fcf9e05Card #34637, claim 6959148889, dev report 6963150096. The seat read the diff itself.
|
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head fcf9e05 · 2026-11-19T06:31Z A fresh isolated reviewer sub-agent at CONTRACT_REVIEW_TIER renders the record (the governed |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head fcf9e05 · 2026-11-19T12:20Z A fresh isolated reviewer sub-agent at CONTRACT_REVIEW_TIER renders the record (the governed |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract reviewServed-tier: PR #35002, card #34637, face ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentEach changed sentence of the reference, against the card's two points and the code on
The eval, against the card's eval prompt ("an approval flow whose next step updates a record guarded by a refusing hook, and checks the flow draws the Findings:
No must-fix. One should-fix (S1). Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C The contract review on fcf9e05 (just above) reads |
…proval-fault-edge
…neFlow; the refusal members read as optional The eval prompt now says the project's files are absent and asks for the flow as a TypeScript defineFlow, so its single-quoted tokens match the form the answer is asked for. The reference and the changeset say the body may carry innerRefusal and userMessage, and the changeset names the list item that now holds the entry-criteria note. Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C 席位核对 · L1 delta ACCEPT · Head-sha: c242d97 · 2026-11-19T12:45ZThe dev's delta report is 7009462824 on #34637. It closes S1 of record 7009057594 and merges origin/main 819c067 (clean).
|
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head c242d97 · 2026-11-19T12:45Z A fresh isolated reviewer sub-agent at CONTRACT_REVIEW_TIER renders the delta record. |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract reviewServed-tier: Delta round on record 7009057594 (head ① Derived judgments
② Semver levelUnchanged from the earlier record. ③ Boundary flags
④ Design judgmentThe reference, this round's one changed sentence: "the body may carry The eval, against the card's eval prompt: the prompt now ends "None of the project's files are in this directory: write the flow as a TypeScript Earlier findings:
New this round:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
Fixes #34637
Clause-②: no
Metadata-protocol: none
维护者速读
RESUME_FAILED,决定照旧生效,错误体带innerRefusal和userMessage。另加一条评测用例。skills/objectstack-automation/references/state-machines-and-approvals.md里 Branching 一节新增的那一条,以及同文件被删的四处;②skills/objectstack-automation/evals/approval-fault-edge.json;③.changeset/34637-approval-fault-edge-skill.md。node scripts/check-skills-token-ratchet.mjs,预期这份参考文件一行读作5913 tokens (ceiling 5916; headroom 3),末行是 ✓。skills/**)。What changes
skills/objectstack-automation/references/state-machines-and-approvals.md, section Branching, side-effects & rejection, gains one bullet. It teaches the two points the card orders, in the wording of the merged approvals docs callout and theApprovalDecisionResult.resumeddocblock:approve/rejectbranch writes a record that a record hook, a validation rule or a permission may refuse, draw afaultedge from that step to a handler. The refusal takes that edge and the decision answers normally.POST …/approve(or/reject) answers500 RESUME_FAILED. The decision stands (finalized: true), the run is stranded, and the body carriesinnerRefusal({ code, message }) anduserMessage, the hook's declared sentence to show the approver.The bullet points to SKILL.md, section Failure routing, for the edge shape, so the shape is not restated.
One eval case is added in a new file,
skills/objectstack-automation/evals/approval-fault-edge.json: an approval flow whose step after the decision updates a record guarded by a refusingbeforeUpdatehook. It is graded on the approval node, theapproveout-edge, theupdate_recordstep and thetype: 'fault'edge.A
@objectstack/skillspatch changeset is included, becauseskills/**ships in that package.The status code, checked against the merged code and the ruling
The card says "status 500 per the standing ruling". The merged code answers the same:
packages/rest/src/approvals-routes.tsmaps theRESUME_FAILEDprefix to status 500 and spreads the recognised stranded-decision envelope into the body.packages/rest/src/rest-approvals-wire-codes.test.tspins status 500 and the exact body key setcode,decision,error,finalized,innerRefusal,repairable,runId,userMessage.packages/plugins/plugin-approvals/src/hook-refusal-after-decision.test.tspins both halves: no fault edge givesRESUME_FAILEDwith the two members, and a fault edge on the step givesfinalized: true, resumed: truewith nothing left parked.The ruling the code cites is the maintainer ruling of 2026-09-04, decision batch #37, option 1B, recorded in comment 5541861039 on issue #13807. From that record: "
POST …/reject(and the sibling decision doors on the same path) keeps its status code — the 500-classRESUME_FAILED— and stops discarding what the engine said". The record gives the maintainer's word as verbatim 「同意」 on the presented recommendation1B · 2及. The approvals docs page states the 500 and cites no ruling id of its own; the id is in the code comments (approvals-routes.ts,packages/types/src/stranded-decision.ts).Scope fence
Only the decision doors' thrown
RESUME_FAILEDenvelope is taught, as merged by PR #34619. The text namesPOST …/approveand/reject. It does not mentionresumeFailure, the recall door or the subflow-parent strand, and it does not say those answers carry the pair.Budget
The reference file was at 5916 tokens against a ceiling of 5916, headroom 0. No ceiling moves. The new bullet is paid for by deleting content. Four restatements were cut, each keeping another home:
needs_directordecision node and the comment on edgee1rejectedges into anendnode (e3,e7)The cuts remove 524 bytes and the new bullet adds 515, so the file is 9 bytes smaller. None of the four is a re-wrap: each removes text.
fff0ad0c18)fcf9e05cbe)state-machines-and-approvals.md, linesstate-machines-and-approvals.md, bytesstate-machines-and-approvals.md, tokens / ceilingSKILL.mdfiles, lines summedSKILL.mdfiles, bytes summedevals/approval-fault-edge.json(eval fixture, not ratcheted), tokensNo
SKILL.mdis touched.skills/objectstack-automation/SKILL.mdstays at 6903 / 6903.Tests
No package source changes, so no package test suite is owed. What ran, at head
fcf9e05cbe:pnpm --filter @objectstack/skills buildunder the shared verify lock:VERDICT command-exit 0; "99 file(s) across 12 skill(s) copied from skills/** into dist/skills and read back byte-identical".skill-evalsrunner has no single-case selector, so five turns of this one case were run with the runner's own argv frompackages/qa/scenarios/src/skill-evals/arms.ts(a fresh directory, the bundle copied withoutevals/on the with-skill arm, an empty directory on the no-skill arm) and graded by literal substring asgrade.tsdoes. This is a hand replication, not a runner round, and no round record was filed.5fa36a038b)label: 'approve'missing,type: 'role'presentlabel: 'approve'missing,type: 'role'presentAll three with-skill answers drew the
type: 'fault'edge from theupdate_recordstep, and all three said that without it the approve call answers500 RESUME_FAILED. All three launched the skill and read the reference file.Stated limits: the token lists were settled after reading these answers, so the five turns are not an independent test of the final lists. Two things changed on the way. Both no-skill answers also wrote
type: 'fault', so the case now also requireslabel: 'approve'and forbidstype: 'role'. The first draft forbadelabel: 'error', and one with-skill answer that drew the fault edge correctly quoted that label while explaining why it does not catch a failure, so that token was dropped. The prompt was the same on all five turns.Acceptance notes
evals/flows-triggers-approvals.json.node scripts/pm/overlap-check.mjsthen answeredVERDICT overlap exit 1against PR feat(spec, service-automation): a packaged flow can ship switched off for an administrator to turn on (defaultActive) #34793, which appends its own case with the sameid: 24at the same position. The case moved to its own file and the shared file is byte-identical tomainagain. The re-run answersVERDICT clean exit 0againstorigin/main(44c7a4a415) and 0 PR heads.mark_wonstep without afaultedge. The new rule is conditional (a write that may be refused), and adding a handler node and two edges to the example did not fit the budget. Noted, not changed.ui/scripts/check-skill-eval-tokens.mjsscans the bundle underui/skillsonly (1 bundle, 11 eval files), so it does not judge this case. The fourmust_containtokens were checked by hand as taught in the bundle:type: 'approval'andlabel: 'approve'in the reference,update_recordin SKILL.md and the references,type: 'fault'in SKILL.md. The forbidden tokentype: 'role'occurs nowhere in the bundle.evals/flows-triggers-approvals.jsonforbidslabel: 'error'and has the same exposure measured above on a different prompt. Noted, not filed.Verification
node scripts/pm/dispatch-gates.mjs --commandsatfcf9e05cbederived 47 commands (change set: 3 paths against merge basefff0ad0c1). All 47 ran at that head with the exit code captured before any pipe. Reconciliation:✓ dispatch-gates --ran: 47 derived famil(ies) accounted for — 45 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).Gates that read the changed files
Not measured locally, and two partial readings
The diff touches no package source, so no whole-workspace build is owed locally. Only
@objectstack/formula,@objectstack/lintand their dependencies were built, to let the doc-formula gate run. These four are whole-build readers and are left to CI.The remaining 28 derived commands are self-tests and whole-tree gates; each exited 0.
Human Minimum
packages/specholds no runtime logic. (No schema touched.)pnpm lintis left to CI (no code file changed).main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code