Skip to content

Fix check re-validation after autofixer runs - #525

Closed
jwbron wants to merge 19 commits into
mainfrom
egg/issue-485
Closed

jwbron wants to merge 19 commits into
mainfrom
egg/issue-485

Conversation

@jwbron

@jwbron jwbron commented Feb 11, 2026

Copy link
Copy Markdown
Owner
Fixes #485. When lint/test/integration checks fail during implement phase,
the autofixer was triggered but checks were never re-run to verify fixes.
This PR implements synchronous autofix wait with re-dispatch: after autofix
completes, the work loop re-runs in checks-only mode to verify fixes. A circuit
breaker prevents infinite loops (max 3 autofix attempts per phase).

james-in-a-box[bot] and others added 17 commits February 10, 2026 20:37
- Add autofix_attempts (default 0) and max_autofix_attempts (default 3)
  fields to contract schema for tracking autofix retry state
- Initialize autofix tracking fields in new contracts (sdlc-pipeline.yml)
- Reset autofix_attempts to 0 on manual workflow dispatch (sdlc-work-loop.yml)
- Add mode input (full/checks-only) to work loop for re-dispatch support

Part of #485: Fix check re-validation after autofixer runs
- Modify check-fixer job to wait for autofix workflow completion using
  gh run watch with 30-minute timeout
- Add error handling for workflow not found or timeout (outputs fixed=false)
- Check autofix attempt limit before triggering autofix
- Increment autofix_attempts counter in contract after autofix completes
- Add limit_exceeded output for circuit breaker integration

Part of #485: Fix check re-validation after autofixer runs
- Remove FIXER_STATUS != pending conditions from aggregate-checks
  (now that fixer waits synchronously, status is true/false not pending)
- Add autofix_succeeded output (true if fixer ran and succeeded)
- Add autofix_limit_exceeded output for circuit breaker integration
- Remove deprecated needs_fixer output

Part of #485: Fix check re-validation after autofixer runs
- Add mode input (full/checks-only) to work loop workflow
- Skip work job when mode is checks-only (re-dispatch after autofix)
- Update check jobs to run when work is skipped
- Add re-dispatch-checks job that runs when autofix succeeded and
  checks still fail, re-dispatching the work loop in checks-only mode
- Add circuit breaker condition to skip re-dispatch when max attempts
  exceeded

Part of #485: Fix check re-validation after autofixer runs
- Add escalate-autofix-failure job that posts a comment explaining
  autofix failed after N attempts with failing checks
- Update escalate job condition to not run if autofix escalation
  already handled the situation
- Escalation includes actionable instructions for human intervention

Part of #485: Fix check re-validation after autofixer runs
- Add Autofix Retry and Re-Validation section explaining:
  - Synchronous wait for autofix completion
  - Re-dispatch in checks-only mode after autofix
  - Circuit breaker with max 3 attempts
  - Escalation when max attempts exceeded
- Document contract fields: autofix_attempts, max_autofix_attempts
- Document work loop modes: full, checks-only

Part of #485: Fix check re-validation after autofixer runs
- Remove branch_prefix parameter from gh workflow run (not in workflow_dispatch inputs)
- Fix race condition in autofix run detection: filter by branch name only,
  capture dispatch timestamp, and filter runs created after dispatch time
- Add lint_passed, test_passed, integration_passed outputs to aggregate-checks
- Add failure handling when push retry loop exhausts all attempts
- Use fresh timestamp on each push retry for accurate audit log entries
- Remove no-op step in resolve-inputs (actual reset is in work job)
- Update escalation comment to report which specific checks are failing
Move DISPATCH_TIME capture to before gh workflow run command
to properly filter runs created after the dispatch.

Authored-by: egg
@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@jwbron

jwbron commented Feb 11, 2026

Copy link
Copy Markdown
Owner Author

@james-in-a-box fix merge conflicts on this branch

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@jwbron

jwbron commented Feb 11, 2026

Copy link
Copy Markdown
Owner Author

@james-in-a-box fix merge conflicts on this branch

@james-in-a-box

Copy link
Copy Markdown
Contributor

Merge conflicts have been resolved.

Resolution summary:

The conflict was in .github/workflows/sdlc-work-loop.yml. Since PR #502 ("Fix check re-validation after autofixer runs") was already merged to main with essentially the same fix for issue #485, I resolved the conflicts by accepting main's version of the conflicting code sections.

The merge brings in all recent changes from main including:

The branch is now mergeable.

— Authored by egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: PR is Empty (Duplicate of Merged #502)

This PR shows 0 additions, 0 deletions, 0 changed files because the feature has already been merged to main through PR #502.

What happened

  1. PR #502 ("Fix check re-validation after autofixer runs") was merged on 2026-02-10T23:27:08Z
  2. This PR (#525) has the same title and addresses the same issue #485
  3. The most recent commit on this branch is "Merge main into egg/issue-485 to resolve conflicts"
  4. After that merge, the branch has no unique changes vs main

Recommendation

Close this PR without merging. There is nothing to merge—all changes already exist in main.

If this was an intentional alternate implementation that got overtaken by #502, the branch can be deleted. If there were intended differences between #502 and #525, those would need to be re-implemented on a fresh branch.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@jwbron

jwbron commented Feb 11, 2026

Copy link
Copy Markdown
Owner Author

@james-in-a-box pull main into this branch

@james-in-a-box

Copy link
Copy Markdown
Contributor

Main has been pulled into this branch.

Merge summary:

Merged commit 20cef25 ("Fix reviewer workflow validation failure (#532)") from main. No conflicts encountered.

Changes incorporated:

  • .egg-state/contracts/287.json (new)
  • .egg-state/drafts/287-analysis.md (new)
  • .egg-state/drafts/287-plan.md (new)
  • .github/workflows/on-pull-request-agent-mode-design.yml
  • .github/workflows/on-pull-request.yml
  • .github/workflows/on-review-feedback.yml
  • .github/workflows/reusable-review.yml
  • action/action.yml
  • action/generate-config.sh
  • docs/guides/github-automation.md
  • gateway/github_client.py
  • gateway/policy.py
  • gateway/tests/test_policy.py
  • gateway/tests/test_token_refresher.py
  • gateway/token_refresher.py
  • sandbox/scripts/gh

— Authored by egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-Review: PR Remains Empty

This is a follow-up to my previous review. The only change since commit 126aaca is a merge of main into this branch.

Current State

  • Additions: 0
  • Deletions: 0
  • Changed files: 0

The PR diff against main is empty. All the code that was merged in (reviewer bot support, token refresher changes, workflow updates) came from main—it's not unique to this branch.

Background

My previous review noted that PR #502 ("Fix check re-validation after autofixer runs") was merged on 2026-02-10, and this PR (#525) has the same title and addresses the same issue #485. That situation has not changed.

Recommendation

Close this PR without merging. There is nothing to merge—the feature this PR was intended to deliver already exists in main (via #502).

If there was additional work intended for this PR that differs from #502, it would need to be implemented fresh since this branch is now identical to main.

— Authored by egg

@james-in-a-box

Copy link
Copy Markdown
Contributor

egg review completed. View run logs

18 previous review(s) hidden.

@jwbron jwbron closed this Feb 11, 2026
@james-in-a-box
james-in-a-box Bot deleted the egg/issue-485 branch February 13, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant