Skip to content

fix: sdd_loop discards the real failure reason at 6 call sites (bare StepResult::Failure, no error text) - #585

Merged
getappz merged 6 commits into
masterfrom
task/174-fix-sdd-loop-discards-the-real-failure-r
Aug 22, 2026
Merged

fix: sdd_loop discards the real failure reason at 6 call sites (bare StepResult::Failure, no error text)#585
getappz merged 6 commits into
masterfrom
task/174-fix-sdd-loop-discards-the-real-failure-r

Conversation

@getappz

@getappz getappz commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Opened by claude-code for item #174 via agentflare.

Fixes a real production incident: item #164 silently failed ~10+ dispatch attempts over ~15 hours overnight with completely empty job logs, because StepResult::Failure carries no error text — the actual cause (an expired Claude Code CLI session, confirmed after the fact) was discarded at the source and never reached step_state.last_error, any comment, or any classifier.

  • Adds StepResult::Failed(String) alongside the existing StepResult::Failure — a terminal failure that carries a real reason, wired through engine.rs, loops.rs, and rollback.rs so it reaches step_state.last_error the same way the existing Err(e) path already does.
  • Converts the Ok(StepResult::Failure) call sites in work_item_pipeline.rs that had real context in scope (stderr, exit status, parse error, etc.) to StepResult::Failed(reason) instead of silently discarding it.
  • Pure diagnostics fix — no change to retry logic, cooldowns, or dispatch behavior beyond the error message content itself.

Full root-cause trace: src/AGENT_AUTH_EXPIRY_STATUS_DESIGN.md (branch docs/agent-auth-expiry-status-design), section "1. Stop discarding the real failure reason".

Test plan

  • New test in crates/flare-workflow/tests/engine_test.rs covers the Failed(String) propagation path
  • cargo check --workspace clean
  • Existing work_item_pipeline/flare-workflow tests still pass

Agentflare-Agent: claude-code_2-1-238_agent
Agentflare-Branch: task/174-fix-sdd-loop-discards-the-real-failure-r
Agentflare-Item: 174-fix-sdd-loop-discards-the-real-failure-r
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 1 minute

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).

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5fb77f91-b12b-4f86-87ae-6987d7f2c6d5

📥 Commits

Reviewing files that changed from the base of the PR and between 4d45dab and e4233f3.

📒 Files selected for processing (7)
  • crates/flare-workflow/src/engine.rs
  • crates/flare-workflow/src/loops.rs
  • crates/flare-workflow/src/rollback.rs
  • crates/flare-workflow/src/types.rs
  • crates/flare-workflow/tests/engine_test.rs
  • src/work_item_pipeline.rs
  • src/work_item_pipeline/cap_tests.rs

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

getappz and others added 5 commits August 22, 2026 12:20
Agentflare-Agent: claude-code
Agentflare-Branch: task/174-fix-sdd-loop-discards-the-real-failure-r
Agentflare-Item: 174
Agentflare-Agent: claude-code
Agentflare-Branch: task/174-fix-sdd-loop-discards-the-real-failure-r
Agentflare-Item: 174
@getappz
getappz merged commit e05ac6a into master Aug 22, 2026
16 checks passed
@getappz
getappz deleted the task/174-fix-sdd-loop-discards-the-real-failure-r branch August 22, 2026 07:48
getappz added a commit that referenced this pull request Aug 22, 2026
CI's dtolnay/rust-toolchain@stable auto-detects this file when no explicit
toolchain input is given, so no workflow change is needed. Fixes a real
local/CI rustfmt formatting mismatch hit while shipping PR #585 -- local
stable (1.97.0) and CI's stable (1.98.0) produced different formatting
for nested match expressions, causing repeated CI-only fmt failures with
no local repro.

Agentflare-Agent: claude-code
Agentflare-Branch: chore/pin-rust-toolchain

Co-authored-by: shiva <shiva@gosysinfo.tech>
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