Skip to content

Declare NOTE_QUEUE_FULL (-517): a note the worker had no room for - #91

Closed
linuxnow wants to merge 2 commits into
mainfrom
fix/note-queue-full
Closed

linuxnow wants to merge 2 commits into
mainfrom
fix/note-queue-full

Conversation

@linuxnow

Copy link
Copy Markdown
Contributor

Declares the code omx-clap-core#160 needs. omx-clap-host currently answers -901 there, a code no table declares, when its note queue for an instance is full.

Stacked on #85. This branch contains #85's commit, because PIN_REFUSED (-516) must be declared first. Review only the last commit, 6b375fb. Once #85 merges I will rebase this onto main and the diff will be that one commit.

  • PHD_ERR_NOTE_QUEUE_FULL (-517) is declared in protocol.h. It means the worker had no room for this note_on, note_off or all_notes_off before its next block: the line was not taken and nothing of it is kept, and the controller may send it again. README.md and protocol/plugin-hostd.json are regenerated.
  • The daemon passes the worker's reply through unchanged, so no daemon code changes.
  • Tests. The fake host answers the code for a synth_full instance. A daemon test checks that the code reaches the controller for all three verbs; on main it is red, because the code is not declared. tests/consumer.c now also refuses two errors that share a code, or a code outside -501..-599. A sabotage arm (new consumer kind) gives this code -516 and turns that test red.
  • A release that carries this is a minor bump.

Local checks: test-pin, test-format, test-daemon, check-generated, check-schema, test-consumer, test-perturbation, check-readme, and the new sabotage arm.

linuxnow added a commit to FreeMixer/omx-clap-core that referenced this pull request Oct 18, 2026
plugin-hostd declares PHD_ERR_NOTE_QUEUE_FULL, -517, for a note verb
its worker had no room to queue (FreeMixer/plugin-hostd#91). The host
answers it where it answered -901, and takes the number from the
header once that is installed. Until then it defines the same number
itself.

jack_synth_e2e.sh stops the private PipeWire, so no cycle drains the
queue, and sends 600 note_on: 511 are queued, the other 89 answer -517,
and all_notes_off answers -517. Once the graph runs again,
all_notes_off answers 0 and note_drops counts the note ons the one
cycle had no room for.
verdict=refused was parsed, stored and then ignored. A plugin whose files failed qualification was added like
any other. pins_check now refuses such a plugin with the new code PHD_ERR_PIN_REFUSED (-516), after the
files have been checked against the pin: the verdict applies only to the pinned files, so files that
differ still answer -509 first. Because the add and the replay share pins_check, an instance whose pin turns
refused while it runs is refused at its next replay (instance_replay_refused with -516). The code is declared
in protocol.h, and the README and protocol/plugin-hostd.json are regenerated from it.

The test fails on main (the add answers resp 0). It covers pin_set, a pin_file under first-use (the
plugin is not learned into the store), the replay, and changed files. A sabotage arm removes the check.

Closes #71
omx-clap-host refuses a note_on, note_off or all_notes_off that its note queue for the instance has no room
for before the next block, and answers -901 today, a code no table declares. Errors go by code: the protocol
now declares PHD_ERR_NOTE_QUEUE_FULL (-517), the next free code after PIN_REFUSED (-516). The line was not
taken and nothing of it is kept; the controller may send it again. The daemon passes a worker's reply
through unchanged, so nothing in it changes; README.md and protocol/plugin-hostd.json are regenerated.

The fake host answers it for a synth whose uri holds "synth_full", and the daemon test checks that the
code reaches the controller for the three verbs. tests/consumer.c now also refuses two errors that share a
code, or a code outside the -5xx hundred; a sabotage arm (a new "consumer" kind) gives this code -516 and
turns that test red.
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.

1 participant