Skip to content

Fix: a base without the resident stock hooks links again - #1861

Merged
repeat98 merged 74 commits into
repeat98:base/octatrack-nextfrom
Lasl00:fix/minimal-base-links-0711
Nov 21, 2026
Merged

repeat98 merged 74 commits into
repeat98:base/octatrack-nextfrom
Lasl00:fix/minimal-base-links-0711

Conversation

@Lasl00

@Lasl00 Lasl00 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor
  • What was wrong or hard: A base built without the resident stock hooks no longer linked. machine_registry.c counts every machine assignment into modwerk_machine_assigned, but only controller_board.c defined that variable, and only a base with --resident-stock-hooks links that file. A minimal development base (--site-events --table-owners, the minimal profile in docs/MODULE_PERFORMANCE.md and the A side of the CPU baseline agreed on the agent board) stopped at the core link: "Core has unexpected unresolved imports: [... 'modwerk_machine_assigned']". Nothing ships or tests that profile, so it broke unnoticed.
  • What this changes:
    • machine_registry.c defines the counter when MODWERK_RESIDENT_ON_DEMAND is off (the build only takes --resident-stock-hooks together with --resident-on-demand, so that is exactly when controller_board.c is missing) and keeps the extern otherwise. The beta base compiles the same code: every symbol in base-binding.json stays where it was.
    • Because the registry and the elekloader README are in the base's source hash, the base gets a new identity, so this is the first change on the 0.7.11 branch and raises elekloader/base-version.json to 0.7.11. base-versions.json keeps 0.7.10 exactly as shipped (b1c76d06…, as on main) and adds 0.7.11 (dea1955f). Regenerated with octatrack:base -- --beta --write, base-sizes.json recorded, the base-bound packages relinked (octatrack:module-packages -- --base-only, which only changes their requiredBase), and the base page lists 0.7.11.
    • New test test_assignment_counter_is_defined_once_with_or_without_the_controller_board (sdk/tests/test_machine_events.py) compiles the registry with the ColdFire compiler both ways and checks the symbol is defined without the hooks and undefined with them. It fails without the fix ("U") and passes with it; it skips without m68k-elf-gcc.
    • Changelog: changelog/2026-11-20-octatrack-minimal-base-links.md.
  • How I checked it: npm run pr:ready (Ready). The minimal base builds with the profile above (before the fix it stopped at the link); octatrack:base -- --beta without the fix reproduced the committed base exactly. Host macOS, GCC 16.2.0 and binutils 2.47 from octabam's m68k-toolchain.sh.
  • Tested on a unit: see the line below. The flashed base was c889442d with 13 kept modules; the project was CPUTEST (four FLEX tracks on a generated sample, no modules). Everything ran as RAM boots and rolled-back trials:
    • Beta base 2ff15d5e RAM-booted: ready, empty inventory (the card set belongs to the flashed base), no failures.
    • The developer MCP's review of Analog BD and Sidechain Compressor passed for 2ff15d5e; both ran as 45 s trials (npm run device -- try, no accept): "no crash, stall, freeze or skipped track", rolled back.
    • CPUTEST played for about 9 minutes with Part changes: no restart, no refusals, steady UI ticks; the unit's log for that boot has no incident (window CPU mean 42.2 %, frame gap 428 µs). Sound clean by ear.
    • Minimal dev base e3d1a247 (build_core.py --dsp-loader --site-events --table-owners --dev) RAM-booted: stats 34-39 % stopped, 50-51 % playing; profile whole UI chain 106.6 µs a tick; sound clean.
    • After a power cycle the flashed base and all 13 kept modules came back.
    • After the version was raised to 0.7.11 (dea1955f, minimal 2e8ef11b): RAM boot, review, both trials ("no crash, stall, freeze or skipped track"), the minimal dev base (profile 103.7 µs a tick; one stats reading of 100 % right after boot, then 39 %), and a power cycle back to the flashed base with all 13 modules.
    • The same five steps passed on base 0.7.10 (bf685b7a, minimal c53fa7e1) before 0.7.10 shipped.

Tested on a unit: beta base 0.7.11 dea1955f (RAM boot, Analog BD and Sidechain Compressor trials, minimal dev base 2e8ef11b, power cycle), after the full run on 2ff15d5e and minimal dev base e3d1a247, Octatrack MKII OS 1.40C, RAM boots with Analog BD and Sidechain Compressor trials, 9 minutes of playing with Part changes, a power cycle back to the flashed base (developer Lasl00, 20 November 2026).

Edge cases

