Skip to content

ci(eval): consolidate the scenario eval onto the flagship agent and widen CI - #4096

Merged
kovtcharov-amd merged 9 commits into
mainfrom
kalin/eval-consolidation
Sep 25, 2026
Merged

kovtcharov-amd merged 9 commits into
mainfrom
kalin/eval-consolidation

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Important

This PR ships no baseline, and the eval is non-enforcing until one lands.
The old baselines scored a different agent, so they were deleted rather than
diffed against. Until a real run on AMD hardware produces the first flagship
baseline, CI measures every category and compares none of them — a green check
on this workflow is not a no-regression verdict. The workflow says so in
its annotations and job summary; a reviewer should not read it as one either.

GAIA had three eval systems and the agent users actually meet was barely in any of
them. The scenario eval ran the doc ChatAgent profile and CI exercised 3 of its 12
categories, so 76 of 91 scenarios never ran on a push and the 15 that did scored an
agent nobody ships. After this, there is one scenario eval, it scores the flagship
gaia agent, and all 10 non-screen-reading categories run in CI — vision and
web_system stay out because they read the runner's clipboard, windows and screen
into a publicly downloadable artifact.

Two threads a reviewer can't infer from the title:

  • The deleted baselines were a comparison trap, not just stale. compare_scorecards
    matches on scenario ID alone, so diffing a flagship run against a doc scorecard
    would have printed confident "improved"/"regressed" lines across two different
    agents. All three baseline directories were generated with --agent-type doc, so
    all three went.
  • Runtime is the real cost. 16 → 82 scenarios on a single serial Lemonade slot.
    Sized from the [TIMING] lines of 19 complete runs plus per-scenario [DONE]
    timings inside 8 of them: 4.23 min/scenario mean, 6.73 max, and no measurable
    per-category overhead. Expected ~5.8 h, ceiling 9.2 h — the eval step goes 400 → 600
    min and the job 450 → 660. This job now holds the shared eval slot for ~6 h per run.

Test plan

  • python -m pytest tests/unit/eval/ -q — 601 passed, 8 pre-existing failures in
    test_release_scorecard.py (a cp1252 UnicodeEncodeError on Windows that
    reproduces unchanged on main)
  • python -m pytest tests/unit/eval/test_scenario_agent_types.py -q — the guard now
    fails if any scenario reintroduces an agent_type: key
  • python -m pytest tests/unit/eval/test_integrity_gate.py -q — two new tests pin
    that an absent baseline disables one check, not the gate
  • python util/lint.py --black --isort
  • python -c "import yaml; yaml.safe_load(open('.github/workflows/test_eval_agent_gemma_consolidation.yml'))"
  • All 91 scenario YAMLs parse; 0 carry an agent_type: pin
  • Workflow dispatch with no baseline present: preflight warns rather than fails,
    compare step prints NO REGRESSION VERDICT, job summary carries both
  • Workflow dispatch with enforce: true and no baseline: preflight hard-fails
    instead of passing every category by default

No gaia eval agent run: Lemonade is down on this box, and CLAUDE.md forbids racing
the shared slot regardless. The first real run is the follow-up that produces the
baseline.

Ovtcharov added 2 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.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes cli CLI changes eval Evaluation framework changes tests Test changes performance Performance-critical changes labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Skill audit

Skill Verdict Claimed tier Cleared tiers Findings Rules
.claude/skills/gaia-testing ✅ ALLOW experimental experimental, community none —

✅ All audited skills cleared the tier they claim.

Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the skill-audit-reports artifact from this run. Offending source text is withheld from CI everywhere — reproduce it locally with gaia skill audit <dir> --show-snippets.

@github-actions

Copy link
Copy Markdown
Contributor

Request changes

This consolidates the scenario eval onto the flagship agent and widens CI from 3 categories to 10 — good direction, and the "no baseline, and we say so loudly" handling is the right call rather than letting a green check masquerade as a no-regression verdict.

The blocker is that the eval job never installs the flagship agent. The eval now asks the backend for the gaia agent by default, but that agent ships as its own package and the eval job's dependency list still installs only the chat one. The backend rejects the unknown agent when each scenario opens its session, so every one of the 82 scenarios fails for an environmental reason — and because the eval is deliberately non-enforcing right now, the job finishes green having measured nothing. That is precisely the failure mode this PR set out to eliminate. The sibling job in the same file already installs the flagship package; the eval job needs the same line.

Two more worth resolving before the first real run:

  • A quarter of the new scenario set cannot pass in this environment. The memory category is 25 of the 82 scenarios and tests remembering, updating and recalling facts across turns — but the workflow disables long-term memory for the whole run, deliberately, so state can't bleed between categories on the persistent runner. Those scenarios will fail for setup reasons, not quality ones, and that will get baked into the first committed baseline. Either exclude the category from CI with a comment saying why, or scope the memory switch so it stays on for that category.
  • The new guard test can't catch either problem. It reads agent IDs out of the source tree rather than from what's actually installed, so it stays green in exactly the environment where the eval would fail. It's still a useful guard against a typo in the default — it just isn't the check that protects the CI run.

One smaller thing: the failure-report code was only half-migrated to the new default, so the repro command it prints still names an agent that doesn't exist.

Real-world evidence

None. The evidence harness errored before producing anything (evidence-bundle.md reports an auth/install/rate-limit failure), so no surface was exercised here, and the PR itself notes no gaia eval agent run was possible. That's defensible for CI plumbing on a shared serial slot — but it also means the blocking issue above would first surface as a wasted multi-hour run on the eval pool. The verdict rests on static review alone.

🔍 Technical details

🔴 Critical

The agent-eval job never installs the flagship hub package (.github/workflows/test_eval_agent_gemma_consolidation.yml:555)

DEFAULT_AGENT_TYPE = "gaia" (src/gaia/eval/config.py:20) is now passed as --agent-type for every scenario. gaia is not a builtin — _RESERVED_BUILTIN_IDS is {"builder"} and _register_builtin_agents registers no gaia (src/gaia/agents/registry.py:78, :702). It registers only via the gaia.agent entry point in hub/agents/gaia/python/pyproject.toml:42. That package is installed in the flagship-tasks job (line 329) but not in agent-eval:

          install-package: '-e .[dev,eval,ui,api,mcp] -e hub/agents/chat/python -e hub/agents/gaia/python'

Without it, POST /api/sessions returns HTTP 422 via _reject_unknown_agent_type (src/gaia/ui/routers/sessions.py:101) for every scenario → 82 × INFRA_ERROR. gaia eval agent still exits 0 (it produced a scorecard), so the eval step's if ($code -ne 0) never fires; the integrity gate flags the unmeasured scenarios but only as a ::warning:: while ENFORCE=false. Net result: a green job that measured nothing.

