Repository navigation
docs(spec): describe innerRefusal as a node's read, write or script function-resolution refusal - #33519
docs(spec): describe innerRefusal as a node's read, write or script function-resolution refusal#33519objectstack-fleet[bot] wants to merge 1 commit into
Conversation
The inner refusal of a flow run is filled by every data node's catch arm, get_record's read included, and by a script node's function-resolution refusal. The describe and JSDoc text on AutomationResult.innerRefusal, FlowFailureDetailsSchema.innerRefusal and FlowInnerRefusalSchema said "a node's write"; they now name the read, the write and the script node's function resolution. The generated API reference follows. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5mkZ32rnBNh7FK8TxM
📓 Docs Drift CheckThis PR changes 1 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 172 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2c3940812e33a8fbac9050eae85d3348446cab9a && git checkout 2c3940812e33a8fbac9050eae85d3348446cab9a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e40cd1e28dd79e60e7f4be0db06f071f3f962574 4da1fb68df06244e029b1644db5846664572116c && git checkout -B drift-repro e40cd1e28dd79e60e7f4be0db06f071f3f962574 && git merge --no-ff 4da1fb68df06244e029b1644db5846664572116c
node scripts/docs-audit/affected-docs.mjs --json e40cd1e28dd79e60e7f4be0db06f071f3f962574
|
|
domain:spec#4 · os-project-manager · session_01FEkQ5mecqk8M5q9vjKj6aS Contract reviewServed-tier: Inputs read: card #33402 (body and its three comments: triage 6884924903, claim 6885523313, os-dev-report 6885846785; no earlier review record), PR #33519 (body, 4 files, net diff against Check-runs on the head as read (50): 14 ① Derived judgments
② Semver level
Clause-②: no. Present on the PR body and in the changeset, with ③ Boundary flags
④ Design judgmentThe new sentence, in all five sites: "the refusal a node met inside the run (a data node's read or write, or a Producers, read at the head.
Every other path that puts the member on a result only CARRIES one of those five:
Findings:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
Requested by Leehom · project thread
Fixes #33402
Clause-②: no
Metadata-protocol: none
维护者速读
innerRefusal的说明文字(AutomationResult.innerRefusal与FlowFailureDetailsSchema.innerRefusal的 describe、FlowInnerRefusalSchema与FlowFailureDetailsSchema的 JSDoc、contracts/automation-service.ts的 JSDoc)从「节点写入时遇到的拒绝」改为「节点在运行中遇到的拒绝(数据节点的读或写,或script节点解析函数名)」;生成的 API 参考随之更新。get_record)和script节点函数名解析失败(RESOURCE_CONFLICT,ADR-0150 D3)都会填这个字段;旧说法让写流程错误处理的客户端和 AI 以为读取或函数名拒绝不会出现在这里。packages/spec/src/api/automation-api.zod.ts的两处innerRefusaldescribe;其次content/docs/references/api/automation-api.mdx的两行生成结果。git grep -n -i "write met inside" -- packages/spec/src content/docs/references,预期零命中(main 上 7 处)。What changes
Wording only. The text now says what the producers on
maindo:refusalCarriedBy(packages/services/service-automation/src/inner-refusal.ts) is spread into all four data-node catch arms ofbuiltin/crud-nodes.ts(get_record's arm included, so a READ refusal lands ininnerRefusal), and into thescriptnode's function-resolution refusal inbuiltin/screen-nodes.ts(aconfig.functionthat names no single function for the flow's package,code: 'RESOURCE_CONFLICT', ADR-0150 D3, PR #32257).packages/spec/src/api/automation-api.zod.tsFlowInnerRefusalSchemaJSDoc, first sentence: FROM "The refusal a flow node's write met INSIDE the run — the structured answer the data layer gave the node, …" TO "The refusal a flow node met INSIDE the run (a data node's read or write, or ascriptnode's function resolution) — the structured answer the data layer (or the function resolver) gave the node, …". The "(or the function resolver)" clause is added because "the data layer" alone would be false for thescriptnode's refusal; the rest of the sentence is unchanged.AutomationResult.innerRefusal(TriggerFlowResponseSchema).describe: FROM "The refusal a node's write met inside the run, structured: …" TO "The refusal a node met inside the run (a data node's read or write, or ascriptnode's function resolution), structured: …". The rest is byte-identical.FlowFailureDetailsSchemaJSDoc: FROM "the refusal a node's write met inside the run, asinnerRefusal" TO "the refusal a node met inside the run (a data node's read or write, or ascriptnode's function resolution), asinnerRefusal".FlowFailureDetailsSchema.innerRefusal.describe: FROM "The refusal a node's write met inside the run (AutomationResult.innerRefusal): …" TO "The refusal a node met inside the run (a data node's read or write, or ascriptnode's function resolution;AutomationResult.innerRefusal): …".userMessage's describe already says "the refusal a node met inside the run": left as it is.packages/spec/src/contracts/automation-service.ts,AutomationResult.innerRefusalJSDoc: same change as above (the card did not list this site; the order added it).content/docs/references/api/automation-api.mdx: regenerated withcd packages/spec && pnpm gen:schema && pnpm gen:docs(not hand-edited). Only the twoinnerRefusalrows move (theFlowFailureDetailsandAutomationResulttables). No other generated file changed..changeset/33402-inner-refusal-describe.md:'@objectstack/spec': patch. The describe text ships in specdistand the JSDoc in its declarations.No schema shape, enum, optional/required, export or type changes.
Tests
origin/mainf068cde8,git grep -n "write met"overpackages/spec,content/docsandskillshit only the five edited source sites and the two generated rows.git grep -n "write met" -- packages/spec content/docs skillsshows zero hits that describeinnerRefusal(the remaining hits are "write metadata …" sentences and releasedCHANGELOG.mdentries about other subjects).4da1fb68:pnpm --filter @objectstack/spec typecheckexit 0;pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/api/automation-api src/contracts/automation-service: Test Files 2 passed (2), Tests 93 passed (93) (lock VERDICT command-exit 0).Acceptance notes
Comments in
packages/services/**are outside this card's surface. Two still describe the inner refusal as the data nodes' alone; reported, not touched:packages/services/service-automation/src/engine.ts:416-420(NodeExecutionResult.innerRefusaldoc): "The refusal this node's data call met … Set by the CRUD executors' catch arms". Thescriptnode's function-resolution refusal sets it too.packages/services/service-automation/src/inner-refusal.ts:54-56(refusalCarriedBydoc): "the one call each data node's catch arm makes (builtin/crud-nodes.ts), so the four arms cannot drift …", and:64"the caller asked for a write the platform will not do".builtin/screen-nodes.tsalso calls it.FlowInnerRefusalSchema.code's describe ("the ADR-0112 member a record save of the same write answers inerror.code") and the contract JSDoc's "the shape a record save of the same write answers with" keep their wording: they name the comparison for the code spelling, not which node met the refusal, and the order keeps each sentence's other clauses as they are.Verification
On
4da1fb68(after building the spec,@objectstack/lint,@objectstack/objectql, client and client-react closures):node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 103 commands, run one by one withtimeout 900, each exit code captured before any pipe.pnpm --filter @objectstack/spec run check:generated(the regenerated reference is current),check:docs,check:skill-examplesandpnpm check:nul-bytes.node scripts/check-plugin-teardown-shape.mjs --self-testexited 3 in the loop (shallow clone: its pinned fixture commit was absent). Aftergit fetch --depth=1 origin 621a4876…it exited 0 ("48 cases pass").pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: it needs every package'sdist; only the closures above were built), so it is NOT MEASURED here and left to CI.--ranreconciliation: "103 derived famil(ies) accounted for — 102 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".node scripts/check-dev-prereqs.mjsexited 1 because 91 of 107 workspace packages have nodist(only the closures above were built); it judges this checkout's build state, not the diff, so it is NOT MEASURED for this change.pnpm --filter @objectstack/spec run check:docs(also run insidecheck:generated, whose roster maps it togen:docsandcontent/docs/references/**) reds a reference that no longer matches the.describetext;cd packages/spec && pnpm gen:schema && pnpm gen:docsregenerates it. Both exited 0 on this head.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran;pnpm lintis CI's run, not run locally.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5mkZ32rnBNh7FK8TxM