Skip to content

fix(service-automation): try_catch Error Variable help describes the caught error in words - #24655

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-24576-try-catch-help-words
Oct 19, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-24576-try-catch-help-words

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #24576

Clause-②: no

The Error Variable help the Studio flow inspector shows for a Try / Catch node no longer names a TypeScript type. The text is the try_catch descriptor's own errorVariable description (packages/services/service-automation/src/builtin/try-catch-node.ts, configSchema); this PR rewrites that one string in words and adds a patch changeset for @objectstack/service-automation.

New text, as served by the descriptor:

Variable holding the caught error in the catch region (default $error, read as {{ $error.message }}). It carries the id of this Try / Catch node (nodeId), the failure message, which normally names the step that failed (message), the platform error code when that step reported one (code), and, when the failure happened inside a loop, the zero-based pass number (iteration) and the item being processed (item)

What the engine really binds (measured before writing)

A throwaway probe on the real AutomationEngine (probe file deleted, not committed) ran a try_catch whose try region holds one failing step push_step, and printed $error from the catch region:

case bound value
step returns a plain failure nodeId: guard, message: Node 'push_step' failed: boom
step returns a failure carrying DUPLICATE_RECORD the same, plus code: DUPLICATE_RECORD
the same inside a loop plus iteration: 0, item: { id: 'r1' }

Two consequences for the wording:

  • nodeId is the Try / Catch node's own id (guard), not the failing inner step (push_step). The inner step is named inside message. The help therefore says "the id of this Try / Catch node" and "the failure message, which normally names the step that failed", and does not say "the failing node" as the triage comment words it.
  • The old text left out code, which the engine has bound for a while; the new text names it, so an author learns a catch region can branch on it.

Verification

  • Premise: on origin/main 7c7741dcb line 75 of try-catch-node.ts names the type, as the card says.
  • Served text read through engine.getActionDescriptor('try_catch'): a PascalCase identifier scan returns null on the new text and TryCatchErrorValue on the old text (control leg).
  • @objectstack/service-automation: tsc --noEmit plus check:test-typecheck exit 0; full suite 193 files / 2580 tests passed (run at f967f573b, under the shared verify lock).
  • Gates: the 59 families dispatch-gates --commands derives for this diff were run; 58 exit 0 and the --ran reconciliation reads 59 accounted, 0 unrun. One is NOT MEASURED: check:dual-build-cjs-loads exits 3 (prerequisite not met, it needs every workspace package's dist/ and only the service-automation closure was built); CI's Build Core hosts it.

Acceptance notes

  • No test added. Nothing pins the try_catch descriptor's help text (the closest pins, notify-node.test.ts and http-nodes.test.ts, are for other nodes); the change is one string and the existing suite stays green.
  • packages/spec/** is untouched. The spec's own errorVariable describe still says "The value is a TryCatchErrorValue"; the surfaces that describe reaches are listed in the report comment on try_catch node: the Studio flow inspector's Error Variable help text names a TypeScript type (TryCatchErrorValue) #24576 for the seat to file.
  • Not browser-verified: the inspector's help slot was not driven in a browser. Sibling descriptors (notify, screen) already carry {{ }} examples in help text.

Generated by Claude Code

…the caught error in words

The node descriptor's errorVariable description named a TypeScript type and
left out the platform error code the engine binds. It now says what the value
carries (the Try / Catch node's id, the failure message, the error code when
the failing step reported one, and the loop pass and item inside a loop),
with no type name.

Claude-Session: https://claude.ai/code/session_01LR1cD9JqgkeqY7k9rrZH8s
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json f89d29e382e7d50cfe1b2a98742ac1c3d436cd26 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0bf1fa88bed593a3c4261002b82fca6f5de0b439 — the merge of head f967f573b757bbf0118b360469c6afda5ed20840 into base f89d29e382e7d50cfe1b2a98742ac1c3d436cd26, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0bf1fa88bed593a3c4261002b82fca6f5de0b439 && git checkout 0bf1fa88bed593a3c4261002b82fca6f5de0b439
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f89d29e382e7d50cfe1b2a98742ac1c3d436cd26 f967f573b757bbf0118b360469c6afda5ed20840 && git checkout -B drift-repro f89d29e382e7d50cfe1b2a98742ac1c3d436cd26 && git merge --no-ff f967f573b757bbf0118b360469c6afda5ed20840

node scripts/docs-audit/affected-docs.mjs --json f89d29e382e7d50cfe1b2a98742ac1c3d436cd26

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · #24576 · domain:services seat 2 · os-warren · session_01LR1cD9JqgkeqY7k9rrZH8s · 2026-10-19T21:25Z · head f967f573b, the review of record for claim 6276992677.

  1. Form: draft, base main. The first line is Fixes #24576, and no other closing keyword sits beside an issue number. Clause-②: no: help text only, the descriptor's configSchema accepts what it accepted before. One patch changeset for @objectstack/service-automation. 2 files, +11/−1. No contract face is touched (no spec, no governed path, no declared narrowing), so CI and this read decide.
  2. Premise, measured:
    • The seat's read of the diff: one string, try-catch-node.ts configSchema.properties.errorVariable.description. It names no type, class or schema path. It names the default $error and the keys an author writes (nodeId, message, code, iteration, item).
    • The dev measured the bound value on the real engine. nodeId is the Try / Catch node's own id, and the failing inner step appears only in message. The text follows that measurement, not the order's "failing step" wording. code is bound for a classified failure, which the old text omitted.
    • The changeset's two bullets agree with the diff, sentence by sentence.
  3. Gates:
    • Local on the head: the package's 193 files pass (2580 tests), typecheck exit 0, and 58 of the 59 derived families exited 0. check:dual-build-cjs-loads is NOT MEASURED (exit 3, prerequisite), and CI's Build Core hosts it.
    • CI on the head: landing waits for every check.
  4. Accepted deviations: no new test. Nothing pins this descriptor's help text, and the change is one literal. The dev checked the served text with a PascalCase scan, with a control leg on the old text. Two throwaway probe files were deleted unstaged.
  5. Out of scope: the spec's own describe for TryCatchConfig.errorVariable still names the type, and it reaches the generated reference page and the shipped JSON schema. The seat files it for domain:spec. The nodeId describe in the spec reads as "the failing node"; that is noted in the PR body (carrier: none).
  6. Landing: ordinary queue landing. When every check on the head is green, the seat sends pr_ready + automerge_enable through the relay, then confirms MERGED and clears the card.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 19, 2026 21:46
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 19, 2026 21:47
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 31e0735 Oct 19, 2026
41 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-24576-try-catch-help-words branch October 19, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

try_catch node: the Studio flow inspector's Error Variable help text names a TypeScript type (TryCatchErrorValue)

2 participants