From 5fa36a038b7f8fdcb815ad99b3a2cf67ada7b4d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 19:59:33 +0000 Subject: [PATCH 1/5] docs(skills): teach the fault edge on a write after an approval decision 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 --- .changeset/34637-approval-fault-edge-skill.md | 12 ++++++++++++ .../evals/flows-triggers-approvals.json | 16 ++++++++++++++++ .../references/state-machines-and-approvals.md | 18 +++++++----------- 3 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 .changeset/34637-approval-fault-edge-skill.md diff --git a/.changeset/34637-approval-fault-edge-skill.md b/.changeset/34637-approval-fault-edge-skill.md new file mode 100644 index 00000000000..96f1e714d04 --- /dev/null +++ b/.changeset/34637-approval-fault-edge-skill.md @@ -0,0 +1,12 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): `objectstack-automation` teaches the `fault` edge on a write after an approval decision, and what `RESUME_FAILED` carries without one + +Clause-②: no +Metadata-protocol: none + +`references/state-machines-and-approvals.md` § Branching, side-effects & rejection gains one bullet. When a step on the `approve` / `reject` branch writes a record that a record hook, a validation rule or a permission may refuse, the flow draws a `fault` edge from that step to a handler: the refusal takes that edge and the decision answers normally. Without the edge `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is stranded, and the body carries `innerRefusal` (`{ code, message }`) and the hook's declared `userMessage`. One eval case covers it. + +Paid in place, the token ceiling does not move. Four restatements were cut, each keeping another home: the send-back section's text diagram (the paragraph above it and the snippet below it trace the same path), and three bullets of § Branching: "Conditional step" (the discount-approval example's `needs_director` node and the comment on its `e1` edge), the send-back pointer (the section it pointed to), and "Hard reject" (the examples' `reject` edges into an `end` node). diff --git a/skills/objectstack-automation/evals/flows-triggers-approvals.json b/skills/objectstack-automation/evals/flows-triggers-approvals.json index 71a8c84a220..79bc469b34b 100644 --- a/skills/objectstack-automation/evals/flows-triggers-approvals.json +++ b/skills/objectstack-automation/evals/flows-triggers-approvals.json @@ -420,6 +420,22 @@ "STACK_TRIGGER_CAPABILITY_REQUIRED" ] } + }, + { + "id": 24, + "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck.", + "expected_output": "An `approval` node (`type: 'approval'`) whose `approve` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and the hook's declared `userMessage`. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", + "files": [], + "assertions": { + "must_contain": [ + "type: 'approval'", + "update_record", + "type: 'fault'" + ], + "must_not_contain": [ + "label: 'error'" + ] + } } ] } diff --git a/skills/objectstack-automation/references/state-machines-and-approvals.md b/skills/objectstack-automation/references/state-machines-and-approvals.md index 75fd9b065c3..c45e4c47989 100644 --- a/skills/objectstack-automation/references/state-machines-and-approvals.md +++ b/skills/objectstack-automation/references/state-machines-and-approvals.md @@ -149,13 +149,6 @@ window*) where the record unlocks and the submitter reworks it, and an explicit *resubmit* re-enters the approval node over a **declared back-edge**, opening round N+1 with a fresh approver slate. -``` -approval ──approve──▶ … - ──reject───▶ … - ──revise───▶ approval_revise (record unlocked, submitter edits) - └──resubmit──[type:'back']──▶ approval (round N+1) -``` - Three pieces author it: 1. **`revise` out-edge** — a third branch label alongside `approve` / `reject`, @@ -382,14 +375,17 @@ Object-hook `ctx` is a different vocabulary — see **objectstack-data** These are wired on the **graph**, not in node config: -- **Conditional step** — put a `decision` node before the Approval node, or a - `condition` on the edge entering it. - **On approve / on reject** — wire downstream nodes (`update_record`, `http`, a `notify` node, …) to the `approve` / `reject` out-edge. +- **A write on that branch that may be refused** (a record hook, a validation + rule, a permission) — draw a `fault` edge from that step to a handler + (SKILL.md § Failure routing): the refusal takes it and the decision answers + normally. Without one, `POST …/approve` (or `/reject`) answers + `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is + stranded, and the body carries `innerRefusal` (`{ code, message }`) and the + hook's declared `userMessage`, the sentence to show the approver. - **Roll back on reject** — route the `reject` edge as a **back-edge** to an earlier node so the submitter can revise. -- **Send back for revision (ADR-0044)** — see *Send-back for revision* above. -- **Hard reject** — route the `reject` edge to an `end` node. ### Approval Best Practices From 6d0af2d83f502edde07f737846fc32fe63170bf1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 20:10:45 +0000 Subject: [PATCH 2/5] docs(skills): the approval fault-edge eval pins the approve edge; userMessage 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 --- .changeset/34637-approval-fault-edge-skill.md | 2 +- .../evals/flows-triggers-approvals.json | 3 ++- .../references/state-machines-and-approvals.md | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.changeset/34637-approval-fault-edge-skill.md b/.changeset/34637-approval-fault-edge-skill.md index 96f1e714d04..4daff363cec 100644 --- a/.changeset/34637-approval-fault-edge-skill.md +++ b/.changeset/34637-approval-fault-edge-skill.md @@ -7,6 +7,6 @@ docs(skills): `objectstack-automation` teaches the `fault` edge on a write after Clause-②: no Metadata-protocol: none -`references/state-machines-and-approvals.md` § Branching, side-effects & rejection gains one bullet. When a step on the `approve` / `reject` branch writes a record that a record hook, a validation rule or a permission may refuse, the flow draws a `fault` edge from that step to a handler: the refusal takes that edge and the decision answers normally. Without the edge `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is stranded, and the body carries `innerRefusal` (`{ code, message }`) and the hook's declared `userMessage`. One eval case covers it. +`references/state-machines-and-approvals.md` § Branching, side-effects & rejection gains one bullet. When a step on the `approve` / `reject` branch writes a record that a record hook, a validation rule or a permission may refuse, the flow draws a `fault` edge from that step to a handler: the refusal takes that edge and the decision answers normally. Without the edge `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is stranded, and the body carries `innerRefusal` (`{ code, message }`) and `userMessage`, the hook's declared sentence for the approver. One eval case covers it. Paid in place, the token ceiling does not move. Four restatements were cut, each keeping another home: the send-back section's text diagram (the paragraph above it and the snippet below it trace the same path), and three bullets of § Branching: "Conditional step" (the discount-approval example's `needs_director` node and the comment on its `e1` edge), the send-back pointer (the section it pointed to), and "Hard reject" (the examples' `reject` edges into an `end` node). diff --git a/skills/objectstack-automation/evals/flows-triggers-approvals.json b/skills/objectstack-automation/evals/flows-triggers-approvals.json index 79bc469b34b..1c40d8d480c 100644 --- a/skills/objectstack-automation/evals/flows-triggers-approvals.json +++ b/skills/objectstack-automation/evals/flows-triggers-approvals.json @@ -424,11 +424,12 @@ { "id": 24, "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck.", - "expected_output": "An `approval` node (`type: 'approval'`) whose `approve` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and the hook's declared `userMessage`. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", + "expected_output": "An `approval` node (`type: 'approval'`) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", "files": [], "assertions": { "must_contain": [ "type: 'approval'", + "label: 'approve'", "update_record", "type: 'fault'" ], diff --git a/skills/objectstack-automation/references/state-machines-and-approvals.md b/skills/objectstack-automation/references/state-machines-and-approvals.md index c45e4c47989..f85398727d7 100644 --- a/skills/objectstack-automation/references/state-machines-and-approvals.md +++ b/skills/objectstack-automation/references/state-machines-and-approvals.md @@ -382,8 +382,8 @@ These are wired on the **graph**, not in node config: (SKILL.md § Failure routing): the refusal takes it and the decision answers normally. Without one, `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is - stranded, and the body carries `innerRefusal` (`{ code, message }`) and the - hook's declared `userMessage`, the sentence to show the approver. + stranded, and the body carries `innerRefusal` (`{ code, message }`) and + `userMessage`, the hook's declared sentence to show the approver. - **Roll back on reject** — route the `reject` edge as a **back-edge** to an earlier node so the submitter can revise. From 9077461e6cb2697fdc0e99795a1f8f842da6ca12 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 20:12:47 +0000 Subject: [PATCH 3/5] docs(skills): the approval fault-edge eval forbids the deprecated role 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 --- .../evals/flows-triggers-approvals.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/objectstack-automation/evals/flows-triggers-approvals.json b/skills/objectstack-automation/evals/flows-triggers-approvals.json index 1c40d8d480c..62e77e3cb76 100644 --- a/skills/objectstack-automation/evals/flows-triggers-approvals.json +++ b/skills/objectstack-automation/evals/flows-triggers-approvals.json @@ -424,7 +424,7 @@ { "id": 24, "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck.", - "expected_output": "An `approval` node (`type: 'approval'`) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", + "expected_output": "An `approval` node (`type: 'approval'`, the planning manager as a `position` approver, not the deprecated `role` spelling) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", "files": [], "assertions": { "must_contain": [ @@ -434,7 +434,7 @@ "type: 'fault'" ], "must_not_contain": [ - "label: 'error'" + "type: 'role'" ] } } From fcf9e05cbeecb6cde44153091318455e45655ca3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 20:14:13 +0000 Subject: [PATCH 4/5] docs(skills): the approval fault-edge eval case lives in its own eval 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 --- .../evals/approval-fault-edge.json | 22 +++++++++++++++++++ .../evals/flows-triggers-approvals.json | 17 -------------- 2 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 skills/objectstack-automation/evals/approval-fault-edge.json diff --git a/skills/objectstack-automation/evals/approval-fault-edge.json b/skills/objectstack-automation/evals/approval-fault-edge.json new file mode 100644 index 00000000000..109ed0b1ac6 --- /dev/null +++ b/skills/objectstack-automation/evals/approval-fault-edge.json @@ -0,0 +1,22 @@ +{ + "skill_name": "objectstack-automation", + "evals": [ + { + "id": 1, + "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck.", + "expected_output": "An `approval` node (`type: 'approval'`, the planning manager as a `position` approver, not the deprecated `role` spelling) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", + "files": [], + "assertions": { + "must_contain": [ + "type: 'approval'", + "label: 'approve'", + "update_record", + "type: 'fault'" + ], + "must_not_contain": [ + "type: 'role'" + ] + } + } + ] +} diff --git a/skills/objectstack-automation/evals/flows-triggers-approvals.json b/skills/objectstack-automation/evals/flows-triggers-approvals.json index 62e77e3cb76..71a8c84a220 100644 --- a/skills/objectstack-automation/evals/flows-triggers-approvals.json +++ b/skills/objectstack-automation/evals/flows-triggers-approvals.json @@ -420,23 +420,6 @@ "STACK_TRIGGER_CAPABILITY_REQUIRED" ] } - }, - { - "id": 24, - "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck.", - "expected_output": "An `approval` node (`type: 'approval'`, the planning manager as a `position` approver, not the deprecated `role` spelling) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", - "files": [], - "assertions": { - "must_contain": [ - "type: 'approval'", - "label: 'approve'", - "update_record", - "type: 'fault'" - ], - "must_not_contain": [ - "type: 'role'" - ] - } } ] } From c242d97dc3fa008ec41bcc2be5a94310d1d431f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 12:27:57 +0000 Subject: [PATCH 5/5] docs(skills): the approval fault-edge eval asks for a TypeScript defineFlow; 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 --- .changeset/34637-approval-fault-edge-skill.md | 4 ++-- skills/objectstack-automation/evals/approval-fault-edge.json | 4 ++-- .../references/state-machines-and-approvals.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.changeset/34637-approval-fault-edge-skill.md b/.changeset/34637-approval-fault-edge-skill.md index 4daff363cec..3fde620a8ae 100644 --- a/.changeset/34637-approval-fault-edge-skill.md +++ b/.changeset/34637-approval-fault-edge-skill.md @@ -7,6 +7,6 @@ docs(skills): `objectstack-automation` teaches the `fault` edge on a write after Clause-②: no Metadata-protocol: none -`references/state-machines-and-approvals.md` § Branching, side-effects & rejection gains one bullet. When a step on the `approve` / `reject` branch writes a record that a record hook, a validation rule or a permission may refuse, the flow draws a `fault` edge from that step to a handler: the refusal takes that edge and the decision answers normally. Without the edge `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is stranded, and the body carries `innerRefusal` (`{ code, message }`) and `userMessage`, the hook's declared sentence for the approver. One eval case covers it. +`references/state-machines-and-approvals.md` § Branching, side-effects & rejection gains one bullet. When a step on the `approve` / `reject` branch writes a record that a record hook, a validation rule or a permission may refuse, the flow draws a `fault` edge from that step to a handler: the refusal takes that edge and the decision answers normally. Without the edge `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is stranded, and the body may carry `innerRefusal` (`{ code, message }`) and `userMessage`, the hook's declared sentence for the approver. One eval case covers it; its prompt asks for the flow as a TypeScript `defineFlow`. -Paid in place, the token ceiling does not move. Four restatements were cut, each keeping another home: the send-back section's text diagram (the paragraph above it and the snippet below it trace the same path), and three bullets of § Branching: "Conditional step" (the discount-approval example's `needs_director` node and the comment on its `e1` edge), the send-back pointer (the section it pointed to), and "Hard reject" (the examples' `reject` edges into an `end` node). +Paid in place, the token ceiling does not move. Four restatements were cut, each keeping another home: the send-back section's text diagram (the paragraph above it and the snippet below it trace the same path), and three bullets of § Branching: "Conditional step" (the discount-approval example's `needs_director` node and the list item above it that names the `e1` edge), the send-back pointer (the section it pointed to), and "Hard reject" (the examples' `reject` edges into an `end` node). diff --git a/skills/objectstack-automation/evals/approval-fault-edge.json b/skills/objectstack-automation/evals/approval-fault-edge.json index 109ed0b1ac6..18d1cd94a00 100644 --- a/skills/objectstack-automation/evals/approval-fault-edge.json +++ b/skills/objectstack-automation/evals/approval-fault-edge.json @@ -3,8 +3,8 @@ "evals": [ { "id": 1, - "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck.", - "expected_output": "An `approval` node (`type: 'approval'`, the planning manager as a `position` approver, not the deprecated `role` spelling) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body carries `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", + "prompt": "Build a flow `mrp_plan_approval` on `purchase_plan`: when `status` becomes `submitted`, the planning manager approves or rejects, and on approve a step sets `status` to `adopted`. That object's `beforeUpdate` hook refuses the write when capacity is already taken. A refusal must send the plan back to its owner; the approver's click must not fail or leave the run stuck. None of the project's files are in this directory: write the flow as a TypeScript `defineFlow` in your answer.", + "expected_output": "A TypeScript `defineFlow`. An `approval` node (`type: 'approval'`, the planning manager as a `position` approver, not the deprecated `role` spelling) whose `label: 'approve'` edge enters an `update_record` step, and a `fault` edge from THAT step to a handler: `{ source: 'adopt_plan', target: 'bounce_back', type: 'fault' }`, the handler returning the plan to its owner (an `update_record` or a `notify`). The hook's refusal takes that edge, the decision answers normally and the run finishes. Without the edge `POST …/approve` answers `500 RESUME_FAILED`: the decision stands, the run is stranded, and the body may carry `innerRefusal` and `userMessage`, the hook's declared sentence. Not an ordinary edge labelled as an error (it traverses on success), and not the reject branch: the approver approved.", "files": [], "assertions": { "must_contain": [ diff --git a/skills/objectstack-automation/references/state-machines-and-approvals.md b/skills/objectstack-automation/references/state-machines-and-approvals.md index 164615e8f74..825ace0e213 100644 --- a/skills/objectstack-automation/references/state-machines-and-approvals.md +++ b/skills/objectstack-automation/references/state-machines-and-approvals.md @@ -362,8 +362,8 @@ These are wired on the **graph**, not in node config: (SKILL.md § Failure routing): the refusal takes it and the decision answers normally. Without one, `POST …/approve` (or `/reject`) answers `500 RESUME_FAILED`: the decision stands (`finalized: true`), the run is - stranded, and the body carries `innerRefusal` (`{ code, message }`) and - `userMessage`, the hook's declared sentence to show the approver. + stranded, and the body may carry `innerRefusal` (`{ code, message }`) and + `userMessage`, the hook's declared sentence for the approver. - **Roll back on reject** — route the `reject` edge as a **back-edge** to an earlier node so the submitter can revise.