Skip to content

Fix: the doctor and tests treat usbOnly packages as having no card form - #1387

Merged
repeat98 merged 2 commits into
repeat98:mainfrom
twwwy:fix/doctor-usb-only
Nov 10, 2026
Merged

repeat98 merged 2 commits into
repeat98:mainfrom
twwwy:fix/doctor-usb-only

Conversation

@twwwy

@twwwy twwwy commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor
  • What was wrong or hard: npm run module:doctor decided whether an Octatrack module has a card form from its USB package's C sources only. The card build, the source importer and the native comparison test use moduleCardless in src/catalog/usb-only.ts, which also counts usbOnly: true. So a module marked usbOnly, as docs/OCTATRACK_RECONSTRUCTION.md describes, was asked for card packages, a native comparison and card pairs that it can never have, and the doctor test (--all) failed on it. Two tests encoded the same old rule: src/catalog/usb-only.test.ts expected every package without requires or sources to have a card form, and scripts/module-release-scope.test.mjs built its USB-only set from sources only, so a usbOnly module looked like an unreviewed card module and the scope check refused it. scripts/build-module-packages.py already uses sources or usbOnly. No module on main uses usbOnly yet. Track Solo (Track Solo 0.2.4-experimental: hold a track to solo it while editing #1383) is the first, after the owner asked for it there.
  • What this changes: the doctor imports moduleCardless and uses it, so there is one rule for card form. A usbOnly module now gets the same lines as a C runtime module: its USB package version is checked, and the native comparison and card pair lines become informational. The packages line says which kind it is. Both tests now use the same rule as build-module-packages.py and moduleCardless. Changelog: changelog/2026-11-10-doctor-usb-only.md.
  • How I checked it: I temporarily marked Bar LED usbOnly in a scratch worktree. Main's doctor still said "compiled into the committed packages" and checked its native comparison; with this change it says "USB package … (a USB-only module, no card form)" and skips the card-only lines. Tiempos (C sources) and Tuner (card only) report exactly as before. On the Track Solo branch (Track Solo 0.2.4-experimental: hold a track to solo it while editing #1383), the first usbOnly module, usb-only.test.ts and module-release-scope.test.mjs fail without this change and pass with it (8 tests). On main, npx vitest run scripts/module-doctor.test.mjs scripts/module-release-scope.test.mjs src/catalog/usb-only.test.ts passes (12 tests). npm run pr:ready: every stage passes except sdk:check, where only the two composition tests fail, because m68k-elf-gcc is not installed on my Mac; CI has it.
  • What the guides lacked or got wrong, and where I fixed it: nothing in the guides. docs/OCTATRACK_RECONSTRUCTION.md already describes usbOnly correctly; the doctor had not caught up with it.

🤖 Generated with Claude Code

The doctor decided card form from a package's C sources alone, while the card
build and the native comparison test use moduleCardless, which also counts
usbOnly. A usbOnly module was asked for card packages and a native comparison
it cannot have. Use the shared rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Nov 10, 2026
Both encoded the old rule that only requires or C sources make a package
USB-only. Use the rule the card build and moduleCardless already use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@twwwy twwwy changed the title Fix: module doctor treats usbOnly packages as having no card form Fix: the doctor and tests treat usbOnly packages as having no card form Nov 10, 2026
@repeat98
repeat98 merged commit b3aa5f2 into repeat98:main Nov 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants