Skip to content

Describe main's single CI slot as designed, and give the test-fixing session goals and context - #2379

Merged
max-sixty merged 6 commits into
mainfrom
fix-main-browser-tests
Oct 11, 2026
Merged

max-sixty merged 6 commits into
mainfrom
fix-main-browser-tests

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Two instruction changes about main's CI and the bot that repairs it.

Main's single complete-suite slot is described as designed (tests/AGENTS.md, "Run what the change needs"). One complete suite always runs while newer commits land. Each new commit replaces the suite waiting behind it, and GitHub records that suite as cancelled. Agents kept reporting the cancellations as a problem, so the file now says this is the design working: a suite per merge would report each commit slightly sooner, at up to twenty times the CI usage. The same paragraph says that tend-ci-fix sees only that run. A failure on main that the run doesn't show, such as one only macOS reproduces, goes to a local session: check whether a live session, worktree or open pull request already covers it, and otherwise start one (for example with /dispatch) to fix and land it.

The test-fixing session gets a goal and context, not a landing sequence (.claude/skills/running-tend/SKILL.md, "Fix every failure in a red run"). On 2026-10-10 a tend-ci-fix session spent its first 1h42m serially. It opened one PR, polled that PR's CI to a terminal result, and reran the whole test job because of a failure the PR did not claim, before it started the next fix. After that it overlapped fixes with CI, opening a PR every 8.5 minutes, and it hit the six-hour cap with two PRs unmerged. It never grouped failures or used subagents, though Codex 0.160.0 allows them.

The section now states the goal: main green within one session, with nothing left unmerged at the cap. It also gives the facts to plan around:

  • the failure list is hours old when the session starts;
  • each PR costs a CI run, so open one per cause;
  • the session is free while a PR's CI runs;
  • subagents in their own worktrees can work separate causes.

Grouping and parallelism are left to the session. The merge rule keeps its conditions, and adds that a failure outside the PR's claimed tests, and not caused by its change, neither blocks the merge nor calls for a rerun. No eval covers this change; the only evidence is the one session described above.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 4 commits October 10, 2026 16:07
…not show to a local session

Agents read the cancelled runs on main as lost coverage. State that one
complete suite always runs while commits land and a newer commit replaces
the waiting one, which a suite per merge would beat only slightly at up to
twenty times the CI usage.

tend-ci-fix answers only what main's CI run fails, so a failure that run
cannot show, such as one only macOS reproduces, had no owner. A session
that finds one checks for existing work, then starts a separate session to
fix and land it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ence

A tend-ci-fix session on main spent its first 1h42m opening one PR, polling
its CI to a terminal result, and rerunning the whole test job for a failure
the PR did not claim, before starting the next fix. The overlay's "Run
monitor-ci's poll on the exact head to a terminal result" read as a step to
finish before anything else, and nothing told it the session was free while
CI ran, that its failure list was hours old, or that subagents could take
separate causes. It then worked 23 fixes in 3h15m once it overlapped them
with CI, and hit the six-hour cap with two PRs unmerged.

"Fix every failure in a red run" now states the goal (main green within one
session, nothing stranded at the cap) and the facts to plan around, and
leaves grouping and parallelism to the session. The merge rule keeps its
conditions and says a failure outside a PR's claimed tests neither blocks
the merge nor calls for a rerun.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The new no-fix rule could leave an intermittent failure on main: one passing rerun on current main does not establish that its cause is gone. The existing “Reading a red suite” rule says a failure that passes and later fails is non-deterministic and calls for a cause fix. Limit this shortcut to failures whose cause a later change or diagnostic has actually removed.

Comment thread .claude/skills/running-tend/SKILL.md Resolved
@max-sixty
max-sixty merged commit 25dbefa into main Oct 11, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix-main-browser-tests branch October 11, 2026 21:06
max-sixty pushed a commit that referenced this pull request Nov 18, 2026
…it (#5789)

Sessions that fix a failing test have been polling their own pull
request's CI. With Leaf's `await_ci: false`, tend-land owns that wait.
In one case the polling session also repaired the PR in parallel with
tend-land's own repair job. This change rewords the one `running-tend`
sentence that reads as an order to wait. It now points at `monitor-ci`,
**Which heads to poll**, which says which session waits, instead of
reading as an order to poll. Under Leaf's config, that section hands the
wait to tend-land and tells the session that pushed to record the push
and not poll. The overlay doesn't repeat that rule because the rule
depends on `await_ci`, and a copy here would override the bundled skill
if that setting changed. The merge condition itself is unchanged: CI
must still reach a terminal result on the exact head before the merge.

**Why this sentence.** **Fixing a CI failure's cause** is written as
instructions to whoever merges: "Merge a pull request that fixes tests …
The pull request's CI must reach a terminal result on the exact head
(`monitor-ci`)." It dates from #2379, when the session fixing a test
also merged it. A triage session that opens a test fix reads that
pointer as its own job. Tend's `monitor-ci`, **Which heads to poll**,
says the reverse: after a push to a PR with no human author, record it
and don't poll. #5327 removed a similar instruction from this overlay,
one that made triage sessions wait hours on a dispatched macOS run.

**Effect.** In triage batch 42582881973 (2026-11-09), 8 of the 11
sessions that opened a PR polled its checks, each after loading
`monitor-ci`. The #5710 session spent about 38 of its 125 minutes
polling. While it diagnosed its red CI, tend-land's `repair #5749` job
(42592804291) fixed the same failure and pushed first, and the triage
session then dropped its own work. The 2026-11-08 sweep recorded the
same 12–15 minutes of polling in four other triage sessions (#5641,
#5658, #5657, #5463). Those runs and their analysis are in the monthly
tracker, #5067.

**What remains uncertain.** The session logs redact the reasoning behind
each poll, so the link from this sentence to the polling is inferred
from where it points and from the #5327 precedent. If polling continues
after this lands, the next step is the bundled skill.

This touches agent instructions, so it needs the control-plane owner's
approval before it lands.

---------

Co-authored-by: leaf-agent <[email protected]>
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.

2 participants