Skip to content

spec's declared test-input radius omits packages/**/*.tsx while its tree-walking tests read .tsx — and the glob that would cover it is forbidden by a dispatch-gates self-test pin #16593

Description

@claude

CROSS_PACKAGE_TEST_INPUTS['@objectstack/spec'] declares the packages/ radius per extension:
*.ts, *.mts, *.cts, *.js, *.mjs, *.cjs, *.json, *.md, *.mdx, *.yaml, *.yml.
packages/**/*.tsx is not among them, and a *.ts glob does not match a .tsx path.

Two tests in that package walk the whole packages/ tree and do read .tsx:

Five files are in scope today, all in packages/client-react: realtime-hooks.tsx, context.tsx,
metadata-hooks.tsx, data-hooks.tsx, index.tsx.

Why the gate does not catch it

check:cross-package-test-inputs is green, and correctly so. Both walks descend with
readdirSync(dir) on a loop variable, so the escape verdict resolves while no path NAME does —
the trade pathExpression documents. The roster therefore gains no entry for the walked files, and a
glob that no roster path holds is judged only by its heldBy witness, not by extension coverage.
This is an instance of the class #15565 already describes (the gate cannot red an undeclared
tree-scoped walk inside an already-declared package); this card is the concrete instance, filed
separately because its remedy is blocked in a way #15565 does not cover.

Why it is not simply fixable by widening

The declaration's own comment forbids the obvious glob, with a measurement behind it:

⛔ Per EXTENSION under packages/, never packages/**: the dispatch-gates self-test pins that no
cross-package hint reaches packages/client-react's realtime-hooks.test.tsx, and a bare
packages/** was the one entry that covered a .tsx file

packages/**/*.tsx matches realtime-hooks.test.tsx, so adding it would turn that pin red. Whatever
the fix is, it has to reconcile the pin with a walk radius that genuinely includes .tsx.

Consequence, stated at its real size

Small but structurally real. A change confined to a .tsx file under packages/ does not put
@objectstack/spec into turbo ls --affected, and does not move the test task's cache key, so
neither spec test re-runs for it. For the D7 guard the input that could actually move is a door
translation arm (error?.code === 'X' with a { status, body: { code: 'Y' } } terminal) or an error
class appearing in a .tsx file. None exists today, and check:error-status-conformance in
Lint & Repo Gates reads the same corpus on a whole-tree population on every PR, so the derivation
itself stays covered there. What is not covered is the D7 guard's own assertion, which the
conformance gate does not make.

Filed unassigned by the seat that widened the second walk (PR #15750, card #15631). Not fixed there:
the remedy touches a declaration held by another pin, which is a different card's decision.


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

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions