Repository navigation
fix(v2): accept host-added deny rules in verifier ownership check - #84
Conversation
OpenCode 2.0.26 appends a browser deny to every agent, so the exact permission comparison rejected the plugin's own goal-verify agent and every completion audit failed. Accept extra deny rules only, surface auditor prompt errors instead of "no verdict", and let the live smoke accept verifier child removal on hosts that expose session.remove. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for #84. I hit the same rejection on OpenCode 2.0.32 (macOS arm64, plugin 0.11.0) and can confirm the Config Live
Rejecting here is the right call: with last-match-wins, Some possible directions:
Happy to test a branch on 2.0.32. |
Every completion audit fails on OpenCode 2.0.26. Found while verifying #81;
mainis affected too.Root cause
OpenCode 2.0.26 appends
{"action":"browser","resource":"*","effect":"deny"}to every agent.assertVerifierOwnershipcompared permissions by exact JSON, so it rejected the plugin's owngoal-verifyagent. WithcompletionAudit: true, every completion was rejected. The real error was hidden because the auditor ignored the{error}response and reported "auditor returned no single clear final-line verdict".Changes
permissionsOnlyNarrow: the owned rules must appear in order. Extra rules are accepted only if they aredeny, which cannot widen access under first- or last-match evaluation. Changed, missing, reordered,alloworaskrules are still rejected.{error}and still no verdict is found after the messages fallback, the reason isauditor prompt failed: <reason>. A verdict that reached the session history still wins.scripts/live-v2-host.mjs: 2.0.26 exposessession.remove, so the verifier child is now deleted after its verdict. The script accepts retention (2.0.16) or removal (2.0.26).docs/compatibility.mdupdated.Verification
mainand pass here.npm run release:check: exit 0 (492 tests, mutation 90/90, type/packed contracts, smoke, audit 0 vulns).smoke:v2-hoston 2.0.16 and 2.0.26, in normal mode and inGOAL_V2_FOREIGN_VERIFIER=1mode: all pass. A foreign verifier still rejects completion on both.Note: this PR and the #81 PR both add CHANGELOG "Unreleased" entries; whichever merges second needs a small changelog conflict resolved.
🤖 Generated with Claude Code