Split normal vs adversarial review prompts; honest setup provider check (#32)#40
Merged
TheRealDinghyDog merged 1 commit intoJul 10, 2026
Conversation
…ck (#32) /opencode:review and /opencode:adversarial-review both rendered the adversarial "break confidence" template — only the result label differed — and the normal review silently accepted focus text its docs said it rejects. getAuthStatus reported loggedIn whenever /config or /provider was merely readable, so setup marked the plugin ready with zero connected providers and the first real task failed later. review now renders a neutral high-signal template (prompts/review.md) selected via explicit per-command config (promptTemplate), rejects positional focus text with an error pointing at adversarial-review, and adversarial-review is unchanged. loggedIn requires a non-empty `connected` set from /provider (id strings or {id} objects); a readable endpoint with nothing connected reports the provider-setup next step, and a failing /provider endpoint is loggedIn: false instead of a crash or a false positive. Drafted by OpenCode via the plugin's own rescue path (issue #32 task), then reviewed and polished: template selection moved from display-label string matching to explicit config, and an invented `connections` field alias dropped from the provider parsing. Tests assert the actual generated prompt per command, the focus-text rejection, and connected/disconnected/failing provider setups against the fixture's real /provider shape. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32 (review findings M-04 + M-05).
M-04 — review command semantics
Both review commands rendered the adversarial "break confidence in the change" template; only the result label differed, and
/opencode:reviewsilently accepted focus text its own docs said it doesn't take.prompts/review.md(balanced, high-signal, evidence-bar rules, same placeholders and structured-output contract as the adversarial one);/opencode:adversarial-reviewunchanged.promptTemplate), not display-label string matching./opencode:reviewrejects positional focus text with an error directing to/opencode:adversarial-review.M-05 — setup false positive
getAuthStatus()saidloggedIn: truewhenever/configor/providerwas merely readable — a server with{"all": [], "connected": []}was reported ready and the first real task failed later.loggedInnow requires a non-emptyconnectedset from/provider(tolerates id strings and{id}objects per the 1.17.15 shape).loggedIn: falsewith the provider-configuration next step in/opencode:setup; a failing/providerendpoint isloggedIn: falseinstead of a false positive./providernow returns the realistic{all, default, connected}shape, with env switches for the disconnected and failing cases.Provenance & tests
Drafted by OpenCode through the plugin's own
--writerescue path (parallel-delegation live test), then reviewed and polished — the draft was good; changes were limited to config-driven template selection and dropping an inventedconnectionsfield alias.Tests assert the actual generated prompt content per command, the focus-text rejection message, and setup behavior across connected / disconnected / failing provider endpoints.
npm test: 100 passed, 0 failed, 0 skipped.🤖 Generated with Claude Code