Skip to content

Push a ci-fix branch before the verify that outlasts the session - #215

Closed
leaf-agent wants to merge 2 commits into
mainfrom
daily/review-runs-33605403583
Closed

leaf-agent wants to merge 2 commits into
mainfrom
daily/review-runs-33605403583

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Two tend-ci-fix sessions were killed by the account's session ceiling on 2026-09-01/02 with nothing committed or pushed — $35.27 and about two and a quarter hours of work discarded, one of them holding a complete, uncommitted fix for the WCAG regression that had reddened main on five consecutive runs. running-tend now names the push point: reach tests/CLAUDE.md's handover bar (the failing test's complete browser file and the everyday suite), then commit, push and open the PR. That is the repo's ordinary landing bar — the one wt merge gates on — so the push hands the unfinished verify over on the usual terms rather than delegating it to the PR's ci, which repeats the everyday suite and no more. Verified by reading all five tend-ci-fix session logs in the window — the two sessions that pushed both landed (#192, #196), the two that did not kept nothing.

Evidence, run IDs and gate assessment

What the five sessions did

Read from the session-log JSONL of each tend-ci-fix run in the window 2026-09-01T07:47:59Z → 2026-09-02T07:49Z, counting git push / gh pr create tool calls, full pytest tests --run-nightly invocations, and turns spent on a shell until wait.

Run Spend Turns Pushed Full nightly runs until wait turns Outcome
33520973151 $44.00 316 yes 9 17 #192, merged
33542178613 $8.59 105 yes 0 0 #196, merged
33570812982 $22.79 179 no 2 5 killed at ceiling, nothing kept
33584628770 $12.48 124 no 0 0 killed at ceiling, nothing kept
33591588436 $0 1 n/a 0 0 died at turn 1

All four substantive sessions made no commit until their work had been verified to the end. The two that were interrupted therefore kept nothing at all; neither came near GitHub's 360-minute job cap, so it was the ceiling that ended them, not the cap.

The finished fix that was thrown away

33570812982 (23:23 → 00:44, 80 minutes) diagnosed 866891a6, arrived at a fix, and moved on to whole-suite verification — running the complete --run-nightly suite twice in the background. It was on its fifth until grep -qE ... /tmp/nightly2.log; do sleep 30; done turn when the session ended on You've hit your session limit · resets 4am (UTC). Its last git diff --stat, on HEAD = 866891a with no branch cut, reads:

 skills/leaf/CLAUDE.md                           |  6 +++++
 skills/leaf/assets/runtime/composing/surface.js | 13 ++++++++++
 skills/leaf/packages/default/theme.css          | 32 +++++++++++++++++++------
 skills/leaf/packages/default/widgets/lf-diff.js | 16 +++++++++++--
 tests/render_cases_interaction.py               | 13 ++++++++--
 tests/test_render_anchors.py                    |  5 +++-
 tests/test_render_controls.py                   | 16 +++++++++++++
 7 files changed, 89 insertions(+), 12 deletions(-)

That is not speculative value. The skills/leaf/CLAUDE.md hunk states the rule "a focusable descendant of a disclosure is a serious WCAG failure, which axe reports once per row", with the theme and widget changes that follow from it — the cause of tests/test_render_controls.py::test_examples_have_no_serious_wcag_a_or_aa_violations[pr-walkthrough], which is the one test that failed on every red ci run on main from 13:56 on 09-01 through 03:53 on 09-02: runs 33516407327, 33537688138, 33568275610, 33581881071, 33588757230. Pushed at the point the fix was written rather than held for the suite, it would have been a PR a maintainer could act on; instead it went to the runner's garbage collector and the regression stayed red.

33584628770 (02:49 → 03:42, 53 minutes) is the milder half of the same shape: 124 turns still mid-diagnosis on dbdacbbc, verifying candidates with repeated timeout 3000 targeted runs, with nothing staged when it died. No finished fix was lost there, but no notes, no branch and no tracking issue survived either, so the next session started from the failure log again.

The waiting cost

33520973151 is the same shape without the loss. It backgrounded the nightly suite and polled it with until ! pgrep -x pytest; do sleep 20; done; the Bash tool's 10-minute cap killed that wait on 13 separate turns, each re-issue carrying the session's whole context again (17 turns in all went to such waits). That is 130 minutes of a 241-minute job, in the window's single most expensive run — $44.00, 10% of the day's $430.06. It landed #192, so the outcome was good; what the waiting bought was a report the session could have gathered after pushing, at the risk of losing the fix with it.

Why this is repo-local and not a bundled gap

The bundled ci-fix skill's step 2 says "reproduce locally" and step 3 pushes; it never asks for a full-suite verify before the push. What sets the bar here is leaf's own tests/CLAUDE.md — "Before handing over a browser-facing change, run its complete browser file and the everyday suite. ... CI adds --run-nightly after main moves." A session reading that reasonably reaches for the strongest local gate it can, and nine full-nightly invocations in one session is well past what the line asks for. Naming the push point belongs beside the repo's own bar, which is running-tend.

Gates

  1. Confidence — High. Structural, and observed 4/4: every substantive ci-fix session in the window carried its work uncommitted through a 30–90 minute local verify, and 2/2 of the interrupted ones kept nothing. The account ceiling that interrupts them is a recurring series in the evidence log — 2026-08-25 (5 runs), 2026-08-29/30 (11), 2026-08-30 (22), and this window (15): four occurrences in nine days.
  2. Magnitude — targeted fix. One new section in an existing skill file the ci-fix session already loads. No new file, no reorganization.
  3. Cost — wasted compute. $35.27 discarded, and a regression whose fix was written at 00:30 still red on main at 03:53. Nothing wrong was posted and no approval was left standing, so this is not a wrong outward action. The remedy is guidance rather than mechanism: no gate, no retry wrapper, no scheduling arithmetic, nothing a later session has to re-derive. It subtracts work — stop running the nightly suite locally — rather than adding a rule to maintain.

Two tend-ci-fix sessions were killed by the account session ceiling mid-verify with nothing committed, discarding $35.27 of work — one of them a complete fix for the WCAG regression that had reddened main on five consecutive runs. Name the push point in running-tend: reach tests/CLAUDE.md's handover bar, then push and let the PR's own ci run the rest.
@leaf-agent leaf-agent added the review-runs Opened by the tend-review-runs sweep label Sep 2, 2026

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The evidence and the trade are right — two sessions losing finished work to the session ceiling is worth a rule, and guidance that subtracts a step is the right shape for it. One correction: the hand-off the section rests on does not exist.

ci.yaml gates the everyday suite on if: github.event_name == 'pull_request' and the nightly suite on if: github.event_name == 'push'. So a PR's ci runs the everyday suite and nothing beyond it; --run-nightly first runs after main moves. That is what root CLAUDE.md ("CI adds the complete nightly suite after main moves") and tests/CLAUDE.md ("CI adds --run-nightly after main moves") already say, and the new section contradicts both — "let the PR's own ci run the rest" delegates to a run that repeats exactly the local bar the session was just told to reach, and "reports nothing the PR's ci would not" is backwards for a nightly wait, which reports strictly more.

It matters for this workflow specifically: a ci-fix session is by construction fixing a nightly-only failure, and test_render_*.py and test_site.py are skipped by broad discovery, so a fix that reddens a different render test goes green on the PR and red on main at merge.

The correction is small and leaves the conclusion standing — arguably strengthens it. Pushing at the everyday-suite bar is the repo's normal landing bar, since wt merge gates on that same suite; the nightly runs post-merge for every change that lands, not just this one. So the push is a handover of an unfinished verify on the repo's usual terms, not a delegation of it, and that is a better reason to push than the one the section gives. Suggestions inline.

Comment thread .claude/skills/running-tend/SKILL.md Resolved
Comment thread .claude/skills/running-tend/SKILL.md Resolved
The PR's ci runs the everyday suite only (ci.yaml gates --run-nightly on push), so "let the PR's own ci run the rest" delegated to a run that repeats the local bar the section had just asked for, and the background-wait paragraph's reason was backwards: a nightly wait reports strictly more than the PR will. Rest the push on the repo's ordinary landing bar — the one wt merge gates on — and on the fact that a mid-wait session keeps neither the result nor the fix.
@max-sixty

Copy link
Copy Markdown
Owner

this shouldn't be on this repo, it should have been on tend

more specifically, we also shouldn't be adding any complication to protect against something like a mid-run kill; it's not worth the complication

@tend-agent address both of these please

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Both taken — closing this, and not refiling it on tend.

On routing: what the section guards against is a session ending mid-run, which is a property of the harness, not of leaf. The only leaf-specific detail was that the verify it interrupts happens to be long. My gate section argued the reverse ("Why this is repo-local and not a bundled gap") on the strength of that detail alone, which is the wrong test — the local flavour of a universal problem doesn't make the rule local.

On the substance: agreed, and it settles the routing point too. A rule that tells every future ci-fix session to weigh push-timing against a kill it can't predict is complication, however it's phrased — the fact that this one reads as "do less verification" doesn't make it free, since a session still has to hold and apply it. The failure mode is real but rare and self-correcting: the next scheduled run re-derives the diagnosis from a still-red main. That's cheaper than the standing rule.

The wasted spend stays on the record here rather than in a tracker; nothing else in the PR is worth keeping.

@leaf-agent leaf-agent closed this Sep 2, 2026
@tend-agent

Copy link
Copy Markdown

Checked both from the tend side: neither needs a change there, so nothing is being filed upstream.

The mid-run-kill rule was already out of bounds. Gate 3 in review-runs' review-gates.md classifies a kill that left nothing on the public record as waste-class, and says a waste-class failure supports only a fix that is nearly free — "a rule every later run loads" is named there as a mechanism that fails the gate at any occurrence count, however few lines it compresses into. That is your second point, near enough verbatim. I also grepped the bundled skills for anything of this shape already shipping: there is none. The nearest text is running-in-ci's end_turn corollary, which is about ending a turn while a backgrounded task gates the deliverable — a decision the session makes, not a kill it can't predict — so it stays as is.

Routing was the wrong test applied to text that already names it. skill-pr-workflow.md settles destination on one question — would every tend consumer want this rule — and spells out that silence in the bundled text is not evidence the rule is local. A universal problem with a leaf-flavoured detail attached still goes upstream. So there is no bundled gap that produced the misroute; the session reasoned past a rule that was already there, which is not something more prose fixes.

Net: no tend PR, and the section stays unwritten in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-runs Opened by the tend-review-runs sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants