Skip to content

Commit 7c1840e

Browse files
committed
fix(runtime): declare assignconst and codehelper in CodeStampShape (#9460)
The two new stamp positions the widened scan reports need members in the declaration table's own union, or every row carrying them is a tsc error. Caught by `pnpm --filter @objectstack/runtime typecheck`, not by the gate — the gate reads the table textually and never typechecks it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012WKSnqAaoqtW3QX7SSf1Vk
1 parent 871877b commit 7c1840e

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

‎packages/runtime/src/dispatcher-error-vocabulary.ts‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,29 @@ export type CodeStampShape =
8383
* (`${…}` → `*`, e.g. `APPROVAL_*_FAILED`) and a row must classify it. The
8484
* only verdict that can honestly cover a family is `runtime-pinned`.
8585
*/
86-
| 'objlittemplate';
86+
| 'objlittemplate'
87+
/**
88+
* [#9460] `err.code = CONST` — the assign position's constant sibling, and
89+
* the last of the four stamp positions to get one. #9223 closed exactly
90+
* this gap for object literals; the assign position kept it, so
91+
* `err.code = DENY_CODE` matched NOTHING and was not reported as
92+
* unresolved either.
93+
*/
94+
| 'assignconst'
95+
/**
96+
* [#9460] The stamp inside a CODE-CARRYING HELPER: a file declares one
97+
* factory — `postureError(code, message)`, `makeError(status, code,
98+
* message)`, a `constructor(code, message)` — and throws through it
99+
* everywhere. The stamp `(err as any).code = code` knows the token `code`
100+
* but not the value; the CALL SITE knows the value and never writes the
101+
* token. Every pattern in `check:dispatcher-error-vocabulary` AND in
102+
* `check:error-code-casing` anchors on that token, so both gates read such
103+
* a file and both reported nothing, each leaving it to the other — which is
104+
* how `plugin-security`'s live 403 sat unswept through two ADR-0112
105+
* batches. The scan joins the two halves through the PARAMETER, whose index
106+
* names the argument to read at each call site.
107+
*/
108+
| 'codehelper';
87109

88110
/**
89111
* Where the stamped code can end up. `dispatcher` is the door this card is

0 commit comments

Comments
 (0)