A harness that runs the real binary, and the two bugs it could not see
Article 5 ended with a practice: after a fix is declared, run the thing and look, before believing the commit message. This essay is about what "run the thing" became once the project had more targets than emulators, and about the day that practice produced a confident green result for a port that did not work.
Why not just use an emulator
The obvious way to check a port is to boot it in an emulator and look. The project did that, and the repo is full of reasons it was not enough. Emulators want firmware the project does not have: the first Mac port commit, 08c8ab7a (June 12), justifies its harness as "ROM-free verification (Mini vMac/MAME need Apple ROM dumps we don't have)". They are not reproducible: the Amiga renderer commit, 7831ae74 (July 18), says "WinUAE screenshots aren't reproducible run-to-run (wall-clock boot timing + a live desktop clock), so they can't byte-verify a redraw refactor". And on a development machine driven over a remote desktop they cannot even be photographed reliably: the PC Engine port "had only ever been eyeballed blind in Mesen (whose GPU surface a GDI grab reads as black, F12 flaky under RDP)".
An emulator is a second opinion you cannot interrogate. When it shows a black screen you do not know whether the kernel crashed, the video chip was misprogrammed, or the screenshot tool failed. That last case is the PC Engine story below.
The house pattern
The alternative landed with the Mac Plus port on June 12, and the ports plan (docs/PORTS-PLAN.md) later wrote it down as the rule for every port: "Every port follows the house method: ROM-free scripted harness first, real emulator second, real hardware last, with committed + regression-tested milestones (the macplus M1->M3 shape)."
A harness, in this repo, is a Python program that loads the actual built binary, the same bytes that would go on a floppy or a cartridge, into a bare CPU core, plays the part of whatever firmware or hardware the kernel touches, runs it for a budget of instructions, and decodes the framebuffer out of emulated memory into a PNG. 08c8ab7a describes the first one: "Unicorn/QEMU 68000 core; harness plays the ROM: Start Manager, A-line _Read vs the disk image, register-level VIA/SCC, 6-byte frame interrupt injection + EXCP-0x100 RTE pops, PNG screenshots, scripted input".
The scripts read like a test plan a person would write. macplus/tests/m1.script waits ninety frames, shoots m1_boot, clicks a title bar and shoots m1_raised, drags a window and shoots m1_dragged, clicks the close box, drives the desktop icons with arrow keys and Enter, double-clicks one, and quits. Each shot is a file the next run can be compared against.
The pattern propagated by imitation. At v3.34.0 there are thirteen harness.py files in the tree, and their docstrings cite each other as precedent. Apple II, C64, VIC-20 and NES run on py65, a Python 6502. Game Boy Advance, WonderSwan, Raspberry Pi, PinePhone and PowerPC Mac run on Unicorn (ARM7TDMI, x86 in 16-bit real mode, AArch64, big-endian PPC32). The Apple IIGS needed a 65C816 and no Python core existed, so 83f6406d (June 15) records "cpu65816.py: a from-scratch self-testing 65C816 interpreter". The GBA harness states the principle as plainly as anything in the repo: "The AUTOTEST ROMs drive the pad themselves, so the harness only has to tick the scanline counter." Input goes through the kernel's real input path; the harness supplies the hardware, not the answers.
What this buys is determinism, and determinism is what lets you diff. The Amiga commit makes the claim and then tests it: "Verified: renders the desktop correctly, and two runs of the same build are BYTE-IDENTICAL (the property WinUAE lacks)." Once two runs of the same binary produce the same bytes, a refactor that was supposed to change nothing visible can be checked by a file comparison rather than by an agent's assurance that it looked fine. The modern PC does the same with QEMU instead of a CPU core: tools/qemu_test.py runs it with -display none, asks its monitor socket for a screendump, and converts that to PNG itself. The trust anchor is the same: a headless run, a picture, a comparison.
The day the harness was wrong
Now the part that matters, because a method is only worth describing if you also describe how it fails.
On June 17 at 10:46, f8ce0fde landed: "pce: complete the PC Engine port (HuC6280 + VDC) — M1-M3 + game + audio, harness-verified". The message explains that the port "sat unverified" because the Mesen screenshots were unreadable, and that this was "Resolved with a ROM-free HuC6280 harness (pce/harness.py): a py65 65C02 core extended with the TAM/CSH opcodes + the MMU + a model of the VDC write path (MAWR/VWR, status vblank bit) and the VCE colour table, decoding the BAT to a PNG." Seven milestone screenshots rendered. The commit closes: "Nothing faked; the 'uniform-colour/hang' seen earlier was a Mesen capture/diagnosis artifact, not a code defect."
Six hours later, at 16:39, 662c0f15: "pce: initialize the VCE control register — fixes black screen on real hardware". The port had been flashed to a TurboEverDrive and booted to nothing. The diagnosis: a HuCard on a flash cart has no System Card to initialise the video colour encoder, so its control register is undefined at reset. "The harness models the VCE palette but not the control register, so the omission was invisible in emulation."
That fix was real, and it was not enough. At 22:41, bb4cb627: "pce: fix real-hardware black screen (HuC6280 zp/stack map + VDC zp-folding)". Its first paragraph: "The PC Engine port booted to a black screen on real hardware (TurboEverDrive, confirmed on two carts) while the py65 harness rendered every milestone. Two silicon bugs, both masked by the harness".
The two bugs explain why a harness in particular could not see them. The HuC6280 is a 6502 derivative that hard-wires its zero page to logical address $2000 and its stack to $2100, and the port had its RAM and I/O banks mapped the wrong way round, "so every jsr/rts/zero-page access hit I/O." And the video chip's registers live at $0000 through $0003, below $100, so the assembler encoded every store to them as a zero-page instruction, which on this CPU goes to RAM: "so all VDC/VRAM writes silently landed in RAM (palette loaded fine via VCE at $0400+, but VRAM stayed empty)."
The reason the harness passed: "The py65 harness cannot model this port -- py65 hardwires zp/stack to $00xx/$01xx and the HuC6280 relocation lives in addressing-mode logic, not the memory bus -- so it is marked superseded by the Mednafen tooling." The harness had been built by extending a 6502 core with the opcodes the kernel used, not by changing the core's idea of where the zero page is, because nobody knew that mattered. A zero-page load and an absolute load of the same address arrive at the harness's memory as the same read of byte zero. It did not refuse to model the relocation; it accepted both instructions and treated them identically, which is exactly the case the hardware distinguishes. The file now opens with a box reading "SUPERSEDED by Mednafen for this port" and is "kept only as a record of the VDC/VCE decode + BAT-render path."
I want to be precise about what went wrong, because it is not "the harness was a bad idea". The morning commit was right that the Mesen black screen had been a capture problem; the harness proved the binary drew a launcher. What it could not prove was that the binary drew a launcher on a HuC6280, because the core underneath it was not one. "Harness-verified" was true and "therefore it works" was not, and the commit message collapsed the two.
The Mac port had shown a gentler version of the same shape five days earlier. 4e9ce4d0 (June 12): "First real-hardware run (Mac SE + FloppyEmu) died with Sad Mac 0000000F 00000001". The boot code hard-coded drive 1; a FloppyEmu on a real SE's external port is drive 2. "Every emulator mounts the image as drive 1, which is why Mini vMac (Plus and IIcx ROMs) never caught it." Neither did the harness. The fix did the right thing with that: the harness now boots from drive 2 and its disk reads "ASSERT the kernel echoes that drive", so the bug class became catchable there instead of invisible by construction.
The claims ledger at v3.34.0 carries the consequence as policy: "'Emulator-verified' and 'runs on the real machine' are different claims, and the distance between them is where operating systems actually break. They are kept in separate columns here for that reason." Of the 22 platforms, six are verified on real hardware without caveats and "The rest are verified only in emulators or instruction-level harnesses." The PC Engine sits in the real-hardware column today. It got there through Mednafen and two flash carts, not through the harness that had declared it done.
The same lesson, in an editor
Two months later the project's code editor, UnoCode, produced the same failure in a different domain, and this time the commit message named the principle. UnoCode colours source with TextMate grammars, the JSON files VS Code uses, and each rule is a regular expression compiled by the editor's own regex engine. Desktop commit 9ce89a6 (2026-08-22) is titled "UCD-28: TextMate fidelity - 36.7% of TypeScript loaded, now 99.8%", and its first heading is "THE NUMBER IS THE POINT":
A rule whose regex will not compile is silently dropped: uc_lang.c leaves the slot inert and says nothing. So "real published grammars fail to load or mis-colour" understated it. Measured with tools/rx_grammar.c, added here: Microsoft's TypeScript 189 of 515 patterns 36.7% -> 99.8%; Microsoft's C++ 350 of 1083 32.3% -> 100%. Two thirds of every rule was being discarded, in silence, and the editor reported the grammar as loaded.
The measuring tool's own header explains why a tool had to exist at all: "'the engine supports lookaround now' is a claim about a feature, and the claim that MATTERS is about a file: how much of Microsoft's TypeScript grammar does this editor actually load?" That is the harness idea again, run against a grammar instead of a ROM: do not ask whether the feature is implemented, execute the real input and count what came out.
Then the commit draws the PC Engine distinction explicitly, under the heading "THREE OF THOSE WERE SILENT WRONGNESS, WHICH IS WORSE THAN REFUSAL": "A refused pattern leaves its rule inert and the text uncoloured. A pattern that compiles to something ELSE colours it wrongly, or matches nothing while looking like it should." An atomic group (?>abc)d "compiled to d, because the flag parser ate >abc as flags"; (?i)abc "compiled a group containing the letter i". The fix is a parser that "consumes only characters that are flags and refuses the rest, so the next construct nobody has taught it fails visibly instead of being swallowed." That is py65 and the zero page, word for word.
The same commit found a thing a screenshot cannot see. Colouring 1,278 lines of TypeScript took 32 seconds; a per-line match cache brought it to 1.33. "That regression is invisible to every other kind of test - the scopes come out identical - so the editor now reports its own regex execution count and the gate asserts a ceiling on executions per line." Disabling the cache on purpose "makes it fail with '1171 regex executions per line for a 60-rule grammar' against a limit of 240; with the cache it is 77." Byte-identical output is not proof that nothing changed; you have to pick the quantity that would change and assert on that.
And the editor's own gate has a blind spot of the harness kind, structural rather than accidental. UnoCode is developed in its own public repository and the OS vendors it (9d5deabe, 2026-08-21), and the desktop build compiles the editor and its foundations, not the kernel. 029a4f17 (2026-08-21) records the consequence on a one-line change: "the UnoCode DESKTOP tree compiles the editor module and its foundations, not the kernel, so pc64_modload.c is not in its source list at any warning level. It built, gated and ran. pc64's own gate caught this on the first try, which is the argument for running it before pushing rather than after." A green gate on one platform is a harness result: true for the bytes it executed, silent about the bytes it never loaded.
The lesson
Every verifier in this story executed the real binary and produced a real picture, and every one of them still said yes to something broken. The PC Engine harness, because its CPU core accepted two instructions the hardware distinguishes. The Mac harness, because it mounted the disk where the bug could not bite. The regex engine, because it compiled patterns it had misread. The desktop gate, because it passed a kernel it had never compiled.
A verifier is only as trustworthy as the set of things it refuses: build it to fail loudly on everything it does not model, then read its green result as a claim about exactly that set and nothing more. The harnesses that earned their keep are the ones changed after a miss to assert on the missed thing: the drive number, the regex count per line, the rule-drop diagnostic. The one that was retired is the one whose miss could not be expressed in its own terms at all, and the honest response was to write "SUPERSEDED" across the top of it rather than keep citing it.
None of this works unless somebody writes down which gate proves what, which is the job of the standing rules and handoff documents the next essay is about.
Sources: https://github.com/hmofet/unodos, commits 08c8ab7a, e1f5dd69 and 4e9ce4d0 (June 12), 83f6406d (June 15), f8ce0fde, 662c0f15 and bb4cb627 (June 17), 7831ae74 (July 18); docs/PORTS-PLAN.md, PLATFORMS.md as reconciled 2026-08-21, macplus/tests/m1.script, the harness.py docstrings under apple2/, c64/, vic20/, nes/, gba/, ws/, rpi/, pinephone/, ppcmac/, iigs/, macplus/, pce/ and pc64/, tools/qemu_test.py. after v3.34.0: unodos 029a4f17, 9d5deabe, e57a9372; hmofet/unocode-desktop fccbd4f, 9ce89a6 and its tools/rx_grammar.c.