Skip to content

Model:Cycles: build the base on the machine page and send it over USB - #2125

Merged
repeat98 merged 25 commits into
repeat98:mainfrom
durchgemacht:site/model-cycles-build
Nov 25, 2026
Merged

repeat98 merged 25 commits into
repeat98:mainfrom
durchgemacht:site/model-cycles-build

Conversation

@durchgemacht

@durchgemacht durchgemacht commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The Model:Cycles machine page builds Modwerk's Model:Cycles base from the owner's own OS 1.13 file in the browser, as a local build preview, and can send a build to the unit over USB as a stock OS update. Downloads and sending stay off until review. Stacked on the base draft #2077: merge that first.

  • What works: planBuild('model-cycles', '1.13', []) picks the pinned base 646706ff (the release base of Model:Cycles base: core-mc 0.3 and a key-LED hook #2077 after its review fixes), not core-mc 0.3. The vendored kit builds 89edf78e… from stock 44fe5862…, byte for byte the image Elekloader's patcher built from the same files. The preview, its configuration route and its button are beta-only (hasBetaUi), and the route waits for the session before it sends anyone away. The Model:Cycles has its own recovery answer in the FAQ (cycles-recovery: the startup menu over MIDI IN, its 3.5 mm TRS jack).
  • Sending: usb-upgrade.ts sends the build with the stock OS upgrade (os-upgrade.ts) to the port that names a Model:Cycles; ElektronSendDialog shows it in the shared base dialog frame. The unit then asks UPGRADE OS NOW?, and only YES writes the flash. The button sits behind the same approval as downloads.
  • What is broken: nothing known. The first run in a browser found one bug: the firmware worker's own machine list left out the Model:Cycles, so the page refused its OS file ("Invalid local firmware request."). Fixed in 98e824608.
  • What it means musically: nothing yet; the page builds the base alone, which changes nothing a musician hears.
  • Ran on a unit: yes, from the page in Chrome on my Model:Cycles, 25 November 2026: the page built 89edf78e (base 646706ff) from my stock 1.13, byte for byte the image that ran flashed in Model:Cycles base: core-mc 0.3 and a key-LED hook #2077, and its send dialog installed it over stock 1.13 (ident 0x7c774e99). Before, with 4d4d91d2: the page built ec928894, NO kept the running OS, YES installed it, also with Transfer open.
  • Who must act: the owner reviews; downloads stay off until then.
  • Next: the owner's approval of downloads and sending for the Model:Cycles.

Tested on a unit: release base 646706ff, Model:Cycles OS 1.13, image 89edf78e built by the page in Chrome and installed from its send dialog. Before: base 4d4d91d2, image ec928894 built by the page: NO keeps the OS, YES installs it, also with Transfer open; base 2e5243e6, the page's image f8b652a0 sent from the site's sender.

Edge cases

Case Why this change makes it a risk How run Result
Site build of the base the page builds through the kit, not the patcher that built the tested images the kit's build in Node on stock 44fe5862… with the pinned package pass: 89edf78e (base 646706ff), byte for byte the patcher's image that ran flashed; before, ec928894 for 4d4d91d2 and f8b652a0 for 2e5243e6
The page in a browser a member builds there npm run dev with npm run dev:community, Chrome, #model-cycles, my stock 1.13 (44fe5862…), Build, download fail, fixed: the worker refused the file ("Invalid local firmware request.", 98e824608); then pass: the download is ec928894aba21a17…, byte for byte; with 646706ff on 25 November 89edf78ed5ba1c73…, byte for byte
Sending over USB the page writes to the unit the site's sender from Node (nodeMidiAccess), f8b652a0 to my Model:Cycles, Transfer closed pass: 478 messages in 2.2 s, UPGRADE OS NOW?, YES, boots as stock
The send dialog in a browser the browser's SysEx prompt and the dialog's stages 'model-cycles': true in DIGI_DOWNLOADS_ENABLED locally (not committed), Transfer closed, the site's MIDI permission reset pass: Chrome asked for MIDI device control (German UI: "MIDI-Geräte steuern und neu programmieren?"), Allow; Connect, Send and Confirm on the unit ticked; "Press YES on the unit"
NO at UPGRADE OS NOW? the unit must keep its OS the dialog sends ec928894 to a unit on stock 1.13, NO pass: the unit runs on, no restart; the dialog stays at "Press YES on the unit", since the page cannot see the answer
YES at UPGRADE OS NOW? the dialog's build must be the one installed sent again, YES; mc_link.py ident; later the same after stock 1.13 was flashed over it; on 25 November 89edf78e over stock 1.13 pass: restarts and boots; set 0x15eddb5a, 38,052 bytes, both times; then 0x7c774e99, 38,272 bytes
Transfer open Transfer may hold the port Transfer open and connected, send from the dialog, NO pass on macOS: sends, the unit asks; not run on Windows (no Windows machine here), where a port cannot be opened twice
Beta only a draft machine's preview must not reach everyone core-build-preview-gate.test.ts and App.model-cycles-preview.test.ts render a released build (USB_LINK off): a visitor, a beta tester, a session still loading pass: no button and the route sends a visitor to the machine page; a beta tester keeps both, also while the session loads
Recovery wording the Model:Cycles has no DIN ports RecoveryNotice.test.ts (each machine's link opens an answer on its FAQ) pass: #faq/cycles-recovery, MIDI IN on the 3.5 mm TRS jack
Usage counts migration 0104 rebuilds the usage table with a wider machine check usage-machine-migration.test.ts and service.test.ts with 0104 pass: old rows kept, model-cycles counted; 0104 lists digitone-ii too, so it and your 0102 (#1767) apply in either order

Guides: APP_DEVELOPMENT.md says local configuration works without the API; on this page the build stopped with "HTTP 502" until npm run dev:community ran (with .dev.vars from the example and npm run db:local). I did not check whether other machines' pages need it too, so I did not change the guide.

What the branch adds and how it was checked
  • sdk/imports/packages/modwerk-base-model-cycles/ holds the package 646706ff (it replaced 4d4d91d2, which replaced 2e5243e6), pinned by sdk/imports/elekloader-modwerk-base-model-cycles-2026-11-24.json at its commit and vendored with --overlay.
  • machine-build.ts selects it by identity (digi-build.test.ts); CORE_BUILD_PREVIEWS lists the Model:Cycles, downloads false.
  • The Model:Cycles joins the page's machine lists (firmware check, the firmware worker, storage, selection, recovery FAQ).
  • Builds count per machine: migrations/0104_usage_model_cycles.sql widens the usage table's machine check as 0083 did, since the tests require every local builder there; it lists digitone-ii as well, as your 0102 lists model-cycles.
  • src/engine/elektron/usb-upgrade.ts (USB_UPGRADE_PORTS, sendOverUsb) and src/components/ElektronSendDialog.tsx, with tests against a simulated unit; DigiBuildPanel offers it when downloads are on.
  • machine.json: stack flash started; guide, recipe row, changelog, verification record.

🤖 Generated with Claude Code

durchgemacht and others added 4 commits November 24, 2026 17:20
The 2e5243e6 base as machine:base builds it, at the path the catalogue
record will pin by commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page builds Modwerk's Model:Cycles base from the owner's OS 1.13 file
as a local build preview (CORE_BUILD_PREVIEWS); downloads stay off until
review. The catalogue record pins 2e5243e6, the builder selects it by
identity, and the kit builds f8b652a0, byte for byte the patcher's image.
Builds count per machine (migration 0104, as 0083).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
usb-upgrade.ts sends a build with the stock OS upgrade (os-upgrade.ts) to
the USB MIDI port that names a Model:Cycles; ElektronSendDialog shows it
in the shared base dialog frame. The unit asks UPGRADE OS NOW? and only
YES writes the flash. The button waits for the same approval as
downloads. The sender, run from Node, installed the base alone on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
durchgemacht and others added 4 commits November 24, 2026 19:41
# Conflicts:
#	docs/MACHINE_RECIPE.md
#	sdk/machines/model-cycles/README.md
The 4d4d91d2 base (the link, the loader, the load and the log in every
base) as machine:base builds it, at the path the catalogue record pins by
commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalogue record pins 4d4d91d2, the base with the link, the loader,
the load and the log, in place of 2e5243e6. The kit builds ec928894 from
the stock 1.13 file, byte for byte the patcher's image that ran flashed
on the unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner

Thanks, pinning 4d4d91d2 is what I asked for, and the byte-for-byte match with the flashed image is a good check.

The page itself still needs a run in a browser. You don't need a signed-in member for that: every dev build gets the beta pages (hasBetaUi in src/community/beta-access.ts is on whenever USB_LINK is), so npm run dev from your branch shows the Model:Cycles page. Please add these rows to the record:

  • The page's build in a browser: load your stock 1.13 there, build, and confirm it gives ec928894.
  • The send dialog in a browser: it only shows when downloads are on, so flip 'model-cycles' in DIGI_DOWNLOADS_ENABLED locally for the test (don't commit it). Send ec928894 from the dialog with Transfer closed. Answer NO once and check the unit keeps running, then send again and answer YES. The browser's SysEx permission prompt and the dialog's stages haven't run anywhere yet.
  • Transfer open: what the dialog says when Transfer holds the port.

Everything else can wait for the base draft (#2077), which this sits on.

repeat98 added a commit that referenced this pull request Nov 25, 2026
…either order

0102 (Digitone II, this draft) and 0104 (Model:Cycles, #2125) each rebuilt usage_device_daily with a closed machine list that left out the other machine. Deploy applies the later-numbered file even after the earlier one, so whichever landed second would fail on the other machine's rows or drop it from the list. 0102 now lists both, and a test checks that the latest rebuild of the table accepts every machine in USAGE_DEVICES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner

One more thing I found after my comment this morning, about migration 0104.

The Digitone II base draft (#1767) has migration 0102, which rebuilds usage_device_daily the same way. Each list left out the other machine: 0102 had no model-cycles, and 0104 has no digitone-ii. Deploy applies the later-numbered file even after the earlier one, so whichever lands second would fail on the other machine's rows, or drop that machine from the list.

I've fixed my side: 0102 now lists model-cycles too, and usage-machine-migration.test.ts on base/digitone-ii-next checks that the latest rebuild of the table accepts every machine in USAGE_DEVICES. Could you add 'digitone-ii' to the list in migrations/0104_usage_model_cycles.sql, next to 'model-cycles'? Then the two apply in either order. When the branches meet, keep both changes to the test file.

repeat98 added a commit that referenced this pull request Nov 25, 2026
# Conflicts:
#	docs/MACHINE_RECIPE.md
#	sdk/machines/model-cycles/README.md
durchgemacht and others added 3 commits November 25, 2026 11:44
0102 on the Digitone II base draft (repeat98#1767) rebuilds usage_device_daily the
same way. With both machines in both lists the two rebuilds apply in either
order without dropping or refusing the other machine's rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page's worker refused a Model:Cycles OS 1.13 file ("Invalid local
firmware request.") because its machine list left model-cycles out. Found
on the first run of the page in a browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@durchgemacht

Copy link
Copy Markdown
Contributor Author

Ran the page in Chrome against my Model:Cycles (npm run dev and npm run dev:community, 'model-cycles' downloads switched on locally, not committed):

  • The page's build: stock 1.13 in, the download is ec928894aba21a17…, byte for byte. Before that it found a bug: the firmware worker's own machine list left out the Model:Cycles and refused the file ("Invalid local firmware request."). Fixed in 98e824608.
  • The send dialog: with the site's MIDI permission reset, Chrome asked for MIDI device control; Connect, Send and Confirm on the unit ticked. NO kept stock running (the dialog stays at "Press YES on the unit", since it can't see the answer). YES installed it: ident 0x15eddb5a.
  • Transfer open: on macOS the dialog sends anyway and the unit asks. Not run on Windows.
  • Migration 0104: lists digitone-ii now, beside model-cycles.

One note for the guide: the build stopped with "HTTP 502" until the local Worker ran (.dev.vars from the example, npm run db:local, npm run dev:community). I didn't check whether other machines' pages need it too, so I left APP_DEVELOPMENT.md alone.

Rows are in the description.

@repeat98

Copy link
Copy Markdown
Owner

Thanks for running the page and the dialog in Chrome, and for catching the firmware worker's missing machine on the way.

Reading the code, I found one thing I got wrong in my last comment: the page isn't beta-only. hasBetaUi is always on in a dev build, which is why it looked gated when you tested it.

  1. Beta gate: protocol.ts:27 puts 'model-cycles' in CORE_BUILD_PREVIEWS, and nothing that reads that list checks hasBetaUi: App.tsx:292 (machineBuildPreview), App.tsx:295 (takesSets) and the hero's "Open local build preview" button in MachinePages.tsx:308. The DIGI_CORES entry also opens #model-cycles/configuration to everyone. So on the live site any visitor gets the build preview of a base that's still a draft, and once downloads go on, the download and the USB send too. MACHINE_RECIPE.md (Beta first) and AGENTS.md ask for the page to be beta-only until I release it. Please gate the preview and the configuration route on betaUi, the way the Zoom pedal pages are (App.tsx:272 and :300), and check it once in a build where USB_LINK is off, as a visitor without beta access.
  2. Verification record: docs/verification/2026-11-23-model-cycles-base.md:75-93 still says the page builds 2e5243e6, and lists the page in a browser, the dialog and NO at "Upgrade OS now?" as not run. Please bring over the rows from the description (ec928894 from the page, NO and YES, Transfer open on macOS).
  3. Recovery help: RECOVERY_FAQ['model-cycles'] (recovery-faq.ts:13) points to the Digitakt/Digitone entry, whose title names those machines and which says to use the DIN MIDI ports. The Model:Cycles has 3.5 mm TRS MIDI. Please give it its own wording before downloads go on.
  4. Transfer open on Windows: on Windows a MIDI port can't be opened twice, so the dialog may behave differently there than on macOS. If you don't have a Windows machine at hand, just say so in the record.

It still waits for the base draft (#2077).

durchgemacht and others added 7 commits November 25, 2026 16:04
- The core build preview, the #model-cycles/configuration route and the
  hero's "Open local build preview" button follow hasBetaUi
  (coreBuildPreviewOpen): a visitor without beta access sees the
  machine page only, and the configuration route sends them there. A
  test renders the page as a released build (USB_LINK off) for a
  visitor and a beta tester.
- RECOVERY_FAQ['model-cycles'] points to a new answer,
  cycles-recovery: the startup menu over MIDI IN on the 3.5 mm TRS
  jack, not the Digitakt/Digitone's DIN ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	sdk/machines/model-cycles/machine.json
#	src/devices/machines.generated.json
The redirect away from #model-cycles/configuration ran while the
session was still loading, when betaUi is false for everyone on the
live site, so a beta tester who opened or reloaded the route landed on
the machine page. It now waits for !sessionLoading. A test renders App
as a released build: loading, then a beta tester, then a visitor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release base of this round (base-binding.json on
base/model-cycles-next), replacing 4d4d91d2. The record that pins it
follows in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalogue record pins modwerk-base-model-cycles-646706ff.elemod
at a6b03de, where it was added, by its SHA-256 (base-binding.json's
identity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 25, 2026
…nt (#2181)

The contract, suite and Windows path checks took the event's base.sha,
which can be an older main than the one GitHub merged the pull request
onto. Main's later changes then counted as the pull request's own: on
25 November main's migration 0105 failed the board check of PRs that
never touched it (#2077, #2125, #2126), and the checks behind it never
ran. The scope step already used HEAD^1 for this reason; these steps
now resolve the same parent to a commit. The workflow test pins it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
durchgemacht and others added 2 commits November 25, 2026 17:56
npm run elekloader:update --overlay with the record pinned in
0e2cb43: the vendored catalogue now holds the base package 646706ff
in place of 4d4d91d2. The kit builds 89edf78e from the stock 1.13 file,
byte for byte the patcher's image of this base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
durchgemacht and others added 4 commits November 25, 2026 19:12
The verification record's new section: the kit builds 89edf78e for
base 646706ff, byte for byte; in Chrome the page built it and its send
dialog installed it over stock 1.13 (identity 0x7c774e99), 25 November.
The rows from 24 and 25 November for 4d4d91d2 (ec928894 from the page,
NO and YES, Transfer open on macOS) come over from the description;
Windows was not run. The beta gate is checked by the two tests that
render a released build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98
repeat98 marked this pull request as ready for review November 25, 2026 21:27
@repeat98
repeat98 enabled auto-merge November 25, 2026 21:27
@repeat98
repeat98 merged commit 4a39050 into repeat98:main Nov 25, 2026
13 checks passed
repeat98 added a commit to durchgemacht/modwerk that referenced this pull request Nov 25, 2026
The recipe row, the machine README and machine.json take both: the site's build and send (repeat98#2125) and the MCP's device tools (this pull request).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit to durchgemacht/modwerk that referenced this pull request Nov 25, 2026
The recipe row, the machine README and machine.json take both: the site's build and send (repeat98#2125) and the MCP's device tools (this pull request).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 26, 2026
Model:Cycles (#2077, #2125, #2126) landed on main beside the Digitone II:
both machines kept in every device list; the core build preview uses
main beta-only gate (coreBuildPreviewOpen) for both; MACHINE_RECIPE keeps
this branch Digitone II row with main Model:Cycles and Analog Keys rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98 added a commit that referenced this pull request Nov 26, 2026
#2077, #2125 and #2126 are on main now. The recipe row, the README and
the machine page keep main's wording and add the Status page back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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