Repository navigation
Fix: the module-memory check counts base 0.8's larger module record; pool readings on a 0.8.2 twin - #2284
Merged
Conversation
…ord, which the pool test reads too The 21 November record's twin (8850f539) does not rebuild byte for byte, so the readings of Mini Verb 0.2.4, Euclid 0.1.6 and Repitch 0.2.2 go into a dated record of their own twin, and module-set-memory.test.ts counts both (owner, 26 Nov 2026: "do (b)"). Readings to follow in this commit's record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pool readings on a 0.8.2 twin loader.h's runtime_module holds 9 bytes a hook; base 0.8's 59 site events (57 on 0.7) make it 754 bytes, not the 736 module-set.ts assumed since #2178, so the site under-counted every module by 16-32 bytes on 0.8. MODULE_RECORD now follows the base's site events (the ColdFire compiler gives 736 at ef6099b, 754 at 48f4a9b). Six rolled-back trials on twin 46c30886 (base 0.8.2, main 48f4a9b), two each: Mini Verb 0.2.4 3424, Euclid 0.1.6 10480, Repitch 0.2.2 2720 bytes, each equal to the corrected extent. They go into a dated record of their own; the pool test reads both records, the 21 November one with its own 0.7 layout (owner, 26 Nov 2026: "do (b)"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 26, 2026
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.
Fix: the module-memory check counted 16 to 32 bytes too few per module on base 0.8. Players won't notice anything: the 768 KiB pool doesn't change, and a set is now priced exactly as the 0.8 loader takes it. This also unblocks the Mini Verb 0.2.4 (#2027), Euclid 0.1.6 (#1868) and Repitch 0.2.2 (#1866) releases. Each of them dropped the pool test below its ten measured packages.
What works:
module-set.tsnow sizes the loader's per-module record from the base's site events. Six rolled-back pool readings on the owner's MKII, on a twin of today's base 0.8.2, equal the corrected extent byte for byte: Mini Verb 0.2.4 3,424 bytes, Euclid 0.1.6 10,480 bytes and Repitch 0.2.2 2,720 bytes, each read twice. The 21 November readings, taken on base 0.7, still match their own layout of 736 bytes.What is broken: nothing known.
Who must act: nobody. The owner asked for the readings and this record on 26 November 2026 ("do (b)"), and it merges on green.
On a unit: yes. Twin
46c30886a7e8f3f6…of base 0.8.2 (build_core.pywith the beta flags and--dev, built from main48f4a9b9c), RAM-booted. Sixnpm run device:price -- --memory --readings 1trials, every one rolled back, with the inventory empty afterwards.Why
loader.h'sruntime_modulehas 9 bytes for each hook:hook[],order[]andruntime_dsp'shook_offset[]. Base 0.8 added two site events (59 instead of 57), so each module has 63 hooks.The ColdFire compiler (
m68k-elf-gcc -mcpu=54455,sizeof(struct runtime_module)) gives:ef6099b0a, the source of the 21 November record's twin;48f4a9b9c.The loader rounds the record and its site records up to 16 bytes. So base 0.8 takes 16 bytes more for most modules and 32 for one with no patched sites, like Mini Verb. #2178 had fixed the record at 736 from the 21 November readings, which were taken on a 0.7 twin.
The site now computes
MODULE_RECORD = (187 + 9 * (4 + SITE_EVENTS) + 1) & ~1fromsite-events.json.poolExtenttakes an older base's record size as an optional argument.The pool test now reads both records. It checks the 21 November readings with that record's own
loaderLayout.moduleBytes(736) and the new readings with the current model. The owner approved this test change on 26 November 2026. Without it, the corrected model would fail every 0.7 reading by design, since those were taken on a base with a smaller record.The new readings get their own dated record,
docs/verification/2026-11-26-octatrack-module-pool-allocation.json. Itsmethodgives the reason: the 21 November twin8850f539does not rebuild byte for byte fromef6099b0a. The symbols are identical, but the configuration hash differs, both with and without controller rows.Checked:
npx vitest run src/engine/elekloader/module-set-memory.test.ts src/engine/elekloader/module-set.test.ts: 73 passed.poolExtenton the three release packages (from their PR branches) gives 3,424, 10,480 and 2,720. WithmoduleRecord = 736it gives 3,392, 10,464 and 2,704.npm run pr:ready.Each module PR gets back to ten measured packages once it merges main after this.
What the guides lacked: nothing said the module record's size depends on the base's site events. The comment above
MODULE_RECORDinmodule-set.tsnow says it.🤖 Generated with Claude Code