Repository navigation
Make each eval experiment a Promptfoo config: state the rule, retire widget formats, run UI review on Promptfoo's hooks - #5442
Merged
Conversation
…widget formats, run UI review on Promptfoo's hooks dev/AGENTS.md gains "Experiments": an experiment is a folder under evals/ with its own Promptfoo config and pnpm script, a leaf-dev command exists only for a mechanism two experiments share, and code names models only through MODELS, JUDGE_MODELS and the new COMPARED_MODELS in arms.py, which Node code reads through dev/leaf_dev/arms.mjs. Widget formats is retired: eval-widget-formats, widget_format_eval.py, evals/widget-formats/, the json/adaptive/formats conditions of leaf-dev eval with their checks and metadata fields, their test, and the adaptivecards dependency. eval-ui-review becomes evals/ui-review-detection/promptfooconfig.mjs with a beforeAll that stages the public fixtures, captures each candidate's views and source and asserts its frozen contrast, and an afterAll that retires the judge's login seed and counts each column's grades. Columns are MODEL/ARM over the four reviewers the command offered and four arms; Promptfoo's filters replace --model, --condition and --mode. The candidate's browser reads the copied site by Playwright routing in place of a loopback server. The run-directory snapshot, its hash and environment records, --prepare-only (now the node smoke test) and the unused no-tools discovery arm are gone. Test vars are stable across runs, so Promptfoo's --filter-failing and its viewer match rows from earlier runs. Control legibility reads its reader and judge models from arms.py, and its column names the pinned model. The plain-HTML control now needs index.html to count as page-valid.
…est brings them under dev/tests/node/test_ui_review_setup.cjs imports the config and its hooks, so build/tsconfig.json's checkJs now reaches provider.mjs. JSDoc names the SDK types it passes, and the page-side readiness test is a string expression. Behavior is unchanged.
leaf-agent
approved these changes
Nov 5, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 5, 2026
…e, and make the experiment rule true (#5450) Four things left over from #5442. This is developer tooling only, +30 / −15 lines. **A bare UI review run costs what the command's default did.** `pnpm run eval:ui-review` took every column after #5442: 160 reviews and 160 judge calls, against 20 of each for the old command's default. The script now passes `--filter-providers 'sol/(no-tools|browser)$'`, which selects `gpt-6.1-sol/no-tools` and `gpt-6.1-sol/browser`. A `--filter-providers` the user adds replaces it, because commander keeps the last value, and `--filter-providers .` takes all 16 columns. The README says so. If the Codex pin ever stops being named `sol`, a bare run prints "No providers matched" and spends nothing. **`pnpm run eval:legibility` runs again.** Its capture refused because `actions.json` had no line for `back`, `delete`, `menu` or `move` and kept a stale `done`. Each new line comes from where the action is offered: the floating panel's "Back to …", a rewrite's Save once its box is emptied, the leaf press, and a board card's grip. The capture also drew the Page menu's leaf as a bare square, because the mask that gives it its mark is scoped to `.lf-chrome`. Each press now stands under that scope, so the sheet shows what a user sees. **The model rule is true as written.** `leaf-dev claude-code-session` was the one tool picking a model outside `arms.py`, and it now reads `MODELS["claude-code-session"]`. `dev/AGENTS.md` now says developer tooling picks the model it runs through `arms.py`, and that a table keyed by model id, such as `fork_eval.PRICES`, looks up what a run already used. The only model literals left in `dev/`, `evals/` and the skills are those pins, that table and a recorded trace's field in test data. **The rule says when an experiment leaves.** Its folder and script stay while someone will run them again. Once it has answered its question they are deleted, and the pull request names the last commit that holds them. `evals/ui-review-detection/README.md` now says why that set is still kept, in place of "We generally do not keep model evals of maintainer development work". ## What I ran - **Filter:** the script's own text through the real Promptfoo CLI, on free `echo` providers wearing the real config's labels. Bare selected the two Sol columns (20 reviews). `.` selected 16 columns, `/discovery$` 4, `/(no-tools|browser)$` 8 and `sol/code-only$` 1, and `--filter-targets` overrode it the same way. Applying the filter to the real providers' ids selected the same two columns. `pnpm run eval:ui-review --filter-providers NOMATCH` on the real config ran no reviews. - **Legibility, real sample:** `pnpm run eval:legibility`, from capture through reader and judge, with its models read from `arms.py` (provider `control-legibility:claude-opus-5-5`). 31 of 34 controls read correctly. The misses were Fit ("Enter fullscreen or focus mode"), Next match ("Expand a section or open a dropdown") and Page menu ("Can't tell; feather, maybe app logo"). Readings vary from run to run, and the script exits 100 whenever any control is misread. Back, Delete and Move all matched. Against the capture before the scope change, only the 32×32 box around the leaf differs. - **Session:** `uv run leaf-dev claude-code-session` started a real session on `claude-sonnet-5-5`, per its process arguments and banner, and `--stop` ended it. - **Checks:** `pnpm run check:tools`, the affected `dev/tests/test_evals.py` tests, and pre-commit on every changed file. > _This was written by Claude Code on behalf of max-sixty_
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.
An experiment is now a folder under
evals/holding a Promptfoo config, with noleaf-devcommand of its own. This change writes that rule intodev/AGENTS.md, retires the widget-format experiment, and moves UI review detection onto Promptfoo's own setup and teardown hooks.leaf-devgoes from 30 commands to 28 (eval-widget-formatsandeval-ui-revieware gone),leaf-dev eval --conditionlosesjson,adaptiveandformats, and theadaptivecardsdev dependency goes. Net change: +633 / −2,573 lines, of which Python code is +64 / −1,531.The rule
dev/AGENTS.md, "Experiments": the catalog (evals/<task>/case.yaml) runs throughleaf-dev eval, and any other question put to a model is an experiment, a folder underevals/with apnpm run eval:<name>script. Its arms are providers, its samples tests and its graders assertions. Setup and summaries for the declared tests go inbeforeAll/afterAll, and setup that produces the tests runs in the script before Promptfoo. A new comparison is another provider, never a--conditionvalue. A mechanism stays in its experiment's folder until a second experiment needs it. Code names a model only throughMODELS,JUDGE_MODELSand the newCOMPARED_MODELSinarms.py. Node code reads them throughdev/leaf_dev/arms.mjs, which runspython -m leaf_dev.arms.leaf-dev eval --modelstays. A person running the catalog passes it, and Promptfoo's run store shows 33 runs between 23 October and 1 November that used it, 24 of them withgpt-6-sol.Widget formats, retired
#4299 added this experiment to ask whether an agent writes a Leaf widget more reliably as HTML or as an equivalent JSON tree. All four of its runs predate its merge on 28 October, and none has run since. Removed:
eval_widget_formats.py,widget_format_eval.py,evals/widget-formats/, thejson/adaptive/formatsconditions withpreflight_formatsand their branches inauthoring_eval.py, its test, and its README passages. Theformat-validandinteraction-provenchecks and theformat_output/interactionmetadata fields existed only for those conditions.To restore it: bf2650b,
mainas this merged, is the last commit that holds it.Then bring back its conditions in
dev/leaf_dev/commands/eval.pyanddev/leaf_dev/authoring_eval.py, andadaptivecardsinpackage.json, from the same commit.UI review as a config
evals/ui-review-detection/promptfooconfig.mjsis the whole experiment. A column isMODEL/ARM: the four reviewers the command offered (each harness's author and judge pin, plus Fable inCOMPARED_MODELS) on each of four arms (no-tools,browser,discovery,code-only). Promptfoo's own--filter-providers,--filter-patternand--repeatreplace the command's--model,--condition,--modeand--repeat. A bare run takes every column; the command's default was Sol on two arms. Each test's vars are{prompt, candidate}, which stay the same from run to run, so Promptfoo's viewer and--filter-failingmatch rows across runs.hooks.mjs:beforeAllcopies the public fixtures and the pinned timeline bundle. It then captures each selected candidate's labelled views and source and asserts the frozen contrast on each, so a broken fixture stops the run before a model is called. Last, it seeds the judge's Codex login.afterAllretires the seed and writes and prints each column's counts. The candidate's browser answers requests from the copied site by Playwright routing, which replaces the loopback server and its private-path probe. The captures now use the same Node Playwright build as the reviewer's browser tool.Dropped with the command:
frozen-hashes.json,integrity.json,environment.json,run.jsonand the fixture sha256 table. Git and the lockfile hold those inputs, and the run's description names its commit (git describe --dirty).--prepare-only: replaced bynode --test dev/tests/node/test_ui_review_setup.cjs, which runs the real setup on all ten candidates.Other fixes in touched files
arms.py, its column shows the pinned model, and its config setssharingandcacheitself.index.htmlto count as page-valid. Before, an empty page directory passed on the static server's 404 page.build/tsconfig.json) now reachesprovider.mjstoo. JSDoc names the SDK types it passes; behavior is unchanged.What I ran
no-toolsandbrowser, Opus onbrowser, and Sol ondiscoveryandcode-onlyfor the defect. That is 8 cells each. Every cell has an identical request digest, image count and native harness on both sides, and every cell got the same detection and false-alarm grade. The no-tools and code-only arms sent the same input token counts (4,192 and 3,745), so their inputs were byte-identical. Browser arms differ only in the model's own operation count. One config sample (Opus/browser, control) had an unsupported observation: the reviewer overstated which messages it had copied.main(Pi 1.5.0):pnpm run test:evals, Sol onno-toolsandcode-only(both graded, no login seed left behind), and the control-legibility reader and judge on one sample.uv run pytest dev/tests/test_evals.py -n0, selecting the tests the removal touches,pnpm run check:toolsandcheck:browser, and pre-commit on every changed file.tests/model/test_receipts.py::test_ack_rearm_reports_when_its_only_page_transfers_after_selection, was aJSONDecodeErrorreading a session record. It passes 3 of 3 locally, and this change touches nothing undersrc/ortests/.pnpm run eval:legibilitystops in its capture step onmainas well.evals/control-legibility/actions.jsondoesn't matchACTIONSinbrowser/runtime/icon-paths.js:back,delete,menuandmovehave no line, anddonehas a line but no action. This change touches none of those files.