Skip to content

Improvement: the Octatrack base keeps the frames before a stall - #1494

Closed
repeat98 wants to merge 4 commits into
mainfrom
improvement/stall-frame-trace
Closed

repeat98 wants to merge 4 commits into
mainfrom
improvement/stall-frame-trace

Conversation

@repeat98

Copy link
Copy Markdown
Owner
  • What was wrong or hard: The stall record says that the audio stopped and how the loader stood, not what led up to it. DSP stalls follow a frame interrupt held off too long, and nothing recorded the frames before the stop.
  • What this changes: The frame interrupt keeps the last 128 frames (46 ms) in ordinary memory, two 16-bit stores a frame: the gap to the frame before, and how long the frame interrupt before it ran. The tick that finds a new stall record copies them to battery RAM at 0x100ffb30 (entered in battery-ram.json), oldest first. LOG pages them after the stall record; the site, the Worker, device -- stall, diaglog and diagnostics:pull read them. A long gap after a long run is the frame interrupt's own work; a long gap after a short one is something else holding it off. An older base answers zeros there and an older site reads fewer pages, so neither side needs the other. The base is rebuilt (identity bc4ac12b) and the five base-bound packages name it; their bytes did not change.
  • How I checked it: npm run pr:ready says Ready after merging main. test_diag.c covers the ring, its order, the saturated values and the LOG pages; device-log.test.ts covers the parser, a trace that belongs to another stall, and the Worker's validation. Not run on a unit or in the emulator. Not run: CI's isolated Octatrack package rebuild (scripts/build-modules-isolated.sh).
  • What the guides lacked or got wrong, and where I fixed it: After a base rebuild, the relink holds back a base-bound package that lags its catalogue version (Sidechain today), row and all, and no guide said so. docs/DEVELOPER_WORKFLOW.md, in the paragraph on base and package assets, now says to set that row's requiredBase by hand and that test_base_bound.py proves it. docs/OCTATRACK_DRIVING.md describes the new lines of stall.

Draft until:

  • a stalltest on a development twin shows the 128 gaps and runs with device -- stall, and the unit restarts as before;
  • the isolated package rebuild matches;
  • its turn in the base queue: this is a new base for every unit and needs a rebuild after each base change that merges first.

The trace is kept by the diagnostics tick, not by dsp.c: dsp.c is pinned by the resident engines' port and stays untouched. The shared diagnostics gain timing numbers only.

🤖 Generated with Claude Code

repeat98 and others added 4 commits November 12, 2026 22:57
The frame interrupt keeps the last 128 frames (the gap to the frame before and how
long the frame interrupt ran); the tick that finds a new stall record copies them
to battery RAM, and LOG pages them after the stall record. The site, the Worker,
device stall and diagnostics:pull read them. Base rebuilt, packages relinked.

Co-Authored-By: Claude <noreply@anthropic.com>
diagnostics:pull may read only shared sources; device-log.ts is not one.

Co-Authored-By: Claude <noreply@anthropic.com>
…e says how

The relink holds a lagging base-bound package back, row and all; test_base_bound
rebuilds it against the new base and its published bytes match.

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

Copy link
Copy Markdown
Owner Author

Closed into #1502: all changes that need a new Octatrack base go out as one base update. This branch is merged there with its commits, and its description and test notes are carried over.

@repeat98 repeat98 closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant