Skip to content

Commit ddcee8b

Browse files
committed
skills(automation): the approvals reference says a reject carries its reason
A reject recorded through ApprovalService.decide() or POST …/reject always carries a non-blank comment, else 400 VALIDATION_ERROR. Paid in place: the outputs paragraph drops a restatement. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1ZJL93Kin2UHFXbFv
1 parent bb1c55d commit ddcee8b

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
docs(skills): objectstack-automation's `references/state-machines-and-approvals.md` says a reject recorded through `ApprovalService.decide()` or `POST …/reject` always carries a non-blank `comment`, its reason, else `400 VALIDATION_ERROR`. Text only; the outputs paragraph gives up a restatement to pay for it.
5+
Clause-②: no
6+
Metadata-protocol: none

‎skills/objectstack-automation/references/state-machines-and-approvals.md‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ Three pieces author it:
171171
### Recording a decision
172172

173173
A decision is recorded through `ApprovalService.decide()` (or the REST routes
174-
`POST /api/v1/approvals/requests/:id/approve` | `/reject`). That finalizes the
175-
`sys_approval_request` and **resumes** the suspended run down the matching
176-
branch — you never resume the flow by hand, and you *cannot*: the
174+
`POST /api/v1/approvals/requests/:id/approve` | `/reject`), a reject always
175+
with a non-blank `comment`, its reason (else `400 VALIDATION_ERROR`). That
176+
finalizes the `sys_approval_request` and **resumes** the suspended run down the
177+
matching branch — you never resume the flow by hand, and you *cannot*: the
177178
`approval` node declares `resumeAuthority: 'service'`, so
178179
`POST /api/v1/automation/:name/runs/:runId/resume` answers **403** for a run
179180
parked on one (including via a `subflow` pause) and changes nothing.
@@ -182,10 +183,8 @@ A decision may also carry **structured outputs** (`{ outputs: { … } }` in the
182183
decide body) when the node declares the keys in `decisionOutputs` — the author
183184
declares keys, approvers only fill values. Accepted outputs resume the run as
184185
`<nodeId>.<key>` flow variables, so a LATER node reads them as
185-
`vars.<nodeId>.<key>` — this is how "the previous approver picks the next
186-
step's approvers" works without writing to a record field (see Dynamic
187-
approvers below). A decision carrying an undeclared key is rejected;
188-
`decision` / `requestId` are reserved. A declaration marked
186+
`vars.<nodeId>.<key>` (Dynamic approvers ② below). A decision carrying an
187+
undeclared key is rejected; `decision` / `requestId` are reserved. A declaration marked
189188
`required: true` must carry a non-blank value to **approve** (never to
190189
reject) — enforced before any write, with no elevation bypass, so the run
191190
cannot resume past the node with the key a later `expression` approver reads

0 commit comments

Comments
 (0)