openbor-diff-harness #95
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
| name: Diff Harness | |
| # Headless OpenBOR diff/debug harness build (native x86-64, no QEMU). Builds the | |
| # engine WITHOUT MiSTer/DDR3 so PAKs can be run off-device in CI/WSL and | |
| # classified (crashes / hangs / preprocess / render). NOT the ship build | |
| # (build_mister_arm.sh) and NOT committed to the ARM binary. Fast (~2 min). | |
| # | |
| # MILESTONE 1a: prove the engine compiles headless on x86. Iterates from there | |
| # (harness driver, --alarm/crash handlers, engine-logic patches, PAK mass-scan). | |
| on: | |
| # 🛑 PUSH TRIGGER IS LOAD-BEARING. This was workflow_dispatch-only, so the | |
| # hard gates it carries -- the untrusted-input parser tests and the pause-menu | |
| # mode-parity check -- ran only when somebody remembered. They did not run for | |
| # three days (2026-08-07 -> 08-10) while RED: the probe stopped compiling | |
| # (missing dirent.h) and nothing reported it. A gate nobody runs protects | |
| # nothing, and "green last time I looked" is not a status. | |
| # | |
| # The path list is an ALLOW-list, so the failure mode of getting it wrong is a | |
| # change that silently never gets checked. Prefer a wasted 2-minute run over a | |
| # missed one; add generously, remove only with a reason. | |
| push: | |
| paths: | |
| - '.github/scripts/**' | |
| - '.github/workflows/build.yml' | |
| - '.github/workflows/diff_harness.yml' | |
| - 'patches/**' | |
| - 'src/**' | |
| - 'tools/harness/**' | |
| - 'games/OpenBOR/_handler.sh' | |
| workflow_dispatch: | |
| inputs: | |
| reason: | |
| description: 'Run label' | |
| required: false | |
| type: string | |
| run-name: ${{ inputs.reason || 'openbor-diff-harness' }} | |
| jobs: | |
| harness: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # 🛑 This test existed on BOTH cores and NO workflow ran it. The staleness | |
| # guard it covers is what stops an older build finishing last and shipping | |
| # a stale binary over a newer one -- a failure that is invisible because | |
| # both runs report success. A guard whose test is never executed is a | |
| # guard nobody is checking. Triggered on build.yml too, since that is the | |
| # file it validates. | |
| - name: CI staleness-guard tests (commit-back cannot ship stale) | |
| run: python3 -m pip install --quiet pyyaml && python3 tools/harness/test_ci_staleness_guard.py | |
| # Hard gates, all of them BEFORE the engine build: they exercise the | |
| # payload parser, which turns a stranger's bytes into filenames on a root | |
| # filesystem. None needs hardware or ARM -- each cuts the shipped code out | |
| # of the emitted C and compiles it natively -- so there is no reason for | |
| # any of them to be anything other than mandatory on every run. | |
| # (This said "Runs FIRST" while sitting above the second of what are now | |
| # four steps; ordering is not the property that matters here, being | |
| # unskippable is.) | |
| - name: Pause-menu mode-parity (replay-desync gate) | |
| run: python3 tools/harness/menu_mode_parity_check.py | |
| - name: Save-payload extractor tests (untrusted input) | |
| run: python3 tools/harness/test_snap_extract.py | |
| # A .sNN in a payload is re-executable OpenBOR script that | |
| # loadScriptFile COMPILES AND EXECUTES as root. The extractor suite | |
| # above proves the extractor CONSULTS the grammar; this one drives | |
| # the grammar itself, cut from the emitted C. | |
| - name: Script-save grammar (a payload may carry a PROGRAM) | |
| run: python3 tools/harness/test_snap_script.py | |
| # The guard walks a VARIABLE-LENGTH identity section to find the payload | |
| # count; a computed offset landed inside the recorder stem. Only running | |
| # it against real takes at several stem lengths can tell the difference. | |
| - name: Probe refuses an unidentified take carrying a payload | |
| run: python3 tools/harness/test_probe_novouch.py | |
| # The suite above can only observe the READER, so a writer emitting | |
| # something its own reader refuses has no case that can see it. That blind | |
| # spot held two live bugs at once (the .scr embed, the unbounded identity | |
| # name), and this check found a third on its first run. | |
| - name: Writer/reader agreement (the reader-only blind spot) | |
| run: python3 tools/harness/test_writer_reader_agree.py | |
| - name: Build OpenBOR headless (x86-64) | |
| run: bash .github/scripts/build_headless.sh | |
| - name: Stage binary | |
| if: success() | |
| run: | | |
| mkdir -p bundle | |
| cp /tmp/OpenBOR_headless bundle/OpenBOR_headless 2>/dev/null || true | |
| ls -lh bundle || true | |
| - uses: actions/upload-artifact@v4 | |
| if: success() | |
| with: | |
| name: openbor-headless-linux | |
| path: bundle/* |