Skip to content

CI-fix Repair waives a flaky test the branch itself added, and re-runs CI on its own #687

Closed

Description

@JacobStephens2

This was generated by AI during triage.

What happened

#684 added site/tests/prompts.test.cjs and the site-test job. On CI, site-test failed because the new test checked visibility before the page's hashchange handler had run. Repair 1 for the #683 Run diagnosed this correctly ("it checks visibility before the queued hashchange handler opens the section"). It then left the code unchanged and only added a "CI notes" entry to the PR body, because the CI-fix Repair prompt says:

If a failure is not caused by this branch (it is flaky, or also fails on {base}), do not change code for it. Instead, add it to a "CI notes" section of the pull request body with a one-line explanation.

The prompt treats "flaky" as a kind of "not caused by this branch". Here the branch had added the flaky test. The fix was one line (#685).

The Repair session also ran gh run rerun twice itself. That spent the head's re-run outside thirdshift's Check re-run bookkeeping and made the attempt-before guard in #686 stale.

Together with #686, the result was a Self-merge of red CI into main.

Expected

  • A failure in a test or check that the branch added or changed belongs to the branch, even when it is intermittent. The Repair fixes it rather than writing a CI note. Only failures in checks this branch doesn't touch can be waived as flaky.
  • Repair sessions don't re-run CI themselves; the Check re-run is thirdshift's.

Evidence

Activity

  1. added
    bug
    needs-triage
    on Oct 14, 2026
  2. JacobStephens2 commented on Oct 14, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: The CI-fix Repair fixes intermittent failures in checks the branch added or changed, and never re-runs CI itself.

    Current behavior:
    The CI-fix Repair prompt groups "flaky" with "also fails on the Base branch" as failures not caused by the branch. It tells the agent to add a "CI notes" entry instead of changing code. A Repair for #683 diagnosed a race in a test that its own branch had just added, then left it unfixed. It also ran gh run rerun itself, twice.

    Desired behavior:

    • A failure is the branch's to fix if the failing test or check was added or changed on the branch (in its diff against the Base branch), even when it fails only some of the time. The Repair fixes the root cause (e.g. waits for the async condition) without weakening the test.
    • Only intermittent failures in tests or checks the branch doesn't touch may go in "CI notes", with the evidence that they are unrelated.
    • The prompt tells the Repair not to re-run CI jobs (gh run rerun or the API) and not to wait on CI. Re-running and watching checks belongs to thirdshift's Check re-run.

    Key interfaces:

    • The CI-fix Repair prompt in the prompt module. prompts/ and the prompts page are regenerated from it with UPDATE_PROMPTS=1 cargo test prompts_page; don't edit prompts/ by hand.

    Acceptance criteria:

    • The CI-fix Repair prompt says a failing test or check the branch added or changed is the branch's to fix even when it is intermittent.
    • It limits "CI notes" waivers to failures in tests or checks the branch doesn't touch.
    • It forbids the session from re-running CI jobs itself.
    • The generated prompts are regenerated, and cargo test prompts_page passes.

    Out of scope:

  3. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 14, 2026
  4. removed
    in-progress
    on Oct 14, 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