Repository navigation
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
Merged
Conversation
…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
reviewed
Sep 26, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
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.
…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]>
leaf-agent
approved these changes
Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to #1238's benchmark survey.
verify-site-local.shbecomesverify_site.py wrangler. The shell script startedwrangler devwith prewarm off, polled it, ranverify_site.py, and printed the Worker log on failure, which is the same lifecyclelocal_adapter()already ran in Python for thelocaltarget. Both targets now shareserving(start, wait for readiness, terminate) andlogged(collect output, print it beside any failure). CI,publish-site,AGENTS.md,scripts/AGENTS.md, and/developing-leafcall the new target. It also removes its own containers once wrangler exits:wrangler dev4.130 stops each session's container but leaves itsproxy-everythingsidecar 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 anotherwrangler devof this Worker (such asnpm run devinworker/), 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), andextra, anything run beforeleaf wait --ackother 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, andROUNDSdrops to 2. One A/A round (same plugin in both arms):On idle comments nearly all of pickup is the agent's own time; the notification lands within a second of the comment.