Repository navigation
Grade authoring samples in regrade.py, so every judge reads one set of page names - #6681
Merged
Merged
Conversation
…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.
leaf-agent
approved these changes
Nov 21, 2026
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]>
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.
Two copies built the pages an eval's live judge reads from a saved sample:
comparison_pagesindev/leaf_dev/regrade.py, for the pair and discovery judgments, anddev/leaf_dev/authoring_assertion.mjs, the Node assertion that grades a complete authoring case. They named the pages differently, so an authoring judge readfinalandbefore_decisionwhile the others readpageandpage_before_decision.The authoring assertion is now
regrade.authoring, a Python assertion besidepairanddiscovery. It reusescomparison_pagesandcomparison_handovers, takes its prompt and verdict schema fromevals/workflows/regrade.yaml, and returns the same result andmetadata.authoring_gradethateval reportreads. This removes the Node module and its node test,arrangement_eval.call_api, and the judge providereval runinjected 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 namepage_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.pypasses, including a new smoke test of the assertion with the judge replaced, and real Promptfoo loadsregrade.py:authoringthrough the catalog'sevals/../devpath and grades a stub sample. No live judge was run.