Repository navigation
chore: execute_work_impl's pre-claim/claim-denied failures are invisible: 0-byte job log, no item comment - #650
Merged
Conversation
execute_work_impl had several early-return branches before the sdd_loop pipeline runs -- unknown agent, claim failed, claim denied/held/blocked, item-fetch failure, agent-resolution error, no headless print mode, and run_in_worktree failure -- that reported the failure only via crate::ui::error, the process's own stderr. For an in-process dispatch (the path every daemon-dispatched item takes), that's the daemon's stderr, not the job's own captured stdout_log_path/stderr_log_path -- the only failure surface the dashboard/operators actually see. None of these branches wrote anything to the log parameter already threaded through for exactly this purpose (mirrored here from the one branch that already did it correctly, the pipeline's own Err arm). Reproduced live: job aY19fOWVYnG9pr9Ws1lUt (item #196) started and finished at the same second with 0 stdout/stderr bytes and no item comment -- a concurrent-dispatch claim collision that left zero diagnostic trace anywhere. Added a regression test reproducing that exact scenario (a claim held by another owner) and asserting the returned log capture names the real denial reason instead of coming back empty. Agentflare-Agent: claude-code Agentflare-Branch: task/204-execute-work-impl-s-pre-claim-claim-deni Agentflare-Item: 204 Agentflare-Session: 73d3ceb5-5889-4eb8-aab0-dbe3dbfa4cd1
Owner
Author
|
Tracking this PR for automated review ( |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesWork error logging
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
getappz
deleted the
task/204-execute-work-impl-s-pre-claim-claim-deni
branch
September 2, 2026 08:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed the silent-failure gap in
execute_work_impl(src/cli/work.rs) tracked in this item.Every pre-pipeline early-return branch —
unknown agent,claim failed,claim denied/held/blocked, item-fetch failure after claim, agent-resolution error,no headless print mode, andrun_in_worktreefailure — now writes its failure message to thelogparameter (mirroring the one branch that already did this correctly, the pipeline's ownErrarm at the bottom of the function). Previously these only calledcrate::ui::error, which for an in-process dispatch job goes to the daemon's own stderr, not the job's capturedstdout_log_path/stderr_log_path— the only failure surface the dashboard/operators actually see.Added
src/cli/work_claim_denied_tests.rs: a regression test reproducing the literalaY19fOWVYnG9pr9Ws1lUtscenario (job #196) — claims an item under one owner, then runsexecute_work_implunder a different owner and asserts the returned log capture names the real "held by" reason instead of coming back empty.Also found a live instance of exactly this bug while investigating: 7 consecutive dispatch jobs on a different project's item (flare-desktop #3) all showed the identical signature —
started_at == finished_at, 0 stdout/stderr bytes, generic wrapper error, zero item comments. Confirms this is a real, currently-occurring gap, not just the original historical repro.Out of scope per the item's own note, not touched:
orphan_reconcile.rs, and root-causing why concurrent dispatches happen in the first place.Verification:
cargo check --all-targetsclean, targetedexecute_work_impl/work_claim_deniedtests pass, full workspacecargo testexits 0 (no failures).Opened by
claude-codeon flared:51bb8de6c33b for item #204 via agentflare.Summary by CodeRabbit