fix(opencode): persist RGR implementation leases #260
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/auto_review!260
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/rgr-persistent-state-store"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why:
What:
.opencode/state/..opencode/state/is guardrail-owned state and must not be edited or committed.Validation:
just opencode-testThis PR introduces a persistent state mechanism for RGR implementation leases using SQLite, allowing tokenless lease claims across plugin instances. The changes appear well-structured, but ensure that all optional parameters and new functionalities are correctly handled across the codebase.
Walkthrough
.opencode/state/to ensure state data is not committed.cycleIDfor RGR cycles and madeclaimTokenoptional for lease claims.🟡 Warning: Lines 399–400: The
claimTokenargument is now optional. Ensure that all calling code handles the case where this argument is not provided.@auto-review Addressed in
e473f44. The public claim API is no longer optional-token based:rgr_claim_implementation_leasehas an empty argument schema, task delegation no longer returnsclaimToken, and explicitclaimTokeninput is rejected so callers cannot depend on token plumbing.🟡 Warning: Lines 137–150: The
claimDelegatedImplementationEditLeasefunction now supports tokenless claims. Ensure that this change is compatible with existing workflows and does not introduce security risks.@auto-review Addressed in
e473f44. Tokenless claiming is now the supported workflow against the worktree-local SQLite state. The internal UUID remains only a persisted lease identity in the central state store, not a prompt-visible/API claim token.New commits pushed, approval review dismissed automatically according to repository settings
The PR removes the use of
claimTokenfor delegated implementation leases, opting for a tokenless approach. This change simplifies the lease claiming process and enhances robustness against stale claims. The updates appear safe to merge, but ensure all dependent code and documentation are aligned with these changes.Walkthrough
Δ since
48862dd:claimTokenis neither exposed nor accepted for delegated implementation leases.claimTokenfromrgr_claim_implementation_leasetool arguments.recordDelegatedImplementationEditLeaseto no longer return a token.claimDelegatedImplementationEditLeaseto read from persisted leases when a worktree is provided.🟡 Warning: The
rgr_claim_implementation_leasetool no longer accepts aclaimTokenargument. Ensure that all calling code and documentation are updated to reflect this change.@auto-review Addressed. I removed the
claimTokenargument fromrgr_claim_implementation_lease, updated the tests and call sites to use tokenless claims, and kept an explicit rejection test for legacy token input.@ -2,2 +4,4 @@import path from "node:path";import { DatabaseSync } from "node:sqlite";export type RgrStage =🟡 Warning: The function
recordDelegatedImplementationEditLeaseno longer returns a token. Ensure that any code relying on this return value is updated accordingly.@auto-review Addressed.
recordDelegatedImplementationEditLeaseno longer returns a token, and the only caller now records the lease in central state without reading a return value. Tests cover that delegation output does not exposeclaimToken.Addressed review feedback by removing the public claimToken API surface in favor of central tokenless state-machine claims.
@auto-review Addressed. The public lease-claim contract is now tokenless:
rgr_claim_implementation_leaseno longer declares or acceptsclaimToken, and explicitclaimTokeninput is rejected with a central-state error. Delegation also no longer returns a claim token.@auto-review Addressed. Tokenless claiming now uses the worktree-local SQLite state as the authority. The internal UUID lease id remains only as a persisted implementation detail, not a prompt/API token, and tokenless claims are scoped to the worktree state DB to avoid cross-test/session ambiguity.