Repository navigation
Conversation
…alled set changes, so it never shows a removed module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
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.
Draft until the next base.
runtime.cis a base input. Its hash no longer matchessrc/engine/assets/octatrack-base-sources.json, sosrc/engine/elekloader/octatrack-base.test.ts("is rebuilt whenever a file the base is built from changes") fails until the base is regenerated. I did not regenerate it. That and the unit run follow with the next base. The fix is reproduced only in a host test, not on the unit.modwerk_runtime_api.value, thevaluethat diagnostics andnpm run deviceprint) was never cleared. Every module's tick writes it, and the last one to write it wins (Docs: the trial's value word is shared by every module's tick #1524). After a module was removed, its value stayed until some remaining tick wrote the word. If no remaining module writes it, it stayed until a power cycle. That is the part of Octatrack base: the shared status word keeps a removed module's value until a power cycle #1314 the host can reproduce.In the reported trials, Pattern Sample Locks was still installed, and its tick writes the word on every tick. So the word staying on Beat Slicer's
0x42530000means Sample Locks' tick was not writing it at the time. This change does not explain that, or the missing FUNC+PART rows. In the host test, the loader and the Octatrack dispatch never run a removed module's tick:live[]changes only inswitch_locked, andmodwerk_runtime_tickreads it again on every tick. That cause is still open and needs the unit.modwerk_runtime_ticknow checks for a changed installed set before it runs the ticks, not after. It uses the same epoch and set mix the screen redraw already used. On a change it sets the word to 0 first. So a value in the word was written by a module that is installed now, and 0 means none of them wrote it. The clear runs in the task that runs the ticks, so a removed module's tick that was paused halfway has finished before the clear. An install clears the word too, until the next tick writes it again. Ticks with the set unchanged leave the word alone. The redraw after a change still happens once, after the ticks, as before.docs/OCTATRACK_API.mdsays so, and the changelog says it ships with the next base.sdk/tests/runtime_removed_tick.c, run bysdk/tests/test_runtime_removed_tick.py, with and without-DMODWERK_CACHED_MODULES. It uses the actual loader with real install and removal packages, andruntime.c's tick dispatch. Host functions stand in for two modules' ticks.runtime_removed_tick.c:66and:71). With the fix it passes.test_recipe.RuntimeSlotTests(includingtest_runtime.cand its cached-modules build, andtest_boot.c): 17 run, 2 skipped, all passed.origin/mainpasses.npm run check,pr:readyor the whole sdk check here (machine load limits), and I did not run the unit, the emulator or a base build.docs/OCTATRACK_API.mdsaid only that the last writer wins. It now also says when the word goes back to 0.Three checks are red, and all of them expect the regeneration (
module-paths-windowsfails on the same reconstruction pin;module-pr-oksums up the others):module-suites (test:2/2):octatrack-base.test.tssays the committed base is stale (runtime.c).module-suites (sdk):test_host_reconstruction.pysays Pattern Sample Locks' reconstruction recipe pinsruntime.c's old hash (sdk/machines/octatrack/module-adapters/reconstruction-recipes.json). As in Fix: Octatrack base, leaving USB DISK MODE no longer stops the audio until a power cycle (finding 72) #1390, that pin is refreshed with the regeneration, after checking that the rebuilt package is byte-identical to the pinned one. I did not edit it by hand.Still to do, outside this PR:
Related to #1314
🤖 Generated with Claude Code