Repository navigation
Share one eval harness and one page-fixture builder - #1216
Merged
Merged
Conversation
Two pairs of copies from the concept survey, each cut over to one owner. Eval arms and children. `scripts/eval_harness.py` now builds every arm (the plugin payload at one git ref: manifest, hooks, launcher, skills, uv project) and every `claude -p` child (a scratch cwd outside any repository, project-only settings, no MCP servers, auto-memory off, and the running agent session's identity variables removed). `scripts/eval_claude_delivery.py` and `notes/arrangement-eval/harness.py` import it, and `evals/README.md`'s A/B recipe builds its other arm with `uv run scripts/eval_harness.py REF DEST`. Behaviour that moved: - The delivery eval's children ran from `.tmp/` inside the checkout. Claude Code loads every `CLAUDE.md` above the cwd, so both arms read this checkout's `CLAUDE.md`, and, because the checkout sits under `$HOME`, the user's `~/.claude/CLAUDE.md` as a project file. With auto-memory on, they also read the repository's memory. A probe child confirmed all three before the change; after it, one Haiku round of the delivery eval reports no memory paths, a cwd under the system temp directory, and the arm's payload as its only plugin. - The delivery eval compares BASE_REF with HEAD, both built as payload archives, instead of a `git worktree` of BASE_REF against the live checkout, so uncommitted edits are no longer measured. `arms.json` records both commits. - The arrangement harness's children and `leaf` calls no longer inherit the running agent session's variables (`CLAUDE_JOB_DIR`, `CLAUDE_EFFORT`, the session id), and the harness runs in the project environment instead of its own PEP 723 header, which it needs to import `leaf.host`. Page-fixture preparation. `test_page_fixtures_pass_check` and `test_every_seeded_fragment_passes_the_door_it_never_came_through` build their pages with `scripts/page_fixtures.prepare_page`, which gains an `each_version` hook the first test uses to run `version check` on every stamped version. The second test's own builder had diverged from `prepare_page` since #606 on three inputs: it always used `examples/layer.json` with no `--no-packages` fallback, always copied `examples/media`, and skipped a sibling `.page` directory. Nothing in the test or its history motivated those differences, and they agreed only because the one seeded page carrying message markup (`ship-review`) lives in `examples/` with the shared layer and media. Behaviour that moved in the tests: each version is now stamped, as preview and the site stamp it, rather than activated; the seed log goes in after the first stamp instead of before every version; and the door test walks every version instead of stamping only the current one. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 26, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 26, 2026
…s comment to an idle session (#1238) Two benchmark fixes from a survey of Leaf's measurement harnesses. **One site journey, not two.** `scripts/benchmark-site.py` ran the same `verify_agent_turn` journey as `verify_site.py --agent` and differed only in printing JSON. The agent pass now writes its progress and timings to stderr and one JSON sample to stdout, so the production gate and the benchmark are one run, and `benchmark-site.py` is deleted. `deploy-site-dev.sh` calls `verify_site.py ORIGIN --release … --agent`. Without `--release`, the agent pass reads the release from the origin's state as the benchmark did, so it still measures any origin (production included) with no local build. The sample's description moves into `verify_site.py`'s module header. **The delivery eval measured the wrong route and never ended a session.** `scripts/eval_claude_delivery.py` posted its comment 5 s after it saw the page URL, which was still inside the agent's setup turn. The `leaf wait` then ended mid-turn, the Stop hook delivered the comment, and the agent handled it in that same turn. The stream held one `result`, the `results > 1` close never fired, and every session ran out the 600 s limit (both arms of a first run did). The comment is now posted once the setup turn's `result` arrives, so it reaches an idle session through the background-task notification the docstring describes, and the scorer counts only notifications after that turn. A four-round A/A run on the fixed harness (both arms on the same plugin code) finished all eight sessions with no timeouts: | arm | pickup (s) | first reply (s) | |---|---|---| | base | 8, 8, 11, 9 | 10, 9, 13, 11 | | head | 6, 8, 7, 5 | 7, 10, 9, 7 | So the noise floor is about ±2–3 s at four rounds, and "actions before ack" read 1 in every run, which means it can't tell arms apart. Each session cost about $1, and the docstring now says so. That run predates #1216's child isolation. Tests: `test_the_agent_pass_emits_one_json_sample_for_local_and_remote_targets` replaces the benchmark CLI test. It asserts that stdout is only the JSON sample and that a remote agent pass needs no local manifest. The post-presentation wait test now reads its profile line from stderr. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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 pairs of copies from the concept survey, each cut over to one owner.
Eval arms and children.
scripts/eval_harness.pynow builds every arm (theplugin payload at one git ref: manifest, hooks, launcher, skills, uv project)
and every
claude -pchild (a scratch cwd outside any repository,project-only settings, no MCP servers, auto-memory off, and the running agent
session's identity variables removed).
scripts/eval_claude_delivery.pyandnotes/arrangement-eval/harness.pyimport it, andevals/README.md's A/Brecipe builds its other arm with
uv run scripts/eval_harness.py REF DEST.Behaviour that moved:
.tmp/inside the checkout. ClaudeCode loads every
CLAUDE.mdabove the cwd, so both arms read thischeckout's
CLAUDE.md, and, because the checkout sits under$HOME, theuser's
~/.claude/CLAUDE.mdas a project file. With auto-memory on, theyalso read the repository's memory. A probe child confirmed all three before
the change; after it, one Haiku round of the delivery eval reports no
memory paths, a cwd under the system temp directory, and the arm's payload
as its only plugin.
archives, instead of a
git worktreeof BASE_REF against the livecheckout, so uncommitted edits are no longer measured.
arms.jsonrecordsboth commits.
leafcalls no longer inherit therunning agent session's variables (
CLAUDE_JOB_DIR,CLAUDE_EFFORT,the session id), and the harness runs in the project environment instead
of its own PEP 723 header, which it needs to import
leaf.host.Page-fixture preparation.
test_page_fixtures_pass_checkandtest_every_seeded_fragment_passes_the_door_it_never_came_throughbuild theirpages with
scripts/page_fixtures.prepare_page, which gains aneach_versionhook the first test uses to runversion checkon everystamped version. The second test's own builder had diverged from
prepare_pagesince #606 on three inputs: it always usedexamples/layer.jsonwith no--no-packagesfallback, always copiedexamples/media, and skipped a sibling.pagedirectory. Nothing in thetest or its history motivated those differences, and they agreed only because
the one seeded page carrying message markup (
ship-review) lives inexamples/with the shared layer and media.Behaviour that moved in the tests: each version is now stamped, as preview
and the site stamp it, rather than activated; the seed log goes in after the
first stamp instead of before every version; and the door test walks every
version instead of stamping only the current one.
🤖 Generated with Claude Code