Skip to content

Share one eval harness and one page-fixture builder - #1216

Merged
max-sixty merged 1 commit into
mainfrom
agent-aa8b91f843fb365b1
Sep 26, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-aa8b91f843fb365b1

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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.

🤖 Generated with Claude Code

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]>
@max-sixty
max-sixty merged commit a74b083 into main Sep 26, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-aa8b91f843fb365b1 branch September 26, 2026 16:32
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]>
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