Repository navigation
fix(email-agent): stop the hub scorecard from claiming stale currency - #3801
Conversation
Correct the email agent's published scorecard to say plainly which version it measured, and add a release-time guard that fails a release when SCORECARD.md's version doesn't match the package version. - README.md's score line now names the measured version (v0.5.0) instead of stating a bare number next to v0.6.0 doc links. - The hub catalog and Agent UI now surface eval_score_version (the scorecard's own agent.version), so a viewer sees which release the score actually covers instead of assuming it's current. - scorecard_gate.py gained --expected-version, wired into release_agent_email.yml's scorecard-gate job, so a future package/scorecard version drift fails the release loudly instead of publishing silently. Closes #2965
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 changesThis makes the email agent's published quality score say which version it was measured on, and adds a release-time check so package/scorecard drift fails loudly. The release gate and the hub Worker both work as described — but the Agent UI half of the change is inert, and the "measured on" label will itself be wrong on a carry-forward release. What needs fixing before merge:
Worth a maintainer decision, not a blocker: as of this ref the next Real-world evidenceAn evidence bundle ran on a no-inference runner and exercised the gate, both HTTP surfaces, and the workflow step. It is honest about what it found, including the gap above. The gate fires on the real committed files, exactly as the workflow now invokes it: $ python -m gaia.eval.scorecard_gate \
--scorecard hub/agents/email/npm/SCORECARD.md \
--baseline-ref agent-pkg-email-v0.5.0 --expected-version 0.6.0 \
--min-aggregate 80.0 --min-urgent-recall 0.9
ERROR: SCORECARD.md version does not match the release (#2965).
hub/agents/email/npm/SCORECARD.md: agent.version = '0.5.0'
Package being released: '0.6.0'
exit=1The Agent Hub Worker really does emit the new field on HTTP 200 application/json; charset=utf-8
{
"id": "email",
"latest_version": "0.6.0",
"eval_score": 84.53,
"eval_score_version": "0.5.0",
"eval_scorecard_url": "https://hub.amd-gaia.ai/agents/email/0.6.0/SCORECARD.md"
}But the route the modal actually reads drops it — re-run against a local hub mirror that does serve the field: $ curl -s "http://127.0.0.1:4200/api/agents/catalog?refresh=true"
HTTP 200 offline=false, total=5
email eval_* keys returned: {'eval_score': 84.53, 'eval_scorecard_url': '…/SCORECARD.md'}
'eval_score_version' present: FalseThe bundle also spot-checked sibling gate flags ( 🔍 Technical details🔴
|
…e UI merge_with_registry copied eval_score/eval_scorecard_url onto merged catalog entries by an explicit allowlist that never included eval_score_version, so the "measured on vX" caption added in the prior commit had no data to render from — confirmed missing via a live curl against gaia.ui.server. Also make the worker's front-matter parser prefer inherited_from over agent.version so a carry-forward release (patch bump reusing a prior eval) reports the version the score was actually measured on, not the release version it was stamped with. Closes #2965
Adds a worker test exercising a carried-forward scorecard (agent.version stamped with the release version, inherited_from holding the version actually measured) to pin the new preference added for #2965.
|
Addressed the review: Also fixed the carry-forward gap: the worker's Tests added:
Real-world evidence — started a local Before this fix Test plan:
|
The contract test's catalog fixture hand-listed the conditionally-emitted eval keys, so #3801's eval_score_version left it stale and the test failed on a field that is genuinely on the wire. The fixture now reads those keys out of merge_with_registry's source, so a new conditional emit can't reintroduce the same false positive. Also hardens the TypeScript parser against two silent traps flagged in review: a brace inside a trailing // comment no longer offsets the interface's brace-depth counter, and field matching no longer assumes exactly four spaces of indentation.
The email agent's published quality score never says which version it was measured on, so a user viewing the 0.6.0 hub listing sees "84.53/100" with no hint it was actually measured against 0.5.0. This makes that drift visible everywhere the score is shown, and adds a release-time check so package/scorecard version drift fails loudly instead of shipping silently.
scorecard_gate.pygained--expected-version, wired into the email release workflow, so a release fails ifSCORECARD.md's version doesn't match the package being released.email_scorecard_refresh.yml) is a ~10.5h eval that has never completed in 100 dispatches (ci(email): scorecard-refresh has never completed — 90-min budget vs a ~2h workload #2094), so wiring it into the release path would either block every release or trigger a workflow with no track record of finishing. This PR makes the drift honest and loud instead.Closes #2965
Test plan
python -m pytest tests/unit/eval/test_scorecard_gate.py -q→ 38 passed (addsTestExpectedVersionGuard)npm testinworkers/agent-hub→ 216 passed (addseval_score_versioncoverage, including a case reproducing the real 0.6.0-package/0.5.0-scorecard drift)npx tsc --noEmitinsrc/gaia/apps/webui→ no errorspython util/lint.py --all --fix→ clean (no diff produced; one pre-existing unrelated mypy error insrc/gaia/factory/harvest/scan.py, confirmed present onmainbefore this change)🔍 Technical details
hub/agents/email/npm/README.md— score line now reads "measured on v0.5.0" instead of a bare number next to the v0.6.0 doc links.workers/agent-hub/src/catalog.ts+types.ts— newparseScorecardVersion()deriveseval_score_versionfrom the scorecard's ownagent.versionfront matter (independent oflatest_version).src/gaia/apps/webui/src/{types/index.ts,components/AgentDetailModal.tsx}— renders the measured version under the eval score, with a "(current: vX.Y.Z)" note when it differs from the installed/listed version.src/gaia/eval/scorecard_gate.py—--expected-versionfails the gate whenagent.versionin the candidate SCORECARD.md doesn't equal the value passed..github/workflows/release_agent_email.yml— thescorecard-gatejob now resolves the package version frompackage.jsonand passes it to the gate.stamp_version.pywas deliberately left alone: it stamps derived references to match the package version, but the scorecard's version is not derived — it's an independent fact about what was measured, and must never be silently rewritten to match the package.