Skip to content

Fold verify-site-local.sh into verify_site.py wrangler, and give the delivery eval an ack reading and a mid-turn case - #1240

Merged
max-sixty merged 3 commits into
mainfrom
benchmarks-survey
Sep 26, 2026
Merged

max-sixty merged 3 commits into
mainfrom
benchmarks-survey

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Two follow-ups to #1238's benchmark survey.

verify-site-local.sh becomes verify_site.py wrangler. The shell script started wrangler dev with prewarm off, polled it, ran verify_site.py, and printed the Worker log on failure, which is the same lifecycle local_adapter() already ran in Python for the local target. Both targets now share serving (start, wait for readiness, terminate) and logged (collect output, print it beside any failure). CI, publish-site, AGENTS.md, scripts/AGENTS.md, and /developing-leaf call the new target. It also removes its own containers once wrangler exits: wrangler dev 4.130 stops each session's container but leaves its proxy-everything sidecar running, and no later run reclaims it, so each local run used to leak about three running containers. To tell its containers from those of another wrangler dev of this Worker (such as npm run dev in worker/), the run serves under a Worker name of its own, lv<pid>, which workerd puts in every container's name. Verified with real runs through Docker, including one beside a stand-in container named like another run's, which survived.

The delivery eval gets a sharper per-comment reading and a mid-turn case. "Actions before ack" read 1 in every run because the one action was always the expected read of the wait's output, so it had no range. It is replaced by ack, the seconds from the delivery reaching the agent to its pickup (the agent's own share of pickup time), and extra, anything run before leaf wait --ack other than that read. Cases:

  • idle: a comment after the setup turn ends, then a second once that turn has ended, which only arrives if the ack re-armed the wait;
  • mid-turn: a comment posted while the setup turn runs, which the Stop hook carries in.

The children now run with --include-hook-events, each stream record carries the time it was read, and ROUNDS drops to 2. One A/A round (same plugin in both arms):

session route pickup reply ack extra
base idle #1 / #2 notification 6 s / 5 s 9 s / 8 s 5 s / 5 s none
head idle #1 / #2 notification 5 s / 5 s 11 s / 8 s 5 s / 4 s none
base mid-turn Stop hook 10 s 13 s 6 s read two references first
head mid-turn Stop hook 8 s 13 s 4 s none

On idle comments nearly all of pickup is the agent's own time; the notification lands within a second of the comment.

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

max-sixty and others added 2 commits September 26, 2026 13:17
…eval a mid-turn case

`verify_site.py wrangler` now runs a pass against the built site through
`wrangler dev` with prewarm off, the check `verify-site-local.sh` ran. It
shares one server lifecycle (`serving`, `logged`) with the `local` target:
start, wait until ready, print the server's log beside any failure, stop.
CI, publish-site, and the docs call the new target.

The delivery eval's "actions before ack" read 1 in every run because the one
action was the expected read of the wait's output. It is replaced by `ack`,
the seconds from the delivery reaching the agent to its pickup, and `extra`,
anything run before the ack other than that read. The eval now runs two
cases: `idle`, whose second comment checks that the ack re-armed the wait,
and `mid-turn`, where the Stop hook carries a comment posted while the setup
turn runs. It saves hook events and a receive time for each stream record,
and runs two rounds.

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

Wrangler stops each session's container on exit but leaves its
proxy-everything sidecar running, and a later run doesn't reclaim it, so
every local run leaked about three running containers. local_worker now
removes the Worker's containers that started during its run.

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 cleanup can remove a container owned by another local Worker run. page_containers() lists every running workerd-leaf-website- container on the machine, so one started by another run during this verification appears in page_containers() - before and is passed to docker rm --force. This can interrupt another worktree's active preview or verification. The cleanup needs container ownership tied to this Wrangler process rather than a machine-wide before/after set.

Comment thread scripts/eval_claude_delivery.py Resolved
…de the ack

verify_site.py wrangler removed every running workerd-leaf-website- container
that appeared during its run, which could include one another wrangler dev of
this Worker started, such as worker's npm run dev. The run now serves under a
Worker name of its own (lv<pid>), which workerd puts in each container's name,
and removes only containers carrying it.

The delivery eval's scorer stopped at the stream record holding the ack
without counting the calls that record made before it, so a Read and the ack
in one record scored extra none.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 98adc8a into main Sep 26, 2026
6 checks passed
@max-sixty
max-sixty deleted the benchmarks-survey branch September 26, 2026 21:12
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