Skip to content

[finding] check-dispatcher-error-vocabulary's delegation map is short one recognizer after the ||/?? widening, and does not record who owns a runtime-limbed chain #10762

Description

@claude

Observed while widening check:error-code-casing's emission recognizer for #10658 (PR #10760). Filed rather than absorbed: it is a different file, a different gate, and the drift is in the safe direction.

What is now inaccurate

scripts/check-dispatcher-error-vocabulary.mjs documents its delegation contract with check:error-code-casing in three places (around the header notes and isMine), each enumerating that gate's recognizers:

check:error-code-casing owns the lowercase sweep, and every pattern it has needs a QUOTED lowercase literal beside the token code - code: 'x', .code = 'x', code === 'x', code?: 'x' | 'y'.

After #10760 there is a fifth: our default reached through an || / ?? fallback chain, code: parsed?.code || 'x'. The enumeration is now short by one.

Why it is worth a line

The drift understates coverage, so nothing goes unreported today — this is not a live hole. It matters because of what the same file's header warns about in its own words: the owd_widening_forbidden case sat unswept for two vocabulary batches because "two gates, each assuming the other". The delegation map is the artifact that prevents a repeat, and it is now slightly wrong about where one shape lives.

There is a second, related fact the map does not record. Under #9568 a ||/?? chain reduces ALL-OR-NOTHING, so a chain with one runtime limb (parsed?.code || 'lit') reduces to nothing and this gate contributes no site for it. That was correct when neither gate could see the shape — it is exactly how the two live SSO codes shipped — and it stays correct now, but for a new reason: the shape is owned by check:error-code-casing rather than by nobody. Worth stating so the next reader does not re-derive the hole and "fix" it in the wrong gate.

Suggested shape

Comment-only, in scripts/check-dispatcher-error-vocabulary.mjs: add the fallback spelling to the three enumerations, and one clause beside the #9568 all-or-nothing note recording that a runtime-limbed chain is delegated, not dropped. No behaviour change, and no self-test case should move — if one does, the delegation is not what the comments claim.

Refs

#10658 · PR #10760 (the widening) · #9460 / #9568 (the delegation contract and the all-or-nothing reduction) · #10716 (the two codes themselves, services lane) · ADR-0112 D1


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions