Repository navigation
Fix: Octatrack base: a module own patched UI handler no longer blocks its Undo - #1788
Merged
Merged
Conversation
…s Undo (#1386) A trial of Micro Timing that ended with TRACK TRIG EDIT open was refused its rollback with needs-recovery, and so was every later recover, even with the page closed, until a power cycle or unplugging USB (a contributor's MKII and the owner's MKII, 19 November 2026). The base refuses to retire an image while the stock UI roots name it (MODWERK_RUNTIME_UI_ROOTS), and the walk reached TRACK TRIG EDIT's layer record 0x400d0140, whose encoder definition at 0x400d01f0 holds 0x40d80740: Micro Timing's own patch, its SymbolRef pointing LEVEL at mt_level. Once the page had been opened, that layer stayed reachable from the key cache, so the scan refused every switch out. That word is a site of the leaving module: the switch puts stock's handler back in the same masked write that retires the image. The loader now offers modwerk_runtime_site_view, which reads a live module's sites as its stock bytes, and the admission walks the UI roots through it, so it asks whether the roots name the image once the switch has run. Any other root into the image still refuses (RUNTIME_UI_OPEN). Host test: test_module_ui_roots.c, a stock encoder definition naming the module: refused when stock wrote it, admitted at SWITCH and PREPARE when it is the module's own site, refused again with a second handler outside the site. It fails without the admission change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Related to #1386 (the 19 November case from #1744). For the cumulative base draft #1757.
needs-recovery), and so was every laterrecover, even after the page was closed; unplugging USB did not clear it either, only a power cycle. Before the base retires an image it walks the stock UI roots (MODWERK_RUNTIME_UI_ROOTS,machine_lifetime.c) and refuses while any names the image. Once TRACK TRIG EDIT had been opened, its layer record0x400d0140stayed reachable from the key cache, and its encoder definition at0x400d01f0holds Micro Timing's own patch (its SymbolRef pointing LEVEL atmt_level). That word is a site of the leaving module, put back to stock in the same masked write that retires the image, but the scan counted it as a live root. None of the loader's refusals records a reason, so nothing showed this; it was found by porting the walk to Python and running it on the unit's memory.modwerk_runtime_site_view(image, address, out, n), which reads the bytes inside a live module's sites as their stock bytes; the admission walks the UI roots through it, so it asks whether the roots name the image once the switch has run. Every other root into the image still refuses (RUNTIME_UI_OPEN), including stock's own copy of the handler in the encoder cache while the page is open, so an Undo with the page open still waits until it closes. Source only: the beta base's assets are not regenerated here, because Fix: Octatrack base 0.7.10 binds Analog BD again after a rolled-back trial that removed it #1774 regenerates the same files; one regeneration once both are inbase/octatrack-nextavoids a conflict.test_module_ui_roots.c: a stock encoder definition naming the module is refused when stock wrote it, admitted at SWITCH and PREPARE when it is the module's own site, and refused again with a second handler outside the site; the new assertions fail without the admission change.test_machine_events(17 tests, which builds it),test_runtime_loader,test_resident_engines_board,test_controller_board,test_module_sets,test_runtime_journal,test_resident_journalandtest_analog_bd_uipass.npm run pr:readynot run: it waits behind other sessions in the build queue long enough for main to move (twice today on Fix: Octatrack base 0.7.10 binds Analog BD again after a rolled-back trial that removed it #1774).f5b96821(the contributor's), project MODWERK-TEST2:f9f8cfb9(Fix: Octatrack base 0.7.10 binds Analog BD again after a rolled-back trial that removed it #1774's code): 120 sdevice.mjs try, during it T3, REC, FUNC+BANK (TRACK TRIG EDIT), MICRO T, one LEVEL step; at the endneeds-recovery. With the page closed: stillrecoveryafter 40 s of polling and after 16 s with no USB requests;recoverrefused; unplugging USB for 15 s did not clear it. Task stacks held no word in its sites or image, all 38 sites still held its patch; the UI walk found the one root above.7c991c1c(this branch): the same steps; with the page open the rollback still answeredneeds-recovery(the walk found stock's encoder-cache copy of the handler and the module's own definition); after closing the page the walk found only the module's own definition andrecoverrolled the trial back:normal, nothing installed.f9f8cfb9.Not tested on a unit: the release build (the beta base is not regenerated in this pull request), and the 9 November SYNTIZ case of #1386, which is a different path (a contributed machine still named, for example in a Part copy) that this does not change.
needs-recovery("unplug USB") does not help when a module's page is open; "close the module's page, thennpm run device -- recover" would. And the loader records no reason for a refused restore, which made this slow to find.🤖 Generated with Claude Code