The comment block above that line also needs updating — it still says gaia.ui.server builds "the backend-default agent these scenarios run against", which this PR made false.

🟡 Important

memory (25/82 scenarios) runs with memory disabled (.github/workflows/test_eval_agent_gemma_consolidation.yml:234, :288)

EVAL_CATEGORIES adds memory, but GAIA_MEMORY_DISABLED: '1' is set at workflow level. MemoryMixin skips init entirely on that flag (src/gaia/agents/base/memory.py:537) and the memory tools are not registered (:2779), so scenarios like memory_conflict_resolution.yaml — whose success criteria are "agent calls update_memory or remember with supersede" — cannot pass. At the measured ~4.23 min/scenario that is ~1.8 h of the shared slot per run spent producing guaranteed failures, and they would be recorded as the flagship's first committed baseline. mcp_reliability is fine by contrast (it exercises the doc/RAG surface, already covered by the embedder caveat).

The new guard cannot catch the install gap (tests/unit/eval/test_scenario_agent_types.py:41)

_hub_agent_ids() parses hub/agents/*/python/pyproject.toml from the repo tree "so the guard doesn't depend on which hub wheels happen to be installed" — which is reasonable for a source-drift guard, but means test_default_agent_type_resolves passes in exactly the environment where the eval would 422. This is the CLAUDE.md "mocks prove we called it, not that the call is valid" case. A cheap complement: assert in the workflow preflight that the default agent id appears in GET /api/agents before spending the slot.

analyze_failures.py is half-migrated (src/gaia/eval/analyze_failures.py:538, :680, :956)

run_config is seeded with "agent_type": "tool" at line 956, so run_config.get("agent_type") at 538 is always truthy and the new or DEFAULT_AGENT_TYPE fallback is dead whenever the scorecard's config lacks the key. The printed repro is then gaia eval agent --scenario <id> --agent-type tool, naming an agent nothing resolves to. Line 680 renders the same stale 'tool' into the report header. Suggest DEFAULT_AGENT_TYPE in both places.

🟢 Minor

  • src/gaia/eval/analyze_failures.py:548 — reproduction["model"] still hardcodes "claude-opus-5" two lines after repro_cli switched to DEFAULT_CLAUDE_MODEL. Same value today, one drift point tomorrow.
              "model": run_config.get("model", DEFAULT_CLAUDE_MODEL),
    
  • docs/plans/gaia-agent-latency.md:404 still gives an actionable --compare tests/fixtures/eval_baselines/gemma-4-e4b-d71cd914/... command against a directory this PR deletes. Historical plan docs are fine to leave, but this one reads as a runnable instruction.
  • The 4.23 min/scenario rate was measured on doc-profile runs across three categories. The flagship carries a much larger tool surface, so the 600/660 ceilings may be optimistic on first contact. The comment already says "re-tighten once complete runs land" — worth saying "or widen" too.

Strengths

  • The no-baseline handling is genuinely well built: enforce=true with no baseline is a hard preflight error rather than a pass-by-default, check_category keeps the checks that don't need a baseline instead of returning early (src/gaia/eval/integrity_gate.py:90), and the compare step writes NOT PERFORMED to the job summary. The two new integrity-gate tests pin exactly that behaviour.
  • Deleting the three baselines rather than diffing across agents is the right call, and the reason (compare_scorecards keys on scenario_id alone) is documented in the workflow, CLAUDE.md, and the guard test's docstring.
  • Collapsing four drifted hardcoded category lists into EVAL_CATEGORIES / EVAL_CATEGORIES_NO_EMBEDDER, with the "never add web_system or vision" rationale attached to the definition rather than to one consumer.
  • The doc sweep is thorough — CLAUDE.md, three .claude/ agent/command files, the testing skill, cli.mdx, eval.mdx, chat.mdx, troubleshooting.mdx all moved together, and the tool-budget fixture was renamed to say it's a parser sample rather than a quality baseline.

Ovtcharov added 3 commits September 21, 2026 19:33
…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.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

The eval job would have burned a ~6 h slot measuring nothing, and now it can't. It asked the backend for the flagship agent without ever installing it, so all 82 scenarios would have failed at session creation while the job still reported success. Fixed, plus a runtime check so the next version of this mistake costs seconds instead of a slot. The failure report's repro command and one plan-doc command also named things that no longer exist; both corrected.

The memory category is deliberately left as-is. It is 25 of the 82 scenarios and cannot pass while memory is disabled workflow-wide — that is a real finding, but it is being resolved in the eval lane-split work, where per-lane ephemeral runners remove the state-bleed reason the flag exists for in the first place. Excluding the category here would be a workaround we'd immediately undo, so EVAL_CATEGORIES and GAIA_MEMORY_DISABLED are untouched. The first committed baseline should wait for that work.

🔍 Technical details

🔴 The eval job never installed the flagship (0efdc0f)

Confirmed against a live backend — POST /api/sessions with an unregistered agent_type returns exactly the 422 the review predicted:

status=422
{"detail":"Unknown agent_type 'flagship-not-installed'. Registered agent ids: builder, chat, doc, email, file, gaia. ..."}

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

  • install-package gains -e hub/agents/gaia/python, matching the sibling flagship-tasks job. The comment above it no longer describes gaia-agent-chat as supplying "the backend-default agent".
  • A runtime preflight after Backend healthy.: read DEFAULT_AGENT_TYPE from gaia.eval.config, assert it appears in GET /api/agents, fail loudly otherwise. It reads the id from config rather than asserting a literal "gaia", so it tracks the default instead of becoming a second place to update. The error names the missing package and the exact line to edit.

On the guard-test point — tests/unit/eval/test_scenario_agent_types.py is kept as-is. It is a good source-drift guard; it just isn't the check the CI run depends on, which is what the preflight now supplies.

All four branches were exercised under Windows PowerShell 5.1 against a running gaia.ui.server: registered (passes), default absent (fails with the actionable message), backend unreachable (fails), default unreadable (fails). The exit 1s sit inside the existing try/finally, so the backend is still stopped on every path. Run body kept pure ASCII per this job's shell: powershell rule.

🟡 analyze_failures.py was half-migrated (0d511dd)

run_config seeded agent_type with "tool", so the or DEFAULT_AGENT_TYPE fallback was dead and the printed repro named an agent nothing resolves to. Seeded from gaia.eval.config now, which also makes the report header correct. The model was drifting the same way — the command used DEFAULT_CLAUDE_MODEL while reproduction["model"] hardcoded "claude-opus-5" — so both now come from one hoisted expression and cannot disagree.

🟢 Plan doc (e99cca7)

docs/plans/gaia-agent-latency.md:404 pointed a runnable --compare at the deleted gemma-4-e4b-d71cd914/ baseline. The row now says to run the eval and report what it measured, and names tests/fixtures/eval_baselines/gaia-flagship/ for once a flagship baseline exists. Rest of the plan untouched. The other gemma-4-e4b-d71cd914 mentions in email-triage-skill.mdx and port-audit-6-agents.md are historical prose, not commands, so they're left alone.

Validation

  • python util/lint.py --all — black, isort, flake8 clean. The pylint os.killpg/os.geteuid errors and 8 test_release_scorecard.py unicode failures reproduce on the unmodified tree (Windows/POSIX-only noise), and touch none of these files.
  • python -m pytest tests/unit/eval/ -q — 601 passed.
  • Workflow YAML parses; both jobs' install-package verified after parse.
  • No gaia eval agent run: Lemonade isn't available here, evals are serial per backend, and ci(eval): every eval gate dies in preflight — the judge org is out of monthly spend #4080 has the CI judge credential blocked until Sep 23.

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

Copy link
Copy Markdown
Collaborator Author

Fixed, and it turned out to be three copies of the same false claim rather than two.

When the embedder is down on this runner - which #3016 says is the normal case, not the edge case - the job was measuring 2 scenarios out of 82 and telling the reader the other nine categories were skipped because they "answer out of embedder-produced chunks". For memory that is simply untrue: none of its 25 scenarios index a document, so the embedder was never what stopped them scoring. The degraded lane now runs memory as well, which takes a degraded run from 2 measured scenarios to roughly 27, and the skip reason now says why the run was cut instead of asserting a dependence the skipped category may not have.

I did not widen past memory, and the reason is now written next to the list: the two categories together hit a 579 min worst case against the eval step's 600 min cap. There is no room for a third without raising the cap.

memory will still have failures, and that is the point being accepted, not missed. GAIA_MEMORY_DISABLED is still set workflow-wide, so the cross-session memory scenarios want a store that is switched 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 individual scenario fail, don't declare the whole category unmeasurable. Decoupling memory from GAIA_MEMORY_DISABLED stays with the lane-split work, untouched here as agreed.

Technical details

.github/workflows/test_eval_agent_gemma_consolidation.yml, one commit (8d53368):

  • EVAL_CATEGORIES_NO_EMBEDDER: tool_selection -> memory tool_selection
  • The --not-measured-reason string in the integrity-gate step
  • A third site the finding didn't name: the ::warning:: at the top of the eval step carried the identical "answer out of embedder-produced chunks" wording. One reason string is shared across every skipped category by integrity_gate.py, so it can only describe the run scope; both strings now do.

Embedder dependence measured from the scenario YAML rather than assumed - count of scenarios with a non-empty setup.index_documents:

category total indexes docs
rag_quality 8 8
context_retention 4 4
real_world 19 19
adversarial 3 2
personality 3 2
tool_selection 5 3
mcp_reliability 10 3
error_recovery 3 1
captured 2 1
memory 25 0

Only three of the ten are fully embedder-dependent, so the old blanket reason overclaimed for six categories and was outright false for one.

Timeout arithmetic (_compute_effective_timeout, runner.py:238 - 240s startup + 90s/doc + 200s/turn, capped at 7200s): memory 516.7 min ceiling, tool_selection 62.7 min, total 579.4 min against timeout-minutes: 600 on the step. Expected cost is ~131 min; the ceiling only materialises if all 30 scenarios time out.

Validation, no eval run (#4080 spend cap, and Lemonade is down locally):

  • yaml.safe_load parses; degraded list asserted to be a subset of EVAL_CATEGORIES
  • Every run: body scanned for non-ASCII - 0 hits, which matters because Actions writes a BOM-less .ps1 that PS 5.1 reads as cp1252
  • All 15 PowerShell bodies parsed clean through System.Management.Automation.Language.Parser
  • pytest tests/unit/eval/ -q - 601 passed, 8 failed, all 8 the pre-existing UnicodeEncodeError: '\u03a3' cp1252 failures in test_release_scorecard.py, unrelated to this diff
  • EVAL_CATEGORIES, GAIA_MEMORY_DISABLED and eval_flagship.yml untouched

kovtcharov-amd pushed a commit that referenced this pull request Sep 22, 2026
#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.
kovtcharov-amd pushed a commit that referenced this pull request Sep 22, 2026
#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.
kovtcharov-amd pushed a commit that referenced this pull request Sep 22, 2026
Carries #4096's corrected eval content into the split workflow. The only
conflicting file was eval_flagship.yml, which git matched by rename detection
to the monolith #4096 edits, so its hunks arrived as content conflicts.

Taken from #4096: memory added to EVAL_CATEGORIES_NO_EMBEDDER, the reworded
embedder-down warning and --not-measured-reason (neither now claims a skipped
category depends on the embedder), the Claude credential probe classifier, and
the default-agent-registered preflight.

Kept from the split: the per-lane memory environment and its assertions, and
the intersection of EVAL_CATEGORIES_NO_EMBEDDER with the lane's own categories
-- taking #4096's whole-list assignment would make every lane run another
lane's category.

Three clauses only true of the monolith were adapted: scenario counts in two
comments, the memory-store caveat the per-lane fix removed, and the timeout
arithmetic, which is now per lane. That last one surfaced an inversion in the
split: the eval step's cap was still the monolith's 600 min against a 300 min
job, so the job cancelled first and the named-step failure that preserves
partial results on an ephemeral machine could never fire. Set to the 240 the
job's own budget table prices.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

When #3074 lands, one of your tests goes red and one constructor line needs a two-way merge. That is the whole absorption — closer to half an hour than a day, so nothing here argues for gating #3074 behind this refactor.

The test is test_no_scenario_pins_an_agent_type. #3074 adds 103 scenarios and every one declares agent_type: gaia — already the default you are introducing, so they point at the right agent; they just trip the guard. Deleting that line from all 103 is a one-liner.

Nothing else genuinely collides: config.py, integrity_gate.py, and tool_cost.py are untouched by #3074, and its CLI and docs edits auto-merge.

One thing worth fixing on your side regardless — the guard's failure message says the eval "no longer honours" a scenario's agent_type, but _resolve_scenario_agent_type still reads it and lets it win. Those two disagree today.

🔍 Technical details

Trial-merged kalin/eval-consolidation (84f7432) against #3074's current head (756ced6), each diffed from its own merge-base with main.

One conflicted file, one hunk — src/gaia/eval/runner.py, adjacent lines of the same parameter list in AgentEvalRunner.__init__:

        # Not None: _stamp_agent_provenance skips a scenario that requested no
        # agent, so a null default would silently disarm the provenance check.
        agent_type=DEFAULT_AGENT_TYPE,   # yours
        iterations=1,                    # theirs

Keep both lines. There is no semantic overlap: your entire runner.py change is +5/−1 (the DEFAULT_AGENT_TYPE import plus this default), while theirs is +162/−17 confined to find_scenarios (a new exclude_tags filter), _aggregate_performance (min/max TPS and TTFT, tool-call counts), and a new summarize_attempts.

Auto-merges, no decision needed: src/gaia/cli.py (your --agent-type default vs their --exclude-tag / --iterations) and docs/reference/cli.mdx.

Zero overlap: src/gaia/eval/config.py, integrity_gate.py, tool_cost.py. Workflows are disjoint too — they add test_gaia_agent_eval.yml and gaia_scorecard_refresh.yml and edit weekly_eval.yml; you own test_eval_agent_gemma_consolidation.yml and the test_eval_rag.yml deletion.

The corpus: 103 added files, no edits to existing scenarios. Thirteen new categories — gaia_skills_tasks (20), gaia_memory (15), gaia_core (11), gaia_rag (8), gaia_skills_lifecycle (8), gaia_files (6), gaia_honesty (6), gaia_shell (6), gaia_data (5), gaia_tool_selection (5), gaia_web (5), gaia_code (4), gaia_skills_capture (4). Same YAML schema as the current scenarios; the agent_type line is the only difference from your post-refactor format, and none of the 55 files you stripped is among them. Counted on the merged tree: exactly 103 offenders, all under eval/scenarios/gaia_*.

sed -i '/^agent_type: gaia$/d' eval/scenarios/gaia_*/*.yaml

On the runner/guard disagreement: runner.py:240 is still scenario_data.get("agent_type") or cli_agent_type, so a pin does still win. As it stands those 103 files would resolve to gaia and run correctly — and fail the guard anyway. Either make the runner ignore the key or reword the message.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

Your guard and your runner disagree about whether a scenario can pick its own agent, and the runner wins. test_no_scenario_pins_an_agent_type tells the reader the eval "no longer honours" a scenario's agent_type — but it still does, for any scenario that lives outside eval/scenarios/. The guard scans only the in-repo directory; the runner also loads ~/.gaia/eval/scenarios (auto-discovered) and anything passed to --scenario-dir, and a pin in either still beats --agent-type.

So the bug this PR's own commit message describes as fixed — the pin "silently beat --agent-type on the command line, so the flag did nothing" — is still live for exactly the people who keep local scenarios. Their scorecard records gaia in its config and scores something else, and compare_scorecards can't see it because it keys on scenario_id alone. That's the mixed-agent comparison this PR exists to prevent, surviving in the one corner the guard doesn't reach.

The code is the wrong side, not the message. Your commit says the pin no longer wins, the guard's docstring says only one pin remains (the default), and the new --agent-type help says "Every scenario runs against this one agent." Three statements agree on the intent; only _resolve_scenario_agent_type disagrees. It reads like the data was removed and the reader was left behind.

