From ddcee8b8f643e13fefdc38e7c7b61fed9bdbf39a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 10:51:33 +0000 Subject: [PATCH] skills(automation): the approvals reference says a reject carries its reason MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_016WV4d1ZJL93Kin2UHFXbFv --- .changeset/35817-skill-reject-reason.md | 6 ++++++ .../references/state-machines-and-approvals.md | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .changeset/35817-skill-reject-reason.md diff --git a/.changeset/35817-skill-reject-reason.md b/.changeset/35817-skill-reject-reason.md new file mode 100644 index 00000000000..e12e34b8528 --- /dev/null +++ b/.changeset/35817-skill-reject-reason.md @@ -0,0 +1,6 @@ +--- +'@objectstack/skills': patch +--- +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. +Clause-②: no +Metadata-protocol: none diff --git a/skills/objectstack-automation/references/state-machines-and-approvals.md b/skills/objectstack-automation/references/state-machines-and-approvals.md index 825ace0e213..3277c7f9b20 100644 --- a/skills/objectstack-automation/references/state-machines-and-approvals.md +++ b/skills/objectstack-automation/references/state-machines-and-approvals.md @@ -171,9 +171,10 @@ Three pieces author it: ### Recording a decision A decision is recorded through `ApprovalService.decide()` (or the REST routes -`POST /api/v1/approvals/requests/:id/approve` | `/reject`). That finalizes the -`sys_approval_request` and **resumes** the suspended run down the matching -branch — you never resume the flow by hand, and you *cannot*: the +`POST /api/v1/approvals/requests/:id/approve` | `/reject`), a reject always +with a non-blank `comment`, its reason (else `400 VALIDATION_ERROR`). That +finalizes the `sys_approval_request` and **resumes** the suspended run down the +matching branch — you never resume the flow by hand, and you *cannot*: the `approval` node declares `resumeAuthority: 'service'`, so `POST /api/v1/automation/:name/runs/:runId/resume` answers **403** for a run 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 decide body) when the node declares the keys in `decisionOutputs` — the author declares keys, approvers only fill values. Accepted outputs resume the run as `.` flow variables, so a LATER node reads them as -`vars..` — this is how "the previous approver picks the next -step's approvers" works without writing to a record field (see Dynamic -approvers below). A decision carrying an undeclared key is rejected; -`decision` / `requestId` are reserved. A declaration marked +`vars..` (Dynamic approvers ② below). A decision carrying an +undeclared key is rejected; `decision` / `requestId` are reserved. A declaration marked `required: true` must carry a non-blank value to **approve** (never to reject) — enforced before any write, with no elevation bypass, so the run cannot resume past the node with the key a later `expression` approver reads