Skip to content

A pin whose verdict is refused refuses the add with PIN_REFUSED (#71) - #85

Merged
linuxnow merged 1 commit into
mainfrom
fix/71-verdict-refused
Oct 18, 2026
Merged

linuxnow merged 1 commit into
mainfrom
fix/71-verdict-refused

Conversation

@linuxnow

Copy link
Copy Markdown
Contributor

Fixes #71 (the verdict part; the resource limits mentioned there are openmixer#1858).

The daemon parsed and stored verdict=refused but never acted on it, so files that had failed qualification were added like any other plugin. pins_check now answers a new code, PHD_ERR_PIN_REFUSED (-516), once the files match the pin. The verdict was given for those exact files, so changed files still answer -509 first. The add and the replay both go through pins_check, so a pin that turns refused while its instance runs stops it at the next replay (instance_replay_refused <id> -516). The pin_changed event is not sent, because the files did not change.

The code is declared in protocol.h. README.md and protocol/plugin-hostd.json are regenerated from it, and the pin section of the README says what the verdict does.

How it is tested: a_pin_whose_verdict_is_refused_refuses_the_add_with_its_own_code fails on main, where the add answers resp 0. It covers pin_set, a pin_file under first-use (the refused plugin is not learned into the store either), the replay, changed files, and a positive control (the same files re-pinned verdict=isolated run). A sabotage arm removes the check and the test goes red.

The code is new, so a release that carries this is a minor bump.

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

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
@linuxnow

Copy link
Copy Markdown
Contributor Author

Rebased onto main 61b07ad: resolved tests/sabotage.py: both sides appended a SABOTAGE entry at the same spot (#83's three relay entries, this PR's pin-verdict entry); kept all four, no logic chosen.

@linuxnow
linuxnow force-pushed the fix/71-verdict-refused branch from fb2852d to cfb3fbb Compare October 18, 2026 21:08
@linuxnow
linuxnow merged commit 1ce8398 into main Oct 18, 2026
17 checks passed
@linuxnow
linuxnow deleted the fix/71-verdict-refused branch October 18, 2026 21:26
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.

plugin-hostd: a pin with verdict=refused refuses the add with a named code

1 participant