Test infrastructure release that closes the source-vs-bundle gap demonstrated by 1.5.1 → 1.5.2 hotfix. Pre-1.5.3, init-end-to-end.test.ts ran against TS source via vitest where __dirname resolves at src/commands/-depth; production dist/cli.js has different depth and was failing the same scenarios despite the in-repo test being green. 1.5.3 ships a tarball-level e2e test that catches this entire class of bug.
Daemon code unchanged — 1.5.0 48 h soak verdict applies to 1.5.3.
Added
init-tarball-e2e.test.ts— runsnpm pack+ clean install + spawns<install>/node_modules/.bin/massu initagainst each Phase 7 fixture in tmpdir, then asserts the same field-by-field expectations the source-level test asserts. Plus 3 tarball-shape gates:dist/cli.jsexists,templates/<id>/massu.config.yamlis well-formed YAML for every present id,<bin>/massu --versionmatchespackage.json:version. Tag-gated viaMASSU_TARBALL_E2E=1env var so it runs in CI but not in localnpm testby default.- Shared fixture module
src/tests/fixtures/phase7-init-fixtures.ts— single source for the 5-fixture test data consumed by BOTHinit-end-to-end.test.tsANDinit-tarball-e2e.test.ts. Adding a new framework = ONE entry that BOTH tests pick up. resolve-templates-dir-bundle-path.test.ts— 4 unit tests that explicitly catch the 1.5.2 path-off-by-one regression class. Sets up both bundled-cli (<pkg>/dist/cli.js) and legacy-nested (<pkg>/dist/commands/init.js) layouts in tmpdir; asserts the candidate-list logic resolves correctly in each. Future builds that move cli.js to a different depth fail this test before reaching the tarball test.- Hermetic build in tarball-e2e —
beforeAllrunsnpm run buildbeforenpm packso the test never reads a staledist/from a previous build.
Verification
npx tsc --noEmit: 0 errorsnpm test: 2079/2079 + 4 new (resolve-templates-dir) = 2083 source-level tests passMASSU_TARBALL_E2E=1 npm test: +8 tarball-level tests (5 fixtures + 3 shape gates) pass against the actual built bundlebash scripts/massu-pattern-scanner.sh: PASSbash scripts/massu-generalization-scanner.sh: PASS
Known follow-on
- AST adapter introspect output piping (
detected.<adapter-id>:block) — Plan 1.5.4 (docs/plans/2026-05-08-ast-introspect-piping.md). Hard prerequisite met now (1.5.3 ships the tarball-e2e gate that 1.5.4's variant-template-style changes need to validate against).