Repository navigation
bench(RS-13): keep the boards' bench firmware and the offline encoder harnesses - #140
Merged
Merged
Conversation
… harnesses Saved before the RS-13.1 worktrees are removed and the bench is powered down: - firmware/firmware_bench_diag_0c1bb0a9.bin: the exact L072 bench build on both boards since 2026-09-15 (RS-12.15 v2, leg U "shipped build"), until now only an untracked file in the PC's build directory. - firmware/firmware_bench_diag_43f0a74c_fhss_gap1500.bin: the rejected, never-flashed A11 variant (branch imp/fhss-authority, now on origin). - tools_offline/: the no-radio harnesses from the encoder work: perf and byte-identity A/B, the A8 relabel evaluation, store replay and experiments, the FHSS-authority mutation check, and the 10-04 review's acquisition model, power analysis and TX-gap tools. READMEs give md5s, provenance and the hardcoded bench-PC paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The archived A/B harness is incomplete, and several tools can produce misleading or incorrect results.
Review effort: Balanced
Findings: 3
Open (5)
Missing reference run incorrectly reports BYTE-IDENTICAL · New Preserved archive lacks required inputs for push · New Bypassing resync cleanup causes spurious re-entry · New Safety claim overlooks ADB commands modifying the tractor X8 · New Incorrectly describes ADB board operations as device-free · New
What changed in this PR
Archives RS-13.1 bench firmware and offline analysis tooling without changing product code.
Changes:
- Preserves two L072 firmware binaries with provenance and flashing guidance.
- Adds encoder, relabel, resync, FHSS, acquisition, and statistical harnesses.
- Links the archived evidence from the session results.
All paths below are relative to bench-evidence/RS_13_vector_scene_2026-09-26/.
| File | Description |
|---|---|
firmware/firmware_bench_diag_0c1bb0a9.bin |
Preserves deployed bench firmware. |
firmware/firmware_bench_diag_43f0a74c_fhss_gap1500.bin |
Preserves rejected A11 firmware. |
firmware/README.md |
Documents firmware provenance and hashes. |
RESULTS.md |
Links archived firmware and tools. |
tools_offline/README.md |
Indexes offline harnesses. |
tools_offline/store_resync/ttl_rows.py |
Traces TTL removals. |
tools_offline/store_resync/exp_lostupd.py |
Exercises lost-UPD recovery. |
tools_offline/store_resync/exp_handover.py |
Exercises refresh handover loss. |
tools_offline/store_resync/episodes.py |
Summarizes resync episodes. |
tools_offline/store_resync/digest_pattern.py |
Reports digest windows. |
tools_offline/review_2026-10-04/txgaps.py |
Analyzes TX completion gaps. |
tools_offline/review_2026-10-04/switch_gaps.py |
Analyzes codec-switch gaps. |
tools_offline/review_2026-10-04/power.py |
Calculates frame-level power. |
tools_offline/review_2026-10-04/power_legs.py |
Simulates leg-level power. |
tools_offline/review_2026-10-04/drop_sweep.py |
Sweeps single-frame losses. |
tools_offline/review_2026-10-04/acq_sim.py |
Models FHSS acquisition. |
tools_offline/relabel_eval/run_loss.sh |
Runs relabel loss evaluation. |
tools_offline/relabel_eval/run_e2e.sh |
Runs end-to-end evaluations. |
tools_offline/relabel_eval/rl_screen.py |
Screens relabel metrics. |
tools_offline/relabel_eval/rl_scenarios.py |
Defines deterministic scenarios. |
tools_offline/relabel_eval/rl_report.py |
Summarizes relabel results. |
tools_offline/relabel_eval/rl_loss.py |
Measures loss behavior. |
tools_offline/relabel_eval/rl_features.py |
Extracts scenario features. |
tools_offline/relabel_eval/rl_e2e.py |
Runs encoder/store evaluations. |
tools_offline/relabel_eval/rl_common.py |
Provides shared relabel tooling. |
tools_offline/relabel_eval/old_rule_check.py |
Mutation-checks the old rule. |
tools_offline/relabel_eval/bench_fn.py |
Benchmarks relabel calculations. |
tools_offline/legtool/tablecheck.py |
Validates Markdown tables. |
tools_offline/legtool/seqpeek.py |
Inspects captured sequences. |
tools_offline/fhss_authority/mutate.sh |
Mutation-checks authority thresholds. |
tools_offline/fhss_authority/bindiff.sh |
Compares firmware symbols. |
tools_offline/encoder_perf/x8.py |
Runs benchmarks through an X8. |
tools_offline/encoder_perf/sync_new.py |
Refreshes A/B package copies. |
tools_offline/encoder_perf/order_check.py |
Checks reduction ordering. |
tools_offline/encoder_perf/miss_count.py |
Counts encoder cache misses. |
tools_offline/encoder_perf/micro2.py |
Benchmarks least-squares internals. |
tools_offline/encoder_perf/micro.py |
Benchmarks candidate formulations. |
tools_offline/encoder_perf/mean_check.py |
Checks mean bit identity. |
tools_offline/encoder_perf/exact_check.py |
Checks vectorization identity. |
tools_offline/encoder_perf/compare.py |
Compares benchmark outputs. |
tools_offline/encoder_perf/bench.py |
Generates deterministic benchmarks. |
tools_offline/encoder_perf/ab.py |
Runs interleaved encoder A/B tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+10
to
+11
| if rb is None: | ||
| continue |
Comment on lines
+34
to
+38
| for f in ("bench.py", "ab.py", "exact_check.py", "order_check.py", "sources.npz"): | ||
| adb("push", f"{HERE}/{f}", f"{REMOTE}/") | ||
| for d in ("abold", "abnew"): | ||
| for f in ("__init__.py", "encode_vector.py", "vector_extract.py", "vs1_codec.py"): | ||
| adb("push", f"{HERE}/{d}/{f}", f"{REMOTE}/{d}/") |
| orig(rec) | ||
| st._ok_run = st._ok_run + 1 if st._digest_ok else 0 | ||
| if st._resync and st._ok_run >= UNSTICK: | ||
| st._resync = False |
Comment on lines
+5
to
+6
| fix, A8 relabel tuning) does not have to rebuild them. None of them touches a | ||
| board or a radio. |
| @@ -0,0 +1,62 @@ | |||
| """Tractor X8 CPU-only bench helper (no devices, no radio, /tmp/lifetrac_bench only). | |||
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mware inventory Answer to "does the firmware include DTS, FHSS and the auto switch, or are we missing older firmware?": - 0c1bb0a9 (on both boards) rebuilds byte-identical from main (mingw32-make bench, 2026-10-04); it has profiles 0/1/2 (bench 915, FHSS 50ch BW250, DTS BW500) with runtime CFG_SET(REG_PROFILE) switching. The auto switch is base-station software (AutoRadioPolicy) and needs nothing more from the firmware. - Older bench builds that survived only outside git are now saved: 5a160e4a (RS-12.15 v2 as flown in legs R/T; recovered from a local reflog-only object that expires ~10-14), e8ad8424 (the RS-12.15 A/B "old fw", from the LifeTrac-oldfw worktree) and 8c112e6f (legs D/E, known STATS-tail bug; recovered unreachable object). - firmware/README.md lists every flashed build with its status; the lost binaries (2ee69f9c, 67a4c0a4, RS-11.5 leg D/G, 1f691312) carry no feature 0c1bb0a9 lacks. BENCH_RUNBOOK: main now builds 0c1bb0a9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… state captured Answer to "is there other custom firmware on other chips, or software in the X8 OS, that we need to save and document?": - Beyond the L072 (already saved), the only probable custom firmware is a May 2026 bench sketch left in the X8 STM32H747's M4 slot (bank 2); the M7 runs stock x8h7 again; every other chip is stock. - The X8 Linux holds LifeTrac customizations (sudoers, masked Foundries units, enabled-but-failing lifetrac-base units, NIC pin, tractor provisioning and WiFi-off pieces, deployed compose trees, three custom docker images, /home/fio tools and flash logs). - bench_tools/BENCH_BOARDS.md documents both boards, every chip, the customizations, where each is saved (repo vs the private archive outside git) and the open items (tractor capture, M4 bank-2 dump on GO, WiFi password rotation, the base's lifetrac-base units). - capture_board_state.sh (read-only, secrets withheld) + pull_board_state.sh (adb, strips the shell's terminal prefix); first run on the base: bench-evidence/board_state_2026-10-04/base/ (host key and machine-id excluded). BENCH_RUNBOOK: base does not stay off after poweroff, L072 boots RXCONT, PC toolchain versions. TODOs: the 2026-05-04 tractor_h7-on-M7 status marked superseded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s kept asleep - Power cycle 2026-10-10: both L072s booted listening (0x85 RXCONT) and were parked to 0x80 SLEEP within a minute (tractor 16:58:59Z via adb, base 17:01:29Z via ssh because its USB did not enumerate); the tractor's lifetrac-camera unit was stopped first. - bench-evidence/board_state_2026-10-10/tractor: read-only capture (LmP 4.0.3-674-88 / 5.10.93; provisioning, WiFi-off and lifetrac-tractor-compose units; images; /home/fio board-only files incl. wdog_regs.py and the 09-15 L072 flash logs). gshadow, machine-id, the 5star WiFi profile and the dropbear key withheld; docker/key.json removed by hand and now in the capture filter. - Finding: the tractor's stm32h7-program reflashes the H747 M7 bank (stock x8h7, 0b03cd9c...) at every boot because the version read times out; bank 2 (M4) untouched. - BENCH_BOARDS.md: tractor section now measured; open items updated (base USB, tractor compose unit, stored WiFi profile). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, power-up radio guards) step1_pass.sh (camera-only step 1 without the fix tree) and the three power-up guards used on 2026-10-04/10 (stop the tractor's lifetrac-camera unit, park both L072s, run the read-only capture). They still carry this session's paths and serials, like the other RS-13 scripts; a bench.env parameterisation is the follow-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dorkmo
added a commit
that referenced
this pull request
Oct 11, 2026
Conflicts in BENCH_RUNBOOK.md and RS13_VECTOR_LEG.md resolved by keeping both sides: the 2026-10-10 amendment notes and carrier-range detail from this branch, the bench.env / serial / HostIp placeholders and legs/ pointer from the bench kit. base_station on the merged tree: 1598 passed, 2 skipped. Co-Authored-By: Claude Opus 5.5 <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.


Saves what the RS-13.1 session would otherwise lose when its worktrees are removed and the bench is powered down. It adds evidence and tooling only, with no product code. Everything lives under
bench-evidence/RS_13_vector_scene_2026-09-26/.firmware/: every L072 bench build that still existed anywhere, plus an inventory of every flashed build.firmware_bench_diag_0c1bb0a9.bin: the firmware on both boards since 2026-09-15. It rebuilds byte-identical frommain(mingw32-make bench, re-checked 2026-10-04). It has all three radio profiles (bench 915, FHSS, DTS) and runtime profile switching, which is everything the base-station auto switch (AutoRadioPolicy) needs.firmware_bench_diag_5a160e4a.bin: RS-12.15 v2 as flown in legs R/T. It was recovered from a reflog-only object in the PC's local git, which would have expired around 10-14.firmware_bench_diag_e8ad8424.bin: the pre-clock-authority "old fw" used in the RS-12.15 A/B.firmware_bench_diag_8c112e6f.bin: legs D/E, with the known STATS-tail bug; recovered.firmware_bench_diag_43f0a74c_fhss_gap1500.bin: the rejected A11 variant, never flashed. Its source branch isimp/fhss-authority.README.md: md5s and provenance, the feature summary, and the status of every flashed build. The lost ones (2ee69f9c,67a4c0a4, the RS-11.5 leg D/G builds, and1f691312) carry no capability that0c1bb0a9lacks.tools_offline/These are the no-radio harnesses from the encoder work, with a README covering purpose, provenance and the hardcoded bench-PC paths:
c7f3926ebyte-identical);RESULTS.md: pointers to both folders.legs/session_end_poweroff_2026-10-04.txt: the read-only radio check and the power-down record.BENCH_RUNBOOK.md:mainnow builds0c1bb0a9.🤖 Generated with Claude Code