Files
zernie 1df264ce6b feat(cli)!: load specs in a vigiles-owned spec host, not a two-loader guess (#178)
Replaces the native-import/npx-tsx pair with ONE loader: a child process that
registers vigiles' own module hooks and streams results as NDJSON.

The measured bug: a consuming repo without tsx installed, where `npx tsx` went
to the registry — >60s against a 15s budget, so all 50 specs failed at once with
advice to run `npm run build`, a step that does not exist in a consumer install.

Why a redesign and not more guards: the seam between two loaders cannot be made
correct. The fallthrough guard had to answer "did the module body already run?"
and Node does not expose that bit — ERR_MODULE_NOT_FOUND and SyntaxError each
occur both before and during evaluation. The native path also had no time bound,
and an in-flight evaluation cannot be cancelled.

Three facts made it cheap: typescript is already a runtime dependency and
already used at runtime; specs already round-trip through JSON (the old tsx path
did exactly that); and the .js -> .ts rewrite is a rule to define, not inherit.

Fixes at once: no npx and no network; a stalled spec is killed and NAMED; double
evaluation is impossible by construction; resolution no longer varies by Node
version or by which loader won; the Windows quoting bug dies with `npx -e`.

Nine review findings closed — six by fixes, three by removing the seam.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014LVXMw2PJtPPtV8BoTANAd
2026-08-31 13:52:56 +05:00
..