Repository navigation
fix(coordinator): bind lease mutations to provider - #1343
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 14, 2026, 5:15 PM ET / 21:15 UTC. ClawSweeper reviewWhat this changesThe PR adds provider identity binding to coordinator lease mutations so a CLI-selected provider cannot mutate a lease belonging to a different provider. Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain This PR addresses a real coordinator identity boundary and current main does not yet implement it, but it needs contributor-provided real behavior proof before merge. Priority: P2 Review scores
Verification
How this fits togetherCrabbox’s CLI sends lease lifecycle and heartbeat mutations to the Cloudflare Worker coordinator, which validates stored lease records before dispatching provider operations. This change carries the selected provider through those requests and rejects a mismatch before changing lease state. flowchart LR
CLI[CLI selected provider] --> Request[Lease mutation]
Request --> Coordinator[Coordinator worker]
Coordinator --> Check[Stored provider check]
Check -->|match| Update[Lease update]
Check -->|mismatch| Reject[Identity rejection]
Update --> Provider[Provider operation]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep omitted expected-provider requests compatible, verify atomic mismatch rejection in a real coordinator setup, and attach a redacted trace covering both accepted and rejected mutation paths. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main accepts heartbeat mutations without a selected-provider field, and the PR adds the request and Worker validation path. A real coordinator run has not been supplied to confirm the after-fix result. Is this the best way to solve the issue? Yes, conditionally: an optional expected-provider checked inside the Worker transaction is a narrow backward-compatible approach, provided a deployed trace confirms both the accepted and rejected paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 77550c511991. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Summary
expectedProvideratomically inside Worker state transactions while preserving omitted legacy requestsgcp,google, andgoogle-cloudwithout conflating distinct routes such as Azure VM and Dynamic SessionsVerification
go test ./internal/cliscripts/check-docs.shgit diff --check