Skip to content

Fix: the tables route marks runtime.json "rests"; module:doctor reads them from the package - #1973

Merged
repeat98 merged 2 commits into
mainfrom
fix/tables-route-rests
Nov 22, 2026
Merged

repeat98 merged 2 commits into
mainfrom
fix/tables-route-rests

Conversation

@repeat98

Copy link
Copy Markdown
Owner
  • What was wrong or hard: The Octatrack tables route (build.py --octabam-tables, runtime_units.compile_linked, the route Mute Modes is built on) ignored runtime.json "rests" without any message. A Mute Modes package that answers ev_in_use and lists five frame detours under "rests" built without a single rest mark, so the base would leave those detours patched while the module rests, and their frame cost would stay. module:doctor's "cost at rest" line still said ✓, because it reads runtime.json, not the package.
  • What this changes:
    • compile_linked marks the "rests" sites the way build.py's octabam route does, and refuses an address that is not one of the module's own detours (a table reference or a poke never rests).
    • module:doctor "cost at rest" (scripts/module-cpu-price.mjs) now reads the rest marks from the committed USB package of the module's current version (bit 7 of a site's length byte, loader.h RUNTIME_SITE_RESTS). It fails when an address runtime.json names is not marked there. With no package of that version committed yet (a draft), it reads runtime.json as before, and the doctor's packages line reports the missing package.
    • candidate-recipes.json re-pins runtime_units.py for both table and cave ports (cc-map, mute-modes), because their recipes pin the builder files they run.
    • Changelog: changelog/2026-11-22-tables-route-rests.md.
  • How I checked it:
    • npm run pr:ready: Ready (sdk:check 721 cases, the module doctor test).
    • New sdk/tests/test_runtime_units.py case: a fixture detour listed in "rests" gets the flag in the built package, and the table reference does not; a "rests" naming the table reference is refused. It fails without the fix (6 != 134).
    • New scripts/module-cpu-price.test.mjs case: a committed package without the mark fails, with the mark passes, and with no package of that version it falls back to runtime.json. It fails without the change.
    • python3 -B scripts/octatrack-module-packages.py --check: every published package is identical. Mute Modes 0.2.2 still rebuilds to d8b871e3….
    • With the fix, a Mute Modes branch that rests (held on module/mute-modes-rest-held behind Mute Modes 0.2.3: answers ev_trig_muted (#777) #1652) builds with exactly its five detours marked.
  • Tested on a unit: Not tested on a unit: no built package or base changes, and every published package rebuilds byte for byte.
  • What the guides lacked or got wrong, and where I fixed it: Nothing in the guides. The gap was a check: the doctor trusted runtime.json, and it now reads the package.

Edge cases

Case Why this change makes it a risk How run Result
Published table and cave packages (Mute Modes 0.2.2, CC Map) a builder change could move their bytes octatrack-module-packages.py --check pass: identical
"rests" naming a non-detour site a table reference or poke put back to stock would break the module's menu test_runtime_units.py pass: refused
A module on main whose machine port or runtime.json lists rests (POLY8, others) the doctor now fails a package without marks module-cpu-price.test.mjs "holds on main", module:doctor -- poly8 pass
A draft with no package of its version the doctor must not fail on a package that does not exist yet module-cpu-price.test.mjs pass

Validation commands and results: see "How I checked it".

🤖 Generated with Claude Code

… them from the package

runtime_units.compile_linked (build.py --octabam-tables, Mute Modes' route) dropped
runtime.json "rests" without a word, so a table module's detours stayed patched while
it rested. It now marks them as build.py's octabam route does and refuses an address
that is not one of the module's own detours. module:doctor's cost-at-rest line reads
the marks from the committed USB package of the module's version and fails when one
runtime.json names is missing. Every published package rebuilds byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Nov 22, 2026
@repeat98
repeat98 enabled auto-merge November 22, 2026 07:51
@repeat98
repeat98 merged commit b5c61fc into main Nov 22, 2026
13 checks passed
@repeat98
repeat98 deleted the fix/tables-route-rests branch November 25, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant