Skip to content

A Base branch CI-fix that commits nothing still pushes its branch and fails creating an empty pull request #2042

Closed

Description

@JacobStephens2

This was generated by AI during triage.

From a 2026-11-11 check of the fleet's Needs you items (thirdshift 0.27.2).

Agent Brief

Category: bug
Summary: When a Fix run Pass's Base branch CI-fix session commits nothing, the run still pushes the repair branch and tries to open a pull request. GitHub refuses it (No commits between main and fix-main-<sha>), so the Command fails into Needs you and leaves an empty repair branch on origin.

Current behavior:

On test, thirdshift fix base main merge, cron at 10:35 EST:

  1. Base branch CI on main at 895f4b7 was red (console-test, site-test). The Pass created worktree thirdshift-fix-main-895f4b7 from origin/main and ran the CI-fix session.
  2. The session made no commit. At 10:51 the run pushed fix-main-895f4b7, still pointing at 895f4b7, cleaned up, and then ran gh pr create … --draft, which failed twice with GraphQL: No commits between main and fix-main-895f4b7 (createPullRequest).
  3. The Command failed and appeared under Needs you. refs/heads/fix-main-895f4b7 is still on origin, and the guide says an existing repair branch prevents another repair attempt for that commit.

main's next commits (2dc95dd, acb42c1, 482507a, b02e7ae) all passed CI, so the red was not a lasting failure.

For a pull request, the Repair loop already handles this case: a CI-fix Repair that leaves the head unchanged gets one Check re-run (ADR-0010). Base branch maintenance has no equivalent.

Desired behavior:

When the Base branch CI-fix session leaves no commit:

  • The run pushes no repair branch and opens no pull request.
  • It ends without a failure, and records in the Activity log and on stderr that the CI-fix found nothing to change on <base> at <sha>. Optionally it re-runs the failed checks once, as ADR-0010 does for a pull request.
  • Later Passes don't retry a repair for that same commit, as now, without needing an empty branch on origin to say so.

Key interfaces:

  • src/fix/base_ci.rs: after the CI-fix session, before pushing and Delivery.
  • The record that stops a second repair attempt for the same Base branch commit.
  • docs/guide.md, Fix runs: the Base branch CI paragraph.

Acceptance criteria:

  • With red Base branch CI and a CI-fix session that commits nothing, thirdshift fix base main pushes no branch, runs no gh pr create, exits 0, and logs the reason.
  • A later Pass on the same red Base branch commit doesn't start another CI-fix session.
  • A CI-fix session that commits still opens Fix CI on <base>: … as now.
  • Tests run through the CLI against the fake gh.

Out of scope:

  • Deleting the existing fix-main-895f4b7 branch on origin, which is a one-off cleanup.

Activity

  1. added
    bug
    needs-triage
    on Nov 11, 2026
  2. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Verified against origin/main and fleet traces (test host fix-20261111-103503, fix-main-895f4b7).

    The ## Agent Brief in the issue description is ready for implementation, with the optional re-run point resolved:

    • Do not trigger another Check re-run after a 0-commit Base-branch CI-fix session (GitHub::fix_base_tip already re-runs failed jobs once when run_attempt == 1 before starting the CI-fix session, so by this point the workflow has already failed twice).
    • Push no branch, run no gh pr create, record the attempted Base-branch commit locally so later Fix Passes do not spin up another CI-fix session for that same <base> commit, log that the CI-fix found nothing to change on <base> at <sha>, and exit 0.

    Moving to ready-for-agent.

  3. added
    ready-for-agent
    ready-for-human
    in-progress
    agent-failed
    and removed
    needs-triage
    ready-for-agent
    ready-for-human
    in-progress
    on Nov 11, 2026
  4. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This comment was generated by AI.

    thirdshift's Run on this issue failed, so it waits for the Day shift.

    Put ready-for-agent back to retry.

  5. added
    ready-for-agent
    in-progress
    and removed
    agent-failed
    ready-for-agent
    on Nov 12, 2026
  6. removed
    in-progress
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions