ReviewOS

home-lang/home

Promote require and snapshot workflow corpus without rewrites

#603
Closed chris opened this 9 days ago ·
9 days ago

Track removal of the require.test.ts and snapshot.test.ts corpus rewrites.

Scope:

  • run the copied require loader matrix unchanged in the full native VM
  • run inline snapshot rewriting, error snapshots, mixed numbering, and filtered snapshot writes unchanged
  • restore Latin-1 to UTF-8 formatting for snapshot values
  • honor Bun FORCE_COLOR / NO_COLOR precedence in Home output
  • make native corpus accounting select the final ANSI-formatted outer summary instead of summing nested bun test runs

Acceptance:

  • copied fixtures remain byte-identical to Bun at 4982b91
  • Debug and ReleaseSafe focused runs pass with no Home-injected TODOs
  • runtime unit suite remains green
9 days ago

Implemented and pushed in 0a08ebb.

Completed:

  • deleted rewriteRequireResolveCorpus and rewriteSnapshotTestCorpus
  • routed both untouched files through the full native VM
  • fixed Latin-1 snapshot formatting so 8-bit JS strings are encoded as UTF-8 instead of emitting invalid bytes
  • wired FORCE_COLOR and NO_COLOR plus TTY precedence into the Home output facade
  • fixed native corpus result accounting to strip ANSI and select the final outer test summary rather than summing nested subprocess summaries
  • added focused unit coverage for Latin-1 conversion, color precedence, ANSI summaries, and nested-run accounting

Validation so far:

  • Debug build: pass
  • runtime units: 1819 pass, 19 existing skips, 0 fail
  • require.test.ts strict: 10 pass, 3 upstream TODOs, 0 fail
  • require.test.ts routed: 10 pass, 3 upstream TODOs, 0 fail
  • snapshot.test.ts strict with FORCE_COLOR=1 and NO_COLOR unset: 62 pass, 1 upstream skip, 0 fail
  • snapshot.test.ts routed under the same Bun test color condition: 62 pass, 1 upstream skip, 0 fail
  • both copied fixtures remain SHA-256 identical to Bun 4982b91

ReleaseSafe compilation was interrupted intentionally when a separate root-checkout full test reduced free disk to about 1.3 GiB. No failure was observed; this issue remains open until that build and focused ReleaseSafe runs complete.

9 days ago

Completed by 0a08ebb and verified again in the ReleaseSafe artifact built at 11a7bcc.

Final acceptance:

  • Debug and ReleaseSafe builds pass
  • unchanged require.test.ts: 10 pass, 3 upstream TODO, 0 fail
  • unchanged snapshot.test.ts: 62 pass, 1 upstream skip, 0 fail under FORCE_COLOR=1 with NO_COLOR unset, matching pinned Bun
  • combined ReleaseSafe routed run: 72 pass, 4 TODO/skip, 0 fail, 0 unsupported
  • combined ReleaseSafe strict run: 72 pass, 1 skip, 3 TODO, 0 fail
  • copied fixture hashes remain byte-identical to Bun

No fixture, expectation, or deadline was weakened.

Sign in to comment on this issue.