Repository navigation
chore: item_done: unowned claim must not fall through silently after a Failed push outcome (follow-up to #406) - #963
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Live-claim ownership check src/mcp_server/tests/item_pr_failure_tests.rs |
Adds a test that calls done from a non-owner session, expects an error identifying someone else’s live claim, and verifies that the item remains incomplete. |
Priority:
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Other
Possibly related issues
- Daemon, claim-lifecycle, verification-evidence and beacon bugs re-filed from image-qc grooming (6 vents) #947 — The issue describes
donerefusing to complete another agent’s live claim. This test checks that behavior but does not implement the requested takeover path.
Possibly related PRs
- getappz/agentflare#960 — Both changes cover
donecalls from a caller that does not own the item’s claim. - getappz/agentflare#954 — This test checks the ownership rejection before the push and pull-request flow described in that PR.
Merge Risk: 
Minimal · up to 0c52d
-
This test-only change has no identified merge-blocking risk.
Pre-merge checks: 
3 · 
2
-
Failed checks: 2 warnings Passed checks: 3 passed -
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
…ndows-latest)`, `Analyze (rust)` and `CI Green`. - **Formatting:** `cargo fmt --check` exited 0 (I printed `FMT_OK`). - **Tests:** `cargo test --bin agentflare mcp_server::tests::item` ran the wider item tests, not just `item_pr_failure`. Result: 167 passed, 0 failed, 2 ignored. - **CI:** `gh pr checks 963 --watch` ended with every check green. `cla` is skipping, and `CodeRabbit` reports "Review skipped: draft pull request". - **PR body:** I added a section to PR #963 saying the reported path is unreachable in `item_done`. A non-owner either steals a stale claim, so `owns_claim` becomes true, or gets the "refusing to complete someone else's live claim" error before any push or PR. - **Test:** `item_done_errors_when_another_session_holds_a_live_claim` only guards existing behavior, and it would pass without this PR. The PR body now says so. - **Reverted guard:** the guard I first wrote in `item_merged_pr.rs` was dead code, so the reverted state has no behavior change and no regression risk. PR #963 is still a draft. The task's premise doesn't match the current code, so a reviewer should confirm that no guard is the right outcome. Agentflare-Branch: task/407-item-done-unowned-claim-must-not-fall-th Agentflare-Item: 407
d586cb8 to
0c52d93
Compare
Auto-opened on
item donefor zRlNt-we3FSzAXcKck55K.Opened by
claude-codeon i-flare-51bb8de6c33b (flared:51bb8de6c33b) for item #407 via agentflare.Finding (#407)
The reported path (
!owns_claim+PrOutcome::Failed/diverged) is unreachable initem_done: a non-owner either steals a stale claim (soowns_claimbecomes true) or hits the "refusing to complete someone else's live claim" error before any push/PR. A guard initem_merged_pr.rswas written and reverted as dead code. This PR only adds a regression test pinning that a non-ownerdoneerrors and never completes the item; it is a guard on existing behavior, not a behavior change.Summary by CodeRabbit