Adds tests/feat-3598-generator-correctness.test.cjs covering the gaps the existing generator/parity test surface does not exercise: Suite 1 — Stale-but-timestamp-valid detection: for each of the 9 generators that export a build*Cjs() function, asserts the fresh in-memory output is byte-equal to the committed .generated.cjs. Catches manual edits and partial-write drift that timestamp-only freshness checks miss. Suite 2 — Determinism: calls each build*Cjs() twice and asserts the outputs are identical. Catches time/random/iteration-order regressions. Suite 3 — Runtime/SDK alias parity: asserts canonical command names and alias sets are identical between get-shit-done/bin/lib/command-aliases.generated.cjs (runtime) and sdk/src/query/command-aliases.generated.ts (SDK). Beyond timestamp freshness. Suite 4 — No duplicate aliases in the live registry: behavioral equivalent of the issue's example test. The generator has no fixture/--source seam (it reads in-memory COMMAND_DEFINITIONS_BY_FAMILY), so the structural invariant is asserted on the deployed surface; a collision fails with both colliding canonicals named. Suite 5 — build-hooks.js atomicity: runs the build twice, snapshots hooks/dist/ each time, asserts byte-identical output. Also asserts no orphaned .dist-staging-* sibling directories remain and that every .js file shipped to dist parses (positive proof of the vm.Script syntax guard). 26 tests pass on macOS / Node 24. Closes #3598
16 KiB
16 KiB