Skip to content

Say that a deletion under its scored figure can still be worth taking - #773

Merged
max-sixty merged 2 commits into
mainfrom
deps-next
Sep 17, 2026
Merged

max-sixty merged 2 commits into
mainfrom
deps-next

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

The cutover preamble in TODO.md scored candidates by lines deleted, which is what made the survey's rows read as worth more than they were. psutil's region was measured at 130 lines and the swap deleted 56 of them, and it was worth taking for the kind of code it removed: two platform doors of hand-laid proc_pidinfo and sysctl struct layouts through ctypes. The preamble now says that, so the next row is scored against the same standard.

🤖 Generated with Claude Code

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

The cutover preamble scored candidates by lines deleted, which is what
made the survey's rows read as worth more than they were. psutil's 56
lines were two platform doors of hand-laid `proc_pidinfo` and `sysctl`
struct layouts through ctypes, and that is the reason to take a row whose
count comes out flat.

Co-Authored-By: Claude Opus 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 sentence's example doesn't demonstrate the count it claims. In the paragraph's own accounting psutil is a 56-line deletion, and paying for the dependency still leaves it one: #753's uv.lock grew 160 lines for its three new packages, about 35 of them psutil's own block, so that swap took roughly 20 lines out of the tree. The +138 in the description is the whole five-swap commit, and uv.lock's +160 more than accounts for it — the rest of that tree nets −22 — so it isn't the psutil row's figure either. Scoring the next row against "flat" means re-deriving what it counts over.

The inline suggestion says what psutil does show while keeping the point that the kind of code decides it. If the flat total is the point you want instead, it needs the figure that carries it and a note that it is the cutover program's number rather than a row's.

Comment thread TODO.md Resolved
The example claimed a flat count, which psutil is not: it deleted 56 lines,
about 20 of them net of its own lockfile block. The point is that a deletion
well under the scored figure can be worth taking for the kind of code it
removes.

Co-Authored-By: Claude Opus 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 commit fixed the preamble but left the title and description arguing the version it replaced. What landed is about a deletion falling short of its scored figure — 56 of a measured 130 — while the title says a flat line count and the body says "#753 came to +138 lines net and was still worth taking, because psutil's 56 lines were …", then "The preamble now says so." The preamble no longer says that, and the +138 is the five-swap commit's total rather than the psutil row's figure, as the earlier review set out. Squash-merge takes the title and body verbatim as main's commit message, so both claims land in history. Retitling around the scored figure and pointing that middle sentence at 56-of-130 would leave the message describing the diff.

@max-sixty max-sixty changed the title Say that a swap can be worth a flat line count Say that a deletion under its scored figure can still be worth taking Sep 17, 2026
@max-sixty
max-sixty merged commit 80c26f0 into main Sep 17, 2026
5 checks passed
@max-sixty
max-sixty deleted the deps-next branch September 17, 2026 23:46
max-sixty pushed a commit that referenced this pull request Sep 18, 2026
The nightly leg of `ci` on `main` went red on
[run
35295861023](https://github.com/max-sixty/leaf/actions/runs/35295861023):
`test_tab_extends_the_comment_with_individual_emoji_buttons` opened the
command
reference expecting its `z` row to read
`Take back: shorten on “The store is capped…`, and read a register of 81
commands with no such row. The case now opens the reference from the
moment the
page says the press is live, which is the fact the row states.

That row is dead until the page has taken in a log reading that accounts
the
reader's own send. `history.undo`'s `when` clause asks
`!unaccountedGesture() && Boolean(undoable())`

([`keyboard/page.js:1178`](https://github.com/max-sixty/leaf/blob/8d8bec8005c970234abd5f33415c25463a09aa01/skills/leaf/assets/runtime/keyboard/page.js#L1178)),
and `undoable()` reads the server projection `runtime.view.undo` and
answers
null while a state is still being applied

([`projection/commands.js:19`](https://github.com/max-sixty/leaf/blob/8d8bec8005c970234abd5f33415c25463a09aa01/skills/leaf/assets/runtime/projection/commands.js#L19)).
The case pressed `?` straight off `painted()` — the forward paint the
reaction
makes in the turn it sends, a turn before that reading arrives — and the
register is built at the press, so the sentence it asserts could not be
in it.

`render_harness.undo` already carries this exact hazard for the `z`
press
itself, and waits on the line offering the chip: the line and the
dispatcher ask
one predicate, so the chip standing on the line is the page saying the
press
will be taken. This case waits on the same fact one step earlier, before
opening
the reference that names it.

Not caused by `8d8bec80`, the commit this run reports on. The ordering
was never
stated; #774 (`145da07d`, serving each page through starlette and
uvicorn) moved
the timing into the window it left open. CI says the same on its own:
the
nightly leg of `145da07d`'s
[run
35289151800](https://github.com/max-sixty/leaf/actions/runs/35289151800)
failed this case with this message, and the last green `main` nightly
before it
is `f292b4d2`
([run
35282456731](https://github.com/max-sixty/leaf/actions/runs/35282456731)).
`dc694cd8` and `80c26f0f` sit between them and were replaced before
their
nightly ran, so CI has no reading on either; the local repeats below
cover that
gap.

<details><summary>Measurements</summary>

All on this runner, `-n0 --run-nightly`, one node id.

At the old press point the press was dead in 6 of 6 runs, and the new
wait
returned 3–117 ms later — so the case was green only when the reading
happened
to land inside the poll of the `to_be_hidden()` above it. Reopening the
reference 1.5 s after a failing read showed 82 commands, so the row was
merely
late rather than absent.

Where the window opened, by repeat runs of the case alone:

| commit | result | per run |
| --- | --- | --- |
| `43d92073` (#767) | 4 passed | 3.8 s |
| `80c26f0f` (#773) | 4 passed | 3.8 s |
| `145da07d` (#774) | 3 failed, 1 passed | 4.8 s |
| `8d8bec80` (#776) | 1 failed | 4.8 s |
| `e382d828` (`main`) | 2 failed, 1 passed | 4.8 s |

</details>

Checked: the case 6/6 green with the change,
`tests/test_render_reactions.py`
under `--run-nightly` (50 passed), and `pre-commit run --files
tests/test_render_reactions.py`. The everyday suite ran 1130 passed / 5
failed
here, and all five are this sandbox rather than the change — three
`test_interact_session.py` cases that need a writable `/tmp` for their
private
unix socket, `test_staged_writes_honor_umask`, and

`test_live_shell_artifact.py::test_a_browser_executes_the_published_capture_with_live_api_routes[True]`
on its node bundle step. The `test` job of the run above is the Linux
control
and was green on this commit; this change touches only a nightly-only
file.

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