Skip to content

Leave a tend-outage close to the sweep that drains it - #18

Merged
max-sixty merged 6 commits into
mainfrom
daily/review-runs-32346633522
Aug 24, 2026
Merged

max-sixty merged 6 commits into
mainfrom
daily/review-runs-32346633522

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

The "Bot temporarily unavailable" tracker's rows name the triggers a failed run stranded, and nothing re-runs them; tend-review-runs is the sweep that drains them, and its query reads open issues only. tend-nightly runs first (06:17 against 07:47) and its bot-opened-transient-condition rule closes the tracker, so the drain never sees it — that happened to #11 last night, and the review-response trigger it stranded for #10 was still unapplied at that PR's head when this PR opened. This adds a section to running-tend telling nightly to leave the close to tend-review-runs, and marking ci-fix's same-labelled diagnosis tracker as out of scope — it holds no rows and closes itself. Verified by re-running the stranded job, which is the drain that should have happened.

Full analysis

The chain

  1. tend-mention run 32304239514 (dispatched for review 4976923619 on fix: resolve the header where the lock's pypi.org URLs cannot be served #10) died in handle: failed to install claude 2.1.226 after 3 attempts, three curl: (22) ... error: 403. Transient, and the session log artifact is 236 bytes — the agent never started.
  2. The action's "Report failure" step filed Bot temporarily unavailable #11 with one row: | 2026-08-19T22:41:48Z | workflow run | #10 |.
  3. tend-nightly 32339817890 enriched Bot temporarily unavailable #11 with the failure text, then closed it at 06:46:30. Its own summary states the basis: "confirmed no tend run has failed since (60 runs, all success/skipped) and closed with that evidence." True, and about the outage rather than the row.
  4. This sweep's Drain stranded triggers step ran gh issue list --state open --label tend-outage and got nothing.

The work that was lost

Review 4976923619 carries an inline suggestion on plugins/leaf/bin/leaf, asking the launcher to relay uv's own failure text instead of asserting a mirror diagnosis — the missing-uv case being the counterexample, where the current message reports a mirror problem and a lock rewrite, neither of which happened. At #10's head be9db78 the line still reads:

if ! uv sync --script "$script" >/dev/null 2>&1; then
  resolve=--upgrade
  echo "leaf: the lock's own URLs cannot be served here; resolving the header against this host's index and rewriting the lock." >&2
fi

Nothing was going to pick it up. The branch was rebased at 02:01 and tend-review 32323190154 re-reviewed the new head — correctly posting nothing, per its own summary: "That thread already blocks the PR, and per the review skill's dedup rule, restating it on a push that changed none of the PR's code would be noise." The re-review is right; the point is that the only actor left to apply the suggestion was the mention run that died.

Gates

  • Gate 1 — confidence: Critical, 1 occurrence. Traced end to end: the failure, the row, the close, the drain that found nothing, and the change verifiably absent at the current head. Structural, not stochastic — with these two crons and a --state open filter, the drain cannot ever see a tracker nightly has closed.
  • Gate 2 — magnitude: a section in an existing skill file, no new file, no workflow change. It removes an authority rather than adding machinery.
  • Gate 3 — cost: wrong outward action. An incident row was closed as resolved while the work it tracked was verifiably undone, and the only pointer to that work was destroyed with it. Recoverable this time only because the run was still inside the census window.

Also done this run

  • Drained the row by re-running 32304239514's failed job (attempt 2), which is what the sweep owed it.
  • Filed the same defect upstream against max-sixty/tend, since nightly's close rule and the drain's --state open filter are both bundled and this would fire in any consumer that schedules nightly before review-runs. The action ref here is pinned at 0.1.18, so an upstream fix stays dormant until the next release — hence the overlay as well.
  • Below-threshold findings recorded on review-runs-tracking: 2026-08 #17.

@leaf-agent leaf-agent added the review-runs Opened by the tend-review-runs sweep label Aug 20, 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.

Self-authored, so this is a COMMENT rather than an approval. The rule itself checks out end to end — tend-nightly's step-6 close rule does read a bot-opened transient tracker as closable, tend-review-runs' drain step really does filter --state open --label tend-outage, and it closes only "once every row is drained", so nightly's close is structurally the last thing that touches the record. Placing the exemption in the overlay rather than the tracker body is the right lever here too: the "Close it once the outage is resolved" line is written by the action's Report failure step, which a pinned ref can't change.

Two numbers in the new section don't survive checking, and both are the kind a future session would take at face value:

  • 06:29 is a run start, not the schedule. .github/workflows/tend-nightly.yaml carries cron: "17 6 * * *"; 06:29 is when run 32339817890 actually started after scheduler delay. Pairing it with 07:47 — which is tend-review-runs' cron — reads as two crons, and a reader grepping the workflows for 06:29 finds nothing. (The PR description has the same pairing, worth the same fix.)
  • The gap was eight hours, not eleven. The row is stamped 2026-08-19T22:41:48Z and #11 closed at 2026-08-20T06:46:30Z — 8h04m.

Neither changes the argument; the ordering claim holds either way. But the section's whole weight is that it traces a real incident precisely, and a number a reader can falsify in one grep spends that.

Comment thread .claude/skills/running-tend/SKILL.md Resolved
Comment thread .claude/skills/running-tend/SKILL.md Resolved
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

test is red on 1fdc0b2, and it is inherited, not this PR's: tests/test_render.py::test_the_ask_walk_reaches_an_ask_that_draws_no_box (assert True is False) fails identically on this branch's merge base — run 32347187122 on f757529 — and on the three main runs before it. It was already failing on d55a9a2, before this push. Nothing here leaves markdown, so no path in the diff reaches a browser test. lint passes on both heads.

tend-ci-fix is already running against the main failure, so I've left it there rather than opening anything parallel.

@max-sixty max-sixty left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Two things to tighten before this lands:

  • Please rebase onto current main. The failed check is the already-fixed test_the_ask_walk_reaches_an_ask_that_draws_no_box, so this branch is missing the fix from 4bead1649c8620fe9189aa963c5eb02138d2e58b.
  • Please keep the frequently loaded skill focused on the durable rule, rather than preserving the full #10/#11 incident timeline and exact schedules. Something like: “Leave tend-outage issues open until tend-review-runs drains every row. The outage ending is not enough; each row names a stranded trigger. A comment can record recovery; the drain owns close.” The historical detail is useful in the PR or issue, but makes the operational instruction harder to scan and more likely to go stale.

This was written by Codex on behalf of max-sixty

@leaf-agent
leaf-agent force-pushed the daily/review-runs-32346633522 branch from 1fdc0b2 to 3d507cc Compare August 20, 2026 22:18

@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.

Self-authored, so this is a COMMENT rather than an approval. Re-reviewed in full after the force-push: both numbers from the previous review are gone — the section no longer dates anything, and the description's 06:17 against 07:47 now matches the two crons (17 6 * * * in tend-nightly.yaml, 47 7 * * * in tend-review-runs.yaml). Every premise the rule rests on still holds against the bundled skills and against #11 itself, whose body does read Close it once the outage is resolved.

One thing the rewrite left broader than its own argument. Both premises the section reasons from — rows that name stranded triggers, and a drain that will pick them up — belong to the "Bot temporarily unavailable" tracker, not to the tend-outage label. tend-review-runs' drain selects on the title (select(.title == "Bot temporarily unavailable")), and the label's other bearer is ci-fix's diagnosis tracker, titled ci-fix: transient failure on <run-id> — an issue that skill opens and closes in the same breath ("open an issue with the diagnosis and close it immediately"), carrying no rows and reachable by no drain. A session that meets one of those with only this paragraph in hand reads "leave the close to tend-review-runs" and leaves an issue open that nothing will ever close. Naming the tracker costs a clause and keeps the instruction the same width as the reasoning behind it.

The path is thin today — this repo has had exactly one tend-outage issue and it is the tracker kind — but it opens whenever a ci-fix run dies between its create and its close, which is the same class of transient the tracker exists to record.

Comment thread .claude/skills/running-tend/SKILL.md Resolved
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Both done, in one rebased commit at 3d507cc — ci is green on it.

  • Rebased onto current main (693d6af), which carries 4bead16, so test_the_ask_walk_reaches_an_ask_that_draws_no_box passes here now.
  • The section is down to the rule and the mechanism behind it: the tracker's rows name stranded triggers, nothing re-runs them, tend-review-runs' drain reads open issues only — so the close belongs to the drain, and recovery goes in a comment. The fix: resolve the header where the lock's pypi.org URLs cannot be served #10/Bot temporarily unavailable #11 timeline and both schedule times are gone from the skill; they stay in this PR's description, where they can go stale without misleading a session.

Squashed the two branch commits into one while rebasing, since the second only corrected the timings the rewrite removes.

@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.

Self-authored, so this is a COMMENT rather than an approval. The previous review's finding is addressed and I've re-verified the section's premises against the bundled skills at the new head: tend-review-runs' drain does select by title (select(.title == "Bot temporarily unavailable")), ci-fix's tracker is titled ci-fix: transient failure on <run-id> and is closed by the run that opens it, and #11's body does read Close it once the outage is resolved. The narrowing lands where the section starts reasoning rather than as a correction at the end, so the instruction and the reasoning are now the same width. Nothing new on the incremental — resolved the inline thread.

One thing the rewrite left behind outside the diff: the PR description still described the rule as covering tend-outage issues generally, which is the exact scope the section just gave up. I've updated it to name the tracker and mark ci-fix's same-labelled issue as out of scope, so the summary a maintainer reads matches what merges.

lint is green on fe91416; test is still in flight.

@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.

Self-authored, so this is a COMMENT rather than an approval. Re-checked the condensed section's premises at this head and they all still hold: tend-review-runs' drain selects by title (select(.title == "Bot temporarily unavailable")), it closes only "once every row is drained", and ci-fix's same-labelled tracker is titled ci-fix: transient failure on <run-id> and closed by the run that opens it. The title-scoping the last review asked for survived the rewrite intact.

One thing the condensation dropped was load-bearing. The previous form named the tracker body's own closing instruction and answered it — "Don't take it"; this one doesn't mention it at all. That sentence is the strongest pull toward the wrong action, and it isn't ambient policy a session may or may not have loaded: it is printed in the issue the session has open at the moment it decides. #11's body ends This issue was created automatically. Close it once the outage is resolved., and nightly's close rule gates its own exemptions on marks the issue carries — a body containing "Do not close manually", or the tend-rate-limit label — neither of which this tracker has. So the checklist and the record both say close, and the overlay is now the only thing on the other side without saying what it is overriding. Naming it costs a clause; suggested inline.

Separately, the PR description still says the section tells nightly "to enrich that tracker", which the rewrite removed. Nightly enriches via its own scripted step either way, so nothing behaves differently — but the description should describe what merges. I'll fix that rather than leave it as a review point.

Comment thread .claude/skills/running-tend/SKILL.md Resolved
@max-sixty
max-sixty dismissed their stale review August 24, 2026 22:04

The current head is rebased, narrows the rule to the correct tracker, and compresses it to the durable operational instruction requested.

@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.

Self-authored, so this is a COMMENT rather than an approval — but it's a clearance, not a finding. The last review's point is applied verbatim: the section now names the tracker body's own closing instruction, says where it comes from, and answers it, so a nightly session holding #11 sees what the overlay is overriding rather than an unexplained "leave it open". Thread resolved.

Re-verified the section's premises at this head, since the whole passage is a claim about other skills' behaviour. tend-review-runs' drain does read gh issue list --state open --label tend-outage and then select(.title == "Bot temporarily unavailable"), so the title-scoping is exact and a closed tracker is genuinely unreachable to it. ci-fix opens ci-fix: transient failure on <run-id> under the same label and closes it in the same step, so the exclusion clause is right about both the rows and the closer. #11's body still ends This issue was created automatically. Close it once the outage is resolved. — boilerplate the report step emits regardless of what the table above it says, which is what the new clause asserts. Nothing new on the incremental.

ci is queued at this head; the change touches only .claude/skills/, so no test path reaches it.

@max-sixty
max-sixty merged commit 87564e1 into main Aug 24, 2026
4 checks passed
@max-sixty
max-sixty deleted the daily/review-runs-32346633522 branch August 24, 2026 23:32
max-sixty pushed a commit that referenced this pull request Sep 18, 2026
`notes/workspace-followups.md` has been presenting finished work as the
plan since 9 September. It opens with "Start #2, #3 and #4 as one
coordinated contract batch; run the review-queue simplification #8
alongside it" — all four of those shipped that week — and carries
thirteen briefs, each with a live "Next task" and "Done when", for work
`TODO.md` dropped as complete. This removes them and leaves the six
`TODO.md` still links: #11, #14, #19, #20, #22 and #23.

The trim follows the convention #666 set and the reason `CLAUDE.md`
gives for it: a note is never a second specification for shipped
behavior. #666 removed #6, #7, #16 and #17 the same way, rewriting the
two `Owner / dependencies` lines in surviving briefs that named them; it
simply did not reach the rest.

Each removal is evidenced by the commit that took the item out of
`TODO.md`, not by a reading of the current code:

| Brief | Removed from `TODO.md` by |
| --- | --- |
| #1, #3, #5 |
[`0f7f06a6`](0f7f06a)
— "Completed workspace items #1, #3, and #5 are removed from `TODO.md`"
|
| #2, #4, #8, #9 |
[`28b5da99`](28b5da9)
— "the completed #2, #4, #6, #8, #9, and #17 backlog entries are removed
while preserving the deferred evaluation work" |
| #13, #15 |
[`6df40353`](6df4035)
— "closes three bounded workspace follow-ups" |
| #10, #12 |
[`c9eaa2c6`](c9eaa2c)
— the continuation cue and the adaptive Threads placement |
| #18, #21 |
[`e46c8b93`](e46c8b9)
— the monitoring workspace and its package-owned root |

Alongside the briefs, three group headings are now empty and go; the
`Suggested work packages` table loses the rows whose whole scope landed;
and four cross-references that named a removed ID are rewritten — #14's
dependency on the Threads-placement experiment, #20's ordering behind
#8, and the two sentences in `Reproduction record` and `Browser
evidence` that pointed at briefs no longer here.

#14 needed more than a rewritten pointer. The experiment it waited on
was settled in two steps, and only the first removed an ID: [PR
#520](#520) kept the adaptive
placement and deferred the modal-focus work to #24, which landed in [PR
#536](#536) as inertness, dialog
semantics and focus containment for a covering workspace. That is the
surface #14 exists to verify, so its `Done when` — "Avoid imposing a
modal focus trap on a nonmodal panel" — described the containment #536
shipped as the defect to avoid. It now states the containment the
shipped modality requires, and the dependency line names both
settlements.

The dated evidence sections themselves stay. They are the record of what
was read in a browser on 8 September, not a plan, and the note's own
header scopes them to that date.

No test covers `notes/`, and this changes no behavior, so there is
nothing to regress. `pre-commit` passes on the file; the `TODO.md` →
note anchors all still resolve, and no surviving text references a
removed ID.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
…nd argument type guards, and the unused x-paints key (#2555)

Browser-runtime and package code that re-checked what Leaf's own server,
composer or producers already guarantee, retried or rolled back faults
nothing records, or type-checked arguments the next line would reject
anyway. It goes; checks that stop bad input passing silently into
admitted events, stored decisions or anchors, guards against hangs, and
`current()` race checks stay. Part of the complication-weight sweep
(#18, #22, #23, #25 and #27 there); follows #2507.

**#18 Re-checks of Leaf's own output**
- `validDrawing` re-validated every drawing against the full comment
schema on each paint, though admitted drawings passed it at the append
door, `drawing.js` clamps every bound, and the versioned `format`
separates old drafts. It is now the format check; the generated bound
constants stay. `drawing-record.test.mjs` goes; the malformed-draft
browser test now uses a `leaf-drawing/2` draft.
- Spot checks of `$layer` facts, four `/api/state` fields, the
deferred-data reply echoing its request, the export payload and "a
single main" (which `page check` refuses) go from `widget-loader.js`,
`state-application.js`, `data.js`, `context.js`, `version.js` and
`layer-client.js`. `loadDeferred` keeps its two `current()` checks. The
two deferred-load tests now inject an HTTP 500 instead of a bad echo.
- `summary-ranges.js` stops re-checking the contiguity `events.py`
builds.

**#22 Retry and rollback for faults nothing records**
- The thread list's one-shot retry of a failed render (with
`RetainedThreadListError` and its `recovered` plumbing) goes; a failure
restores the committed list once and is reported, and the next reading
paints. The sibling-cohort rollback stays.
- The Questions banner rolled back twice on one failure, and its inner
rollback ran before `view.js`'s rule that an obsolete attempt must not
roll a newer reading back; `view.js` is now the one owner.
- The file editor's merge `Compartment` could never switch; the merge
view is built once.
- lf-diff's four assertions on its vendored Pierre's output shape go;
`renderedLines`' row check, which keeps a datum key off the wrong row,
stays.

**#23 (runtime half)** The torn-opening-line thread recovery, which
#2507 made unreachable by refusing a reply to a withdrawn message, goes
from `thread/model.js`'s contract, `module-authoring.md` and
`application.ts`, with its runtime test.

**#25 Argument type guards** About sixty `typeof`/`instanceof` checks on
module-API arguments, including bundles only the runtime passes, go
across `projection/`, `thread/`, `keyboard/` and the top-level runtime,
and in lf-visual-review, lf-playground and lf-diff. Kept because they
guard a rule rather than a type: `projectData`'s non-empty key and
identity (a package passing an object would otherwise anchor a stored
comment to an unrelated datum; new `project-data.test.mjs`),
`setReaction`'s boolean, `declaredScope`'s Escape enum, double
registration, visual-part uniqueness and `requireReference`.

**#27** The `x-paints` registry key, which no tag in the tree declares
since lf-task left, goes with its runtime reader, render-check half,
schema, docs and tests.

**Not cut:** `canonicalBinding`'s `"Space"` alias, which is what makes
the non-canonical check refuse a binding that would otherwise never
fire.

**Tests:** with the retry gone, the `choose-earlier` boundary variant
holds each failing reading at a gate before it paints, so the user's
choice happens on the committed list and one release fails all three
readings; the shift watch stays on and the test asserts both the
retained reading and its stability.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Nov 6, 2026
…ext is found by the reading's walk; a gap is a symbol of the quote automaton

Inline adjacency (#16). Text in no text block read in its parent element, so
`<div><span>alpha</span><span>beta</span></div>`, which shows `alphabeta`, read
"alpha beta" in the browser and in the file, and page search, which since 7c591e3
takes a gap only where the reading reads one, found `alphabeta` no more where main
found it. Both readings now read such text in the nearest element around it that HTML
doesn't draw inline (`$passages.inline` in the kernel registry, read by the runtime's
`segmentTextBlock` and passages.py's block of each element): two inline elements side
by side are one word wherever they stand, and only a block's end or a line break parts
them; `<div>a</div><div>b</div>` still reads "a b". The option Markdown cases change
with it, in both runtimes: `X<em>Y</em>` reads "XY", `A _b_<code>c</code>` "A bc", and
two `<small class="tag">` chips with nothing between them "effort: lowrisk: med", as
the browser's own find and a copy of them read.

Removed text (#17). The watcher found the text a change took out with a light-tree
walker, so a marked passage, or a draft's, inside a widget's shadow stage, scoped to
the element around the widget, kept its mark on the old stage's disconnected text when
the widget was replaced by one staged alike before it was put in place: nothing settled
until a reader asked. The text is now found by the reading's own walk, from a declared
host's own tree where the removed node is one. On placement's path what remains of the
light tree's traversals is the id lookup's: `elementById`'s `getElementById` and
`querySelectorAll`, the watcher's `idsUnder` reading ids where `elementById` looks
(the light tree and the stages on it, which a slotless host's light children are in
and the reading walk is not), and `shadowRootsIn`'s `contains`, the stage registry's
filter; `pageQueryAll` serves datum lookup.

One gap symbol (#18). The automaton matched each quote's letters with its gaps
stripped, and each candidate's words were read again, so quotes of the same letters
with their spaces elsewhere were each read at every place the letters stood. A quote
is now spelled with one symbol for each gap, and the page alike (a run of whitespace
and edges holding whitespace is a gap, edges alone nothing), so what the automaton
finds is a copy and `matchAt` goes. 1,600 quotes of 60 letters with differently placed
spaces, against 640 x's: 91 to 10 ms in Chromium, 175 to 9 ms in Firefox. The build
costs the quotes' spellings: 1,600 quotes of 640 letters, a million characters, which
the letters-only automaton collapsed to one path, go from 9 to 124 ms and 9 to 130 ms.

tests/quote_cases.json gains the run-together spans (one word, and no gap), a table
cell's end, a list item's end, an image's alt text, and a line break a staged widget's
slot holds, which takes a case's `registry` and `stage`; both runtimes answer all 19.

Tests, each failing on 7c591e3 in Chromium and Firefox:
- test_page_search_finds_words_two_spans_run_together_outside_a_text_block (#16), with
  the shared cases failing in Python and the browser's runtime test on 7c591e3;
- test_a_mark_in_a_widget_staged_again_moves_to_the_new_stage (#17), read once;
- test_a_draft_in_a_widget_staged_again_moves_to_the_new_stage (#17), read once.
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.

2 participants