You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(test): resolve in-place package emit to .ts source in vitest, restoring both coverage attribution and subprocess artifacts (#8568)
Second, complete fix for the 2026-07-24 codecov/patch (0%/99%) incident.
The first fix (#8564) deleted the miner/MCP in-place build output before
the coverage run, which restored .ts coverage attribution and --changed
tracing -- but broke the other class of tests: subprocess-spawning ones
(the CLI harnesses and MCP stdio tests) run under plain Node outside
Vite's resolver and genuinely need the built lib/bin .js at spawn time
(node's ESM resolver does not fall back from a .js specifier to a .ts
sibling). Scoped post-fix runs failed in miner-discover-cli/--help,
miner-init-wizard e2e, and all 14 mcp-feasibility-gate stdio tests.
This replaces that approach: a resolve-stage vitest plugin rewrites
relative .js-suffixed imports that land inside
packages/loopover-{miner,mcp}/{lib,bin} to their .ts sibling when it
exists, so in-process imports always carry the source identity (correct
v8 attribution + import-graph tracing) while the built .js stays on disk
for spawned subprocesses. The #8564 ci.yml surgery (pre-coverage clean,
unconditional check-miner-package exclusion, trailing pack-integrity
step) is reverted -- the workflow returns to the #8514 shape, with the
plugin making it correct.
0 commit comments