Skip to content

Reply numbers and shared verb words come from the rendered contract - #181

Open
linuxnow wants to merge 4 commits into
mainfrom
fix/176-reply-macros
Open

linuxnow wants to merge 4 commits into
mainfrom
fix/176-reply-macros

Conversation

@linuxnow

Copy link
Copy Markdown
Contributor

Closes #176 on this side except the note ranges, PHD_STRING_MAX and PHD_REMOTE_PAGE_SLOTS, which omx-clap-core does not declare in its contract (they need a declaration there first). protocol.h loses its PHD_ERR_* numbers and PHD_VERB_* words; the daemon, PHD_ERRORS and the generators read OMX_REPLY_RESP (omx-contract#159, merged, not released) and omx-clap-core's OMX_VERB and track kinds, rendered by make render-verbs from omx-clap-core's package. Needs an omx-contract release and an omx-clap-core release carrying the re-render (omx-clap-core#368) before CI can pass: the installed omx-contract does not spell _RESP yet. Desk run with the local contract: test, test-perturbation (now moves a code's resp in data/verbs.json), verbs_declared and consumer pass.

…not copies in protocol.h (#176)

protocol.h defines no PHD_ERR_* number and no PHD_VERB_* word of its own: the daemon, PHD_ERRORS and the generators read
OMX_REPLY_<GROUP>_<REASON>_RESP, which omx-contract renders for plugin-hostd's codes and, from omx-clap-core's package, for
the ones omx-clap-host answers too, and OMX_VERB_<VERB> and _FMT of omx-clap-core for the instance and note verbs, with the
track kinds from OMX_HOST_TRACK_KINDS_*. make render-verbs and check-rendered render omx-clap-core's package beside the
daemon's; the two headers ship in the development package. verbs_declared.py holds PHD_ERRORS to the rendered numbers and
refuses a PHD_ERR_ define; perturbation.py now moves a code's resp in data/verbs.json and sees the daemon and the docs follow.
Not done: the note ranges, PHD_STRING_MAX and PHD_REMOTE_PAGE_SLOTS, which omx-clap-core does not declare in its contract.
… the sabotage arm for a changed code now breaks the render (#176)

A declared resp is rendered and the daemon follows the render, so changing data/verbs.json can no longer make the daemon
disagree with it. The arm now changes the rendered header instead, and verbs_declared fails on a rendered number that
is not its code's resp. verbs_contract reads the verb words from omx-clap-core's render too.
The reply numbers stay the rendered contract's: the conflicts in
data/verbs.json (noSuchPlan, -532), protocol.h, tests/sabotage.py and the
supervisor and planner sources take main's additions in the OMX_REPLY_*_RESP
spelling. include/plugin-hostd/*vocabulary.h, protocol/plugin-hostd.json,
README.md and doc/plugin-hostd.1 are written by `make render-verbs` and
`make gen` against omx-contract 3.4.0 and omx-clap-core-contract 0.23.0,
not merged by hand; `make test` passes in a fedora:44 root.
The header gained three lines ahead of PHD_LINE_MAX, so the recorded mutant
`4096` -> `4` pointed at line 53, where the token is no longer; it is on
line 56. fuzz-records meets all 34 records again.
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.

Per-code reply macros come from the contract, and PHD_* verb aliases go (review #2, #3)

1 participant