Skip to content

Fix the causes behind #3939's patches, and drop the panel's refusal hold - #4124

Merged
max-sixty merged 21 commits into
mainfrom
main-failure-owner
Oct 25, 2026
Merged

max-sixty merged 21 commits into
mainfrom
main-failure-owner

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Follow-ups to #3939 from a /fix-underlying review of its fixes and the decisions that review raised. Each part fixes a cause one level above where #3939 patched it, or removes a hold that cost more code than the movement it prevented.

Product changes

  • An oversized upload is read to its end before it is refused. The server closed the connection with the body unread, so a client still sending got a connection reset instead of the 400. read_body in src/leaf/http.py now keeps up to the limit and discards the rest.
  • The margin rail's Tab stop reads a carried row where it is painted. paintedBox in margin-layout.js serves both visibleRows and syncRoving, so a row the rail carries a frame late no longer takes the stop by its stale box. A gate now covers an untouched narrowing.
  • Leaf places focus in a framed page only once the user enters it. canPlaceFocus is now window === window.top || document.hasFocus(), one rule for every framed page, and bootstrap.js enters a frame on a trusted pointerdown or keydown. Run every tier on macOS nightly, and fix the tests main and macOS fail #3939 handled only arrival recovery.
  • Send's card is the card a reopen shows. The comment field's options trigger took a 40 px column beside the field, and the card Send opens takes the field's rectangle. The trigger now stands above the field's right end, so the field fills its frame (CSS only).
  • A page read from its top stays at its top. capturePlace (reading-place.js) marks a scroller at 0 as read from its start, so narrowing no longer scrolls root-parts 135 px and takes its title out of view. Leaf's own resize correction had overridden the browser, whose scroll anchoring leaves a page at its top alone.
  • A refused reply's words grow the panel's field as typing does. This removes the refusal hold Run every tier on macOS nightly, and fix the tests main and macOS fail #3939 restored (holdRefused, holdField, +16/−64 in the runtime). browser/AGENTS.md gains "Stability is owed to the common path": a rare path the user reads at a glance may move the layout rather than carry a mechanism of its own. Its wording covers the floating panel; whether margin cards follow it is still open.

Test changes

  • The scroll-watch gesture drives its own frames. It runs a fixed 24 frames and holds the runtime's settle with scrollGlides, the hold Leaf's own key scrolling uses, exported from check-api.js. A follower's allowance no longer depends on how fast the host draws. The design-header case failed at 8 frames on macOS CI and passes at any speed now. An injected follower is still caught on 24 of 24 frames.
  • The test Run every tier on macOS nightly, and fix the tests main and macOS fail #3939 relaxed for the card width requires the minimum again.

Notes

  • notes/browser-support.md records Run every tier on macOS nightly, and fix the tests main and macOS fail #3939's three engine workarounds. The Firefox one is unconfirmed.
  • notes/focus-ring-room.md records six cases of a focus ring cut at a scroller's edge, the two mechanisms behind them, and two candidate fixes. Neither fix landed. Per the user, ring fixes wait until the cases are weighed together, so the two ring commits on this branch are reverted.

Each fix has a test that failed before it and passes after, run by node id. The PR's test job fails six journey tests, and each fails on main as well (checked locally on main at f90ff10): test_refused_reply_retains_its_live_foot in all four cases (#4127), and test_page_fixture_renders[lost-update] and [notification-playground]. The refusal test's panel case now accepts the panel's own moves.

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

max-sixty and others added 16 commits October 25, 2026 09:37
A POST past a route's 10 MiB bound was refused before its body was read,
and the connection closed with the body still arriving. A sender still
writing then met a reset rather than the answer: Python's http.client
raised BrokenPipeError, and Chromium's fetch rejected with "Failed to
fetch" (3 of 3) when a page on a stale layer uploaded a 12 MiB image, so
it never received the layer to reload into. `read_body` now keeps the
body only up to the bound and discards the rest, so every refusal reaches
the browser on a connection it can reuse. An unauthenticated request is
still answered unread, since the key gate precedes every read.

