Skip to content

test(eval): validate the four parity-critical skills in the existing lanes - #4105

Merged
kovtcharov-amd merged 16 commits into
mainfrom
claudia/task-ac8e3583-skill-eval
Sep 25, 2026
Merged

kovtcharov-amd merged 16 commits into
mainfrom
claudia/task-ac8e3583-skill-eval

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

GAIA ships sixteen skills and until now not one of them was independently
measured. That matters most right now because the chat/doc/file profiles are
being retired into skills — document-brief, summarize, file-ops and
data-explore are the four absorbing that capability, and nothing checked
whether they actually do. This adds eight scenarios covering those four, two
each: one golden path, one exercising the failure behaviour the skill's own
SKILL.md claims to handle.

They run inside the existing category lanes and cost no new CI wiring — no
workflow file changes. All eight land in rag_quality, tool_selection and
real_world, each of which the consolidation lane already runs.

No scenario in this PR has been executed. The CI judge's Anthropic org is
out of monthly spend until Sep 23 (#4080), and Lemonade is down on this machine,
so there is no way to run gaia eval agent here. Treat the scenarios as
unverified against a live model: the YAML is validated, the assertions are
traced to source, but nobody has watched an agent attempt them. First green run
should be read as a measurement, not a confirmation.

Two things a reviewer needs to decide, neither of which this PR takes a
position on:

  • The embedder-down lane is now over its timeout budget. EVAL_CATEGORIES_NO_EMBEDDER
    documents a 579 min worst case against a 600 min cap, with an explicit note not
    to widen it without redoing the arithmetic. The two tool_selection scenarios
    here add 28.0 min, taking the worst case to 607.3 min. The fix lives in a
    workflow file owned by another task, so it is reported rather than applied.
    Real exposure is likely much lower — the same lane's expected cost is ~131 min —
    but the margin is gone.
  • fix(skills): file-ops SKILL.md documents a binary-file refusal that read_file does not do #4106 — file-ops's SKILL.md documents a binary-file refusal the code does
    not implement. Found while writing these scenarios; the scenario asserts
    against real behaviour, so this PR is not blocked on it.
🔍 Technical details

Based on kalin/eval-consolidation, not main. #4096 adds
test_no_scenario_pins_an_agent_type, which fails on any scenario carrying the
key — these eight originally set it. Both PRs were green alone and main would
have gone red on whichever landed second, with no CI run able to catch it.
That branch is merged in rather than rebased onto, because this one is already
pushed and rebasing would require a force-push. GitHub re-points the base to
main once #4096 lands.

How each scenario is made skill-dependent. The requirement was that a
scenario must not score the same with the skill uninstalled. The runner has no
skill hook — setup: accepts only index_documents — so no schema field was
invented. Two mechanisms instead:

  • Hard: turn 1's success_criteria requires load_skill in that turn's tool
    list. The runner surfaces per-turn tool calls to the judge via agent_steps[].tool
    and the agent_tools output slot. Remove the skill and the load fails.
  • Soft: the behavioural assertions are drawn only from SKILL.md. The
    sharpest is summarize, where the skill's brief ("at most 3 sentences, no
    bullets") directly contradicts summarize_document's own instruction
    ("concise 2-3 paragraph summary") — a 3-sentence bullet-free answer cannot
    come from the tool. Others: the four-heading standing brief, the
    quote-the-source rule, the rag_status-on-index-failure recovery, the
    get_file_info-before-acting confirmation, and the COUNT(*)-against-source
    verification step.

All eight require the flagship, which is the run-wide default as of #4096.
Only GaiaAgent composes SkillLibraryToolsMixin; ChatAgent (the chat/doc/file
profiles) has no load_skill tool at all, so a default pointed back at it would
fail every one of these on turn 1 for a reason unrelated to the skills. Since a
scenario can no longer express that, the guard test asserts it once for the suite
instead — which also catches the default being flipped back, the hazard the
per-scenario pin was standing in for.

Honest notes on the assertions.

  • data-explore's scratch_ prefix rule is also in the query_data docstring,
    so a correct prefix alone does not prove the skill loaded. That scenario leans
    on the recovery rule and the data-limits step instead, and says so inline.
  • No scenario writes to disk — no existing one does either. The single write
    attempt targets a credential dotfile, denied on filename by
    src/gaia/security.py before any I/O, so it is deterministic and creates
    nothing.

Added runtime, estimated not measured. At #4096's historical 4.23 min/scenario
mean, roughly 41 min for all eight. This is why phase 1 stops at four skills —
the remaining twelve at the same rate is roughly two hours, a whole extra lane
on a suite already being split for length.

Phase 2 is the other twelve skills, each listed in DEFERRED in the new
guard test with the reason it waits — mostly live connectors, live web fetch, or
non-deterministic ground truth. The guard fails if a seventeenth skill arrives
with neither scenarios nor a stated reason.

Test plan

Ovtcharov added 8 commits September 21, 2026 17:39
Every scenario pinned its own `agent_type`, and that pin silently beat
`--agent-type` on the command line, so the flag did nothing and one run
could mix agents. `compare_scorecards` keys on `scenario_id` alone, so it
cannot see the mix and happily reports "improved/regressed" across two
different agents.

Scenarios no longer name an agent. The runner passes one `--agent-type`
for the whole run, defaulting to the flagship `gaia` — the agent users
actually meet — so a scorecard names a single agent and two scorecards are
comparable. A guard test fails if a scenario reintroduces the key.

The committed baselines go with it. All three were recorded against the
`doc` ChatAgent profile, so diffing a flagship run against them is the
cross-agent comparison above, dressed as a verdict. They are deleted
rather than reinterpreted; the first honest flagship baseline comes from a
real AMD-hardware run. The tool_selection scorecard is kept, moved to
tests/fixtures/eval/, because one test reads it as a TTFT parser sample
rather than as a quality baseline.
… exists

CI measured 3 of 12 scenario categories, so 76 of 91 scenarios never ran on any
push. All 10 non-screen-reading categories now run (vision and web_system stay
out: they read the runner's clipboard, windows and screen into a public
artifact), and the category list lives in one env var instead of the four
hardcoded copies that had already drifted apart.

The flagship has no committed baseline yet - the old ones scored the doc agent
and were deleted rather than diffed against - so this run compares nothing. That
is reported, never assumed away: the preflight hard-fails enforce=true with no
baseline instead of passing every category by default, the compare step prints
"NO REGRESSION VERDICT" and writes it to the job summary, and the integrity gate
keeps the checks that do not need a baseline (a scorecard must exist, its
scenarios must have produced a measurement) rather than going dark entirely.

Budget resized from 19 runs of measured [TIMING] data: 82 scenarios at a 4.23
min/scenario mean is ~5.8 h expected, 9.2 h at the observed per-scenario max, so
the eval step goes 400 -> 600 min and the job 450 -> 660. The file's own budget
comment was 6x stale, citing a run that took 124 min for work this pool now does
in 26.

test_eval_rag.yml is removed: disabled pending #1315, never ran successfully,
and its one category is covered here.
…egistered

The eval job asked the backend for an agent it never installed, so all 82
scenarios would have died at session creation while the job still finished
green. Every scenario now runs the flagship `gaia` agent, but `gaia` is not a
builtin -- it registers only through the `gaia.agent` entry point in
gaia-agent-gaia, and the eval job's dependency list stopped at gaia-agent-chat.
POST /api/sessions answers 422 for an unregistered agent_type, so every scenario
records INFRA_ERROR; `gaia eval agent` still exits 0 because it produced a
scorecard, and with ENFORCE=false the job reports success having measured
nothing. Verified against a live backend: an unknown agent_type returns 422.

Two changes, because the install line alone would let the next one through:

- Add `-e hub/agents/gaia/python` to install-package, matching the sibling
  flagship-tasks job, and correct the comment above it -- it still described
  gaia-agent-chat as supplying "the backend-default agent", which this PR made
  false.
- Add a runtime preflight after the backend reports healthy: read
  DEFAULT_AGENT_TYPE from gaia.eval.config, and fail the job if that id is
  absent from GET /api/agents. Healthy is not the same as "can run these
  scenarios". The source-drift guard in tests/unit/eval/ parses pyproject.toml
  from the repo tree, so it stays green in exactly the environment where the
  eval 422s; this check is the one the CI run depends on. It costs seconds and
  protects a ~6 h slot, and the error names the missing package and the line to
  edit rather than skipping quietly.

The check reads the id from gaia.eval.config rather than asserting a literal
"gaia", so it tracks the default instead of becoming a second place to update.
All four branches (registered, absent, backend unreachable, unreadable default)
were exercised under Windows PowerShell 5.1 against a running gaia.ui.server.
The repro command in every failure report named `--agent-type tool`, an agent
nothing resolves to. `run_config` seeded `agent_type` with the pre-consolidation
literal `"tool"`, so the `or DEFAULT_AGENT_TYPE` fallback added alongside the
flagship switch was dead code -- the seed is always truthy. Anyone pasting the
command got a 422 instead of the failure they were trying to reproduce. The
report header rendered the same stale literal.

Seed both `agent_type` and `model` from gaia.eval.config, and hoist the model
into one expression so the printed command and the structured `reproduction`
fields cannot name different models -- they had already drifted, the command
using DEFAULT_CLAUDE_MODEL while the field hardcoded "claude-opus-5".
…line

Row 1 of the "numbers still owed" table read as a runnable instruction pointing
at tests/fixtures/eval_baselines/gemma-4-e4b-d71cd914/, which this branch
deletes. Anyone following it hits a missing path.

That baseline scored the `doc` ChatAgent profile, so diffing a flagship run
against it was the cross-agent comparison the consolidation set out to stop.
The row now says to run the eval and report what it measured, and names
tests/fixtures/eval_baselines/gaia-flagship/ as the path to compare against
once a flagship baseline is committed. The rest of the plan is untouched.
The doc profile is being retired and these two skills absorb its capability,
but nothing measured them. Four scenarios, two per skill: a golden path and
the failure behaviour each SKILL.md claims to handle.

Each asserts the skill actually loaded rather than the tools underneath it.
Turn 1 requires load_skill in the turn's tool list, which the runner surfaces
to the judge, and the output assertions come only from SKILL.md -- the
four-heading standing brief, the quote-the-source rule, and the three-sentence
brief that contradicts summarize_document's own "2-3 paragraph" instruction.
With the skill uninstalled the load fails and the shape cannot be produced.

Ground truth is read off the corpus files, not inferred.
The file profile is being retired into these skills and neither was measured.
Two scenarios each, golden path plus the failure behaviour SKILL.md claims.

file-ops lands in tool_selection because both scenarios turn on picking the
right tool: find_files for a description, search_file_content for a string
inside the file, and the RAG path rather than read_file for a PDF.
data-explore lands in real_world alongside the other spreadsheet scenarios,
but asks aggregates over all twelve months instead of single-cell lookups, so
it does not duplicate us_labor_statistics_xlsx on the same file.

Nothing is written to disk. The one write attempt targets a credential
dotfile, which the sensitive-file list denies on the filename before any I/O,
so the guardrail assertion is deterministic and creates nothing. The binary
criterion is worded against what read_file actually does -- it returns a
"[Binary file, N bytes]" placeholder with status success, it does not refuse,
whatever the skill doc says.

Every aggregate was computed from the spreadsheet, and none of them appear in
the sheet's own Note rows, so they cannot be lifted without loading the data.
…eason

Phase 1 covers four of sixteen skills. Without a guard the other twelve are
indistinguishable from an oversight, and a seventeenth skill would land with
no coverage decision at all.

The skill list is read from hub/skills/, never hardcoded, so a new skill must
either bring scenarios or name why it waits. Coverage is claimed by filename
(skill_<name>_*.yaml) because the scenario schema has no field for "this
exercises skill X" and adding one would change what the judge sees.

Two of the guards encode correctness arguments rather than style. Scenarios
must set agent_type: gaia, since ChatAgent has no load_skill tool at all and
the backend defaults to chat when the field is absent. And turn 1 must assert
load_skill, so a scenario that would score identically with the skill
uninstalled cannot be added.
@github-actions github-actions Bot added the tests Test changes label Sep 22, 2026
When the embedder fails to load on the eval runner - the common case per
#3016 - the job measured 2 scenarios out of 82 and told the reader the
other nine categories were skipped because they "answer out of
embedder-produced chunks". That is false for memory: 0 of its 25
scenarios index a document, so the embedder was never what stopped them
scoring. The degraded lane now runs memory too, taking the run from 2
measured scenarios to roughly 27, and the skip reason no longer asserts
a dependence the skipped category may not have.

The degraded list was sized when this workflow ran three categories.
Widening the healthy list to ten left it behind at tool_selection alone.

Individual memory scenarios can still fail on their own - the
cross-session ones want the store GAIA_MEMORY_DISABLED turns off. That
is the same posture the list already takes for tool_selection, 3 of
whose 5 scenarios do index documents: run the category, let the scenario
fail, do not call the whole category unmeasurable. Decoupling memory
from GAIA_MEMORY_DISABLED belongs to the lane-split work and is
deliberately not touched here.

Headroom is now the binding constraint on widening further, so it is
recorded next to the list: these two categories sum to a 579 min worst
case against the eval step's 600 min cap.
@kovtcharov-amd
kovtcharov-amd changed the base branch from main to kalin/eval-consolidation September 22, 2026 02:49
#4096 strips agent_type from every scenario and adds a guard that fails on the
key, so the two branches break each other on main even though both are green
alone. Merging rather than rebasing because the branch is already pushed and
rebasing it would need a force-push.
#4096 makes the flagship the run-wide default and adds a guard that fails on
any scenario carrying the key, so the pin is now both redundant and
test-failing. The reason for it still holds -- these scenarios assert
load_skill on turn 1 and only the flagship composes SkillLibraryToolsMixin --
it is just no longer something a scenario expresses.

Moved that requirement to where it can still be checked: the coverage guard
now asserts the eval's default agent type resolves to an agent that actually
exposes load_skill. That catches a default flipped back to chat, which is the
hazard the pin was standing in for, and it catches it once for the whole
suite instead of eight times.
Resolves src/gaia/eval/runner.py against #4092 (0816b01), which added
the agent-provenance check while this branch was making the flagship the
agent every scenario runs as. The two are complementary: #4092 verifies
which agent answered, this branch decides which one is asked for.

Resolution keeps #4092's mechanism whole. Its
_resolve_scenario_agent_type is restored at both call sites, and each
site passes the value that helper computed rather than self.agent_type
directly - otherwise _stamp_agent_provenance would compare a requested
agent against a session created with a different one and report a
mismatch that never happened.

That reinstates the per-scenario YAML override this branch had removed in
code, which is the better of the two: an override that exists and is
honoured beats one silently ignored, and
tests/unit/eval/test_scenario_agent_types.py already fails CI loudly if
any scenario carries an agent_type key. Enforcement moves from silent to
loud, which is the direction the no-silent-fallbacks rule points.

The constructor default stays at DEFAULT_AGENT_TYPE rather than None,
and that is now load-bearing for #4092 rather than just tidiness:
_stamp_agent_provenance returns early when no agent was requested, so a
null default would disarm the provenance check for every programmatic
runner. Noted in a comment at the default so it does not get "simplified"
back.
The summarize scenarios referenced a document id that does not exist
(meeting_notes_q3 is the filename; meeting_notes is the id) and four fact ids
that were never in the manifest, which TestManifestCrossReference catches.

The assertions themselves were right -- all four facts are verbatim in the
corpus -- so they are added to the manifest rather than dropped from the
scenarios. That matters beyond satisfying the test: the runner injects the
whole manifest into the judge prompt as ground truth, so a fact the scenario
scores against but the manifest omits is a fact the judge has to take the
agent's word for.

Also corrects total_documents and total_facts, which had drifted from the
document list and which my four facts made further wrong.
…sent

The coverage guard imported gaia_agent at module scope, so the email-agent
lane -- which installs one hub agent and not the flagship -- failed on
ModuleNotFoundError instead of running.

Split in two so neither half depends on the other: the default-agent-type
assertion needs no import and runs everywhere, and the mixin check uses
importorskip, matching how the integration tests already handle
gaia_agent_email. The invariant that actually guards these scenarios is the
name check, and it no longer rides on an optional package being present.
@github-actions github-actions Bot added documentation Documentation changes llm LLM backend changes eval Evaluation framework changes performance Performance-critical changes agents tui Go terminal UI (gaia-tui) labels Sep 22, 2026
Picks up the base's resync with main so the skill-coverage scenarios sit on
the same eval runner the consolidation PR ships.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

The conflict banner on this PR was wrong — the branch merged into its base with no conflicts at all. I merged the base in anyway to force GitHub to recompute, and it now reports mergeable.

That stale flag is also why almost no CI ran here: 2 checks passed and 7 skipped, because GitHub won't build a merge ref it believes is dirty. Checks should populate properly on this push.

One thing to watch when this lands alongside the lanes PR: that branch renames the eval workflow to eval_flagship.yml, and a test here pins the old name. The old name is correct on this base — whichever merges second has to update it.

🔍 Technical details

Merge commit 3203bfa8e — plain merge of origin/kalin/eval-consolidation into the head, no rebase, no force-push.

Authoritative merge test before touching anything (detached worktree at the real base, git merge --no-commit --no-ff of the head): zero unmerged paths, exit 0. GitHub's API kept returning mergeable: false, mergeable_state: dirty for the same pair until the push.

The pinned name is tests/unit/test_classify_claude_probe.py:33 — EVAL_WORKFLOW = WORKFLOWS / "test_eval_agent_gemma_consolidation.yml", which is the file that exists on this base. #4097 carries eval_flagship.yml at the same line; deliberately not applied here.

Tests on the merged tree: tests/unit/eval/ + tests/unit/test_classify_claude_probe.py → 679 passed, 1 skipped, 8 failed. All 8 failures are in test_release_scorecard.py, a file neither side of the merge touches, and all 8 are the same Windows-only UnicodeEncodeError — the test calls Path.write_text without an encoding on a scorecard containing Σ, so it dies under cp1252. Pre-existing and local-only; unrelated to this branch.

kovtcharov-amd pushed a commit that referenced this pull request Sep 22, 2026
An offline replay of 25 archived pr-review jobs turned up a cause the
no-log branch did not account for: PR #4105 (job 106596633316) died on
`API rate limit exceeded for installation`, a GitHub API limit, with no
execution log at all. The message told that reader the pinned
claude-code-action SHA was the suspect, which is the wrong fix.

Both causes are indistinguishable from inside the step — the action's
own output is not reachable from a later step — so the message now names
both and points at the failed `Run Claude` annotation, which does say
which one. The headline the outage classification exists to deliver is
unchanged: the review never ran, so the red says nothing about the PR.
Base automatically changed from kalin/eval-consolidation to main September 25, 2026 00:05
Resolves the same eval-consolidation conflicts as the other stacked
branches (agent_type default + iterations param), takes main's
renamed eval_flagship.yml wholesale (this branch never touched the
file under its old name, only inherited it), and restores an
import pytest an earlier auto-merge dropped from
test_scenario_agent_types.py.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

Eight well-crafted scenarios for four parity-critical skills, backed by a coverage-enforcement test that will catch every new skill that slips past without a scenario. The one thing a reviewer needs to decide before merge is the timeout budget.

🟡 The no-embedder CI lane is now 7.3 min over its hard cap — decide before merging

EVAL_CATEGORIES_NO_EMBEDDER: memory tool_selection runs whenever the embedder can't load. The two new tool_selection scenarios (skill_file_ops_discovery, skill_file_ops_guardrails) add to that path's budget. The PR documents the worst case as 607.3 min against a 600-min cap, with the fix deferred to a workflow file the PR author flags as another task. On an embedder-down run, the lane will time out and silently discard whatever partial results it produced — which is exactly the scenario the step-level timeout was added to prevent. The fix is a one-line bump to the timeout-minutes for the tools step in eval_flagship.yml, or a rebalance of the no-embedder category list. Neither requires changes to this PR's scenarios, but the reviewer needs to confirm a follow-up is queued before the next embedder-down run.


Everything else verified clean: all four new corpus facts (eap_eligibility, gross_margin, action_items, attendees) are present verbatim in their respective documents; safety_handbook_large.pdf exists at the referenced path; each scenario's turn 1 asserts load_skill in success_criteria (the anti-false-green guard); the 12 DEFERRED entries cover skills that genuinely can't run in a headless lane (audio, live web, connectors).

🟢 Nit: The PR description notes the file-ops binary-file refusal discrepancy (#4106) without blocking on it — the scenario asserts real behaviour, not the SKILL.md claim. That's the right call; just confirm the linked issue is open.

🔍 Technical details

Timeout arithmetic (from PR description):

  • Current no-embedder worst case: 579 min
  • Two new tool_selection scenarios: +28.0 min
  • New worst case: 607.3 min vs. 600-min cap

Fix: in .github/workflows/eval_flagship.yml, the tools lane's eval step currently has timeout-minutes: 300. The no-embedder path runs only tool_selection and memory; bumping that step's timeout to 320 (or adding a separate per-category timeout calculation) is sufficient. Alternatively, move one of the two file-ops scenarios out of tool_selection if the category can justify splitting.

Corpus fact verification — all four new manifest entries confirmed present in the source documents:

  • employee_handbook.md has the EAP section with the contractor exclusion verbatim
  • acme_q3_report.md has "Gross margin for Q3 was 68%, up from 65% in Q2 2025"
  • meeting_notes_q3.txt has the full action-item table and attendee list with roles

safety_handbook_large.pdf exists at eval/corpus/documents/ — the binary-placeholder behavior described in turn 1 of skill_file_ops_guardrails is reachable.

Test structure — test_skill_scenario_coverage.py covers the right invariants:

  • test_the_eval_default_agent_is_the_flagship guards against a future DEFAULT_AGENT_TYPE drift that would silently break every skill scenario on turn 1
  • test_scenario_filename_prefixes_are_unambiguous catches a subtle prefix-collision edge case
  • pytest.importorskip("gaia_agent.agent") in the flagship-provides-load_skill test is the correct skip mechanism for lanes that don't install the hub package

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit 7c4d278 Sep 25, 2026
37 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the claudia/task-ac8e3583-skill-eval branch September 25, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation Documentation changes eval Evaluation framework changes llm LLM backend changes performance Performance-critical changes tests Test changes tui Go terminal UI (gaia-tui)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants