Skip to content

Grade authoring samples in regrade.py, so every judge reads one set of page names - #6681

Merged
max-sixty merged 1 commit into
mainfrom
placement-cards-slim
Nov 21, 2026
Merged

max-sixty merged 1 commit into
mainfrom
placement-cards-slim

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Two copies built the pages an eval's live judge reads from a saved sample: comparison_pages in dev/leaf_dev/regrade.py, for the pair and discovery judgments, and dev/leaf_dev/authoring_assertion.mjs, the Node assertion that grades a complete authoring case. They named the pages differently, so an authoring judge read final and before_decision while the others read page and page_before_decision.

The authoring assertion is now regrade.authoring, a Python assertion beside pair and discovery. It reuses comparison_pages and comparison_handovers, takes its prompt and verdict schema from evals/workflows/regrade.yaml, and returns the same result and metadata.authoring_grade that eval report reads. This removes the Node module and its node test, arrangement_eval.call_api, and the judge provider eval run injected into each authoring assertion. Promptfoo sets no time limit on a Python assertion, so the provider's 30-minute timeout has no counterpart. The two rubrics that named "the before_decision page" now name page_before_decision.

Authoring scores from earlier runs were judged under the old page names. Within one run both arms see the new names.

Checked: dev/tests/test_evals.py passes, including a new smoke test of the assertion with the judge replaced, and real Promptfoo loads regrade.py:authoring through the catalog's evals/../dev path and grades a stub sample. No live judge was run.

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

…f page names

The live quality assertion of a complete authoring case was a Node module,
dev/leaf_dev/authoring_assertion.mjs, that built its own page roles from the saved
sample and called arrangement_eval.call_api as a Promptfoo provider. regrade.py
built the same roles for the pair and discovery judges under other names, so an
authoring judge read `final` and `before_decision` while the others read `page`
and `page_before_decision`.

`regrade.authoring` is now that assertion, a Python one beside `pair` and
`discovery`: it reuses comparison_pages and comparison_handovers, takes its prompt
and verdict schema from regrade.yaml, and returns the same result and
`metadata.authoring_grade` the report reads. The Node module, its node test,
call_api and the judge provider `eval run` injected into each such assertion are
gone; a Python assertion has no time limit in Promptfoo, so the provider's
30-minute timeout has no counterpart. The rubrics that named the
before_decision page name page_before_decision.

Authoring scores from earlier runs were judged under the old page names.
@max-sixty
max-sixty merged commit 48a61a0 into main Nov 21, 2026
6 checks passed
@max-sixty
max-sixty deleted the placement-cards-slim branch November 21, 2026 21:31
leaf-agent added a commit that referenced this pull request Nov 22, 2026
…ce (#6722)

Three evals had drifted from the code they test. This brings each back
in line.

- **`control-legibility` couldn't start.** `views.py` exits when
`actions.json` and `ACTIONS` in `browser/runtime/icon-paths.js`
disagree. #6679 and #6687 added four presses to `ACTIONS`
(`resume-writing`, `restore-edit`, `show-annotations`, `show-changes`)
that `actions.json` didn't have. Each now has a line saying what
pressing it does, taken from the notice that offers it (`drafts.js`,
`thread/message-edit.js`, `annotation-layer.js`, `since-seen.js`). A
Node comparison of the two key sets now comes back empty.
- **Two rubrics failed pages that follow the shipped guidance.**
`proposals-get-individual-decisions` (`recommendation-markers`) and
`options-stay-words-for-wording` (`comparison-labels`) still asked for a
"recommended small.lf-tag". Since #6289, the advice marker is the
`recommended` attribute on the `lf-option`, which draws the badge;
`authoring-on-me.md` and the `lf-option` registry entry both teach it.
#6715's rename to `lf-tag` carried the stale requirement forward. Both
rubrics now ask for `recommended`. This only corrects a fact, so there's
no instruction scoring. The header of
`proposals-get-individual-decisions` still calls compact recommendation
markers a known failure, and that may have been this mismatch; the next
run of the case will show whether it holds.
- **`evals/README.md`** still described the JavaScript assertion that
#6681 replaced. Complete authoring tasks now grade with the Python
assertion `regrade.py:authoring`.

No regression test is added. `views.py`'s own startup check is what
reports `actions.json` drift, and a suite test would charge every new
icon action for an experiment. `dev/tests/test_evals.py` passes and both
case files parse.

Co-authored-by: leaf-agent <[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