Repository navigation
Conversation
…ooks A module that subscribes the new ev_in_use (hook 38, asked by the base from the UI tick, each module on its own) and answers 0 is left out of the rows of the events marked "rests" in events.json (ev_play_increment, ev_voice_bind, ev_voice_bind_run, ev_tail_kill), so the frame interrupt never enters its code there; its other hooks, tables and setup UI stay. The loader keeps a resting and an asking bit per position; a switch wakes its position, and modwerk_runtime_rest_poll restages and commits the rows only when an answer changed, under the lock, fenced against a paused task inside the dispatch and written masked, as a switch is. Modules that do not subscribe never rest. Host tests only; no base regeneration (the base-identity pins are stale until the owner rebuilds the base from a stock OS file). Co-Authored-By: Claude <noreply@anthropic.com>
Main took hooks 38-52 for project, bank and Part events (#1564). The generator keeps both new kinds: hooks the base raises itself, and ev_in_use, which the base asks each module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ckages name it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e's own detours Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rests A runtime.json may name the module's own detours under "rests". The builder sets bit 7 of those sites' length byte (loader.h RUNTIME_SITE_RESTS), only for a hashed site of a module that subscribes ev_in_use; an older base reads the length as malformed and refuses it. When the rest poll changes a module's state it writes those sites masked, with its rows: stock's bytes while it rests, its patch when it wakes. A wake waits while a paused task would resume inside such a site past its first byte; the site checks (switch, intact, broken, journal) expect stock's bytes in a resting module's resting sites. The reviewed recipes re-pin build.py and verify_static.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ges name it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ack before an at-rest price Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98
marked this pull request as draft
November 17, 2026 18:18
repeat98
added a commit
that referenced
this pull request
Nov 17, 2026
…il its exact build ran on a unit (#1697) * Improvement: a change to what runs on an instrument stays a draft until its exact build ran on a unit pr:ready says Ready to open as a draft when a branch changes a .mwrm package or .elemod base, and CI's description check refuses a ready pull request of that kind unless a line names the build that ran (Tested on a unit: … with its hash) or says plainly that it was not tested. Drafts pass. The check also runs when a pull request is marked ready or turned back into a draft. Base 0.7.8 (#1694) went up ready to merge after only development twins had run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * AGENTS.md: the draft rule within the word budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
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.
Octatrack base 0.7.8: a module that no track uses rests, and costs the frame interrupt next to nothing
What changed
ev_in_use(index 53, claimed on the agent board). The base's UI tick asks each module that subscribes whether it acts on a track now. While it answers 0 the module rests: the loader leaves its handlers out of the per-frame hooks markedrests(ev_play_increment,ev_voice_bind,ev_voice_bind_run,ev_tail_kill). Its other hooks, tables and setup UI stay. A module that does not subscribe never rests. Installing, replacing or removing a module wakes its position."rests": ["0x…"]in a module'sruntime.jsonnames its own detours. The builder sets bit 7 of those sites' length byte (RUNTIME_SITE_RESTS), only on a hashed site of a module that subscribesev_in_use; an older base reads such a length as malformed and refuses the package. When the rest poll changes a module's state it writes those sites masked, together with the rows: stock's bytes while it rests, its patch when it wakes. A wake waits while a paused task would resume inside such a site past its first byte. The site checks (switch, self-test intact/broken, journal) expect stock's bytes in a resting module's resting sites.sdk/runtime/loader/loader.c/loader.h,sdk/runtime/loader/build.py,verify_static.py,src/engine/elekloader/module-set.ts(reads the length without the flag),sdk/machines/octatrack/events.json/events.pyand the generated files. The reviewed recipes and base sources re-pinbuild.pyandverify_static.py, as Improvement: Octatrack base 0.7.5 never removes a module whose window is open, and drops the stock-run scans #1475 did.ev_in_useanswer and"rests"onrate_gateandpitch_gate.tstr_resolvestays patched, because it keeps stock's voice renderer away from TSTR 4, a value only Repitch adds.Evidence
sdk/runtime/loader/tests/events_test.ccovers resting rows. It also covers resting sites: stock while resting, patch on wake, the wake waiting under a paused task, a site someone else wrote, removal while resting, an unflagged site and a flag withoutev_in_userefused. The site tests were checked to fail when the resting write is broken on purpose.test_runtime_loader.pycovers the builder'srestsdeclaration and the flag.module-set.test.tspasses.f24d6e97: rows only;98637a13: rows and sites). The scene was bank C pattern C01 with three static loops sounding, measured withnpm run device:price, two alternating runs each. Every trial rolled back and nothing was kept.ev_play_incrementhandler spends 400 loop passes cost +12.5 frame points on no track, and +1.0 when it answeredev_in_use0.ev_in_usewithrate_gateandpitch_gateresting +0.1 / +0.1.0x04199999) by the next read. With T2 back to OFF, both sites were stock again 1.5 s later. No stall record and no crash; frame gaps on time.Tested on a unit: base 8d1db124 (this exact release build, RAM-booted), the owner's MKII, 17 November 2026. Every trial was a set trial without Keep.
ev_in_useand resting detours.Not tested
98637a13.What the guides lacked
Guides:
sdk/machines/octatrack/HOOKS.mdanddocs/MODULE_PERFORMANCE.mdnow describe resting and"rests", including the rule that a detour guarding stock from a module-only value must stay patched. The performance guide also says to check that a module acts on no track before pricing it at rest: in the owner's project two loops carry REPITCH as their own TIMESTRETCH, so every "at rest" Repitch reading that day was first taken with Repitch at work.🤖 Generated with Claude Code