The door tests now send the whole oversized body, by Content-Length and
in chunks, as a browser does; on the old code they fail with
BrokenPipeError.

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

The rail's one Tab stop is its highest row in view (#3939), but the stop
read each row's own box, and a row standing in a carrier, which the
browser moves with the scroll, reads its box a frame late after a scroll.
margin-layout.js already says so and reads such a row from its target.
On ship-review, scrolling down and back to the top left the stop on the
second row, below the first, until a resize or another render re-read
the rail. margin-layout.js now exports that reading (`paintedBox`), and
the projection's visible rows, which the stop, the walk and the Page
Map's hand-back all use, read it.

Behavior changed: after a scroll, Tab into the rail starts at the
highest row the user sees, carried rows included.

#3939 also made a resize that carries a region into the page keep the
page's own place among places the reader never made. That rule had no
check beyond one test on live-progress, though with it reverted seven
corpus pages move on an untouched narrowing (sidebar tracks and stacking
panes). The corpus gate now narrows a fresh, untouched copy of each page
and fails when the page leaves its own place's words, which catches the
two that jump furthest (live-progress, command-hub); the others move
27 to 422px and keep their words in view. The check API
exposes `capturePlace` and `placeNode` for it.

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

Every sticking block (a column's margin sidebar, a sidebar page's track
body, a widget's track such as a playground's rail) scrolls what it holds,
so it clips at its padding edge. #3939 gave the ring's room to the track
body alone, so a column's margin sidebar holding more than a contents map
still cut rings: a details summary's at both sides and a line-leading
link's at its start and top (5px, Tab at 1440x900).

The room (padding, scroll padding, and the block-axis room given back as a
negative margin) now sits in the shared Sticking blocks rule, and the
track-body-only rule is gone. The margin sidebar's float rule takes
`:where()` so the shared block-axis margin outranks its own while it
sticks, keeping what it holds at its old top; flowing, it keeps its
margins. A playground's rail now stands its panes 5px in from each side,
as the track body already did.

The new test tabs onto a line-leading link and a summary in both a margin
sidebar and a sidebar page's track and asks that each ring is whole; on
the previous CSS it fails for the margin sidebar.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#3939 kept a framed Leaf page's arrival from taking focus from the page around
it with a clause on one caller, the arrival's composer recovery. The rule it
stated already had a home, focus.js's `canPlaceFocus`, which every Leaf focus
placement passes through, but there it held only for live samples. So a framed
page that isn't a sample still took focus by every other route: when the
embedding page sent it to a fragment, by a link targeting the frame or by
script, travel put focus on the heading and the embedding page's link lost it.

`canPlaceFocus` now holds for every framed document: a top-level page may
always place focus, and a framed one only while it holds focus. The arrival's
own clause goes, so a framed page with a saved composer draft now reopens it
without focus, as a page in a background tab does. The sample's trusted-input
entry moves from the sample bridge to every framed document, since an ⌥-press
cancels the native mousedown focus that would otherwise enter the frame and
the composer it opens would then refuse focus.

The framed-arrival test now also sends the frame to a fragment and ⌥-presses
inside it; on the previous runtime the fragment step fails, and without the
entry the ⌥-press does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	dist/kernel/kernel.json
#3939 added three engine workarounds with no entry in
notes/browser-support.md, so nothing scheduled a recheck to remove them.
Each now has one, with the evidence and the recheck that settles it:

- Chromium skipping the visual review's case-button restyle under a
  nested container. Reproduced on 2026-10-25 by deleting
  `container-type: normal` and narrowing visual-review-gallery from
  1200px to 880px: the buttons kept 14px 4px in Chromium 153 and took
  10px 8px in Firefox 155.
- WebKit revealing a selection written during the focus event.
  Reproduced on 2026-10-25: with the editor-view guard disabled,
  test_sample_editor_focus_preserves_outer_scroll_and_the_caret
  [webkit_browser] failed with the page scrolled 1,386px, and the
  Chromium case passed.
