Blocked-by: #14954
Filed by the domain:spec execution seat for #14954 as an out-of-scope observation. Unassigned; domain:*, type and priority are triage's — this seat does not produce them. Observation class (a redundancy, not a defect): the code compiles and behaves correctly both before and after #14954 lands.
What
packages/services/service-automation/src/builtin/try-catch-node.ts (at origin/main 7087f99c, around :221-:240) builds the catch-region binding as an explicit local widening of the spec type:
const errorValue: TryCatchErrorValue & { code?: string } = {
nodeId: node.id,
message: lastError,
...(lastErrorCode ? { code: lastErrorCode } : {}),
...(loopFrame ? { iteration: loopFrame.iteration, item: loopFrame.item } : {}),
};
Its own comment says why: code (#14419) was bound alongside but was NOT declared on TryCatchErrorValueSchema, so it was spelled as an explicit widening rather than dropped, and the divergence was filed as #14954 against the spec lane.
Why it is now redundant
#14954 (the spec half, branch claude/issue-14954-try-catch-error-code-key) declares code: z.string().optional() on TryCatchErrorValueSchema, so the exported TryCatchErrorValue type already carries code?: string. The intersection TryCatchErrorValue & { code?: string } is then the same type as TryCatchErrorValue; it still compiles (measured: pnpm --filter @objectstack/service-automation typecheck exit 0 against the rebuilt spec dist), so nothing is broken — but the annotation and the comment paragraph explaining the widening now describe a divergence that no longer exists, which is exactly the kind of stale explanation the next reader will act on.
Suggested shape (for the domain:services seat, not a ruling)
Once #14954 has landed: annotate errorValue as plain TryCatchErrorValue, and rewrite the comment paragraph that begins code (#14419) is bound alongside but is NOT declared on TryCatchErrorValueSchema to state that the key is declared (pointing at the spec docblock). No behaviour change; no changeset needed beyond what the services lane's own convention asks for a comment-and-annotation edit.
⛔ Not done in #14954's PR: that file is domain:services and was in flight under the services lane's cards (#15616 / #15572) at dispatch time; the spec card was scoped to packages/spec and its generated followers only.
Refs: #14954 (the spec half) · PR #14948 / #14419 (the engine half that introduced the widening) · #14955 (the related but distinct $error refresh asymmetry finding)
Generated by Claude Code
Blocked-by: #14954
Filed by the
domain:specexecution seat for #14954 as an out-of-scope observation. Unassigned;domain:*, type and priority are triage's — this seat does not produce them. Observation class (a redundancy, not a defect): the code compiles and behaves correctly both before and after #14954 lands.What
packages/services/service-automation/src/builtin/try-catch-node.ts(atorigin/main7087f99c, around:221-:240) builds the catch-region binding as an explicit local widening of the spec type:Its own comment says why:
code(#14419) was bound alongside but was NOT declared onTryCatchErrorValueSchema, so it was spelled as an explicit widening rather than dropped, and the divergence was filed as #14954 against the spec lane.Why it is now redundant
#14954 (the spec half, branch
claude/issue-14954-try-catch-error-code-key) declarescode: z.string().optional()onTryCatchErrorValueSchema, so the exportedTryCatchErrorValuetype already carriescode?: string. The intersectionTryCatchErrorValue & { code?: string }is then the same type asTryCatchErrorValue; it still compiles (measured:pnpm --filter @objectstack/service-automation typecheckexit 0 against the rebuilt specdist), so nothing is broken — but the annotation and the comment paragraph explaining the widening now describe a divergence that no longer exists, which is exactly the kind of stale explanation the next reader will act on.Suggested shape (for the
domain:servicesseat, not a ruling)Once #14954 has landed: annotate
errorValueas plainTryCatchErrorValue, and rewrite the comment paragraph that beginscode (#14419) is bound alongside but is NOT declared on TryCatchErrorValueSchemato state that the key is declared (pointing at the spec docblock). No behaviour change; no changeset needed beyond what the services lane's own convention asks for a comment-and-annotation edit.⛔ Not done in #14954's PR: that file is
domain:servicesand was in flight under the services lane's cards (#15616 / #15572) at dispatch time; the spec card was scoped topackages/specand its generated followers only.Refs: #14954 (the spec half) · PR #14948 / #14419 (the engine half that introduced the widening) · #14955 (the related but distinct
$errorrefresh asymmetry finding)Generated by Claude Code