Add the core regression harness to the repo and CI - #51
Merged
Conversation
The headless harness that verified the portability refactors (PRs #39/#48/#49/#50) lived in /tmp; it now lives in core/test/ with checked-in baselines and a CI job, so every PR proves the core's behavior unchanged — or shows an explicit baseline diff when a change is intentional. `make -C core/test check` builds the core with the system compiler and diffs per-virtual-second FNV hashes of semantic machine state (register values, RAM, LCD gddram — never raw struct bytes, so the hash survives layout changes) against two baselines: - a BIOS-only boot (the embedded BIOS runs its no-cartridge loop) - a synthetic peripheral workout: since BIOS idle leaves the cartridge-driven hardware cold, the harness scripts the bus directly — patterned tiles/OAM in RAM, blitter map+sprite rendering with LCD copy, all three timers in both widths with compares feeding audio, and per-second input wiggles for edge IRQs Cartridge-driven code paths still need a real ROM locally (`core/test/harness rom.min 30`); documented in CLAUDE.md along with the baseline-regeneration workflow for intentional changes. Both baselines verified byte-identical between g++ and clang builds, and deterministic across repeated runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The headless harness that proved every portability refactor bit-identical (PRs #39/#48/#49/#50) lived only in
/tmp— one reboot from vanishing. It now lives incore/test/with checked-in baselines and a third CI job.make -C core/test checkbuilds the core natively and diffs per-virtual-second FNV hashes of semantic machine state (register values + RAM + LCD gddram — never raw struct bytes, so hashes survive layout changes) against two 30-second baselines:Workflow: an intentional behavior change regenerates with
make -C core/test baselineand the baseline diff appears in the PR — behavior changes become explicit and reviewable. Real-ROM verification (core/test/harness rom.min 30) remains the local gold standard for cartridge-driven paths; documented in CLAUDE.md.Verification
make -C core/test check(notable.h, no binary) passes — same path CI takes; the newCore regressionjob on this PR is the live proof🤖 Generated with Claude Code