Skip to content

Fix: protect selected DSP dispatch from omitted card effects - #2593

Draft
Jacobphono wants to merge 2 commits into
repeat98:mainfrom
Jacobphono:codex/fix-card-omitted-id
Draft

Jacobphono wants to merge 2 commits into
repeat98:mainfrom
Jacobphono:codex/fix-card-omitted-id

Conversation

@Jacobphono

@Jacobphono Jacobphono commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor
  • What was wrong or hard: In a card remix, an omitted module with an effect ID outside the 32-entry table could overwrite a later DSP payload record. An omitted module sharing the selected effect ID could null Ghost Cut's dispatch. The development test also tried to read chooser placeholder labels outside the base's MEM windows and stopped before the effect checks.
  • What this changes: Limit omitted-card null stubs to stock-width IDs that are not selected in the remix, and skip unreadable chooser placeholders when resolving effect names in the device and qualification tools. This is separate from the Ghost Cut module release.
  • How I checked it: With the private OS extraction, the payload parser saw 98 modules and valid Ghost Cut DSP entry points after the builder fix; before it saw 1 module or a null Ghost Cut dispatch. verify.py passed 115/115 Ghost Cut host gates. npm run check -- --base upstream/main --part contract passed. node --check scripts/device.mjs, Python compile and git diff --check passed. The emulator progressed past the former placeholder read failures; its CPU meter stayed at 100%, so it could not qualify an effect. Full pr:ready is red because the SDK source fingerprint changed and committed packages need a native rebuild/import, including the pinned utility releases.
  • Not tested on a unit: This PR changes build and development tooling only; no package or base from this branch was installed on the Octatrack.
  • Edge cases:
Case Why this change makes it a risk How run Result
Omitted ID outside 0–31 Null stub could overwrite the DSP table Native payload parse on a Ghost Cut scratch remix Pass: 98 modules and valid payload layout
Omitted module sharing selected ID 10 Null stub could replace Ghost Cut dispatch Native DSP map and verify.py Pass: valid init/proc entries and 115/115 renders
Stock chooser placeholder outside MEM range Name lookup could abort test Ghost Cut emulator procedure Pass: device and qualification scripts got past the former MEM read error
Real unit install, CPU and rollback Tool behavior may differ on hardware Planned release procedure Not run: developer asked to prepare release without a new unit test
  • What the guides lacked or got wrong, and where I fixed it: Nothing; both failure modes are now guarded in code.

Validation commands and results: npm run check -- --base upstream/main --part contract passed. Full pr:ready stopped after three source-fingerprint failures and an SDK check fingerprint failure; this draft needs the package rebuild and import before it can be ready.

Related to Ghost Cut release draft #2592.

@repeat98

repeat98 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

@Jacobphono good catch: a card remix that leaves out an effect whose id is 0x20 or higher writes past the 32-entry table in build_bus.py, and Ring Bank (FX2 0x20) already has one. The cumulative base draft (#2473) still has the same code.

The checks are red because of the builder edit itself: changing sdk/octabam/tools/build/build_bus.py changes the pinned build identity and every committed package's fingerprint (utility-releases.test.mjs, module-doctor.test.mjs). That's expected for a builder change, and it's why it belongs with the base: every package gets rebuilt there anyway. Ghost Cut (#2592) passes the same suites on the same main, so main is fine.

  1. Please send the build_bus.py fix as its own pull request into base/octatrack-next (merge it in, don't rebase), with a test that an omitted id ≥ 0x20 is not written past the table and a selected id is never stubbed. Its changelog line goes with it.
  2. Keep this PR to the scripts/device.mjs and octatrack-qualify.py fixes and their changelog line; on their own they should go green on main.

Who acts: you. Next step: split it in two as above, and I'll take the builder fix into the base draft.

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.

2 participants