- Firefox misplacing a `left`-inset heading link after a resize. Not
  reproduced: a `left` form of the current arithmetic followed its
  heading in Firefox 155 on three corpus pages and a one-heading page,
  so the entry calls the gap unconfirmed and says what drops it.

No behavior changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	dist/kernel/kernel.json
Tab onto a Web Awesome control that focuses a node in its own shadow tree
left the ring cut at a scroller's edge. A diff's file filter 3px past a
pane's foot kept its frame's ring up to 3.2px cut, a package's select up
to 3.3px, in Chromium and Firefox; a code block's Copy kept its ring only
because a04efbb gave its shadow button a margin of its own.

Leaf's rules reach the document and its stages, the only open roots it
attaches, so the focused node inside a vendor's tree had no scroll margin,
and the Tab-arrival correction read zero there and counted the ring shown.
A landing now reads a node's margins from the nearest element Leaf's rules
reach, the vendor control's host, which matches `:focus` and keeps the
ring's room and the sticky-header slot. That covers Copy too, so its
per-part `scroll-margin` is gone.

The input's and select's frames, which wear the ring around the focused
editor, now declare `--lf-wears-ring` as the contract asks, so a landing
shows the frame: measuring the select's editor left 2.3px of its ring cut
even with the margin.

The scroller-edge test gains Copy at a pane's top and the filter and a
select at its foot, in both engines.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user judged focus rings too central to Leaf for another per-case
fix. This reverts the branch's two ring commits: the ring room shared by
every sticking block (647ef69) and the Web Awesome host margin at Tab
arrival (4eb1eef). Main keeps #3939's track-only room and #3916's
Copy-only margin.

notes/focus-ring-room.md lists the six cases found so far, with their
measurements and reproductions, the two mechanisms behind them, and the
two candidate fixes tried. TODO #31 asks for one mechanism once the list
shows its shape.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	TODO.md
#	dist/kernel/kernel.json
At 1200x900 a one-line comment's card opened by Send stood 280px wide, 40px
under `--thread-card-min`, while the same thread reopened from its margin
marker stood at 320px with the same left, top and height. A wrapping comment
showed the same gap at the other bound: 552px at Send, 592px reopened.

The card Send opens takes the comment field's rectangle, so the words keep
their column through Send. #3634 stood Other responses in a grid column
beside the field, inside the frame, so the field (and the card from it) was
the frame less that column, while a reopen sizes the card by the frame's
own bounds (`--thread-card-min` to `--thread-card`).

The user chose on 2026-10-25 that the field is at least the card's minimum.
The frame's grid returns to one track, so the field takes its whole
measure, and the trigger stands 4px over the field's end in the head row
the frame already reserves, where the card's controls stand once it opens.
The frame's width bounds are then the card's, with no second clamp, and the
boundary that holds the frame holds the trigger.

Rejected: letting Send's card size itself as a reopen does, which drops the
field's width and rewraps a wrapping comment at Send (3 lines to 2 here,
the card 21px shorter); and hanging the trigger outside the frame, which a
window edge would cut.

