Repository navigation
feat(eval): gate CI on the flagship agent's outcome-scored tasks - #4007
Conversation
CI measured only ChatAgent answering questions about documents. Nothing ran the flagship GaiaAgent, and nothing checked that its code changes actually work. `gaia eval tasks` gives the flagship real work in a fresh copy of a small project and scores what the project does afterwards: its tests, plus a probe run inside it. Claude grades quality with no tools. A gate compares passes, quality, honesty, tokens and steps with committed expectations. - The run step removes the judge's credentials from its own environment, and the agent may touch only its task's copy of the project. - The judge reads the original project, the answer and the diff, so it can check claims without tools. It runs in an empty directory. - The eval workflow gains a flagship-tasks job on GAIA's embedded Lemonade, running the 4-task core suite. Its artifact is the scorecard plus proposed expectations; committing those switches the gate on. - Tests prove every coding task fails on the untouched project and accepts a reference solution, and every question task accepts its reference answer.
Request changesThis adds a CI job that gives the flagship agent four real tasks in a throwaway sample project and scores what the finished project actually does, with Claude grading quality and a gate on passes/quality/honesty/tokens/steps. The design is genuinely good — outcome scoring instead of an LLM's opinion, the agent and the judge kept in separate environments, and reference solutions proving every coding task fails before the work and passes after it. Three things should be sorted before merge. Turning enforcement on today guarantees a red build. No expectations file is committed yet, and the job shares the repo's existing An outage reads as a quality regression. If Lemonade or the model backend dies mid-run, every task is recorded as an error and the gate reports "0/4 passed" — the same verdict a genuinely bad agent change would get. The harness already counts these errors separately; nothing acts on the count. The sibling eval job distinguishes infrastructure failures from verdicts, and this one should too. Two of the question tasks can be passed by saying almost nothing. Their pass check is "does the answer contain one of these words", and the word lists are broad enough that a single generic sentence clears the bar. The coding tasks are held to "must fail before the work, must pass after it"; the question tasks only get "the model answer passes, an empty string doesn't". Adding a plausible-but-wrong answer that must fail would close the gap and keep the passed-count metric meaningful. Real-world evidenceN/A — no evidence bundle was produced for this run, so the verdict rests on static review plus the checks I could run locally here: the new files parse, the judge's no-tools invocation is valid against the installed Claude CLI, and the workflow's ASCII/action-version conventions match the rest of the repo. I could not run pytest (not installed in this environment). The PR's test plan describes an end-to-end run on Kimi K2 (4/4 passed, judge graded all four, propose→enforce round-tripped) but doesn't show the output. Since this ships a new CLI surface, pasting the actual 🔍 Technical detailsIssues🟡
if checks is None:
problem = f"No expectations at {expect_path}. ..."
...
elif args.enforce:
sys.exit(1)With 🟡 Backend failures are scored as agent regressions (
🟡
The test file gives mechanical tasks a negative control ( Nits🟢 🟢 🟢 🟢 🟢 The new job has no Strengths
|
… run The gate now also fails when total runtime grows past its limit (50% headroom: runtime includes the model load, so it swings more than tokens). The expectations file carries main's measured results, overall and per task, with the commit and runner they came from, so every report reads main | this run | limit. The limits still move only through a reviewed commit.
…verdicts Addresses review on amd#4007. - Question tasks pass on the judge's verdict against plain-language required points, instead of keyword lists that a vague answer could clear. Each question carries a reference answer and wrong answers; a live check (GAIA_EVAL_LIVE_JUDGE=1) requires the judge to pass every reference and fail every wrong answer. - The judge grades every task in one call with the project sent once, so a run costs one call instead of one per task. Only tasks without a usable grade are retried. - A task the model backend could not serve (a ConnectionError) is "not measured": the gate reports an infrastructure failure, not a regression, and no expectations are proposed from that run. - A model with no committed expectations is reported, never failed, so enforcing cannot turn every run red before the first file lands. A named --expect file that is missing is an error. - CI always enforces the flagship gate; agent-eval waits for this job so the shared runner runs them in a fixed order, and the timeouts are tighter. - Nits: "—" instead of "None" for an unjudged run, an empty suite is refused, IGNORED is public.
|
All three points are addressed in 26be278, plus the nits. I also pasted real run output below, as you asked.
🔍 Technical details
Evidence. Kimi K2 via Lemonade on the Live judge calibration ( Tests: |
|
🟡 The warning printed when the judge fails says "counts them as unmeasured", but that is now false — and it directly contradicts the gate table the developer sees immediately below it. The latest commit introduced a strict distinction between "unmeasured" (backend unreachable, A developer debugging CI sees "unmeasured" in the warning, looks for infrastructure problems, but the table says the backend was fine. The fix is to update the message to say what actually happens. 🔍 Technical details
The word "unmeasured" now has a precise meaning in this codebase: |
Same fix as amd#4001's scan: zero files scanned is a warning, not a clean result, and the scan and upload lists point at each other.
"Unmeasured" now means the model backend was unreachable. A task the judge could not grade fails the quality and misreport checks, and an ungraded question counts as not passed; the warning says that.
|
Fixed: the warning no longer says "unmeasured", which now only means the backend was unreachable. It says what actually happens: until a re-run grades them, the tasks fail the quality and misreport checks, and an ungraded question counts as not passed. 🔍 Technical details
|
CI never ran the flagship GaiaAgent, and never checked whether its code changes work. The only agent eval is ChatAgent answering questions about documents, scored by an LLM's opinion. This adds a CI job that gives the flagship four real tasks: explain a file, fix a bug with a regression test, build a weekly CSV report, and add an env-var config option. Coding tasks are scored by what the finished project does; question tasks are decided by the judge against the points a correct answer must establish. Claude grades quality in one call, and the job fails on a missed expectation for passes, quality, honesty, tokens, steps or runtime. Every report puts main's committed results beside the current run. It runs on GAIA's embedded Lemonade, in the same report-by-default /
enforcepolicy as the existing categories.The first run on current main already finds real problems. Kimi K2 passed all 4 tasks, but quality was 3.4/5: pytest was refused before it ran, stray
.bakfiles were left behind, and one answer claimed "all tests pass" while admitting pytest never ran.🔍 Technical details
gaia eval tasks run | judge | gateinsrc/gaia/eval/flagship_tasks.py. Tasks and thecore(4) andfull(8) suites live ineval/tasks/tasks.json; the fixture project iseval/tasks/toybox.allowed_pathsis exactly that copy.runpopsCLAUDE_CODE_OAUTH_TOKENandANTHROPIC_API_KEYfrom its own environment before the agent starts. In CI those credentials exist only in the judge step.claude -p --tools ""in an empty temp directory, given the original project, the answer and the diff. A task with no usable grade is recorded as unjudged, and the gate fails its quality checks rather than skipping them.eval/tasks/expectations/<model>.<suite>.json, tied to model, suite and judge model. The file holds main's measured results (overall and per task, with commit and runner) plus the limits. The report readsMain | This run | Limit.--proposewrites that file from a run with headroom: one task may flip, quality may drop 0.5, tokens and steps may grow 35%, and runtime may grow 50%. Limits move only through a reviewed commit. No file is committed yet: the first runner run's artifact carries the proposal.flagship-tasksjob sits beforeagent-eval, so it doesn't overlap ci(eval): keep judge credentials away from the agent under test #4001's hunks. It adds atask_suitedispatch input and triggers oneval/tasks/**. The artifact is the scorecard plus proposed expectations, scanned for credentials, kept 14 days. Everyrun:body is pure ASCII.Test plan
pytest tests/unit/eval/test_flagship_tasks.py: 67 pass (plus the opt-in live judge check, which passes: 10/10 verdicts in one call). Each coding task fails on the untouched project and passes a reference solution. Credentials never reach the agent. The judge gets no tools. Every gate metric can fail on its own. Report vs. enforce exit codes are covered.pytest tests/unit/eval tests/unit/test_cli*.py tests/unit/test_eval*.py: 725 pass. The 1 failure is the macOSpython-not-on-PATH case (fix(eval): eval gate loses all its tools where there is no barepythonon PATH #3981), identical on main.runpassed 4/4 in 190 s,judgegraded all 4,gatewithout expectations reported and exited 0, and--proposefollowed bygate --enforceagainst that proposal exited 0.pylint,black,isort,flake8on the new code;util/check_doc_links.pypasses; the workflow YAML parses and everyrun:body is ASCII.llamacpp:vulkan, all 4 tasks run, and the artifact holdsscorecard.jsonandproposed-expectations.json.eval/tasks/expectations/Gemma-4-E4B-it-GGUF.core.json(after fix(llm): count a local call's tokens from its own usage, not /stats #4005) to switch the gate on.