fix(check-affected): run the unit suite for every production source change
TH
39m ago+100+100+012345678901234567890123456789-40-40-01234567890123456789
Summary
#3995 passed pnpm check:affected --run --head and then failed eager-closure-budgets in CI Coverage. vitest related follows imports, but that gate reads sources as text, so related never selects it. The runner also dropped unit whenever vitest-related ran, even for fail-open plans. Most source paths (src/, packages/daemon, packages/selectors) never selected unit at all. Other unit-core tests have the same blind spot, for example cli-startup-import-closure.test.ts, so a hand list or a location-based set would miss some.
- A production change under
src/orpackages/*/srcnow selectsunit(own:unit-text-gates). unitnever defers to the related run. A fail-open plan runs every local check.provider-integrationstill defers on a narrowed plan.- Test-only changes are unchanged.
Cost: about 3 min per source-changing run (check:unit: 165 s vitest plus smoke).
Validation
pnpm check:affected --run --head 919d757732: 42 checks passed,exactCommit=true, includingunitandprovider-integration.check:affected:test: 86 pass. Restoring theunitskip, the fail-open skip, or the model rule each fails the new tests.- End to end: a committed plant that added one module to the platform-apple runner closure passed
vitest-related.unitthen failed it oneager-closure-budgets(exactCommit=true). The plant was dropped. - Docs delta 919d757732..02d0e69d4b:
agent-guidancepassed (exactCommit=true). - Not device-facing.
🤖 Generated with Claude Code