Repository navigation
Conversation
A scorecard.json recorded only the CLI-level --agent-type in its run config, but a scenario's own agent_type: overrides that flag. A run invoked --agent-type gaia could therefore emit a scorecard labelled gaia whose scenarios had every one of them run doc — provenance that is false on its face, and unusable as the basis for a published release scorecard. The resolved agent is now stamped onto every scenario result inside run_scenario_subprocess, which both runner call sites (the initial pass and the --fix rerun pass) go through, so the two cannot drift apart. The skipped-no-document path records it too. Adding the key is backward compatible: compare_scorecards keys on scenario_id, so baselines recorded before the field existed still diff normally. A test pins that, and self-invalidates if a future re-baseline makes it vacuous. Refs #2983
All five tool_selection scenarios pin agent_type: doc, and a scenario's own agent_type overrides the CLI flag, so no invocation of `gaia eval agent --category tool_selection` could measure the flagship agent. The milestone's regression bar was reading ChatAgent's doc profile and could not see the flagship's tool growth at all. These are new ids rather than a repoint of the existing five. compare_scorecards diffs per scenario_id, so reusing the ids while changing which agent produces them would make --compare report improved/regressed/unchanged against the committed baselines while actually comparing two different agents — a verdict that looks valid and is not. New ids leave the doc baselines diffing cleanly and land in only_in_current until a flagship baseline exists. The doc profile also keeps its coverage, which a repoint would have deleted. The clones are not copy-paste. The doc original of data_vs_recall_disambiguation reasons about analyze_data_file being a conditional bundle member, which is false for the flagship's full profile; its counterpart asks the question that is real there — whether semantic selection surfaces the tool at all when ~26 of ~80 tools reach the model. Turns and ground truth are unchanged wherever the expected answer is agent-independent, so the paired ids stay comparable. pytest tests/unit/eval/test_scenario_agent_types.py -q -> 63 passed (up 5, one parametrized case per new scenario). Refs #2983
Turns a real `gaia eval agent` run into hub/agents/gaia/npm/SCORECARD.md, the published card the flagship has never had. Mirrors the email adapter's shape, not its metric: email scores a labelled corpus, this reads a scenario run, so the aggregate is a weighted mean of per-category judge scores and is named weighted_judge_score rather than weighted_accuracy — calling an LLM judge score "accuracy" would misdescribe it. Provenance is read per scenario, never from the run config or a filename, because a scenario's own agent_type overrides the CLI flag and a run invoked --agent-type gaia can contain scenarios that ran doc. Every degenerate input raises with what failed and what to do about it, rather than producing a plausible number: a file with no per-scenario agent_type at all, no scenario that ran the flagship, nothing judged, or no ctx_size to stamp. The zero-judged guard is the important one — an all-INFRA_ERROR run would otherwise render a healthy-looking card, since infra errors are excluded from the average. The card ships in a public npm tarball and on the hub page, so paths are repo-relative and hardware is a class descriptor; the run's lemonade_url and response transcripts never reach it. pytest tests/unit/eval/test_release_scorecard.py -q -> 116 passed lint (black, isort) -> clean Refs #2983
The flagship could publish with no evidence of answer quality at all,
while email — the reference sidecar — has blocked every release on a
measured card for months. This adds the same gate and surfaces the card
where integrators look.
Presence + regression only, deliberately: email resolves absolute bars
from a thresholds manifest built on a labelled corpus, and the flagship
has neither that manifest nor a second measurement to derive a bar
from, so a number set here would be a guess wearing the costume of a
bar. An absolute bar is a follow-up once more than one measurement
exists.
--expected-version is what keeps the published number honest. The card
is regenerated only when a fresh eval runs, so without that check it
drifts silently behind the package version and ships a stale score.
Publishing to the hub is guarded on the file existing so a release cut
before the first flagship eval still publishes its docs; the gate job is
what makes the card mandatory. Note the consequence: with scorecard-gate
in publish's needs and no SCORECARD.md committed yet, the next flagship
release fails until a real eval produces one. That is the intended
behaviour and the reason this change cannot merge on its own.
Also corrects two documents this change falsified — the scorecard
playbook (the flagship is now a second adopter, with a judge-scored
scenario harness rather than a labelled corpus) and the email-triage
plan's acceptance bar.
Verified:
pytest tests/unit/eval/test_*.py -q -> 681 passed, 1 skipped
python -m gaia.eval.scorecard_gate --scorecard hub/agents/gaia/npm/SCORECARD.md
-> exit 1, "SCORECARD.md missing", naming the generator to run
yaml.safe_load(release_agent_gaia.yml) -> OK
lint (black, isort) -> clean
Refs #2983
Resume mode appended a prior run's trace verbatim, so it was the one result-construction path the previous commit left unstamped. A scorecard built from a resumed run would carry a half-populated agent column, and the generator either raises on it or drops real flagship results as unattributable. On reachability, against my own first reading: this branch is hard to reach in normal operation. _run_locked mints a fresh timestamped run_id per call and creates the run dir under it, so .progress.json can only pre-exist when two runs start inside the same second and collide on the id, or when results_dir is pointed at an existing run dir directly. The fix is therefore defensive consistency with the other three paths rather than a repair of an observed failure, and it is not claimed as more than that. It is left in because a known half-populated column is worse than none, and setdefault cannot regress a trace that is already stamped. No test accompanies it: the path has no harness in the repo and cannot be triggered without either forcing an id collision or reaching into internals, and a mocked test that never exercises the real branch would assert nothing. pytest tests/unit/eval/test_*.py -q -> 681 passed, 1 skipped lint (black, isort) -> clean Refs #2983
|
Adapter evidence, ahead of the real eval run. Both of these are executed against real files in this branch, not mocks. It refuses to attribute an unattributable run. Pointed at a committed baseline recorded before the harness stamped provenance: That is the guard that matters most here: the failure mode this issue exists to prevent is a published number that claims to measure the flagship without having done so. The arithmetic is recomputable by hand, which is the point of publishing Rendered from the committed fixture into a temp dir ( 🔍 What the rendered card does and does not carry
The methodology string states plainly that the aggregate is a judge score and not an accuracy — there is no labelled ground truth in this corpus, only a rubric. That is also why Category means are computed from the filtered flagship scenarios rather than read from the run's Remaining before this leaves draft: run 35627620637 has to produce a real |
Skill audit
✅ 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 |
|
Request changes — but only on details; the design is right and the draft blocker the author flagged is the correct one. This gives the flagship agent the same published, measured score and the same release block the email agent already has, and fixes the reason it could not be measured before (every tool-selection scenario was pinned to another agent, and the scorecard never recorded which agent actually ran). The per-scenario provenance stamp and the refuse-to-emit-on-a-zero-measurement run are the two things that keep the published number honest, and both are done well. Three things to fix before this leaves draft:
Real-world evidence
Real inference — an actual 🔍 Technical detailsIssues🟡 Published reproduction command is not runnable for a multi-category run (
(With the flag dropped, line 222's f-string renders a double space — worth collapsing at the same time.) 🟡
🟡 README contradicts the gate this PR wires ( "It is regenerated only when a fresh eval runs, not on every release, so it can lag the package version above" — 🟢 Misleading remedy in the no-provenance error (
🟢 No
Strengths
|
The missing-card case asserted only that the gate returned 1. Every failure path in that gate returns 1 — a regression, an unreadable card, an unparseable one, a bad flag — so the assertion could not fail for the reason the test is named after. A gate that stopped mentioning which file was missing, or how to produce it, would have kept this test green. Now asserts the card's path and the generator to run appear in the output, so the message that makes the failure actionable is covered by the test that claims to cover it. pytest tests/unit/eval/test_scorecard_gate.py -q -> 44 passed Refs #2983
|
The three issues from the last review are still open — none of the requested changes appear in this push. 🟡 Reproduction command still broken for multi-category runs — 🟡 🟡 README still says the scorecard "can lag the package version" — 🔍 Technical detailsReproduction command ( Drop the flag when more than one category was run — an unfiltered run covers all of them and the adapter filters to gaia anyway.
(And the README wording ( |
|
Heads up on an overlap — we're consolidating the scenario eval onto the flagship agent, so some of this PR's premise changes. The decision is one eval that measures the flagship and nothing else: the per-scenario Nothing to do while this is a draft — flagging it so the overlap isn't a surprise when you pick it back up. The scorecard and release-gate half is unaffected and still wanted; it's specifically the five cloned 🔍 Technical detailsThe consolidation drops Your provenance fix (stamping the resolved agent per scenario inside |
Part of amd#4052 — deliberately not closing it. Criteria 1-4 (the Gmail backend, shape parity with the Outlook arm, read-only consent declaration, and the four-state no-mailbox error) are met and covered by tests here. Two are not, and neither can be met by code: - **The eval comparison** needs a working judge and a committed flagship baseline. The judge is out of org budget repo-wide (amd#4080) and the flagship has no baseline yet (amd#2983). No eval was run and none is claimed. - **The live-mailbox transcript** needs a human on a box with a connected Gmail. amd#4074 owns that as the milestone's exit gate. Leaving amd#4052 open keeps those visible rather than closing them by implication. The flagship agent could only read Outlook. Ask it about your Gmail and it answered `Agent 'installed:gaia' has no grant for microsoft` — a Microsoft error, on a machine where Google was the connected mailbox. Now the same five email tools read either mailbox, pick the right one on their own, and when neither is usable they say which mailbox is in which state and give you the one command that fixes it. A first-time Google user is asked to **read your email** and nothing more. If your Google account was already connected for the Email Triage Agent it carries the broader `gmail.modify` scope; the flagship reuses that rather than sending you back through a browser, and needs only a local grant-ledger write. ### Two things the reviewer should know **The spec was wrong and this PR corrects it.** Issue amd#4052 and `docs/plans/email-triage-skill.mdx:134` both describe this as "a backend relocation" of the sidecar's `gmail_backend.py`. The credentials are genuinely shared; the code is not. <details> <summary>🔍 Why it could not be a relocation</summary> - `_email/graph.py:10-14` already states the rule this follows: the flagship must not depend on the standalone email package it is meant to replace. - `gmail_backend.py:59-63` imports `gaia_agent_email.google_errors` and `gaia_agent_email.scopes` — both sidecar-package modules. - Decisive: `LiveGmailBackend` never emits the provider-neutral shape. `list_messages` (`:790-811`) returns `{"messages":[{"id","threadId"}]}` — id stubs, no headers — and `get_message` (`:813-819`) returns the raw Gmail resource. The flattening lives in `gaia_agent_email/tools/read_tools.py` (3414 lines), which does not come along. Without it none of `message_summary`'s shape exists, and that shape is the whole reason the skill never learns which mailbox answered. Measured: `gmail.py` is 425 lines against `gmail_backend.py`'s 1256, matching what Phase 0 did (242 vs `outlook_backend.py`'s 722). The plan doc is corrected in this PR — both the "relocated from" table row and the "largely a relocation, not a rewrite" paragraph above it. </details> **One pre-existing flaw is deliberately not fixed here.** `graph.py:119` interpolates raw `response.text[:300]` into a user-facing error string. It lives in the Outlook backend, which this change does not otherwise touch, and folding an unrelated cleanup into a feature PR blurs the diff. The new Gmail backend does not copy the pattern: its errors are built only from Gmail's structured `reason` field and an `extendedHelp` link rejected unless it starts with `https://`. Tracked separately in amd#4082. ### Test plan - [ ] `python -m pytest tests/unit/agents/tools/ -q` → **113 passed**. Includes all 33 pre-existing email tests, unmodified. - [ ] `python -m pytest hub/agents/gaia/python/tests/test_gaia_agent.py -q` → **22 passed** (19 before, 3 added). The `tools_count: 80` drift guard still holds: no tool was added or renamed. - [ ] `python util/lint.py --all` → **exit 0**. Black, isort, Pylint, Flake8, Import Validation and Bandit all PASS. - [ ] `python -m pytest tests/unit/ -q -p no:randomly` → 24 failing node ids on this branch, **28 on a clean checkout of the base commit**. Zero failures are unique to this branch; the branch fixes none of them either (the 4-test difference is a `gaia` console-script PATH check, environment state). Both runs captured in full. Shape parity is asserted by value type and format, not key presence — a green key-set test passes while every value is wrong. `received` is `Z`-suffixed UTC built from epoch-millis (a naive `fromtimestamp` breaks "what came in today"); `from` survives both `"Doe, Jane" <j@x>` and `=?UTF-8?B?…?=`; `preview` is entity-unescaped; `CATEGORY_PROMOTIONS` never reaches the field the triage skill reads as user tags; an inline base64 attachment is asserted absent from the body. Outgoing request shape is asserted too, over a real `httpx.MockTransport`: `labelIds` are checked against Gmail's documented system-label **IDs** (Gmail 400s on names), `metadataHeaders` is asserted to ride with `format=metadata`, a failed fetch is asserted to raise rather than silently shorten a listing, and the empty-mailbox path is driven by a transport that **omits** the `messages` key the way the real API does. ### Not closed by this PR - **A turn's cumulative body budget is unbounded.** `read_email` caps one body at 12,000 characters and marks the truncation visibly, which is ~12% of the 32K NPU context at the worst density I measured (3.0 chars/token, for quoted thread history — plain text runs 4.7 and HTML 3.7). But the cap is **per message**: an agent reading eight messages while triaging can still exhaust the window, and nothing tracks the running total. Out of scope here; tracked separately. - **AC5 (eval)** — not run and not claimed. The judge credential is rejected on the Anthropic org's monthly spend limit (amd#4080) and the flagship has no committed baseline (amd#2983, amd#4056), so there is nothing to regress against. - **AC6 (live Gmail)** — needs a human with a connected Google account; no transcript is fabricated here. - **Search relevance ordering** — a server behaviour, unobservable under a mock transport. Recorded as unproven rather than implied by the `q`-parameter test that is present.
|
The five new On "no absolute bar": the scenario evals already carry perf and quality manifests, but their numbers are placeholders in report mode (200k input tokens and 600 s per scenario, not enforced). The plan in the flagship-validation workstream is to replace them with limits measured over 3 repeated runs per category on the Strix Halo pool (tokens, turns, tool calls, wall time, judged score), the same way 🔍 Technical details
|
amd#4640) Five contributor skills under `.claude/skills/` were giving instructions that stopped matching the repo. They pointed builders and responders at agents deleted when per-task agents became hub skills, such as "mirror the `analyst` package" or "link the jira/docker/blender guide". One cited a `gaia audio` command that doesn't exist. Another said the base `Agent` never imports Lemonade at module level, when it does. After this PR, each of those skills names the agents, guides and imports that actually exist. The 16 product skills under `hub/skills/` needed no change. Every tool, command, flag and path they reference checks out, and all 16 pass `gaia skill audit` with ALLOW. That means nothing the flagship agent reads at runtime changed, so no eval is needed for this PR. <details> <summary>🔍 Technical details</summary> - `gaia-build-agent`: templates to mirror are now `hello-world` / `word-count` / `email`, and the closer base class is `ChatAgent`. The non-default model example is the email agent's NPU pick, not a summarizer. The eval step now matches CLAUDE.md: there is no committed baseline yet, so report the measured scores. - `integrate-hub-agent`: the agent list now matches `hub/agents/`. The name-divergence example is now real: the flagship's module is `gaia_agent` and its npm package is `@amd-gaia/gaia`. The entry point comes from `gaia-agent.yaml` `entry_module`, because the flagship has no `build_registration()`. - `github-issue-response`: the "where things live" map lists the agents and guides that exist today. - `lemonade-client-patterns`: `agent.py` imports `DEFAULT_MODEL_NAME`, the ctx helpers and `CONNECTION_FAILURE_RE` at module level. The skill now describes that accurately instead of forbidding what is already there. `gaia audio` now reads "audio transcription". - `weekly-audit-patterns`: the published agents are email and the flagship. The audit prompt itself is updated in the review-automation PR. - How the refs were checked: a script resolved every backticked path, `gaia <cmd>` subcommand, `--flag`, `gaia.*` module and code symbol in both skill sets against `git ls-files`, the argparse definitions, and the `@tool`-registered names. Flags it raised that turned out to be relative paths or harness tools (`SendUserFile`) were dropped. `testing-the-gaia-agent` and `adding-eval-scorecard` are left alone because open PRs amd#4461 and amd#4056 edit them. </details> ## Test plan - [x] `pytest tests/unit/test_ai_doc_paths_exist.py tests/unit/test_no_stale_agent_paths.py tests/unit/test_starter_skills.py tests/unit/test_skills_format.py tests/unit/test_skills_drift.py tests/unit/test_skills_audit_no_false_positives.py tests/unit/test_skills_audit_instructions.py tests/unit/test_skill_sets.py tests/unit/test_flagship_ci.py tests/unit/test_skills_manager.py tests/unit/test_adaptive_skills.py` (961 passed, 16 skipped) - [x] `gaia skill audit hub/skills/<each>` returns ALLOW for all 16 --------- Co-authored-by: Kalin Ovtcharov <[email protected]>
|
Closing as superseded — thanks @itomek. Since this was drafted, the flagship gets measured another way: every eval scenario now scores the flagship by default, and |
Refs #2983 — deliberately does not close it. The measured card cannot be produced in this
session (see the blocking callout and the note at the end), so #2983 stays open naming that
blocker rather than being closed on infrastructure alone.
The flagship GAIA agent — the first thing a new user meets — can ship a release with no evidence its answers are any good. The email agent publishes a measured score every release and blocks the release if that score drops; the flagship publishes nothing and blocks on nothing, so a change that quietly made it worse would pass every unit test and go out the door. This gives the flagship the same measured score and the same release block, and surfaces the card where integrators actually look.
It also fixes the reason the flagship could not be measured at all: the five scenarios that test whether an agent picks the right tool are pinned to a different agent, and the command-line flag meant to redirect them is ignored.
Important
Draft — must not merge yet.
hub/agents/gaia/npm/SCORECARD.mddoes not exist; it has to come from a real eval run, which is waiting on an inference machine. Becausescorecard-gateis in the publish job'sneeds:and the gate fails on a missing card by design, merging this as-is would fail the next flagship release. The card lands first, or this does not merge. No number in this PR is hand-authored and none will be.Why new scenarios instead of repointing the existing ones
#3814 posed this as "fix the scenarios or the bar". Repointing the five
tool_selectionscenarios toagent_type: gaialooked like the obvious move and is the one thing that must not happen.compare_scorecards(src/gaia/eval/runner.py:1469+) diffs perscenario_id, not per category. A repoint keeps the same five ids while changing which agent produces them, so--compareagainst the committedscorecard_tool_selection.jsonbaselines would report improved / regressed / unchanged — a verdict that looks valid while comparing two different agents. That is the trap #3906 hit oncsv_analysisand could only annotate with a_stale_note; doing it deliberately five times is worse. It would also delete the only tool-selection coverage thechatpackage's doc profile has.New ids avoid both: the doc ids keep diffing cleanly against their baselines (nothing invalidated, no
_stale_note), and the new ids land inonly_in_current, which the compare already reports separately from regressions. Mixing two agents in one category is established precedent — #3906 did exactly that inrag_quality.The premise, source-confirmed at
src/gaia/eval/runner.py:1947-1948: "Per-scenario agent_type from YAML overrides CLI --agent-type". So--agent-type gaiais dead on these scenarios and #3814 §3 cannot observe the flagship by any invocation available today.The clones are not copy-paste — the doc original of
data_vs_recall_disambiguationreasons aboutanalyze_data_filebeing a conditional bundle member, which is false for the flagship's full profile.Two things that would have made the published number a lie
Provenance.
scorecard.jsonrecorded only the CLI-level--agent-typein its run config, so a run invoked--agent-type gaiacould emit a scorecard labelledgaiawhose scenarios had every one of them rundoc. The resolved agent is now stamped per scenario, insiderun_scenario_subprocess, which both runner call sites go through — so the two cannot drift apart. Backward compatible:compare_scorecardskeys onscenario_id, and a test pins that old baselines still diff normally, self-invalidating if a future re-baseline makes it vacuous.Zero-judged runs. Infra errors are excluded from the category average, so an all-INFRA_ERROR run would otherwise render a healthy-looking card. The generator raises instead — as it does for a file with no per-scenario provenance, no flagship scenario, or no
ctx_sizeto stamp.No absolute bar, on purpose. Email resolves
--min-aggregate/--min-urgent-recallfrom a thresholds manifest built on a labelled corpus. The flagship has neither that manifest nor a second measurement, so a threshold set here would be a guess wearing the costume of a bar. Presence + regression only; an absolute bar is a follow-up.Test plan
Executed:
pytest tests/unit/eval/test_*.py -q→ 681 passed, 1 skipped (up from 668 onmain)pytest tests/unit/eval/test_scenario_agent_types.py -q→ 63 passed (up 5 — fix(eval): point five scenarios at a real agent, and reject unknown agent types #3906's guard globs scenarios, one parametrized case per new scenario, and it stays green)python -m gaia.eval.scorecard_gate --scorecard hub/agents/gaia/npm/SCORECARD.md→ exit 1, with an actionable error:yaml.safe_load(.github/workflows/release_agent_gaia.yml)→ OKpython util/lint.py --black --isort→ cleanStill to run, and what gates promotion out of draft:
gaia eval agentrun on AMD hardware producinghub/agents/gaia/npm/SCORECARD.md--baseline-file(exit 1)round(100·Σ(wᵢvᵢ)/Σwᵢ, 2)fromaggregate.componentsmatching the recordedaggregate.valueEvidence provenance — read before trusting the check list. Every
[x]above is a localpytest/ lint run, pasted verbatim. None of it is CI. This PR was opened as a draft, andtest_gaia_cli.yml:39-41gates the whole test tree ondraft == false || contains(labels, 'ready_for_ci')— so until theready_for_cilabel was added, Unit Tests, API Tests, Lint, TestGaia Agent and Test Eval Tool were all skipping while the check list still rendered green. Judge
this PR on the pasted output, not on the badges.
Why the last three boxes are unchecked and will stay that way for now. The eval that produces
the card needs the one self-hosted Windows Strix Halo runner carrying the
lemonade-evallabel —the only machine in the fleet that can judge a scenario eval. At the time of writing, 16 runs are
queued on it, of which roughly 40% are superseded duplicates from successive pushes on other
branches. Two completed eval jobs today took 79 and ~60 minutes, so this PR's run
(
35627620637, created 16:45Z) starts in an estimated 15–19 hours. The run is left queued and willproduce the card when it reaches the front.
Nothing about this PR is blocked by this PR: the adapter works, its guards fire on real data, the
gate blocks correctly, and the corpus tripwire is clear. It is blocked by fleet capacity.