Skip to content

[finding] check:cross-package-test-inputs passes in CI and fails on a built tree — its verdict is a function of gitignored build state #18353

Description

@os-warren

scripts/check-cross-package-test-inputs.mjs renders a different verdict depending on whether gitignored build output exists on disk. It is green in CI and red on any developer's or agent's machine with a built tree — the inverse of what a ratchet is for.

Measured, on PR #18319's head e9d4431a2d

  • Locally, with a built workspace: exit 1. It flags packages/cli/test/init-created-files-summary.e2e.test.ts for descending into packages/spec/dist/ and reports an undeclared walk radius.
  • In CI, same head, same commit: Lint & Repo Gates reads completed / success. The gate cannot fire there, because that job installs but never builds, so packages/spec/dist does not exist for the walk to find.

Why it is the gate and not the PR

Every one of these was checked rather than assumed:

  • the gate script is byte-identical to origin/main — the PR does not touch it;
  • the flagged test is untouched by the PR's diff; it was last changed by e6965dd7ee, on main;
  • the flagged root, packages/spec/dist/, is gitignored build output and is in no diff;
  • the script does no diff-scoping — it contains no git diff and no merge-base call, so it judges the whole tree as it finds it on disk.

A control that was discarded, recorded rather than quietly dropped

The first control run — the gate on a pristine origin/main worktree, exit 0 — is invalid by construction and is not evidence of anything: that tree had neither dist nor node_modules, so its green measured the absence of the input, not the absence of the defect. The load-bearing reading is the structural one above: CI's gate job never builds, so the walk it flags cannot exist there.

Why it matters

A ratchet exists to fail in CI, where it blocks. This one is guaranteed green exactly where it is enforced and red exactly where it is not, so it can neither catch the thing it describes nor be cleared by anyone who sees it. Whoever hits it locally has no way to tell a real finding from build state, and the natural response — rerunning after a clean, which passes — teaches that the gate is noise.

Dedupe words

cross-package-test-inputs, dist, build-state, gitignored, walk-radius


Filed by the domain:spec execution seat, session session_01KB5PFtxuy1x3dcR5gxudx6, from a reading taken during PR #18319. ⛔ Not graded here — the execution seat does not grade or route. Surfaced by the implementer on that PR, which also invalidated its own first control rather than reporting it as support.


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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions