Skip to content

Fix: a removed effect's FX page no longer holds addresses into the removed code - #2631

Draft
repeat98 wants to merge 3 commits into
base/octatrack-nextfrom
fix/fxpage-drop-page-record
Draft

repeat98 wants to merge 3 commits into
base/octatrack-nextfrom
fix/fxpage-drop-page-record

Conversation

@repeat98

@repeat98 repeat98 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

What works: when an effect module is removed, the base now turns that effect's page record into the page any unlisted effect shows: MISSING, or NONE's before the first tick. Before, the record kept the addresses of the removed module's formatters, so a track still showing the page could call code that was no longer installed. The test that was missing now exists: a host test sweeps the modelled memory and the base's tables for any word left pointing into a removed effect's image.

What it means musically: this is the likely cause of beta finding 31, the stale E-Verb page after removal. The removed effect's page now reads MISSING, and turning a knob on it calls nothing from the removed module.

What is broken / not done: not tested on a unit. That stock actually keeps the page pointer and calls a formatter on a knob turn is still unconfirmed, as the issue says.

Who must act: the owner. This belongs on the cumulative Octatrack base draft (#2473), so merge it into base/octatrack-next when you choose, and test the exact build on a unit before the base ships.

Next step: on a unit, install E-Verb, open its FX page on a track, remove E-Verb over USB, then turn a knob on that page. Expected: the page reads MISSING and nothing crashes.

Fixes #2616.

Details
  • sdk/machines/octatrack/elekloader/fxpage.c modwerk_fxpage_drop: after the rows are re-pointed, it copies the page an unlisted handle shows (unlisted(): MISSING once built, else NONE's descriptor) over pages[id], and clears that id's wide-formatter entries. Those were already gated by serves, but the sweep counts them too.
  • test_fxpage.c: into(low, bytes) counts big-endian words at every even address of the modelled memory outside the image, plus the four id tables, both chooser lists, the wide table and the per-id wide formatters. Id 26 is built from a second image at 0x3000 (with a wide formatter), and id 27 from the first. The test asserts the count is above 0 for both images before the drop, 0 for the dropped image after it with pages[26] equal to MISSING, and still above 0 for the image that stays. A new line also checks that a drop before the first tick gives NONE's page.
  • I confirmed the test fails on the current base/octatrack-next (line 150) and passes with the fix, in all three builds test_recipe.py runs (plain, MODWERK_FX_IDS=128u, MODWERK_CACHED_MODULES).
  • test_machine_registry.c: skipped. Its machine descriptors are host statics that sit outside the modelled segments, so a sweep there has nothing to find.
  • The base is rebuilt with npm run octatrack:base -- --stock … --beta --write (still the unreleased 0.8.7: identity d517f418…, package 6c18d16a…).
  • Checks: python3 -m unittest test_recipe (elekloader) passes except test_dev_audio_follows_the_vendor_interface_and_chains_the_tails. That one reads the generated sdk/octabam/modules copy, which this worktree does not have, so it is unrelated. After the rebuild, base-sizes.json is recorded and the base-bound packages are relinked (only requiredBase changed). npm run check -- --base origin/base/octatrack-next: everything passes except two vitest files outside this diff. src/community/backend-performance.test.ts (account schema check) fails locally with nothing under src/community or server changed. src/engine/zoom/zoom-link.test.ts failed under load and passes alone (34/34). CI will judge both.
  • What the guides lacked: nothing for this fix.

Edge cases

Case Why this change makes it a risk How run Result
Removal before the first tick (no MISSING page yet) The drop copies NONE's page instead host test test_fxpage.c pass
Removal after MISSING is built The drop copies the MISSING page host test test_fxpage.c (sweep finds 0 words) pass
Another effect stays installed The drop must leave its page and formatters alone host test test_fxpage.c pass
A knob turned on the removed effect's page on a unit Stock may still hold the page not run: not tested on a unit, waits for the owner's build test not run: no unit run

🤖 Generated with Claude Code

repeat98 and others added 3 commits December 4, 2026 11:24
…moved code (#2616)

modwerk_fxpage_drop now overwrites the dropped page with the page an
unlisted handle shows (MISSING, or NONE's before the first tick) and
clears its wide formatters. test_fxpage.c sweeps the modelled memory and
the base's tables for words left pointing into a removed image.

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

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

This branch has not been deployed

No deployments
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.

1 participant