What I'd change: reject agent_type in validate_scenario rather than ignore it there. That covers all three scenario sources at load time with one loud error the user can act on, instead of a quiet wrong answer — and it makes _resolve_scenario_agent_type genuinely unreachable, so it can go. The guard then becomes what its name suggests, a fast repo-local lint, and its message becomes true.

Not pushing anything — it's your branch and your call. Patch and evidence below.

🔍 Technical details

Confirmed at 84f7432 (current head), not a stale diff.

The three scenario sources, and which one the guard covers

find_scenarios (src/gaia/eval/runner.py:486-500) scans, in order:

source covered by test_no_scenario_pins_an_agent_type?
SCENARIOS_DIR — in-repo eval/scenarios/ (runner.py:49) yes
USER_SCENARIOS_DIR — ~/.gaia/eval/scenarios, auto-discovered (runner.py:207) no
--scenario-dir extra dirs no

The guard walks REPO_ROOT / "eval" / "scenarios" only. The later sources also override built-ins by scenario id, so a local file can shadow a shipped scenario and repoint it at another agent.

The pin still wins

runner.py:238-240, unchanged by this PR:

def _resolve_scenario_agent_type(scenario_data: dict, cli_agent_type):
    """Return the agent a scenario asks for: its own ``agent_type:`` wins."""
    return scenario_data.get("agent_type") or cli_agent_type

Four call sites: runner.py:302 (inside _stamp_agent_provenance), :2050, :2074, :2172.

Repro against this head — one scenario in a --scenario-dir carrying agent_type: chat, resolved against the new default:

CLI --agent-type = 'gaia'
scenario agent_type = 'chat'
runner resolved to  = 'chat'

validate_scenario (runner.py:365) never inspects agent_type, so nothing rejects it on the way in, and _stamp_agent_provenance then compares the pinned request against the observed session — so the provenance check agrees with the pin and reports no drift.

Suggested patch — in validate_scenario, alongside the other field checks:

if "agent_type" in data:
    errors.append(
        f"'agent_type' is not honoured — one run scores one agent, set by "
        f"--agent-type (default '{DEFAULT_AGENT_TYPE}'). Delete the key; to "
        f"measure a different agent pass --agent-type for the whole run."
    )

Then _resolve_scenario_agent_type is unreachable: delete it and collapse its four call sites to cli_agent_type / self.agent_type.

The softer alternative is to tolerate the key and log a warning. Less disruptive to anyone holding a pinned local scenario, but a warning scrolls past in a long run and you still end up with a scorecard labelled with an agent it didn't score — which is the failure mode the repo's no-silent-fallbacks rule is aimed at.

What already passes at this head — test_scenarios_exist, test_hub_entry_points_parsed, test_default_agent_type_resolves, test_no_scenario_pins_an_agent_type. The in-repo corpus is clean; the gap is only the two unguarded sources.

The consolidation deleted `agent_type:` from the committed scenarios but left
the code that reads it, so a scenario loaded from anywhere else — the
auto-discovered `~/.gaia/eval/scenarios`, or any `--scenario-dir` — still beat
`--agent-type`. That run scored one agent while its scorecard recorded another,
which is exactly the mixed-agent comparison `compare_scorecards` cannot detect,
since it keys on `scenario_id` alone.