Case Why this change makes it a risk How run Result
Base with the resident controller (beta) The counter's definition must stay in controller_board.c there, or it is defined twice or moves memory octatrack:base --beta without the fix reproduced the committed base; with it every symbol in base-binding.json stays put; RAM boots of 2ff15d5e and dea1955f pass
The shipped 0.7.10 stays known A changed base must take the next version, not rewrite a shipped one base-versions.json keeps 0.7.10's identities as on main and adds 0.7.11 pass
Base without the resident controller (minimal) The registry now owns the counter there build_core.py minimal profile links; RAM boot of e3d1a247, stats, profile, playing pass
Base-bound packages on the new identity Their requiredBase moved with the identity MCP review plus 45 s trials of Analog BD and Sidechain Compressor on 2ff15d5e pass
Machine assignments while playing mw_assign writes the counter on every assignment CPUTEST playing with Part changes 1-4 for about 9 minutes; unit log pass
Back to the flashed base A RAM-booted test base must leave the kept set alone power cycle, then inventory pass: c889442d and all 13 modules
  • What the guides lacked or got wrong, and where I fixed it: docs/MODULE_PERFORMANCE.md said the minimal profile stops at this symbol; it now says it links. sdk/machines/octatrack/elekloader/README.md now says octatrack:base only builds the beta base and gives the minimal command. Not fixed, for whoever owns them: with the developer MCP connected to the bridge, npm run device -- try and boot got "No reply to setup 8006000100001200" until the bridge was restarted with no second client; and npm run upstream:tools ends with HTTP 404 on the Ziddle archive pin.

