fix(opencode): add claimable RGR implementation leases #259

Merged
jwilger merged 1 commit from fix/rgr-delegated-changed-diagnostic into main 2026-05-18 15:03:49 -07:00
Owner

Why:

  • Delegated implementer sessions are not always known before Task execution, so parent-approved changed diagnostics could not be consumed by the actual subagent.
  • Issue #28 exposed this when the implementer could not see the orchestrator-approved changed diagnostic.

What:

  • Add claimable delegated implementation leases and rgr_claim_implementation_lease.
  • Return a claim token from implementer task delegation when no explicit subagent session is available.
  • Preserve explicit-session delegation behavior and cover changed-diagnostic delegation without an explicit subagent session.

Validation:

  • node --test .opencode/plugins/auto-review-discipline-rgr.test.ts --test-name-pattern 'issues claimable lease for changed-diagnostic delegation without explicit subagent session'
  • just opencode-test
Why: - Delegated implementer sessions are not always known before Task execution, so parent-approved changed diagnostics could not be consumed by the actual subagent. - Issue #28 exposed this when the implementer could not see the orchestrator-approved changed diagnostic. What: - Add claimable delegated implementation leases and `rgr_claim_implementation_lease`. - Return a claim token from implementer task delegation when no explicit subagent session is available. - Preserve explicit-session delegation behavior and cover changed-diagnostic delegation without an explicit subagent session. Validation: - `node --test .opencode/plugins/auto-review-discipline-rgr.test.ts --test-name-pattern 'issues claimable lease for changed-diagnostic delegation without explicit subagent session'` - `just opencode-test`
fix(opencode): add claimable RGR implementation leases
All checks were successful
CI / opencode plugin tests (pull_request) Successful in 7s
CI / Classify changed paths (pull_request) Successful in 3s
CI / Clippy (pull_request) Has been skipped
CI / Format check (pull_request) Has been skipped
CI / Test (pull_request) Has been skipped
CI / Dependency policy (pull_request) Has been skipped
CI / Build (pull_request) Has been skipped
CI / Request auto_review semantic review (pull_request) Successful in 1s
CI / Build PR artifacts (no token) (pull_request) Has been skipped
auto_review auto_review: no findings
9e49ae54f2
Why:
- Delegated implementer sessions cannot always be known before Task execution, so parent-approved changed diagnostics need a claimable lease handoff.

What:
- Add claimable implementation lease storage and rgr_claim_implementation_lease.
- Return claim tokens from implementer task delegation when no subagent session is known.
- Cover changed-diagnostic delegation without an explicit subagent session.

Validation:
- node --test .opencode/plugins/auto-review-discipline-rgr.test.ts --test-name-pattern 'issues claimable lease for changed-diagnostic delegation without explicit subagent session'
- just opencode-test
auto-review left a comment

The PR introduces claimable delegated implementation leases to handle scenarios where explicit subagent sessions are unavailable. The changes appear well-structured and include tests for the new functionality, making it safe to merge.

Walkthrough

  • auto-review-discipline-rgr.test.ts:
    • Added tests to verify the new claimable lease functionality, ensuring that the implementation works as expected in scenarios without explicit subagent sessions.
  • auto-review-discipline.ts:
    • Introduced rgr_claim_implementation_lease to allow claiming of delegated implementation leases.
    • Modified recordDelegatedImplementationEditLease to return a claim token when no explicit session is provided.
  • shared.ts:
    • Added claimDelegatedImplementationEditLease function to handle the claiming of leases using tokens.
    • Updated data structures to manage claimable and delegated leases effectively.
The PR introduces claimable delegated implementation leases to handle scenarios where explicit subagent sessions are unavailable. The changes appear well-structured and include tests for the new functionality, making it safe to merge. ## Walkthrough - **auto-review-discipline-rgr.test.ts**: - Added tests to verify the new claimable lease functionality, ensuring that the implementation works as expected in scenarios without explicit subagent sessions. - **auto-review-discipline.ts**: - Introduced `rgr_claim_implementation_lease` to allow claiming of delegated implementation leases. - Modified `recordDelegatedImplementationEditLease` to return a claim token when no explicit session is provided. - **shared.ts**: - Added `claimDelegatedImplementationEditLease` function to handle the claiming of leases using tokens. - Updated data structures to manage claimable and delegated leases effectively.
jwilger deleted branch fix/rgr-delegated-changed-diagnostic 2026-05-18 15:03:49 -07:00
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!259
No description provided.