Skip to content

Keep the branch, case and arm out of every path an eval agent reads - #6456

Merged
max-sixty merged 2 commits into
mainfrom
eval-samples-outside-checkout
Nov 19, 2026
Merged

max-sixty merged 2 commits into
mainfrom
eval-samples-outside-checkout

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

leaf-dev eval run kept each run under the checkout's .tmp/eval/, so every path an eval agent read named the branch under test, and sample, page and fixture directories named the case or task, whose names describe the behavior being measured. Scoring #6443, every turn-end-check prompt carried leaf.recommended-option-chip, the fix's own name; an author's skill path also said arms/head.

Following Promptfoo's model (per-step workspaces with generic names under the OS temp dir, its record in ~/.promptfoo), a run now lives in $XDG_STATE_HOME/leaf-dev/eval/, linked from .tmp/eval/<run>, and the next eval run deletes a stored run whose link is gone. Arms, samples, native-probe pages and regrade evidence take random names; a task's fixtures sit at the root of the agent's working directory, and six prompts now name them that way. Child environments drop variables naming the checkout.

To weigh: the link-based deletion (stored_run in commands/eval/run.py), which keeps a run as long as its worktree; and leaf-assets.json moves to a pin whose only change is the audit fixture's candidates.json.

Asked for by Max. Checked with a fork, two authoring cases (one with its page-defects judge) and a native probe: no prompt, transcript or stream names the worktree, case or arm. dev/tests/test_evals.py passes.

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

`leaf-dev eval run` kept each run under the checkout's `.tmp/eval/`, so the paths agents read named the branch under test: the fork's page in its prompt, an author's plugin ("Base directory for this skill: …/leaf.<branch>/.tmp/eval/run-…/arms/head/skills/leaf", which also names the arm), state homes, judges' evidence directories and the Playwright CLI. Sample directories took the case's name, native probes' pages `pages/<case>`, and task fixtures `evals/<task>/`, which six prompts quoted; case and task names describe the behavior under test. On 2026-11-18 every turn-end-check prompt scoring #6443 carried `leaf.recommended-option-chip`, the name of the fix being measured.

Promptfoo runs each agentic step in a generically named directory under the OS temp dir and keeps its record in its own home, `~/.promptfoo`. A run now lives in `$XDG_STATE_HOME/leaf-dev/eval/` (`leaf_dev.state_home()`, which journey's sample log now shares), linked from `.tmp/eval/<run>`; the next `eval run` deletes a stored run whose link is gone, so a run lasts as long as its worktree. Arms, samples, native-probe cwds and pages, and regrade evidence take random names. A task's pinned files are copied to the root of the agent's working directory (`arms.stage_task_files`), and the six prompts name them by those paths; the audit fixture's `candidates.json` was republished to leaf-assets with the same change. The Playwright CLI runs from a copy in the agent's cwd, since Node resolves links and the CLI prints its own location. Child environments drop variables and PATH entries naming the checkout and the Codex companion plugin's session variables, and name uv's interpreter by its resolved path.

Building in a temporary directory and moving the run into `.tmp/eval` afterwards was rejected: the records keep absolute paths that agents also read, so no rewrite keeps them both true and resolvable.

Verified: a turn-end-check fork, an authoring case with its page-defects judge, a native probe and an authoring case that read staged fixtures; no prompt, transcript or stream names the worktree, case or arm. Tests cover the run's location, link-based deletion, the paths providers are given, and the child environment.
@max-sixty
max-sixty merged commit 795467e into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the eval-samples-outside-checkout branch November 19, 2026 02:38
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