fix(opencode): require RGR cycle before RED author delegation #228

Merged
jwilger merged 1 commit from issue-226-rgr-cycle-guard into main 2026-05-16 21:18:56 -07:00
Owner

Closes #226.

Summary

  • Adds an opencode plugin regression test for blocking rgr-test-author task delegation without an active RGR cycle.
  • Includes recovery guidance in the task-gate error.
  • Narrows the guard to subagent_type === "rgr-test-author" so other task delegations that merely mention the agent remain allowed.

Verification

  • node --test tests/opencode-rgr-task-gate.test.mjs
  • node --test tests/*.mjs
  • nix develop -c git push -u origin issue-226-rgr-cycle-guard (pre-push full-verification hook passed)
Closes #226. ## Summary - Adds an opencode plugin regression test for blocking `rgr-test-author` task delegation without an active RGR cycle. - Includes recovery guidance in the task-gate error. - Narrows the guard to `subagent_type === "rgr-test-author"` so other task delegations that merely mention the agent remain allowed. ## Verification - `node --test tests/opencode-rgr-task-gate.test.mjs` - `node --test tests/*.mjs` - `nix develop -c git push -u origin issue-226-rgr-cycle-guard` (pre-push full-verification hook passed)
fix(opencode): require RGR cycle before RED author delegation
All checks were successful
auto_review auto_review: no findings
CI / Format check (pull_request) Successful in 6s
CI / Clippy (pull_request) Successful in 41s
CI / Dependency policy (pull_request) Successful in 12s
CI / Test (pull_request) Successful in 54s
CI / Build (pull_request) Successful in 33s
CI / Request auto_review semantic review (pull_request) Successful in 1s
CI / Build PR artifacts (no token) (pull_request) Successful in 2s
CI / Publish PR artifact packages (pull_request) Successful in 2s
373c1c09b8
auto-review left a comment

The PR introduces a new guard in the opencode plugin to prevent rgr-test-author task delegation without an active RGR cycle, along with a regression test to verify this behavior. The changes appear safe to merge, as they include both the implementation and corresponding tests.

Walkthrough

  • .opencode/plugins/auto-review-discipline.ts

    • Added a new function isRgrTestAuthorTask to check if the task is of type rgr-test-author.
    • Introduced a guard in the tool.execute.before hook to block task delegation if no RGR cycle is active.
    • The error message provides recovery guidance.
  • tests/opencode-rgr-task-gate.test.mjs

    • Added tests to ensure that rgr-test-author task delegation is blocked without an active RGR cycle.
    • Verified that other task delegations mentioning rgr-test-author are allowed.
The PR introduces a new guard in the opencode plugin to prevent `rgr-test-author` task delegation without an active RGR cycle, along with a regression test to verify this behavior. The changes appear safe to merge, as they include both the implementation and corresponding tests. ## Walkthrough - **.opencode/plugins/auto-review-discipline.ts** - Added a new function `isRgrTestAuthorTask` to check if the task is of type `rgr-test-author`. - Introduced a guard in the `tool.execute.before` hook to block task delegation if no RGR cycle is active. - The error message provides recovery guidance. - **tests/opencode-rgr-task-gate.test.mjs** - Added tests to ensure that `rgr-test-author` task delegation is blocked without an active RGR cycle. - Verified that other task delegations mentioning `rgr-test-author` are allowed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Slipstream/auto_review!228
No description provided.