Skip to content

Improvement: a stopped Octatrack is judged by the load it last played at (CPU FULL guard) - #1519

Merged
repeat98 merged 12 commits into
mainfrom
improvement/cpu-guard-playing-load
Nov 14, 2026
Merged

repeat98 merged 12 commits into
mainfrom
improvement/cpu-guard-playing-load

Conversation

@repeat98

@repeat98 repeat98 commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner
  • What was wrong or hard: The CPU FULL guard (Improvement: a busy Octatrack refuses a further module machine or effect with CPU FULL #1499, in Improvement: one Octatrack base update: update and sync screens, CPU FULL guard, stall frames, engine price in the package, Windows USB, a larger RAM boot stage #1502) reads the CPU meter at the moment of the pick. A stopped unit reads low, so picks made while stopped passed and left a Part that played over the line. On the owner's MKII (13 November 2026, twin 23f3f1b1 of base 4e9a87ea, 29 modules) the stopped unit read 70 %, four module effects were accepted, and playing then read 95 to 97 % with frames at 121 to 130 % until the DSP frames stopped (stall record 44). Measured with an encoder probe the same day, the panel is unchanged up to 83 %, and from 87 % a knob turn starts to wait for its redraw (0.1 to 0.2 s from 90 %).
  • What this changes:
    • While the unit is stopped, a pick of a module's machine or effect is judged by the meter's mean over the last four seconds the unit played, if that is more than the meter now (modwerk_status_cpu_load, cpu_note_played in status.c). The box then reads "WAS BUSY PLAYING" in place of "UNIT IS BUSY" and shows that figure.
    • Stock's machines and effects and NONE still always pass. Playing, nothing changes.
    • machine_registry.c asks the same figure for a machine pick. selection.c, dsp.c and manager.c are untouched.
    • Limits: the kept figure is replaced only by four seconds of playing, so a unit made lighter while stopped (a stock pick, a removed module, another project) refuses a module until it has played once. A unit that has not played since its start is judged as it stands. Installing a module is still never refused.
    • The base was regenerated on 14 November (below).
  • How I checked it:
    • Host: test_status.c (kept only after eight readings in a row playing, a stop starts the count again, used only while stopped and only when higher, the refusal counted, stock and NONE pass, a lighter last play passes) and the registry host tests in sdk/tests/test_machine_events.py and test_fract_public_registry.py. A build with the new rule broken fails the new checks. node scripts/docs.mjs passes. npm run pr:ready was not run.
    • On a unit (owner's MKII, 13 November 2026, twin c6e655c7 of this branch, started from the flashed base; Air Chorus, Tape Echo, Euclid, Mini Verb, POLY8 and FM Synth 0.1.2 installed): never played, stopped at 54 %, Mini Verb on T1 FX2 went through. After twelve seconds playing at 93 %, stopped at 66 to 68 %: Mini Verb on T1 FX2, Euclid on T1 FX1 and POLY8 on T2 SRC were each refused with "CPU FULL / CPU 93% / WAS BUSY PLAYING"; FILTER and NONE on T2 FX1 went through. With FM Synth removed and no play since, Mini Verb was still refused; after twelve seconds playing at 81 % and a stop, it went through.
    • Not tried on the unit: a project load or a Part change between the play and the pick, a pick just under the line, the box over other pages.
  • Found on the way, not fixed here:
    • A RAM boot from one development twin into another never arrived: the screen stayed on BASE UPDATE / RESTARTING and the unit was gone from USB until a power cycle. The same image started from the flashed base came up. Cause open.
    • Frames ran past their time in every playing run with POLY8 installed (109 to 115 %, 124 to 126 % with FM Synth 0.1.2).
    • The diagnostics log held one cpu entry after four refusals; whether that is intended was not looked at.
  • What the guides lacked or got wrong, and where I fixed it: docs/MODULE_PERFORMANCE.md said the guard reads the moment of the pick; it now says how a stopped unit is judged and what the limits are. docs/verification/2026-11-13-cpu-guard-panel-lag.md is the record of the day's runs: what the guard refused and let through, the lag by load, how it was measured, and what was not shown. The UI tick count and tick gap did not show the lag at any load; the record says so.

Added 14 November 2026

  • What was wrong or hard: A machine picked just under the line was admitted and then played over it; the base's frame guard dropped its renders without saying so. In shared diagnostics of 11 to 14 November there are 166 skip records on 24 units beside 5 CPU FULL refusals, and the fixed 45 % allowance refused nothing.
  • What this adds:
    • mw_assign judges a module's machine with its price on top of the meter (cpu + 10 * cpu_price(next) >= mw_cpu_hot); an unpriced machine counts the default 12. Effects, stock's machines and NONE are judged as before. The box still shows the measured load, so a refusal can read "CPU 76% / UNIT IS BUSY" with the line at 85 %.
    • main is merged and the base is rebuilt: identity 10ec7118, the base-bound packages re-stamped. The tightest USB Audio variant is 75 bytes under the 1.25 MiB that older bases take over USB.
    • A changelog entry for the whole pull request, and one sentence in docs/MODULE_PERFORMANCE.md.
  • How I checked it:
    • Host test: a pick at the line less the price is refused, one more point under it passes, a dearer machine is refused there; with the old comparison the test fails.
    • On the owner's MKII (14 November 2026): the line cannot be set on a unit, so two development twins were built with it lowered and nothing else changed. Twin 98c0b7de (line 56 %): Amiga 0.1.0 on T8 at 41.7 % went through. Twin 9576709b (line 50 %): the same pick at about 42 % was refused with CPU FULL / T8 SRC / AMIGA / CPU 42% / UNIT IS BUSY. The working Part read equal to before after each. Record: docs/verification/2026-11-13-cpu-guard-panel-lag.md.
    • npm run pr:ready: Ready on current main.
    • The real line (85 %) on the same unit, twin 48fbb746 of this branch: Amiga on T8 at 63 % went through; after playing at 77 %, stopped, it was refused with CPU FULL / T8 SRC / AMIGA / CPU 77% / WAS BUSY PLAYING, and stock's FLEX on the same track passed.
    • The base as committed (10ec7118, not a development build) was started from RAM on the unit: it came up, and trials of Mini Verb, Sidechain and Analog BD loaded and rolled back.
    • npm run pr:ready: Ready again on main of 14 November evening (FM Synth 0.1.3 and POLY8 0.3.3 merged in).
    • Not run: the committed base flashed and kept, its update over USB from an older base, a stock machine at high load.
  • What the guides lacked or got wrong, and where I fixed it: docs/MODULE_PERFORMANCE.md did not say a machine's price counts at the pick. A __pycache__ folder left by a host test run without python3 -B fails test_requested_imports.py; not written down yet.

🤖 Generated with Claude Code

repeat98 and others added 2 commits November 13, 2026 13:29
The CPU FULL guard read the meter at the moment of the pick, so picks made
while stopped passed and left a Part that played over the line. Stopped, it
now goes by the mean of the last four seconds the unit played, if that is
more, and the box says WAS BUSY PLAYING. The base is not regenerated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he MKII

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Nov 13, 2026
@repeat98
repeat98 marked this pull request as ready for review November 14, 2026 12:22
@repeat98
repeat98 enabled auto-merge November 14, 2026 12:25
@repeat98
repeat98 merged commit cbbaffa into main Nov 14, 2026
16 of 24 checks passed
@repeat98
repeat98 deleted the improvement/cpu-guard-playing-load branch November 25, 2026 12:59
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