test(golden): dual-firmware golden fixtures (Momentum + Official) - #106
Merged
Conversation
Hardware golden fixtures whose recorded bytes are firmware-specific (cli_exec device_info, fs_push, mode_switch, lock_contention) now live under tests/golden/fixtures/<flavor>/; the firmware-independent offline fixtures stay flat. The recorder writes into the connected device's flavor dir (classified from device_info), and the replay tests are parametrized over both flavors. Captured the Official 1.4.3 set live to complement the existing Momentum mntm-012 set, so the drift guard now covers both firmwares. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closed
6 tasks
Mask the capture device's hardware_uid, radio_ble_mac, and hardware_name out of the committed golden fixtures and test mocks. The recorder now redacts these fields at capture time with equal-length masks so the length-prefixed protobuf frames stay decodable and no future re-record reintroduces a real hardware fingerprint into the public test corpus. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 10, 2026
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.
Addresses the golden-fixture reorg item on #99.
What
Hardware golden fixtures whose recorded bytes are firmware-specific now live in per-flavor subdirs; the firmware-independent offline fixtures stay flat:
harness.pygainsOFFLINE_FIXTURES,HARDWARE_FIXTURES,FIRMWARE_FLAVORS, andhardware_dir(flavor).record.pyclassifies the connected device's flavor fromdevice_infoand writes the hardware fixtures into that flavor's dir (make record-fixturesworks on either firmware).test_golden_fixtures.pyparametrizes the four hardware replay tests over both flavors; the drift guard checks the offline set is flat and each flavor dir holds the full hardware set.The Official set was captured live (device is currently on Official 1.4.3 following the #99 flash validation).
Tests
tests/golden/18 passed (hardware tests now run for both Momentum and Official). Full non-integration suite: 211 passed. ruff + ty clean.🤖 Generated with Claude Code