Repository navigation
Commit d683e6f
docs(skills): a flow door's innerRefusal is the refusal any node met, not only a write's (#33390)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XN3CiY5nMB8z5cLWxV2JQ7s)_
Fixes #32379
domain:skills#1 · os-project-manager · session_01FEkQ5nPZFfbs98ogV2mAFM
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`objectstack-api` 技能里流程入口 `400 FLOW_FAILED` 一段,原文把
`details.innerRefusal`
说成「节点的写入被拒」并只列三个错误码;现改为「节点遇到的拒绝」(数据节点的读或写、`script` 节点的函数名),错误码改为举例并补上
`RESOURCE_CONFLICT`。另在「`apis:` 还是代码处理器」表格的 `script` 行加一个链接,指向 automation
技能里讲「到底运行哪个函数」的条目,不复述。
- 为什么改:自 PR #32257 起,`script` 节点的函数名在本包范围内有歧义或只在依赖闭包外,流程入口答 `400
FLOW_FAILED`,`innerRefusal.code` 为
`RESOURCE_CONFLICT`;按旧文按错误码分支的客户端会漏掉它。
- 风险与回滚:纯技能文字,`skills/objectstack-api/SKILL.md` 改 5 行、净增 1 行,外加一个
changeset;不动 schema、不动运行时;回滚即还原本 PR。
- 先看:`skills/objectstack-api/SKILL.md` 第 360–363 行(innerRefusal 句),再看第
133 行(表格链接)。
- 两分钟验证:`git diff origin/main -- skills/`,预期只见上述两处:innerRefusal 句改为「a
node met」并举 `RESOURCE_CONFLICT`,表格 `script` 行多一个指向
objectstack-automation「Valid-but-silently-wrong」第 3 条的链接。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。
## What changes
- **`skills/objectstack-api/SKILL.md` lines 360–363**, the flow-door
paragraph. `innerRefusal?` was "the `{ code, message }` a node's write
was refused with, `code` in its wire spelling (`UNIQUE_VIOLATION`,
`VALIDATION_FAILED`, `PERMISSION_DENIED`)". It now reads "the `{ code,
message }` refusal a node met (a data node's read or write, a `script`
node's function name), `code` an `ErrorCode` member in wire spelling
(e.g. `UNIQUE_VIOLATION`, `PERMISSION_DENIED`, `RESOURCE_CONFLICT`)".
The codes are examples now, not a set.
- **`skills/objectstack-api/SKILL.md` line 133**, the "Choosing between
`apis:` and a code handler" table. The `script` node row gains one link,
"which one runs:
[objectstack-automation](../objectstack-automation/SKILL.md#valid-but-silently-wrong-passes-build-fails-at-runtime)
item 3", and restates nothing.
- **`.changeset/32379-api-flow-inner-refusal-any-node.md`**:
`'@objectstack/skills': patch`, carrying both declaration lines.
This resumes the released commit `ab838308` (branch
`claude/project-thread-xb2225`, Release comment 6807417751) and merges
`origin/main` `6538ba48`. Every claim the commit makes was re-read on
that `main` (below); none moved, so the text is unchanged.
## Why
Each claim, read on `origin/main` `6538ba48`:
- **A `script` node's function-name refusal fills `innerRefusal` with
`RESOURCE_CONFLICT`.**
`packages/services/service-automation/src/builtin/screen-nodes.ts:651-660`:
when `engine.resolveFunction` throws a package-scoped refusal, the node
returns `code: 'RESOURCE_CONFLICT'` plus `refusalCarriedBy(err)`. Pinned
at the flow door by
`packages/qa/dogfood/test/bare-name-one-holder-request-family.dogfood.test.ts:280-298`
(`[400, 'FLOW_FAILED']`, `details.innerRefusal.code ===
'RESOURCE_CONFLICT'`) and in-engine by
`packages/services/service-automation/src/flow-function-package-scope.test.ts:134`
(both from PR #32257).
- **A data node's read fills it too, not only a write.**
`refusalCarriedBy` is called by all four data-node catch arms in
`packages/services/service-automation/src/builtin/crud-nodes.ts`
(`get_record` :669, and :831, :947, :1026 for the three writes). It
carries any declared 4xx throw (`inner-refusal.ts:86-102`).
- **`code` is an `ErrorCode` member.** `FlowInnerRefusalSchema.code` is
`ErrorCode` (`packages/spec/src/api/automation-api.zod.ts:361-366`).
- **The link target exists.**
`skills/objectstack-automation/SKILL.md:230` is the heading `##
Valid-but-silently-wrong (passes build, fails at runtime)`, and item 3
(`:262-275`) states the package rule for which function a `script` node
runs (landed in PR #32377). The anchor follows the form
`skills/objectstack-data/SKILL.md:221` already uses for another heading
in that skill.
## Acceptance notes
- `skills/` sweep (`git grep` for `innerRefusal` and `FLOW_FAILED`):
this paragraph is the only skill text that teaches `innerRefusal`. No
`evals/*.json` mentions it, so no eval was made false.
- Not in scope, noted only: the spec's own `.describe` on
`FlowFailureDetailsSchema.innerRefusal`
(`packages/spec/src/api/automation-api.zod.ts:640-642`, mirrored in
`content/docs/references/api/automation-api.mdx:389` and `:1140`) still
says "the refusal a node's write met". It is spec prose, outside this
card's surface (carrier: none).
## Verification
Head `9adabd41`, base `origin/main` `6538ba48`.
<details><summary>Line and token budget (skills/**)</summary>
- `skills/objectstack-api/SKILL.md`: 431 to 432 lines, 20628 to 20841
bytes; token ratchet 5152 to 5206 (ceiling 6314, headroom 1108). No
ceiling moved.
- Whole package, all `skills/*/SKILL.md` (11 files): 4602 to 4603 lines.
Bundle total (whole shipped tree): 244310 to 244364 tokens.
- `node scripts/pm/check-skill-line-ratchet.mjs`: exit 0. `node
scripts/check-skills-token-ratchet.mjs`: exit 0.
</details>
<details><summary>Derived gates</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 46 families for the two paths. Each
was run on head `9adabd41`, exit code captured before any pipe (record:
project file `pm-orders/skills/32379-gates-ran.txt`):
- 44 exit 0, among them `check-adr-0087-registration` (scan and
`--self-test`), `check-changeset-no-major`, `check-empty-changeset`
(scan and `--self-test`), `check-skills-token-ratchet` (scan and
`--self-test`), `@objectstack/spec check:skill-docs`,
`check:changeset-gate-self-tests`, `check:doc-authoring`,
`check:nul-bytes`, `check:pm-governed-merges`, `check:published-files`,
`check:skill-compatibility`, `check:skill-frame-sync`,
`check:skill-identifier-liveness`, `check:skill-links`.
- `@objectstack/lint check:doc-formula-expressions` exit 0, after
building the `@objectstack/lint...` closure under the verify lock
(VERDICT command-exit 0, 67s). `check:dts-closure` and
`check:sourcemap-no-sources-content` exit 0 over the 5 packages that
build left in `dist/` only; CI builds every package and runs them in
full.
- NOT MEASURED, exit 3 PREREQUISITE NOT MET (each reads every package's
`dist/`): `check:dual-build-cjs-loads`, `check:lean-entry-closure`. No
package source is touched, so no full build was paid locally.
- `--ran` reconciliation: "46 derived famil(ies) accounted for — 44 run,
2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
- CI families are read from this PR's check-runs, not re-run here.
</details>
<details><summary>Tier and governed readings</summary>
- `dispatch-gates --tier`: MANDATORY contract-review tier (`skills/**`,
clause ①, the published catalog); no one-line exit for this surface.
- `node scripts/pm/check-governed-merges.mjs --branch
claude/project-thread-co1yph`: exit 3, GOVERNED, landing tier H (人合). 1
of 2 paths on the register (`skills/**`); the changeset is not on it.
Size +15 / -4, under the 3000 threshold.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FEkQ5nPZFfbs98ogV2mAFM
<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent 34c0522 commit d683e6f
2 files changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
362 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| |||
0 commit comments