Behavior changes in tests: the margin journey again requires the card at
least the minimum (relaxed by #3939); the narrow response-field test asserts
the trigger over the field's end rather than beside it; a new test holds
Send's card to the reopened card's rectangle.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`gesture_writes` ran one smooth `scrollBy` and counted the frames the host
drew, and `scroll_followers` allowed a place a third of them. A slow host draws
fewer frames for the same travel, so the design legend's three crossings
failed at 8 frames (macOS CI) and passed at 9 or more.

The gesture now takes 24 frames, each an instant write of an equal share of
the travel, so the allowance is against the same count on any host. The
runtime settles on each write's own `scrollend`, and after `SETTLE_MS` of
scroll silence, which a host drawing frames further apart than that reaches
between them. So the gesture holds the settle with the runtime's own hold for
frame-by-frame scrolls (arrivals.js, `scrollGlides`, as navigation's
`glideTo` uses), releases it after the last frame, and waits for the one
settle through `watchScrollEnds`. Both are exported from the diagnostic entry
`runtime/check-api.js`; no runtime behaviour changes. Every frame moves, so a
sample is taken on each.

Behaviour kept: a place written on every frame is still a follower (an
injected scroll listener writing a legend box's style is flagged on 24 of 24
frames under `taskpolicy -b`), and a state the scroll crosses is still allowed
a share. Per-place counts are the same at normal speed, under `taskpolicy -b`
and with frames spaced 120 ms apart (6, 3 and 2 for the legend cases, against
an allowance of 8); without the hold, 120 ms frames settled on every frame and
failed `picker-header` and the seated-chip test.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A scroller standing at scrollTop 0 is now read from its top: capturePlace
marks the reading `start`, and restorePlace returns that same scroller to
its start rather than to the first line at the edge. A box the words are
handed to (page to pane, pane to page) still takes the line landmark, so
handovers keep the reader's passage.

Behavior changed: root-parts at 1200 px, untouched, narrowed to 440 px used
to scroll 135 px to keep "Rollout plan" where it stood beside the fixed
header, taking the title out of view; it now stays at 0 with the title in
view. The same holds for the page, bounded regions and a revision that adds
content above the title while the reader is at the top: the page stays at
its top. The user chose this on 2026-10-25 over keeping the first line.

test_revision_reveals_a_page_landmark_around_an_empty_active_region now
reads the page 20 px past its top, so it still checks that an empty flow
region does not displace the page's reading rather than the new top rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user chose on 25 October that words landing in the floating panel's
reply field without typing, handed back by a refused send or typed in
another tab, grow the field at once as typing does. The returned words show
whole first, the path is rare, and a hold for it costs code on every later
change.

Behavior change: when the log refuses a reply sent from the panel's thread
view, the view gives the turn's room back and the field grows to the words
it hands back, so the view's head moves down and the row over the field
moves up, where #3939 held both until the user's next gesture.

Removed from floating-panel.js: `holdRefused`, `holdField`,
`releaseField`, `fieldHold` and their calls, and `stoodAt`, which only
`holdRefused` read. `holdThread` stays for a press in the view and a
rewrite's caret. The reply row's `sent` binding no longer gets the send's
flight, which only `holdRefused` awaited, so `sendReply` returns
`sendMessage`'s result directly.

browser/AGENTS.md, "Stability", gains "Stability is owed to the common
path", scoped to the floating panel because margin and page cards still
hold refused words and mirrored drafts in `reply-continuity.js`.

Test: `test_refused_reply_retains_its_live_foot[panel]` now asserts the
handed-back words show whole in the field (it fails against the hold) and
consumes the panel's own moves, each reported in a frame that moved the
panel, while the Send action and the page's tail still hold still.

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 panel refusal regression test still rejects the movement this change deliberately allows.

max-sixty and others added 2 commits October 25, 2026 13:58
The refusal test's predicate looked for the leaf-floating-panel host, but the
watch names the nearest classed element, div.lf-fp-card or div.lf-fp-row, so
it rejected the movement #4124 allows. The test still fails on the unchanged
writes to the refused message, which fail on the base too (#4127).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 25, 2026
leaf-agent
leaf-agent previously approved these changes Oct 25, 2026
leaf-agent
leaf-agent previously approved these changes Oct 25, 2026
@max-sixty
max-sixty merged commit e158a7c into main Oct 25, 2026
3 of 4 checks passed
@max-sixty
max-sixty deleted the main-failure-owner branch October 25, 2026 22:16
leaf-agent added a commit that referenced this pull request Oct 25, 2026
The failed-save panel test borrowed a reading-continuity fixture that
inserts five paragraphs. #4124 deliberately keeps a page read from its
top at the top, so adopting that fixture's valid revision moves the old
paragraphs down 608.75px. The original test reproduces that shift on
main and passes with the previous reading-place module.

Use a small text-only revision for the panel's error/recovery journey.
The test now also asserts that an invalid save leaves the last valid
content displayed and that the next valid save replaces it. Its error
status, Errors menu count, Versions diagnostic, and shift watching
remain covered. No runtime behavior changes.

The focused test passes normally and at 6× CPU throttling; `git diff
--check` passes. Local Ruff checks could not run because Ruff is not
installed; PR CI supplies those checks.

Closes #4159 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 26, 2026
main's #4124 stood the ⋯ over the field's end in the floating frame's head
row; this branch stands it inside the empty field instead, so that rule
and its tests' expectations go, and selection.js's header records the
replacement.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 26, 2026
… a hold (#4183)

Margin and page thread cards now follow the stability rule #4124 set for
the floating panel. When a refused send hands its words back, or a draft
typed in another tab arrives, the reply field grows to show them as
typing does. A refused turn gives its room back as it folds.

**Before.** After a refusal, the card held still by growing the field up
into a spacer. A draft mirrored from another tab stayed one line tall,
so its words were cut mid-line and two lines were hidden until the user
typed there.

**After.** A refusal moves the card: its top rises 22 px and Send drops
38 px. A mirrored draft shows whole, and the card's foot drops 60 px.

**What goes and what stays.** `reply-continuity.js` loses its
writing-room hold (+46/−193), and the `--lf-reply-writing-room` CSS rule
goes. The passive spacer stays for content a new page version removes
above the reply, such as a summary folding turns. The messages a refusal
drops reach it through `Transcript.leaving`, so their room isn't kept.
`browser/AGENTS.md`'s "Stability is owed to the common path" now covers
cards as well as the panel. A refused edit has no hold either, so the
rule has no exceptions (the user's choice, 25 October 2026).

**Tests.** Three tests assert the new behaviour in place of the hold,
and each fails on main:

- `test_a_refused_reply_folds_away_and_its_words_return_whole`
- `test_a_draft_typed_in_another_tab_shows_whole`
- the mirrored cases of
`test_native_reply_edits_after_semantic_paint_keep_the_first_line`

`test_refused_reply_retains_its_live_foot` still fails, only on the
unchanged writes it fails on in main (#4127).

Closes #4129

> _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 Oct 26, 2026
The ⋯ that opens Suggest and the reactions moves from a bordered button
beside the comment field into the field's corner, beside Dictate, and
only while the field is empty. The draft's first word takes it away, so
the field spans the whole bar in every state and nothing moves as the
user starts typing. Tab and `e` still open the picker with words in the
field; it then stands over the field instead of the ⋯.

The user picked this on 25 October over keeping the button beside the
field, hiding that button at the first key (which widened the field
under the caret), and dropping it for keys only (which left a mouse or
finger no route). selection.js's header records the choice and what it
rejected, reversing #3634's placement. It also replaces #4124's ⋯ over
the
field's end, in the head row of the floating frame, which landed on main
meanwhile and only the floating presentation had.

Behavior changes:

- The field gains the button's 40px of the 294px bar, and a sent
  comment's message again ends at its card's Reply field.
- A field holding words shows only Send in its corner; a pointer reaches
  the picker from an empty field, or by Tab and `e` from a draft.
- A bar with only a target chosen shows Comment alone; its ⋯ appears
  once Comment opens the field.

Tapping the floating panel's offer of selected words opened the picker:
the panel opens the comment box on the release, and the click the
browser delivers after it landed on the ⋯ now standing under the
finger. The release claims that click, through a `claimReleaseClick`
in pointer.js that held-word.js's own copy of the same rule now uses
too.

Tests: the picker test asserts the ⋯ inside the empty field, gone with
words, and the field's width unchanged; it opens the picker by pointer
from an empty field. Its panel touch case fails without the claimed
click. The narrow-bar test asserts the field reaches the bar's content
edge.


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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 27, 2026
The live-news continuity journey still expected a page at scroll offset
zero to follow its old heading when a revision inserts context above it.
#4124 deliberately changed that behavior to keep a page read from its
start at its start, preserving the title. The reported 40.1875px shift
occurs at that revision step; work status and the held reply already
preserve their positions.

Start the journey 20px down before recording its reading, editor and
Resolve positions. All existing assertions remain, including draft
selection, resting-pointer hit testing, held news and the genuine growth
released by opening the reply. No product behavior changes.

The existing test failed on main before this change and passes with it,
including at 6× CPU throttling. The October 24 and 25 scheduled results
passed before #4124; the October 26 results fail at the source-revision
assertion on both Linux and macOS.

Closes #4236 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 27, 2026
…UL.md

Responsiveness and Pages across Leaf updates were subsections of Stage,
whose subject is that Leaf has no users to stay compatible with; both are
lasting rules, so they are top-level sections now. The cross-runtime
invariant drops its restatement that log-dependent facts come from the
server's reading, which Responsiveness owns.

SOUL.md's foundation principle now says a guarantee is owed to the paths
users take often, generalizing the stability rule chosen on 25 October
(#4124) to every guarantee; browser/AGENTS.md's "Stability is owed to the
common path" cites it.
leaf-agent added a commit that referenced this pull request Oct 28, 2026
The send-placement test assumed a reopened card must have the exact
width of the card Send opened. #4513's longer italic “Queued for Claude”
receipt exposes that assumption: a fresh card sizes to its contents,
while a sent card retains the comment frame's width to keep the user's
words in place. The test passes on #4513's parent and fails on that
commit and current main with the same 48.9375px widening reported here.

Check the guarantee #4124 repaired directly: the comment frame meets the
card minimum and Send keeps its width. Reopening still must meet the
minimum and retain the attachment and vertical bounds, while choosing
its width afresh as `thread-preview.js` specifies. This changes test
coverage only; the status wording and runtime layout stay as they are.

Validation: the revised browser case passes on current main's runtime. A
temporary 40px loss of editor width makes the new Send-width assertion
fail (280px versus 320px), preserving coverage of the original
regression. The original assertion failed locally with the reported
rectangles; the preceding CI run's junit records a pass and the reported
run records the same width mismatch.

Closes #4529 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 10, 2026
Tend's PR review now checks each change against the open backlog and
gets the description to close what the change settles. Where the change
leaves nothing of a `backlog` issue to do, by finishing what remains,
removing its premise or recording a decision against what it asks, the
description says `Closes #N`. Where it does part, the description says
`Part of #N` and what is left, so the review of the last part can tell
that part finishes the issue. On Tend's own pull request the review
edits the description. On someone else's it asks in the review, and the
ask goes in an approval rather than holding one back. The rule is a new
section of `running-tend`, **Issues a change finishes**, after **Review
threshold**.

## Why

Leaf's backlog triage of 2026-11-04 found seven merged pull requests
that did an open backlog issue's work without closing it. Four said
`Part of #N`: #3879, #3902, #3856 and #3868. Three named no issue:
#4487, #4124 and #5039. Nothing asked those three to look, since
`/developing-leaf` asks for `Closes #N` only of a session that starts
from a backlog item. Tend's nightly sweep reads a seventh of the open
issues each night, long after the diff has left the reader's context,
and, by the triage's count, it commented on none of them in ten nights.
The review is the step every change passes with its diff in hand.

The replay below sorts the seven more finely than the triage did. #4011,
#4036 and #4013 were settled by #3879, #4124 and #5039. #3902 did half
of #4023, whose five composition defects stayed open. #3856, #3868 and
#4487 each did one item of #4027, which is still open. For those four
the right description is `Part of #N` with what is left. A `Closes #N`
would have been wrong.

## Replay

Each case gets the rule as this branch ships it, together with
`running-tend`'s **Review threshold** section, which it competes with.
It also gets the PR's title, author, description and diff, capped at 80k
characters with vendored files left out, and every `backlog` issue open
when the PR merged, as it read then. That list is rebuilt from the
issues' creation and close times, label events and body edit history,
plus their comments up to the merge. Each case runs once through a
headless `claude -p` on `claude-opus-5-5` (the review's model), with no
tools, in a scratch home. The JSON verdict is graded against an expected
answer fixed before the run.

| PR | What it did | Expected | Result |
| --- | --- | --- | --- |
| #3879 | the play-through #4011 asked for | close #4011, or part with
its open decision left | pass: part, the decision and the home-page test
left |
| #3902 | #4023's touch-target half | part of #4023 | pass (also part of
#4027) |
| #3856 | #4027's Android back item | part of #4027 | pass |
| #3868 | #4027's Draw mode item | part of #4027 | pass |
| #4487 | #4027's lf-draft back item | part of #4027 | pass |
| #4124 | recorded the call that settled #4036 | close #4036 | **miss**:
read #4036 and judged the call unrelated |
| #5039 | one held-news count, #4013 | close #4013 | pass (also part of
#4012) |
| #5331 | removed #4060's premise | close #4060 | pass |
| #4643, #4718, #4847, #5020, #5252 | nothing in the backlog | nothing |
5 pass |
| #5441, #5446, #5454 | rightly a part of an open issue | that part | 3
pass |
| #4212 | rightly said `Closes #4037` | close #4037 | pass |

That is 6 of the 7 triage cases, the premise case, and 9 of 9 controls.
No run closed or named an issue it shouldn't have. #5020 is a hard
negative: it changes held-news notices, which #4013 is about, and the
run left #4013 alone. #4124's miss held in all three wordings tried. The
triage itself only inferred that the 2026-10-25 call in
`reading-place.js` covers #4036's case.

The clause for a removed premise or a recorded decision goes beyond the
two cases Max named. It is there because the triage closed several
issues as obsolete after a landed change removed their premise. Without
the clause, the #5331 run read #4060 and declined: "It only makes one
sentence of the issue's background out of date". With it, the run closed
#4060.

Two grades were corrected after the first run, each on evidence from the
record. #5252 says `Part of #5194`, but #5194 was labelled `backlog`
only on 2026-11-05, after #5252 merged. #5039 left a count that gains a
digit outgrowing its room, as its own `thread-card.js` comment says, and
#5288 fixed that on 2026-11-04, so `Part of #4013` naming that is also
right at merge time. The final wording closed #4013 anyway.

```sh
uv run python .tmp/replay/replay.py --jobs 4
uv run python .tmp/replay/replay.py --only 5331,4124 --rule-file .tmp/replay/arm-finishes-only.md --runs runs-finishes-only --results results-finishes-only.json
```

The final wording's 17 runs cost $6.75. All runs together cost $19.64,
across three wordings and the two-run ablation. The script, cases,
prompts, answers and results are in `.tmp/replay/` of the worktree that
wrote this PR, not committed. The last run used this text before one
sentence was split in two.

## Decisions Max may reverse

- **Where the rule lives.** It lives in `running-tend`, which only Tend
loads. `/developing-leaf`'s `Closes #N` under **Take a backlog item**
stays as it is. That rule claims an item early: the closing keyword is
what makes `TODO.md`'s `-linked:pr` query skip it. The review then
corrects a claim the change only partly fulfils to `Part of #N`.
Repeating the search in the author's skill would make every Leaf session
pay for a check the review already makes on every PR.
- **How it acts on others' pull requests.** The review asks and doesn't
edit, since the author owns the description and Leaf sessions rewrite it
whole from a file. The ask doesn't withhold approval. `tend-review` runs
on `opened`, `synchronize`, `ready_for_review` and `reopened`, not on
`edited`, so a held approval would wait for the next push. The review
approves with the ask as its body.
- **Scope.** Only issues labelled `backlog`. CI failure reports and
cause issues close by their own routes.

## Not verified

- **Use inside a full review.** The replay gives the section on its own,
with the backlog inline. It shows that the rule, once applied, picks the
right issue. It doesn't show whether a whole Tend review, with the
bundled review skill in context, remembers to apply it. Tend's next
reviews will show that.
- **What-is-left lists.** The replay leaves out the earlier PRs that
name each issue, which the rule tells the review to read. So its lists
repeat items that earlier parts had done. #5454's ask lists #4027 items
that #3856 and #3868 had finished.
- **Repeat runs.** Each case ran once.

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

Co-authored-by: Claude Opus 5.5 <[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