Repository navigation
[finding] the silent partial-filter drop #17853 fixes in packages/cli is live in the seven other packages that declare vitest projects #17978
Description
⛔ Filed bare — no domain:*, no priority, no type. Those three are triage's write.
Filed by the domain:cli execution seat while delivering #17853 (PR #17965). ⛔ Not folded into that PR: its landing site is packages/cli, fixed by triage (5651476033).
The mechanism, and why it is not package-specific
#17853 is about a vitest file filter that selects nothing. Measured there, vitest 4.1.11:
- when every positional filter selects nothing, vitest is already loud —
printNoTestFound()printsNo test files found, exiting with code 1; - when at least one filter selects a file, the filters that selected nothing are dropped with no diagnostic at all, and the run is green.
Both behaviours live in vitest itself — TestProject.filterFiles and Vitest.start in dist/chunks/cli-api.*.js — ⛔ not in any config of ours. So the false green is available in every package where a narrowing exists for a filter to fall outside of.
The population
Eight packages declare vitest projects:
packages/types/vitest.config.ts
packages/objectql/vitest.config.ts
packages/rest/vitest.config.ts
packages/runtime/vitest.config.ts
packages/spec/vitest.config.ts
packages/qa/dogfood/vitest.config.ts
packages/cli/vitest.config.ts <- the one #17853 covers
packages/core/vitest.config.ts
PR #17965 adds packages/cli/vitest-filter-preflight.ts, invoked from that package's config alone. The other seven carry no preflight.
⚠️ What is measured and what is not — the boundary, not a clean bill
- MEASURED, in
packages/cliat84e6b05b6: naming two unit-tier paths plus one integration-tier path under--project unitprintsTest Files 2 passed (2)— three named, two counted — anddiffagainst the run naming only the two is empty but for timestamps and durations. The discarded path's name appears nowhere in vitest's own output. - ⛔ NOT MEASURED: the same probe has not been run in any of the other seven. The claim above is a derivation from vitest's own package-independent code path, not seven readings. Whoever picks this up should measure before fixing, exactly as [finding] vitest 的 --project 过滤器落空即静默成功 —— 点名一个 integration 文件跑 --project unit,报它是通过的文件、执行零个用例,并把它从文件计数里减掉 #17853's acceptance required — that card's own headline repro turned out to be false while its defect class was real.
Why it is worth a card rather than a note
The cost is measured and already paid once: #16872's delivering dev verified with a narrowed --project run, read green, pushed, and CI went red on Test Core with the failing assertion inside a file the local run had discarded. Nothing about that sequence is specific to packages/cli.
Dedup
One directed search (MCP search_issues, after the repo-scoped REST search endpoint refused this session: This GitHub API path is not available: sessions are bound to their configured repositories). Query: vitest --project filter selects no test files silently dropped across packages that declare vitest projects. 8 results, one open — #17853 itself, which is the built-in positive control that the probe is not blind. ⛔ No open duplicate for the seven-package extension.
Refs
#17853 / PR #17965 (source) · #16872 (the round it cost) · packages/cli/vitest-filter-preflight.ts (the shape a fix could take)
Activity