perf(check-affected): keep the related run out of the unit projects on fail-open plans too

Merged
TH
3d ago
+20-8

Summary

Follow-up to #4040. Fail-open plans run every local check, unit included, but their vitest related run still searched the unit-core and fuzz-worker projects. unitSuiteRuns now depends only on unit being a runnable check, so fail-open plans also add --project=!unit-core --project=!fuzz-worker.

Safe: the exclusion stands in for nothing. unit still runs in full, and the run stops at the first failure, so no pass skips unit. The provider-integration deferral is a stand-in, so it stays off for fail-open plans.

2 files, no scope expansion.

Validation

At 89ef2d88d7:

  • pnpm check:affected:test: 91/91 pass. The fail-open test asserts both exclusions plus check:unit and provider integration still running. A new test asserts that a fail-open plan fails on a check:unit failure.
  • Planted reds, reverted: restoring !plan.failOpen in unitSuiteRuns, or dropping it from relatedSelected, fails the fail-open test.
  • Related run for a package.json change at load average 56-106: 2003 files / 566 s before, 164 files / 123 s after. The same provider-integration contention failures appeared in both runs.
  • pnpm check:affected --run (FAIL-OPEN, exactCommit: true): the receipt's related command carries both exclusions and passed. Every check before unit passed. unit failed twice, in a different test each time: daemon-registration-owner.test.ts (forced vs graceful), then scripts/fuzz/harness.test.ts timeouts. Each file passes on its own, and src/, packages/ and scripts/fuzz/ match main. The cause is unproven.
  • CI owns integration and coverage.

šŸ¤– Generated with Claude Code