Related to the agent board thread on machine octatrack (CPU baseline, the owner's answers of 19 November).

🤖 Generated with Claude Code

repeat98 and others added 30 commits November 20, 2026 08:42
A machine-wide unit queue (npm run unit -- status, hold, release, run): the
device commands wait in line for the one connected unit and start when it is
free, instead of an agent asking whether it is free.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm run test:procedure runs the fixed steps in order with the existing
tools (module:doctor, modules:compat, module:dev, device:test,
device:price), stops at the first failure, records unit steps as not
run without a unit session, and writes a record for the named build
with an empty edge-case table. docs/TEST_PROCEDURE.md holds the order
and how to derive a change own edge cases; the PR description check
asks a ready instrument change for them; the skills point at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rocedure

# Conflicts:
#	.github/pull_request_template.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ls point at the procedure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Imported by a test or another script, the caller owns the turn; load unit_turn.py by path so a test that loads octatrack-test.py from elsewhere finds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… steps for the unit or an emulator session

serve --emulator no longer probes the emulator bench first: ot_emu takes one
connection and stopped when the probe hung up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…work that puts it back

The owner, 20 November 2026: agents on his computer need no OK to run on the unit. A Keep (device:qualify too), a flash and a power cycle still need his yes. Step 2 of /modwerk-test-on-unit keeps the per-run OK for contributors; fix-issue, maintain and MAINTENANCE.md point to OWNER_OPERATIONS.md. The check lock advice now names the slots that npm run check, pr:ready and sdk:check take by themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed cmd.exe line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rocedure

# Conflicts:
#	.agents/skills/modwerk-test-on-unit/SKILL.md
#	.claude/skills/modwerk-test-on-unit/SKILL.md
… description check on base drafts

The test procedure says who runs it: the submitter, on their own unit,
edge cases included, delivering the record with the pull request. A
reviewer or maintainer checks the record against the diff and is never
required to test; a change without it goes back to the submitter. The
review skill, MAINTENANCE.md, MODULE_QUALIFICATION.md, DEVELOPER_WORKFLOW.md
and the PR template say the same. The edge-case table is required on
drafts too, and pull requests into base/*-next get the description check
(scope is skipped there, so nothing else runs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rocedure

# Conflicts:
#	.agents/skills/modwerk-pr-ready/SKILL.md
#	.claude/skills/modwerk-pr-ready/SKILL.md
#	docs/DEVELOPER_WORKFLOW.md
…thout asking

The owner, 20 November 2026: no prompt to insert a scrap card. A session records the kept set and the flashed base before a Keep and puts the set back after, checking the inventory. Flashing and power cycles stay his.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s and the two targets

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… an ot_emu session

npm run device:emulator starts ot_emu on a development twin with its
time tied to the wall clock (--interactive, pace on), serves it like a
unit and runs a command inside it. Every wait and timeout in device:test
then means the same as on the unit, so nothing changes for the unit.
Inside the session test:procedure targets the emulator by itself.
device:test lists the checks a still DSP frame clock cannot answer as
not run there, never passed, and titles its entry as emulator evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lasl00 and others added 12 commits November 20, 2026 12:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; a test keeps the pins honest without the toolchain

The reviewed standalone recipes pin every authored input by hash. The Tape
Echo and Euclid recipes went stale when their CPU price evidence and
manifests changed (18 November) and again with src/catalog/modules.ts
(repeat98#1847), so octatrack-module-packages.py --check failed wherever the m68k
toolchain is present. CI's SDK job lacks it and skips every rebuild, so
the drift hid. Only the input hashes change: with them re-pinned, all 40
published packages rebuild identically. test_standalone_recipe_pins.py
compares the pins without the toolchain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-test-record

Improvement: the maintenance bot asks for the submitter test record, not a hardware test
Aquitronic

This comment was marked as outdated.

@repeat98 repeat98 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix in machine_registry.c looks right to me (build_core.py only accepts --resident-stock-hooks together with --resident-on-demand, so the counter is defined exactly once either way). One thing to sort out before this lands: base-versions.json.

The description says base 0.7.11's identity moves to 2ff15d5e, but the diff rewrites the identities of the 0.7.10 entry and drops the ones 0.7.10 shipped with (b1c76d06…, the same list main has). base/octatrack-next still lists 0.7.10 as its latest version: per #1840 the change to 0.7.11 comes with #1826, which hasn't landed. Merged as it is, the branch would record the new identities as 0.7.10 and no longer know the shipped 0.7.10 base.

Could you either add a 0.7.11 entry for the new identities and leave 0.7.10 as shipped, or wait for #1826's version change and regenerate on top of it?

@repeat98

Copy link
Copy Markdown
Owner

Follow-up on the base-versions.json entry: #1826 is the PR that is meant to change the version to 0.7.11 (per #1840), but its current diff doesn't do that yet either (comment there). The simplest order is probably for #1826 to land first with a 0.7.11 entry, then for this PR to regenerate the base files on top of it, so the new identities go into that entry and 0.7.10 stays as shipped.

repeat98 and others added 8 commits November 20, 2026 13:35
…t98#1832)

* Docs: USB Audio becomes a module package (decision and design)

The owner decided on 20 November 2026 that Octatrack USB Audio installs like any other module instead
of coming as a base variant per layout: one module, the layout chosen on the site, the on-device switch
(repeat98#1512) in the module, and it counts toward the module limit. The design note lists what the base, the
module, the sync and the site need, what the 12 November prototype on base/usb-audio-module already
covers, and what to measure first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Docs: the USB Audio switch is a row in the Modwerk settings on the unit

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Docs: the audio frame hook is ev_usb_frame, raised by the base

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Docs: USB Audio design note follows the draft: SETTINGS row, computed Tracks Post curve, status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…hipped

base-versions.json had the fix's identities written over the shipped
0.7.10 entry, because base/octatrack-next still named 0.7.10 and the
published-version guard read a stale fork's origin/main. The shipped
0.7.10 identities are back, base-version.json says 0.7.11, and the base
files, sizes and base-bound packages are regenerated for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pins

Fix: Tape Echo and Euclid standalone recipes pin their current inputs, and a test keeps the pins honest
…t-emulator-pacing

Improvement: device:test and the test procedure finish their cases on an ot_emu session
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lasl00

Lasl00 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, went with a): this is the first change on the 0.7.11 branch, so it raises elekloader/base-version.json to 0.7.11. base-versions.json now keeps 0.7.10 exactly as shipped (b1c76d06…, same as main) and adds 0.7.11 (dea1955f); the base page lists 0.7.11. Short retest on my MKII: RAM boot of dea1955f, review plus Analog BD and Sidechain trials, the minimal dev base 2e8ef11b, and a power cycle back to the flashed base with all 13 modules. pr:ready says Ready.

The origin/main detail: scripts/octatrack-base.mjs guards against reusing a published version by reading origin/main:sdk/machines/octatrack/base-versions.json. In a contributor's checkout origin is their fork, and mine was 368 commits behind, so it didn't know 0.7.10 had shipped and the guard let the rewrite through. Since I synced the fork it refuses as it should. Reading upstream/main when that remote exists (or failing when the fork's main is behind) would close that gap; happy to send that as its own Fix if you want it.

Follow-ups as you said: #1840's description still says #1826 sets the version, and #1826 now only needs to rebuild on top of this.

@repeat98

Copy link
Copy Markdown
Owner

I checked the updated version history. Your 0.7.11 entry preserves the shipped 0.7.10 identities, and the MKII runs on the full and minimal builds are recorded. The cumulative branch has since gained the project-load fix. Git now reports conflicts in the binding, variants, package list, version history and base changelog.

The remaining integration step is to regenerate those files from the combined 0.7.11 sources, then check that both the minimal and beta configurations still link and RAM-boot. The results on dea1955f and 2e8ef11b should stay identified as the pre-integration runs.

@repeat98
repeat98 merged commit cf47bf5 into repeat98:base/octatrack-next Nov 21, 2026
17 of 19 checks passed
@Lasl00
Lasl00 deleted the fix/minimal-base-links-0711 branch November 23, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants