smoke: pack a build of src (and guard src↔dist drift) #24

Open
opened 2026-10-13 21:27:37 +00:00 by orchestrator · 0 comments
Member

The smoke suite cannot validate a PR's src.

smoke/run.sh packs the repo with npm pack, and package.json.files ships only
dist/**/*. Because dist/ is committed only at release (ratified in session 100),
npm pack packs whatever dist happens to be in the working tree — so the smoke
suite exercises stale artifacts, not the change under review.

Concretely: PR #15 migrates the headless runner from CSS-class selectors to data-*
hooks. Its smoke guards (42d7d2e) assert the packed headless contains
data-testrunner-status and no old class selectors — but the committed
dist/headless is still the old class-based build, so those guards cannot pass
until the separate release dist commit lands. A hook/selector regression, or any
src↔dist drift, is invisible until release.

Proposal

  • Build before packing in smoke/run.sh, so the tarball reflects src. Note
    s/dist is not CI-safe today: s/clean runs an interactive git clean -i — so
    either split that out or invoke the individual esbuild/vite steps.
  • Release-time drift guard: after a fresh build, git diff --exit-code -- dist
    and fail if the committed artifacts differ from a build of the current src.
  • Longer term (session 100's open thought): move to a prepack build and untrack
    dist/ entirely.

Filed from session 101 while reviewing PR #15.

The smoke suite cannot validate a PR's `src`. `smoke/run.sh` packs the repo with `npm pack`, and `package.json.files` ships only `dist/**/*`. Because `dist/` is committed only at release (ratified in session 100), `npm pack` packs whatever `dist` happens to be in the working tree — so the smoke suite exercises **stale artifacts**, not the change under review. Concretely: PR #15 migrates the headless runner from CSS-class selectors to `data-*` hooks. Its smoke guards (`42d7d2e`) assert the packed headless contains `data-testrunner-status` and no old class selectors — but the committed `dist/headless` is still the *old* class-based build, so those guards cannot pass until the separate release dist commit lands. A hook/selector regression, or any `src`↔`dist` drift, is invisible until release. ## Proposal - **Build before packing** in `smoke/run.sh`, so the tarball reflects `src`. Note `s/dist` is not CI-safe today: `s/clean` runs an interactive `git clean -i` — so either split that out or invoke the individual `esbuild`/`vite` steps. - **Release-time drift guard:** after a fresh build, `git diff --exit-code -- dist` and fail if the committed artifacts differ from a build of the current `src`. - Longer term (session 100's open thought): move to a `prepack` build and untrack `dist/` entirely. Filed from session 101 while reviewing PR #15.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
legend/gooey-test#24
No description provided.