`validate_scenario` now rejects the key, covering all three scenario sources at
load time rather than only the in-repo corpus the guard test walks. With nothing
able to carry the key, `_resolve_scenario_agent_type` is unreachable, so it and
its four call sites are gone and the provenance stamp records the run's agent.

Note for #3074: it adds 103 scenarios under `eval/scenarios/gaia_*/`, every one
declaring `agent_type: gaia`. All 103 fail validation the moment it merges on
top of this. `gaia` is already the default, so the key is redundant and the fix
is to strip it: sed -i '/^agent_type: gaia$/d' eval/scenarios/gaia_*/*.yaml
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

Fixed and pushed as d85d9fd, and there's a number in it that whoever lands #3074 needs to see.

validate_scenario now rejects agent_type outright, so the rule holds wherever a scenario comes from — the repo, ~/.gaia/eval/scenarios, or a --scenario-dir — instead of only where the guard test happens to walk. With nothing able to carry the key, _resolve_scenario_agent_type was unreachable, so it and its four call sites are gone.

#3074 adds exactly 103 scenarios, and every one declares agent_type: gaia. I counted them against its current head (9fd2415, on kovtcharov/gaia), not a stale diff. So the moment it merges on top of this, all 103 fail validation at load — a hard stop, not a warning. That is louder than it was before this commit, which is the point, but it is worth knowing in advance rather than discovering it in CI.

The fix is one line, because gaia is already the default this PR introduces — the key is redundant, not wrong:

sed -i '/^agent_type: gaia$/d' eval/scenarios/gaia_*/*.yaml

Whoever lands #3074 should run that in the merge commit. Nothing else about the absorption changes: still one real conflict, two adjacent kwargs in AgentEvalRunner.__init__.

🔍 Technical details

How the 103 was counted

Against #3074's head 9fd2415c9b (kovtcharov/gaia, gaia-eval-integration), diffed from its own merge-base with main (4fe3f606) — not against this branch's base, which would miscount:

git diff --name-status --diff-filter=A 4fe3f606 9fd2415c -- eval/scenarios | grep '\.yaml$'
  -> 103 added, all under eval/scenarios/gaia_*/

#3074's tree as a whole shows 158 scenarios carrying the key (chat 10, doc 39, file 1, gaia 108) — but that is an artifact of its merge-base predating this PR. What matters is the merged result. Trial-merging this branch with #3074 via git merge-tree --write-tree and grepping the resulting tree:

103 agent_type: gaia      <- all of them, all under eval/scenarios/gaia_*/

So this PR's strip cleans up every pre-existing pin; the 103 new files are the entire remainder. No file outside gaia_* survives with the key.

What changed here

src/gaia/eval/runner.py

  • validate_scenario gains an agent_type rejection alongside the other field checks. find_scenarios is the only scenario loader in the runner and it validates every file it reads, so this covers all three directories.
  • _resolve_scenario_agent_type deleted. Call sites collapsed: _stamp_agent_provenance now takes requested = cli_agent_type, and the two run_scenario_subprocess calls pass self.agent_type directly (the local scenario_agent_type alias went too — it no longer described anything scenario-specific).

tests/unit/eval/test_scenario_agent_provenance.py — these named the agent via the scenario dict and relied on the pin winning. They now name it on the run. test_scenario_agent_type_beats_the_cli_flag_as_the_requested_id tested the removed behaviour and is replaced by test_a_stray_scenario_agent_type_does_not_override_the_run, which pins the opposite. One test became a byte-identical duplicate of another once the scenario could no longer declare an agent, and was dropped.

tests/unit/eval/test_scenario_agent_types.py — new test_validate_scenario_rejects_a_pin_from_any_directory. The existing guard's failure message said the eval "no longer honours" the key, which was not true before this commit; it now says validate_scenario rejects it, and the module docstring records that this file names in-tree offenders early but is not what makes the rule hold.

Test results

tests/unit/eval/ + tests/test_eval.py: 673 passed, 1 skipped.

tests/unit/eval/test_release_scorecard.py has 8 failures, all UnicodeEncodeError: 'charmap' codec can't encode character '\u03a3' — a Windows cp1252 issue writing a Σ. I verified these reproduce identically on a clean checkout of 84f7432 before my change, and release_scorecard.py does not import the runner. Pre-existing and unrelated, but flagging it since it will bite anyone running this suite on Windows.

python util/lint.py --black --isort: pass.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

One thing to decide before this lands, not a change request — the PR is fine as it stands.

After this, no eval scenario exercises the lean conversational profile any more. That matters because #4103 is being designed right now to fix exactly that profile's cost, and its acceptance criterion asks for "an eval scenario in personality or tool_selection [that] demonstrates a greeting turn." The scenario that was doing that job is personality/concise_response — literally named "Short Greeting" — and it loses its pin here along with everything else. So the criterion becomes unmeasurable by CI at the moment its fix is being written.

That is a fair trade if it is a deliberate one: one run scores one agent is the right rule, and honouring per-scenario pins is what made scorecards incomparable in the first place. The choice is whether #4103 gets a flagship-side greeting scenario of its own, or a separate lean-profile run, or whether its acceptance criterion should be reworded to something the corpus can still measure. Worth a decision by someone, rather than discovering it when #4103 goes to verify itself.

🔍 Technical details

What changes. 55 agent_type: pins are removed corpus-wide (39 doc, 10 chat, 5 gaia, 1 file), RunnerConfig.agent_type defaults to DEFAULT_AGENT_TYPE = "gaia", and validate_scenario now rejects the key outright. So "keep three scenarios pinned" is not one of the options — the mechanism is gone by design, and the only ways to measure a non-flagship profile are --agent-type <x> for a whole separate run, or a new scenario that reaches the lean path through the flagship.

The three personality files keep their content and lose only the pin: concise_response (chat), honest_limitation (doc), no_sycophancy (doc). Of the 10 former chat pins, concise_response is the only one in personality or tool_selection; the other nine are vision/ and web_system/.

Why chat specifically and not doc/file. Per #4103's measurements, chat is the only profile with early_return=True and no tool_groups, giving a 1,227-token fixed prefill against the flagship's 6,100 (CORE only) to 17,282 (selector unavailable) — +12 to +41 s TTFT per LLM call at the 387 tok/s rate in docs/plans/gaia-agent-latency.md. The flagship is within noise of doc and file, so those pins losing nothing is real; chat is the one case where the pin was carrying information.

Not a duplicate of the #3074 absorption thread above — that one is about merge mechanics when #3074 lands. This is about what the corpus can still measure afterwards.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

One file in this PR — tests/unit/test_tool_loader_token_budget.py — is never executed by any CI lane, so the green checks say nothing about that file's changes. Everything else here was audited separately and is clean; this is narrow and is not a reason to hold the merge.

Just review that one file's diff on its merits rather than reading green as verification. The gap is in the lane, not the change: tracked systemically in #4121, with #4124 adding the guard that flags it automatically.

🔍 Technical details

The file calls pytest.importorskip("gaia_agent_chat") at line 35. test_unit.yml installs -e ".[api]" and never -e hub/agents/chat/python, and the root conftest.py only prepends a hub agent to sys.path when find_spec() already resolves — it redirects an existing install, it never creates one. The module therefore aborts during collection.

Receipt from this PR's own Unit Tests (py3.12) job 106677441732 (run 35706759195, head d85d9fd0af):

string searched in the job log hits
tool_loader_token_budget 0
test_tool_loader_selection.py (alphabetical neighbour, control) 34
test_tool_recall.py (alphabetical neighbour, control) 19

It is not even reported as skipped. The job prints 13387 passed, 227 skipped with 148 SKIPPED lines enumerated, and this module is not among them — a collection-time importorskip aborts before the skip report, and the lane passes no -rs.

No other lane covers it. Test Gaia Agent (job 106677441301, SUCCESS) is the one lane on this PR that installs gaia_agent_chat, but it runs a hand-enumerated list of test files that omits this module — 0 hits in its log too.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

The scenario changes are correct — I checked them offline, since the Gemma lane is dark until the spend cap resets (#4080).

All 91 scenarios parse and pass the eval framework's own validator, none points at a retired agent, every tool they reference still exists, and the flagship's tool surface is a strict superset of what the old per-scenario pins needed. The PR's own eval tests pass.

The thing worth a reviewer's attention isn't a defect. Roughly 50 scenarios used to be pinned to doc, chat or file, and that pin beat the CLI flag — so they genuinely scored those agents. After this PR they score the flagship. There is no committed flagship baseline to compare them against yet; the PR states this itself. So those 50 scores are unanchored until someone generates that baseline, which can't happen before the cap resets on Sep 23 15:00 UTC.

That's a sequencing fact, not a reason to hold the merge. Nothing here is broken; the comparison point simply arrives after the merge rather than before it.

Deleting the standalone RAG lane leaves no coverage hole — rag_quality is still in the consolidated category list, so those scenarios keep running.

🔍 Technical details

Verified at head d85d9fd0af, against base 83aa69dd91, in a detached worktree.

Q1 — parse + schema. Ran all 91 scenarios through this PR's own find_scenarios() / validate_scenario() in src/gaia/eval/runner.py rather than a hand-written parallel validator: 91 OK, 0 bad. Zero residual agent_type keys, which matters because validate_scenario now hard-rejects that key at load.

Q2 — agent and tool existence. AgentRegistry().discover() at head yields ['builder', 'chat', 'doc', 'file', 'gaia'], so no scenario ever pointed at a retired per-task agent. All four referenced tool names resolve (index_document, list_indexed_documents, query_specific_file in rag_tools.py; search_files in agent_ui_mcp.py).

The superset argument: GaiaAgentConfig.prompt_profile = "full" (hub/agents/gaia/python/gaia_agent/agent.py:154), and PROFILE_SPECS["full"].tool_groups is doc_rag, file_fs, data_scratch, web_browse, full_screenshot, media_transcribe — which covers doc's doc_rag, file's file_fs, and chat's empty set. So no re-scored scenario loses a tool it needs. It does get a wider prompt and a larger tool menu, which is exactly why the scores are not directly comparable to the old ones.

Q3 — model / category / baseline references. No scenario pins a model id. Every category: matches its directory. Every operational consumer of the deleted baseline directories was updated to gaia-flagship. One stale doc reference survives in a historical plan (docs/plans/email-triage-skill.mdx:281, still naming gemma-4-e4b-d71cd914/ as a live acceptance bar) — filed separately, out of scope here.

Q4 — classification of the 56 changed files.

bucket n
pure rename / move 1 — safety_handbook_water.yaml into rag_quality/ (R100)
semantic: now scores a different agent 50
mechanical no-op (already pinned gaia) 5
deletion of coverage 0

The 50 break down as 39 previously doc, 10 previously chat, 1 previously file.

Tests. tests/unit/eval/test_scenario_agent_types.py, test_scenario_agent_provenance.py and test_integrity_gate.py at head: 51 passed.

Scope note. The consolidated lane widens from 3 categories to 10 (82 scenarios), with vision and web_system deliberately excluded. So this is an expansion of coverage, not a trade.

kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Sep 24, 2026
…answer (amd#4133)

The code benchmark has been blaming the model for an outage it never
saw. When Anthropic refuses a call because the account hit its usage
limit, the agent's "answer" is the rejection notice — and `code_bench`
scored that as a failed coding task. `_AGENT_ERRORS` exists specifically
to stop that, but none of its seven patterns matched the text the API
actually returns, so every run during the current weekly limit (amd#4080)
is reporting coding failures that are really harness failures. After
this, those tasks are marked `agent could not run` and excluded from the
solve rate, which is what the scorecard already does for an exhausted
credit balance.

This only makes the outage legible. It does not restore eval coverage —
the limit is real and resets Sep 23.

<details>
<summary>🔍 Technical details</summary>

The live rejection, verbatim from PR amd#4096 run `35706759444` job
`106755245481`:

```
You've hit your weekly limit · resets Sep 23, 8am (America/Los_Angeles)
```

Four things in it change between outages, so the pattern deliberately
avoids all of them:

| varies | why matching it goes blind |
|---|---|
| the adjective | `weekly` today, `5-hour` or `daily` next month |
| the reset date | different every single time |
| the apostrophe | sometimes `'`, sometimes U+2019 |
| the separator | U+00B7 between `limit` and `resets` — which is why
`util/`'s `"limit resets"` pattern never fired either |

`"hit your"` is the only span that survives all four, and the match at
`code_bench.py:591` is a plain case-sensitive `marker in result.answer`,
so a short fragment is the robust shape. `"usage limit"` is added
alongside it for the "reached your usage limit" phrasing, which the
lead-in misses.

On false positives: `"hit your"` is generic enough to be worth a second
look, but it does not appear in ordinary benchmark answers — including
ones that discuss limits ("the rate limit on the API is 60/min", "clamp
the percent at its upper limit"). The failure mode if it ever did fire
wrongly is a task excluded from scoring, not a wrong score.

This is a *second* copy of outage classification. amd#4120 fixes the other
one (`util/classify_claude_probe.py`) and does not touch this file.

The canary's issue template is a one-line wording fix in the same class:
it told admins to raise "the monthly spend limit", but this is a weekly
usage limit that lapses on its own. It now points at the error line
rather than naming a period.
</details>

## Test plan

- [ ] `python -m pytest tests/unit/test_code_bench.py -q` → 52 passed
- [ ] The verbatim live string runs end-to-end through `run_task` and
comes back as `result.error`, not a failed task
- [ ] `test_a_usage_limit_matches_whatever_the_adjective_and_date_are`
covers a different adjective, a different date, U+2019, a leading BOM,
and the "reached your usage limit" wording
- [ ]
`test_the_fixture_still_carries_the_separator_that_broke_the_match`
fails if anyone normalises the U+00B7 to a hyphen
- [ ] `python util/lint.py --black --isort` → clean

Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Sep 24, 2026
amd#4120)

Five open PRs (amd#4096, amd#4108, amd#3937, amd#3122, amd#3072) are showing a red
agent-eval lane for a scorecard that was never produced. The Anthropic
account is over its weekly spend cap, and the rejection text changed to
a wording the preflight classifier does not recognise, so instead of
"quota exhausted, this says nothing about your PR" the job dies in ~37
seconds with "could not be classified" and looks like a measured quality
regression. After this change the same outage is named as a quota outage
and points at billing rather than at the PR or the repository secrets.

The pattern matches on `weekly limit`, not on the reset date the message
quotes — that date moves every reset.

## Test plan

- [ ] `python -m pytest tests/unit/test_classify_claude_probe.py -q` —
30 passed
- [ ] `test_real_weekly_limit_rejection_is_a_quota_problem` feeds the
verbatim text from run 35681533582 (job 106629918099), BOM and U+00B7
included, and asserts `quota`; it fails on `main`
- [ ] `test_the_weekly_limit_pattern_does_not_depend_on_the_reset_date`
pins that a different reset date still classifies
- [ ] `python util/lint.py --black --isort --flake8` passes
- [ ] The classifier stays pure ASCII
(`test_the_classifier_module_is_pure_ascii`), which the PowerShell eval
step depends on

Co-authored-by: Kalin Ovtcharov <[email protected]>
Reconciles two independent designs in the same region: main added
per-scenario iteration repeats (summarize_attempts) while this PR's
own tip commit deliberately removed per-scenario agent_type honoring
(_resolve_scenario_agent_type) in favor of one agent per run. Kept
main's iteration/summarize_attempts mechanism, dropped the
now-superseded per-scenario agent_type resolution per this PR's own
stated intent.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit 556b04d Sep 25, 2026
48 of 51 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/eval-consolidation branch September 25, 2026 00:05
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Sep 25, 2026
…ence (amd#4097)

Stacks on amd#4096 — review that one first; the two commits below its head
are its, not this PR's.

The scenario eval was one serial job running all 82 scenarios: ~5.8 h
expected, 9.2 h at the ceiling we have actually measured, holding the
single shared Lemonade slot the entire time — so in practice nobody
waits on it and every other eval on that box queues behind it. It now
runs as four independent lanes on the ephemeral `devlab-dispatch` pool,
about 2 h each, finishing together. And because that pool destroys the
machine when the job ends, each lane now uploads what you need to read a
failure — transcripts, judge rationales, failure analysis, the backend
log and the Lemonade logs — instead of scores alone. Until now the
advice on a red eval was "reproduce it locally", which on a machine that
no longer exists is not advice.

This does not weaken CLAUDE.md's "run evals serially" rule. That rule is
about two evals evicting each other's model out of **one** Lemonade
slot; every lane gets its own machine and its own backend, and inside a
lane the categories still run one at a time. The rule's wording is
sharpened to say so rather than relaxed.

Four things a reviewer should look at specifically:

- **`eval/ci_lanes.json` is the single source of truth for the split**,
because the dangerous edit here is silent: a category assigned to no
lane simply stops being measured while every lane still reports green. A
`lanes` job validates the map on a hosted runner before anything reaches
the scarce AMD pool, and a unit test fails the build on an orphan.
`vision` and `web_system` stay excluded — they read the runner's screen
and clipboard into an artifact that is public.
- **The `memory` lane now runs with memory switched on**, which it could
not do before. `GAIA_MEMORY_DISABLED=1` was set workflow-wide, so a
quarter of the suite was scoring an agent that had no
`remember`/`recall` tools at all — those scenarios could only ever have
failed, for a setup reason that reads exactly like a quality regression.
The old default was right for one serial job on a shared runner, where
memory state bled from one category into the next one's score; separate
ephemeral machines make that impossible, so the memory lane can opt back
in alone. It stays off for every other lane, and a lane whose memory
environment does not match its categories now fails at a named step
before anything runs rather than producing a misleading scorecard.
- **The scenario job now installs the flagship agent it scores.** `gaia`
is not a builtin — it registers only through a hub package that no extra
pulls in — so without it every scenario 422s at session creation,
records INFRA_ERROR, and the eval still exits 0 having produced a
scorecard full of nothing. Each lane now asks the backend which agents
registered and refuses to start if the eval's default is missing, naming
the install line to fix. This is the same two-part fix already made on
amd#4096's branch, carried across rather than reinvented; with five jobs
building their own venv, the one-line install is the part that rots.
- **The nightly replaces `weekly_eval.yml`** and keeps the one thing it
did well: filing an issue when the run does not pass. PR runs are
path-filtered, so environment drift (a Lemonade version bump, a
re-quantised model, a driver or runner-image change) moves nothing in
the repo and triggers nothing — the nightly is the only thing that can
catch that class. It is a `schedule:` trigger on this same workflow, not
a reusable-workflow caller, so it cannot reproduce the phantom-job bug
that had `weekly_eval.yml` filing issues about jobs that never started.

With no flagship baseline committed yet, a green run still is not a
no-regression verdict, and the new aggregate summary says that out loud
rather than letting a row of green checks imply it.

## Not verified end to end, and why

**The eval cannot be run right now.** Per amd#4080 the Anthropic org behind
the CI judge credential is out of monthly spend, so every eval dies in
preflight; the limit resets Sep 23. Nothing below exercises a real lane
against real hardware, and I am not claiming otherwise. What is verified
is the structure, the Python, and each new PowerShell guard's logic run
standalone against stubbed inputs; what is not is any lane against real
hardware, which needs a `workflow_dispatch` once amd#4080 clears. In
particular the agent-registration guard has never been run against a
live backend — its query shape is checked against `AgentListResponse` in
`src/gaia/ui/models.py`, not against a running server.

## Test plan

- [ ] `python -m pytest tests/unit/eval/test_ci_lanes.py
tests/unit/eval/test_lane_summary.py -q` — 15 pass
- [ ] `actionlint .github/workflows/eval_flagship.yml` — clean apart
from the pre-existing unknown-self-hosted-label noise (no
`actionlint.yaml` in the repo)
- [ ] Every workflow still parses: `python -c "import
yaml,glob;[yaml.safe_load(open(f,encoding='utf-8')) for f in
glob.glob('.github/workflows/*.yml')]"`
- [ ] The lane validator produces the right matrix:
`EVAL_LANES_FILE=eval/ci_lanes.json GITHUB_OUTPUT=/dev/stdout python -`
with the `lanes` job's body — emits 4 lanes covering all 82 scenarios,
exit 0
- [ ] Break the map on purpose and confirm it fails loudly: add a
`vision` entry to a lane, or delete a category from the map, and the
`lanes` job / `test_ci_lanes.py` both refuse
- [ ] The memory guard is right in both directions: run the `Check the
memory environment matches this lane` body under `powershell` with the
memory lane's env (exit 0), with the workflow defaults (exit 1, naming
all three variables), with a non-memory lane's env (exit 0), and with
the variables unset (exit 1)
- [ ] The agent-registration guard is right in both directions: run its
`-notcontains` body under `powershell` with a stubbed `/api/agents`
payload containing `gaia` (exit 0), missing it (exit 1, listing the
registered ids), a single-element list (exit 1, no unrolling crash), and
an empty list (exit 1, no crash)
- [ ] `-e hub/agents/gaia/python` appears in **both** jobs'
`install-package`, not just the outcomes job
- [ ] No non-ASCII in any PowerShell `run:` body (a single em dash kills
a step at parse time on this pool)
- [ ] **After amd#4080 clears:** `workflow_dispatch` `eval_flagship.yml` on
this branch and confirm the four lanes run at once on separate machines,
each artifact carries `traces/` and `backend.*.log`, and the aggregate
summary renders with the no-baseline warning

---------

Co-authored-by: Ovtcharov <[email protected]>
Co-authored-by: probe <probe@local>
Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Sep 25, 2026
main renamed test_eval_agent_gemma_consolidation.yml to eval_flagship.yml
(amd#4096); this branch's task-judge bump follows it under the new name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Sep 25, 2026
…lanes (amd#4105)

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 (amd#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.
- amd#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.

<details>
<summary>🔍 Technical details</summary>

**Based on `kalin/eval-consolidation`, not `main`.** amd#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 amd#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
amd#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 amd#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.
</details>

## Test plan

- [ ] `python -m pytest tests/unit/eval/test_skill_scenario_coverage.py
-q` — 28 pass
- [ ] `python -m pytest tests/unit/eval/test_scenario_agent_types.py -q`
— 4 pass,
      confirming amd#4096's guard and this one coexist
- [ ] `python -m pytest tests/unit/test_starter_skills.py -q` — 188
pass, unchanged
- [ ] All eight YAMLs load through the real `validate_scenario()` and
are found by
      `find_scenarios()` under their categories
- [ ] `python util/lint.py --all` — no new findings
- [ ] Not verifiable before merge: an actual eval run. Blocked on amd#4080.

---------

Co-authored-by: Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
huong8373tt-beep pushed a commit to huong8373tt-beep/gaia that referenced this pull request Nov 1, 2026
…seline (amd#6243)

## Summary

Point the email-triage plan's acceptance bar at the flagship baseline
that exists today, `tests/fixtures/eval_baselines/gaia-flagship/`,
instead of a deleted directory and a "no email category yet" blocker
that has since been resolved.

## Why

The paragraph under **Acceptance bar** reads as a live gate, not
history: it tells whoever decommissions the email agent to compare
against `tests/fixtures/eval_baselines/gemma-4-e4b-d71cd914/` (deleted
in amd#4096) and says only three categories have committed baselines.
Anyone acting on it goes looking for a path that is not there (amd#4131).
The flagship baseline now has one scorecard per category, `gaia_email`
among them (`gaia_git` and `gaia_resilience` have none yet), and the
blocker it cites (amd#2983) was closed on 2026-10-25, so the bar can simply
name the real files.

Only this paragraph changes. The other stale mentions of the old
directory (`docs/plans/gaia-agent-latency.md`, `port-audit-6-agents.md`,
`port-triage-thin-infra-agents.md`) describe past runs and read as such,
so they are left alone, as the issue suggested.

## Linked issue

Closes amd#4131

## Changes

- `docs/plans/email-triage-skill.mdx`, "Acceptance bar": replace the
"Blocker first" paragraph with one that names
`tests/fixtures/eval_baselines/gaia-flagship/`, notes it has a
`scorecard_<category>.json` per category including `gaia_email` (none
yet for `gaia_git` and `gaia_resilience`), records that amd#2983 is closed,
keeps the single-iteration caveat from the baseline's `meta.json`, and
limits the flagship comparison to the `tool_selection` re-run and
`gaia_email` once the skill lands.

## Test plan

- [x] `git diff --check` (clean)
- [x]
`tests/fixtures/eval_baselines/gaia-flagship/scorecard_gaia_email.json`
exists on `main`
- [x] `gemma-4-e4b-d71cd914` no longer appears in
`tests/fixtures/eval_baselines/`

## Evidence

- **Agent exposed in the Agent UI** — N/A (docs-only change)
- **MCP tools / servers** — N/A (docs-only change)
- **CLI** — N/A (docs-only change)
- **HTTP API / REST** — N/A (docs-only change)

## Checklist

- [x] I have linked a GitHub issue above (`Closes #N` / `Fixes #N` /
`Refs #N`).
- [x] I have described **why** this change is being made, not just what
changed.
- [ ] I have run linting and tests locally (`python util/lint.py --all`,
`pytest tests/unit/`).
- [x] I have attached **real-world evidence matched to the surface I
changed** (see Evidence above), or marked each surface N/A.
- [x] I have updated documentation if user-visible behavior changed (see
[CONTRIBUTING.md](../CONTRIBUTING.md)).

---------

Co-authored-by: kovtcharov-amd <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes devops DevOps/infrastructure changes documentation Documentation changes eval Evaluation framework changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants