fix(flare-workflow): honor RetryPolicy for StepMode::Loop iterations - #519
Conversation
execute_loop dispatched from StepMode::Loop never consulted the step's RetryPolicy, hard-failing the whole loop on the first error even when a policy (including the crate default) configured multiple attempts. sdd_loop's configured 3-attempt retry for malformed judge replies was silently dead code as a result. Retry the current iteration in place (not advancing iter) up to the policy's max_attempts with backoff, reusing the same in-memory context across attempts so a partially-completed iteration isn't redone. Agentflare-Agent: claude-code_2-1-233_agent Agentflare-Branch: task/486-flare-workflow-execute-loop-silently-ign Agentflare-Item: 486
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 2 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 72 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Agentflare-Agent: claude-code_2-1-233_agent Agentflare-Branch: task/486-flare-workflow-execute-loop-silently-ign Agentflare-Item: 486
Agentflare-Agent: claude-code_2-1-233_agent Agentflare-Branch: task/486-flare-workflow-execute-loop-silently-ign Agentflare-Item: 486
#573) Same architectural gap as skill-registry (#519/PR #572), which gateway-registry's own doc comments say it mirrors: hand-rolled apply_schema() with no user_version tracking. Audited the git history (#104 -> #158 -> #347) -- the tools table's columns have never changed since creation, so there's no live "no such column" bug today, but the next column addition would hit the identical class of bug. Migrates to agentflare-db-kit's open_file/open_memory with a real migration list: 0001_initial replays the original (#104) narrow schema, 0002_fts_triggers unconditionally drops and recreates tools_fts as the external-content shape with sync triggers plus a backfill. No ALTER TABLE/migration hook needed here (unlike #519) since tools's columns are stable -- DROP ... IF EXISTS before a fresh CREATE is correct regardless of which pre-migration shape existed. Added GatewayError::DbInit for db_kit::open::Error and its error_kind match arm. All 60 gateway-registry unit tests pass, including the existing legacy-standalone-FTS conversion test; clippy (with the CI gate flags) and fmt are clean; the full agentflare binary compiles. Agentflare-Agent: claude-code_2-1-237_agent Agentflare-Branch: task/520-fix-gateway-registry-adopt-agentflare-db Agentflare-Item: 520
Summary
execute_loop(the code pathStepMode::Loopsteps likesdd_loopactually dispatch through) never consulted the step'sRetryPolicy, hard-failing the whole loop on the first error even when a policy — including the crate's own default (max_attempts: 3) — configured multiple attempts.iter) up to the policy'smax_attemptswith backoff, reusing the same in-memory context across attempts so a partially-completed iteration isn't redone.crates/flare-workflow/src/loops.rsonly —sdd_loopis the onlyStepMode::Loopstep in the codebase, confirmed via full-repo search.Test plan
cargo test -p flare-workflow— all 43 tests pass, including 2 new ones (loop_iteration_retries_transient_failure_then_succeeds,loop_iteration_fails_after_exhausting_retries) and the existing crash-recovery loop test (no regression to loop durability)cargo clippy -p flare-workflow --all-targets -- -A unsafe_code -A clippy::pedantic— clean