Skip to content

chore: Review sweep: dispatch a rebase job when a PR's mergeable_state is dirty/conflicting - #773

Closed
getappz wants to merge 1 commit into
masterfrom
task/271-review-sweep-dispatch-a-rebase-job-when
Closed

getappz wants to merge 1 commit into
masterfrom
task/271-review-sweep-dispatch-a-rebase-job-when

Conversation

@getappz

@getappz getappz commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Status: task already complete, verified only.

The prior checkpoint commit (6ebb030 wip(sdd-loop): task 0 checkpoint) already contains the full implementation:

  • PrCiStatus::Conflicting { number } variant added in src/worktree/mod.rs, detected before checks are fetched in both pr_ci_status_impl (REST) and pr_ci_status_from_batch (GraphQL batch) — mirroring Behind's early-check pattern.
  • run_review_sweep dispatches via a new rebase_or_gate in src/supervisor.rs (lines 1469–1620), mirroring self_repair_or_gate arm-for-arm: same cap (SELF_REPAIR_CAP), same claim-liveness/cross-machine-arbitration (claim_self_repair), same cooldown/host-gate checks, its own REBASE_CONFLICT_MARKER comment prefix and agentflare:conflict PR label, with a NEEDS_HUMAN gate fallback once the cap is hit.
  • ReviewSweepResult.rebase_dispatched counter added and wired into handle_pr_status's Conflicting arm.

Verification run (all foreground, no backgrounding):

  • cargo build --bin agentflare — clean.
  • cargo test --bin agentflare worktree:: — 48 passed, including the new pr_ci_status_reports_conflicting_before_ever_fetching_check_runs and pr_ci_status_from_batch_reports_conflicting_before_checks.
  • cargo test --bin agentflare supervisor:: — 80 passed, including rebase_or_gate_dispatches_a_job_and_posts_a_marker_comment and rebase_or_gate_gates_instead_of_dispatching_once_the_cap_is_reached.
  • cargo fmt --check — clean.
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings -A unsafe_code -A clippy::pedantic (the exact CI invocation) — clean.

No concerns — nothing to commit, working tree is already clean at HEAD with this task's changes checked in.


Opened by claude-code on flared:51bb8de6c33b for item #271 via agentflare.

Agentflare-Branch: task/271-review-sweep-dispatch-a-rebase-job-when
Agentflare-Item: 271
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 61f9efcc-c614-40c9-905e-e6155b352238

📥 Commits

Reviewing files that changed from the base of the PR and between 00388fb and 6ebb030.

📒 Files selected for processing (4)
  • src/dashboard/server.rs
  • src/supervisor.rs
  • src/supervisor_tests.rs
  • src/worktree/mod.rs

Comment @coderabbitai help to get the list of available commands.

@getappz

getappz commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

Closing in favor of a competing implementation for the same underlying problem (agentflare item #576, same PrCiStatus::Conflicting detection). #576's dispatch reuses the existing self_repair_or_gate machinery via a RepairTrigger enum instead of duplicating cap/claim/cooldown/routing logic in a separate rebase_or_gate function — less duplication for the same behavior. Sorry for the wasted verification pass here; this is the same class of coordination gap as agentflare item #595 (two dispatches converging on the same scope with nothing catching it) — caught this time before either landed.

@getappz getappz closed this Sep 18, 2026
@getappz
getappz deleted the task/271-review-sweep-dispatch-a-rebase-job-when branch September 18, 2026 07:34
@getappz
getappz restored the task/271-review-sweep-dispatch-a-rebase-job-when branch September 18, 2026 08:50
@getappz getappz reopened this Sep 18, 2026
@getappz

getappz commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #774, which already merged the same PrCiStatus::Conflicting detection + dispatch via the cleaner RepairTrigger/self_repair_or_gate approach (agentflare item #576). This PR's own author flagged the duplication in a comment above; closing to avoid two implementations of the same scope landing separately.

@getappz getappz closed this Sep 18, 2026
@getappz
getappz deleted the task/271-review-sweep-dispatch-a-rebase-job-when branch September 21, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant