Repository navigation
Keep the branch, case and arm out of every path an eval agent reads - #6456
Merged
Merged
Conversation
`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.
leaf-agent
approved these changes
Nov 19, 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.
leaf-dev eval runkept 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 carriedleaf.recommended-option-chip, the fix's own name; an author's skill path also saidarms/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 nexteval rundeletes 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_runincommands/eval/run.py), which keeps a run as long as its worktree; andleaf-assets.jsonmoves to a pin whose only change is the audit fixture'scandidates.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.pypasses.