Repository navigation
probe-output.schema: the shared enums come from omx-contract's vocabulary (#115) - #120
Conversation
…ulary header (#115) The probe output's shared words (latency method, voice basis, core and clock bands, thread scheduling) come from omx-contract's omx_vocabulary.h, which 2.18.0 is the first release to install.
… vocabulary header (#115) The latency method, the voice basis, the core and clock bands and the realtime scheduling were lists typed in the template. Each is now an @OMX_<ITEM>@ token the generator replaces with the item's _INIT words from omx_vocabulary.h, in the contract's order, with a static check that the list holds as many words as the item's count. The generated schema keeps the same values, note-onset among the methods. The probe.* outcomes, steps, limits, reasons and profile codes stay this protocol's own.
…word for word (#115) tests/vocabulary_derived.py reads the installed omx-vocabulary.schema.json and holds every enum the template takes by an @OMX_<ITEM>@ token to $defs.<ITEM>.enum, same words, same order; requires the five items of #115 to be taken that way; refuses a template list that is a whole contract item typed by hand; and checks note-onset is a latency method. A positive control tells a contract with a word more and one reordered apart. make sabotage gains five breaks, each seen red: a method dropped from the generated schema, the clock bands reordered, a scheduling class added to a copy of the contract, the methods typed by hand in the template, and the voice basis taken from nowhere.
…y omx-contract's names (#115) The runner typed the core and clock bands, impulse-onset and note-onset, and "none" as literals of its own; it now writes the words of omx_vocabulary.h (MACHINE_CORE_BANDS, MACHINE_CLOCK_BANDS, MEASUREMENT_LATENCY_METHODS, RESOURCE_THREAD_SCHEDULING). The documents it writes are unchanged.
A copy of omx_vocabulary.h with a latency method more moves the probe schema the generator writes, and the same word list without its count does not build. Two sabotages, each seen red: the generator types the methods itself, and it drops the check of a list against its count.
|
Coordinator's answers (2026-10-20, recorded in decisions-2026-10-19.md): (1) limit.unit and cost.unit stay plugin-hostd's own lists, but add a check that every word is a word of the contract's RESOURCE_UNITS (a subset test), so they cannot drift to a word the core lacks; do it in this PR if small, else as a follow-up issue. (2) machine.class field names and machine.profile field names: derive them the same way (tokens from MACHINE_CLASS_FIELDS and MACHINE_PROFILE_FIELDS); a follow-up PR is fine, file the issue. (3) The packaging floor rises to omx-contract-devel >= 2.18.0 with this change: agreed, it is part of the change, not a spec change. The release 0.6.0 PR (#119) is merged and is not touched; this PR goes in the next plugin-hostd release. Image: the worker image needs a rebuild with contract 2.18.0 (ops#219); CI here installs the published 2.18.0. |
Closes #115.
The probe output keeps its own format and its own probe.* codes; the words it shares with the other readers of a measurement now come from omx-contract 2.18.0, declared once there.
What is derived now
protocol/probe-output.schema.innames five enums as@OMX_<ITEM>@tokens and holds no list of them: latencymethod(MEASUREMENT_LATENCY_METHODS: impulse-onset, declared-port, note-onset), the held notes'basis(MEASUREMENT_VOICE_BASES),machine.class.coreBand/clockBand(MACHINE_CORE_BANDS/MACHINE_CLOCK_BANDS) andoffer.realtime(RESOURCE_THREAD_SCHEDULING).tools/protocol-genwrites each token from the item's_INITin<omxcontract/omx_vocabulary.h>, in the contract's order, and does not build when a word list is not its_COUNT. The generatedprobe-output.schema.jsonhas the same values as before (only the five lists are now written on one line).src/probe.cwrites the bands, the latency method and the scheduling class by the header's names instead of literals; the documents it writes are unchanged.cancelledBy,viaandplugin.format.Checks
make test-vocabulary(new, inmake test):tests/vocabulary_derived.pyreads the installedomx-vocabulary.schema.json(pkg-config datadir of omx-contract, orOMX_VOCABULARY) and holds every enum the template takes by a token to$defs.<ITEM>.enum, word for word and in order; requires the five items above to be taken that way; refuses a template list that is a whole contract item typed by hand; and checks that note-onset is a latency method. A positive control tells a contract with a word more and one reordered apart.make test-contractgains a scratchomx_vocabulary.hwith a latency method more: the schema the generator writes follows, and the same list without its count does not build.make check-generatedkeeps the generated schema current with the header.Sabotages (
make sabotage), each seen red:Two existing sabotages had their text moved with the code (the note-onset schema entry, now on one line; the note-onset method in
src/probe.c, now a macro).Packaging: the floor of
omx-contract-devel/libomx-contract-devrises to 2.18.0, the first release withomx_vocabulary.h; both channels carry it. No version or changelog change.Verified in the worker image with omx-contract-devel 2.18.0:
make testgreen,make sabotagegreen but for "worker_env is not applied to a running worker", which survives on main as well when the suite runs niced (#103).Codes: none. No hosting.* code is added, removed or renamed; the step's
hostingCodestays a pattern.