Skip to content

Machine: Digitone II diagnostics log, the Octatrack's layout, over the development link - #1820

Open
prodbysmolec wants to merge 57 commits into
repeat98:base/digitone-ii-nextfrom
prodbysmolec:machine/digitone-ii-diagnostics
Open

prodbysmolec wants to merge 57 commits into
repeat98:base/digitone-ii-nextfrom
prodbysmolec:machine/digitone-ii-diagnostics

Conversation

@prodbysmolec

@prodbysmolec prodbysmolec commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator
  • What was wrong or hard: The owner asked for the Octatrack's diagnostics on the Digitone II, copied as they are (Discord, 19 November 2026): what the unit did while no site watched, a freeze above all. The Digitone II had none. Builds on Machine: Digitone II development link, stage two (panel keys and encoders over USB MIDI) #1817 (this branch holds its commits, and Machine: Digitone II development link, stage one (read-only diagnostics over USB MIDI) #1763's): please review it after them.
  • What this changes: Development bases only (base.json's dev). base/diag.c is the Octatrack's diag.c for this unit, and base/diag.h is the Octatrack's header byte for byte (a test pins that), so the site's parseDeviceLog reads the Digitone II's log unchanged. It logs a START at each start; a FREEZE when the UI tick stands still five seconds while the frame interrupt (ev_frame_params) goes on, with how many frames it stood and the last 16 panel keys (ev_key, takes none); and a load window every five minutes with its UI ticks and the longest run of frames without one. The clock is the frame count at the rate measured on the unit, 1,500 a second. What the Digitone II does not have yet stays 0: CPU and DSP meters, machines, FX, screen, tempo, crash and stall records. The log lives in the base's .bss (no battery RAM is known here), so it starts empty at every start. The link gets diag (the log's address and size, frames, ticks; the host reads it with mem) and, armed, freeze N, the Octatrack's FREEZE TEST: the next UI tick stands still N frames. Host diag --save and freeze, LINK.md, a test of the header's identity, a changelog entry.
  • How I checked it: npm run pr:ready; a build that counted the rates first (30 s of wall time: 1,501.6 frames and 30.03 ticks a second).
  • Tested on a unit: development base bf387913 with hello-marker-dn2 (.syx 68b73acd), my Digitone II: diag --save read the log and parseDeviceLog parsed it (version 2, START); freeze 6 stood the display, keys and LEDs still for 6 s while the sound went on, and the log held a FREEZE of 9,050 frames each of three times, the last with the 16 keys pressed before it; after five minutes a load window of 9,026 ticks with a 9,050-frame gap (record). Not tested: a real freeze, long sessions.
    Edge cases
Case Why this change makes it a risk How run Result
The site's parser reads the log the layout must be the Octatrack's diag --save, then parseDeviceLog pass: version 2, START
A FREEZE the frame interrupt must log a stalled UI freeze 6 on the unit pass: FREEZE at second 14, 9,050 frames; sound went on
A load window five-minute records at the measured rate five minutes on the unit pass
A real freeze that ends in a restart the log lives in .bss not run not run: it would be lost by design
  • What the guides lacked or got wrong, and where I fixed it: LINK.md now says what the diagnostics keep and what they leave out on this unit.

🤖 Generated with Claude Code

prodbysmolec and others added 24 commits November 19, 2026 03:03
…SB MIDI SysEx

Development bases (base.json's dev) observe stock's SysEx router at 0x4012197a (core-dn2 0.3's ev_sysex site) and
answer the Analog Rytm MKII link's ident and mem requests from ev_tick through stock's sysex_send on USB. A host
(tools/dn2_link.py) with a test of its frames, LINK.md, the goal row and a changelog entry.

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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The status byte of stock's USB MIDI receive parser, 0x445090ac on OS 1.12, reads 0xF0 while a SysEx message arrives.

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>
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>
…, not yet on a unit)

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>
…host on a unit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and the encoder pushes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot yet on a unit)

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>
…red rate

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

gitguardian Bot commented Nov 19, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
40376663 Triggered Generic High Entropy Secret 19be13a src/community/agent-sessions.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the diagnostics log work. The changed files include workflows, skill files and AGENTS.md that don't belong to this change, which usually means the branch is behind main. Please merge the current main into your branch and run npm run pr:ready until it says Ready, so only the diagnostics-log files are left in the pull request. Once the checks are green it can be looked at again.

@repeat98

Copy link
Copy Markdown
Owner

The freeze test skips the link's panel-priority check. A local key or encoder starts the interval in which remote controls yield to the musician, but CMD_FREEZE_TEST checks only whether the link is armed and whether the duration fits. It can still stop the panel during that interval. Please apply the same human-at-the-panel check here and cover the refusal and the first allowed request after the interval.

There is also a readout issue in diag --save. It writes the chunks directly to the requested file even if a read comes back short. Once the shared memory reader in #1763 validates each reply, please have the save path report success only for a complete log and leave any existing capture intact on failure.

…n command, eight parts of one copy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prodbysmolec and others added 7 commits November 25, 2026 11:38
…OW? opened is taken at dispatch, never reaching the prompt

A person's press at the prompt always reaches stock now, even while the link holds keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chine/digitone-ii-link-keys

# Conflicts:
#	sdk/machines/digitone-ii/GOAL.md
… replaces the file

The header (seq, loads, incidents, freeze_state) before, inside and after the read must match; a write in between reads again, three times at most, then exits with nothing saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chine/digitone-ii-diagnostics

# Conflicts:
#	sdk/machines/digitone-ii/GOAL.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@prodbysmolec

Copy link
Copy Markdown
Collaborator Author

Fixed in 302246c (then merged main and base/digitone-ii-next). What changed: diag --save now replaces the file only with a log that stood still for the whole capture. Not run on a unit yet.

  • read_stable_log reads the log's 40-byte header (magic … freeze_state) before the read and again after it, and compares both with the header inside the captured bytes. diag.c raises seq, and loads or incidents, with every record it finishes, and changes freeze_state as a freeze starts and ends, so three equal headers mean no record was written in between. Otherwise it reads again, three times in all, then exits nonzero with nothing saved.
  • Host cases (Dn2DiagSave):
    • a record (seq and incidents raised, a record filled past the first chunk) arriving between the first and second chunk: read again, and the saved file is the log after the write, header and record together;
    • one arriving after the last chunk: caught by the closing header read;
    • one during each of the three reads: exits, the earlier capture stays, and no temporary file is left.
  • diag.h copied again from main; the dev base builds (16 sites); test_dn2_link.py 19 of 19 and sdk:check pass.

One thing coming: #1763 now removes mem from the link (the unit chooses what each request returns). When it is merged into this branch, the log moves to its own bounded request (log OFF, parts of the log only) on that interface, and this stability check stays on top of it.

prodbysmolec and others added 6 commits November 25, 2026 12:08
… key link

link.c keeps the keys and turns and takes repeat98#1763's screen in place of mem; one host fixture covers both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omes in parts the unit reads itself (log OFF)

mem is gone, so link.c answers log OFF (0x24) with up to 128 bytes of diag.c's log and its seq; dn2_link.py diag --save
and the site's readLog read part 0, the rest, then part 0 again, and keep only a log that stood still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prodbysmolec added a commit to prodbysmolec/modwerk that referenced this pull request Nov 25, 2026
…t: bootdiag gets its own request

With mem gone, bootdiag (0x25) sends the gate's 15 words and the two marks the base itself writes; the host reads them
with one request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prodbysmolec added a commit to prodbysmolec/modwerk that referenced this pull request Nov 25, 2026
…nto the loader: ident sends the modules' test value itself

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

Copy link
Copy Markdown
Collaborator Author

#1763 and #1817 are now merged in (5767ee2). As announced, the log has its own bounded request: log OFF (0x24) sends up to 128 bytes of diag.c's log from OFF, with the log's seq, and refuses offsets past the log or between parts.

  • diag still sends the size, frames and ticks. The log's address stays in it for reference, but no request reads at it.
  • dn2_link.py diag --save and the site's readLog read part 0, the rest, then part 0 again. They keep the capture only when the header and the seq of every part stayed the same, otherwise they read again (three times at most).
  • Host cases: in Python, a write between parts, after the last part, and during every read, plus a short part and a refusal; in TypeScript, a write mid-read and a log that keeps changing. In dn2_link_host.c, a 300-byte log read in three parts byte for byte, and every bad offset.
  • sdk:check, lint, typecheck and Vitest pass. Not run on a unit yet.

@repeat98

Copy link
Copy Markdown
Owner

Thanks. log OFF with the unit reading its own log, and a capture kept only when the header and seq stayed the same, covers both of my points, and the person-at-the-panel check on freeze is in.

Before this goes into base/digitone-ii-next (after #1763 and #1817):

  1. A unit run on this head. The record is for bf387913… from 19 November, which read the log through mem. Please flash this head's dev package, put its SHA-256 in the record, and run:
    • diag --save through log parts, then parseDeviceLog reading the file;
    • freeze right after you press a key: refused with status 5, then accepted once about three seconds have passed;
    • log at an offset past the log or between parts: refused with status 4.
  2. Stale text. The description still says the host reads the log with mem at the address diag gives, and so does the header comment of diag.c. The edge-case table has no rows for the freeze refusal, a record written mid-capture, or the log refusals. Please update all three.

prodbysmolec and others added 9 commits November 26, 2026 10:30
…chine/digitone-ii-link

# Conflicts:
#	src/engine/elektron/dn2-link.ts
…nto machine/digitone-ii-diagnostics

# Conflicts:
#	src/engine/elektron/dn2-link.ts
The unit refuses 0x21 since the link became bounded, so mem, MEM_MAX,
read() and the readLog that read through them are gone, with their
tests. repeat98#1820 brings the log back through log OFF (0x24). The fake unit
now refuses every command link.c does not serve.

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

# Conflicts:
#	src/engine/elektron/dn2-link.test.ts
#	src/engine/elektron/dn2-link.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a unit, the link held YES while an OS upload completed, then
'release' posted YES's key-up, and stock started the flash: it answers
the prompt on the release as on the press. At the prompt mw_link_key now
takes every key event the link posted, releases included, and counts it
as refused; a person's YES and NO still reach stock. The host test
asserted the old behaviour and now checks the release is taken (it fails
against the old dispatch).

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

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