Repository navigation
Description
Bug: SDLC pipeline skips check re-validation after autofixer runs
Summary
When lint or test checks fail during the implement phase, the autofixer is triggered but checks are never re-run to verify the fixes. The pipeline proceeds to review as if checks passed.
Root Cause
The check → fix → re-check loop in sdlc-work-loop.yml is broken in three places:
1. Fire-and-forget autofix dispatch (sdlc-work-loop.yml, check-fixer job)
The fixer triggers reusable-autofix.yml via gh workflow run which is asynchronous. It immediately outputs fixed=pending without waiting for the autofix to complete:
gh workflow run reusable-autofix.yml \
--repo "${{ github.repository }}" \
--field pr_number="${ACTUAL_PR_NUMBER}" \
--field failed_workflow="${FAILED_CHECK}"
echo "fixed=pending" >> "$GITHUB_OUTPUT"2. Aggregate treats "pending" as passing (aggregate-checks job)
When fixer_status == "pending", the aggregate job skips marking lint/test as failed:
if [[ "$LINT_PASSED" == "false" && "$FIXER_STATUS" != "pending" ]]; then
ALL_PASSED="false"
fiThis means all_passed=true even though the fixer hasn't actually run yet.
3. No re-run after autofix (reusable-autofix.yml)
After the autofix agent pushes fixes, the workflow posts a comment and exits. There is no step to re-trigger the lint/test/integration checks or re-dispatch the work loop. The sdlc-work-loop.yml is only triggered via workflow_dispatch/workflow_call, not by push events, so the push from the autofixer does not automatically re-trigger checks.
Expected Behavior
work → lint/test (parallel) → fail → autofixer → re-run lint/test → pass → review
→ fail → autofixer (retry, up to max)
→ fail (max retries) → escalate
The pipeline should:
- Wait for or be notified when the autofixer completes
- Re-run lint/test/integration checks on the fixed code
- Only proceed to review when checks actually pass
- Respect the circuit breaker / max retry count to prevent infinite loops
Current Behavior
work → lint/test (parallel) → fail → autofixer (fire-and-forget) → review proceeds immediately
Review proceeds as if checks passed because aggregate-checks treats fixed=pending as success.
Affected Files
.github/workflows/sdlc-work-loop.yml—check-fixerandaggregate-checksjobs.github/workflows/reusable-autofix.yml— missing re-dispatch after fix
Suggested Approach
Option A: Re-dispatch from autofix workflow — After the autofix agent pushes, have reusable-autofix.yml trigger a new run of the check jobs (or the full work loop with a "checks-only" flag).
Option B: Synchronous fixer with re-check loop in work-loop — Instead of dispatching autofix as a separate workflow, run the fixer inline and loop back to re-run checks within the same workflow run.
Either approach needs the circuit breaker (max autofix attempts) to prevent infinite loops.
Authored-by: egg
Activity
Initialize SDLC contract for issue #485
james-in-a-box commentedon Feb 10, 2026
Draft analysis for issue #485
Agent-mode design review: approved (refine phase, issue #485)
Refine review: approved for issue #485
james-in-a-box commentedon Feb 10, 2026
Analysis: SDLC pipeline checks not re-run after autofixer
Problem Statement
When lint, test, or integration checks fail during the implement phase of the SDLC pipeline, the autofixer is triggered but checks are never re-run to verify the fixes. The pipeline proceeds to the review phase as if checks passed, meaning broken code can reach human review.
Current state: Check failures trigger autofix, but autofix completion doesn't trigger re-validation.
Desired outcome: The pipeline should re-run checks after autofix completes, only proceeding to review when checks actually pass (or escalating after max retries).
Current Behavior
The check-fix-recheck loop in
sdlc-work-loop.ymlis broken in three places:1. Fire-and-forget autofix dispatch (
check-fixerjob, lines 626-678)The fixer triggers
reusable-autofix.ymlviagh workflow runwhich is asynchronous:The job immediately outputs
fixed=pendingwithout waiting for the autofix workflow to complete or succeed. There is no mechanism to:2. Aggregate treats "pending" as passing (
aggregate-checksjob, lines 744-756)When
fixer_status == "pending", the aggregate job skips marking lint/test as failed:This logic means:
LINT_PASSED=false+FIXER_STATUS=pending→ALL_PASSED=true(incorrect)The aggregate job outputs
all_passed=trueeven though checks failed and the fixer hasn't completed yet.3. No re-check dispatch after autofix (
reusable-autofix.yml, lines 232-250)After the autofix agent pushes fixes, the workflow posts a comment and exits:
There is no step to:
The
sdlc-work-loop.ymlis only triggered viaworkflow_dispatch/workflow_call, not by push events, so the push from the autofixer does not automatically re-trigger checks.Constraints
workflow_runcan trigger on workflow completion, but this pattern is already used byon-check-failure.ymlfor the standalone autofix flow (outside SDLC pipeline)concurrency: sdlc-work-loop-${{ inputs.issue_number }}withcancel-in-progress: false, which means a re-dispatch won't cancel an in-progress runcircuit_breakerstructure withtotal_cyclesandmax_total_cycles(default 10), but this only applies to review cycles, not autofix cyclesOptions Considered
Option A: Re-dispatch from autofix workflow
Approach: After the autofix agent pushes fixes, have
reusable-autofix.ymltrigger a new run of the work loop (or just the check jobs) with a "checks-only" flag.Implementation:
reusable-autofix.ymlthat dispatchessdlc-work-loop.ymlafter successful pushmode: "checks-only"tosdlc-work-loop.ymlthat skips the work phase and only runs checksaggregate-checksto fail whenfixer_status=pending(remove the special case)Pros:
Cons:
Option B: Synchronous fixer with inline re-check loop
Approach: Instead of dispatching autofix as a separate workflow, run the fixer inline within
sdlc-work-loop.ymland loop back to re-run checks within the same workflow run.Implementation:
gh workflow run reusable-autofix.ymlwith inline steps that call the autofix action directlyPros:
Cons:
Option C: Hybrid - Synchronous wait with re-dispatch
Approach: Keep autofix as a separate workflow, but have the
check-fixerjob wait for it to complete synchronously usinggh run watch, then re-dispatch the work loop.Implementation:
gh workflow run reusable-autofix.yml, immediately find the triggered run and usegh run watchto wait for completionPros:
check-multi-agentstep (lines 385-420)Cons:
Recommended Approach
Option C (Hybrid - Synchronous wait with re-dispatch) is recommended for the following reasons:
Proven pattern: The codebase already uses
gh run watchfor synchronous waiting in the multi-agent step (sdlc-work-loop.yml:385-420), so this pattern is established.Preserves reusability: The
reusable-autofix.ymlworkflow remains usable for both SDLC and standalone flows without modification to its core logic.Centralized control: The work loop controls retry logic, which means:
Clear semantics: Instead of
fixed=pending(ambiguous), we getfixed=true|falseafter waiting, making aggregate logic straightforward.High-Level Implementation Plan
Update
check-fixerjob to:gh run watchto wait for completion (with timeout)fixed=trueon success,fixed=falseon failureUpdate
aggregate-checksjob to:FIXER_STATUS != "pending"special caseall_passed=falseAdd a
re-dispatch-checksjob that:needs_fixer=trueandfixed=truesdlc-work-loop.ymlwith a newmode: checks-onlyinputUpdate contract schema to track:
autofix_attempts: number- current count of autofix attempts for this phasemax_autofix_attempts: number- configurable limit (default: 3)Add
checks-onlymode to work loop:mode=checks-only, skip theworkjob entirelycheck-lint,check-test,check-integration,aggregate-checks,review-setup, etc.Open Questions
The following questions should be addressed before implementation:
Timeout for autofix wait: The multi-agent pattern uses an implicit timeout via
gh run watch. Should autofix have an explicit timeout? Suggested default: 30 minutes.What happens if checks pass after autofix but new issues are introduced? Should the review phase re-evaluate the full diff, or trust that passing checks means the code is ready?
Should autofix attempts persist across manual retries? If a human manually re-triggers the pipeline, should the autofix counter reset?
Authored-by: egg
Analysis Phase Complete
The analysis above has passed internal review and is ready for human approval.
View run logs
Ready for Review
Authored-by: egg
jwbron commentedon Feb 10, 2026
Approve and advance to plan phase for issue #485
james-in-a-box commentedon Feb 10, 2026
Draft plan for issue #485
6 remaining items
james-in-a-box commentedon Feb 10, 2026
Phase plan approved by @jwbron.
Advancing to implement phase.
--- Authored by egg
Populate contract tasks from plan for issue #485
Add autofix tracking fields to contract schema
Implement synchronous autofix wait with contract tracking
Fix aggregate-checks to verify actual check status
Add re-dispatch after autofix with checks-only mode
Add escalation for autofix circuit breaker
Document autofix retry behavior in sdlc-pipeline.md
Link commits to contract tasks for issue #485
Fix check re-validation after autofixer runs (#502)
james-in-a-box commentedon Feb 13, 2026
SDLC cleanup completed.
egg/issue-485--- Authored by egg