Skip to content

ci(eval): action-item eval (Claude-judge required) — nightly + weekly + release gates (#1964) - #1976

Merged
kovtcharov-amd merged 5 commits into
mainfrom
kalin/1964-action-item-nightly-eval
Jul 9, 2026
Merged

kovtcharov-amd merged 5 commits into
mainfrom
kalin/1964-action-item-nightly-eval

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

#1962 shipped the extraction-quality eval (precision/recall/F1 over the hand-labeled action-item corpus), but nothing ran it — so a regression in what the agent extracts would reach a user's task list silently. This PR runs the email eval suite where it matters: nightly, weekly (with an auto-filed issue on failure), and as a blocking gate on every release (email-agent and GAIA core).

Threads

  • Nightly action-item eval — a step in test_email_agent_eval.yml drives the real triage/extraction path over the committed corpus, prints a precision/recall/F1 scorecard, and uploads action_items_report.json alongside the triage/perf/drafting reports.
  • Claude judge REQUIRED — no fuzzy fallback — the borderline equivalence judge is mandatory. If ANTHROPIC_API_KEY is absent or the judge errors, the step fails loudly rather than degrading to fuzzy-only matching (CLAUDE.md: No Silent Fallbacks — Fail Loudly).
  • Release gate (email agent + core) — the email eval workflow is now reusable (workflow_call) and is called as a blocking gate from release_agent_email.yml (before the hub/npm publish) and publish.yml (before the core publish approval). Both run on [self-hosted, lemonade-eval] and share the lemonade-eval concurrency group, so a release exercises the shipping agent on its corpus and stays strictly serial with the nightly/refresh runs.
  • Weekly sweep + auto-issue — weekly_eval.yml runs the same reusable suite once a week and opens (or updates) a GitHub issue labeled eval-failure if any eval fails, escalating a regression the nightly only logs.

Report mode is preserved for the gate contract: the eval runs + uploads on every release, and only hard-blocks when a tests/fixtures/email/ threshold manifest sets enforce:true (data, not code). Note this is distinct from the judge requirement above — a missing judge always fails the run regardless of enforce.

The general gaia eval agent gate is intentionally not wired into the core release yet: that CI (test_eval_rag.yml) is disabled pending #1315 (nonexistent runner label + a 90-min perf ceiling), so gating on it now would fail every release. Fast-follow once #1315 lands (noted inline in publish.yml).

Test plan

  • All four workflow YAMLs parse (yaml.safe_load); every needs: resolves; both release gates + the weekly issue job depend on email-eval
  • Embedded step scripts compile; action-item imports from gaia.eval.action_item_quality resolve; no judge_fn=None / fuzzy-only path remains
  • inputs.* unification leaves the nightly schedule run unchanged; no stray github.event.inputs refs
  • After merge: dispatch test_email_agent_eval.yml + weekly_eval.yml and confirm the action-item report uploads and (on an injected failure) an eval-failure issue is filed
  • On the next email-agent / core release: confirm the email-eval gate runs on the self-hosted runner and blocks the publish approval

Closes #1964

Ovtcharov added 3 commits July 9, 2026 11:13
…esult handling)

Adopts the token-reduction and data-out-of-context outcomes from Anthropic's
"code execution with MCP" writeup using GAIA's existing embedding-based tool
loader and tool-wrapper layers — not the code-execution mechanism, which is a
poor fit for local 4B-35B models and a large local-machine attack surface.

Scopes three workstreams: WS1 routes MCP tools through the dynamic loader
(progressive disclosure, with an MCP-only gating mode so static-tool recall is
preserved), WS2 keeps large tool results out of context via a session-scoped
artifact store + handle resolution in _execute_tool, WS3 (optional) adds PII
pass-through. Non-goal: model-authored code execution / sandbox.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

This wires the already-shipped action-item extraction eval (#1962) into the nightly email workflow as a report-mode step, so a precision/recall/F1 drop in what the agent extracts shows up in the nightly report instead of silently reaching a user's task list. It's a clean, additive change that faithfully reuses the shipped API and mirrors the existing drafting step.

I verified the substance end-to-end and found no blocking issues: the workflow YAML parses (9 steps), the embedded Python compiles, all 7 imports resolve, every call signature and every summary/gate/aggregate key the step reads matches action_item_quality, both referenced fixture files are committed, and the gate honors the same enforce-in-manifest / should_fail contract as the sibling gates (report mode never blocks the build).

One minor note, not blocking: the description says "the net diff is the single workflow file," but the PR also adds an unrelated MCP-context-efficiency plan doc — worth either splitting out or correcting the description.

🔍 Technical details

🟢 Minor — description/scope mismatch
The PR body states "The net diff is the single workflow file," but the diff also adds docs/plans/mcp-context-efficiency.md (328 lines), which is unrelated to the eval wiring. Not a correctness problem — just consider splitting it into its own PR or updating the description so a reviewer isn't surprised by the second file.

Verification performed (all pass):

  • YAML parses via yaml.safe_load; the new "Action-item extraction eval (report mode)" step is present, and the job now has 9 steps in the documented order (triage → gate → drafting → action-item → upload → summary).
  • Embedded heredoc script compiles (compile(..., 'exec'), 104 lines).
  • All 7 imports from gaia.eval.action_item_quality resolve to defined symbols, and each call matches its signature:
    • generate_extractions(model, corpus_path=…) → generate_extractions(model_id, *, corpus_path, …) ✓
    • score_generations(corpus, generations, model_id=…, judge_fn=…) ✓
    • summarize_extraction(results, run_id=…, thresholds=…) ✓
    • make_claude_judge() ✓ (model: str | None = None default — no-arg call is valid)
    • load_action_item_corpus(corpus_path), load_default_extraction_thresholds(), default_extraction_thresholds_path() ✓
  • Keys the report reads exist: threshold .enforce/.f1_min/.recall_min/.precision_min; summary extraction/extraction_gate; aggregate precision/recall/f1/hard_negatives_correct/hard_negatives_total/hard_negative_correct_rate/cases_scored/cases_errored; gate passed/enforce/should_fail (skipped read defensively via .get(..., False)).
  • tests/fixtures/email/action_items_ground_truth.json and action_items_gate_thresholds.json are both committed.

Strengths

  • No-silent-fallback done right: unlike the drafting step (which must skip without a judge), this step correctly runs pure-fuzzy token-overlap matching when ANTHROPIC_API_KEY is absent, logging the mode and recording it in the report — never a skip, never an invented pass. Right call, since the judge only resolves gray-band pairs.
  • Single-source gate contract preserved: no thresholds inlined in YAML; enforce lives in the committed manifest and the build only fails on should_fail, matching the triage/perf/drafting gates. Report mode is genuinely non-blocking.
  • Serial-Lemonade discipline (CLAUDE.md) respected: the step runs after triage + drafting in the same job, so only one eval holds the Lemonade slot at a time.
  • Self-contained additive block with clear BEGIN/END markers, so concurrent edits to this workflow merge cleanly.

@kovtcharov-amd kovtcharov-amd changed the title ci(eval): wire the action-item extraction scorecard into the nightly email eval (#1964) ci(eval): action-item extraction eval — nightly + release gate (email agent + core) (#1964) Jul 9, 2026
@kovtcharov-amd kovtcharov-amd changed the title ci(eval): action-item extraction eval — nightly + release gate (email agent + core) (#1964) ci(eval): action-item eval (Claude-judge required) — nightly + weekly + release gates (#1964) Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🟡 The workflow_call secret description for ANTHROPIC_API_KEY contradicts what the new action-item eval step actually does, and this will cause confusing release-gate failures.

The workflow_call block marks ANTHROPIC_API_KEY as required: false with description: "absent → those paths log a loud skip / run judge-less." That's accurate for the voice-drafting step (it sets skipped: True and continues). But the new action-item eval added in this PR does the opposite — it calls sys.exit(1) when the key is absent with no fallback whatsoever. Any release triggered from publish.yml or release_agent_email.yml via secrets: inherit on a runner that doesn't have ANTHROPIC_API_KEY configured will hit an opaque CI failure, while the required: false + the "run judge-less" description gives the opposite impression.

The fix is small: mark required: true (since the action-item judge is now mandatory) and correct the description to reflect the hard-fail behavior. Or, if you want the key to remain optional for callers other than these release gates, the action-item step needs to be updated to match the documented behavior — but that conflicts with the no-silent-fallback policy stated in the step's own comment.

🔍 Technical details

.github/workflows/test_email_agent_eval.yml, workflow_call secrets block (~line 87–89):

# Current (misleading):
ANTHROPIC_API_KEY:
  description: 'Judge credential for the drafting + borderline action-item judge; absent → those paths log a loud skip / run judge-less.'
  required: false

Suggested fix:

ANTHROPIC_API_KEY:
  description: 'Required for the action-item extraction judge (hard-fail if absent). Also used by the voice-drafting judge (skipped/reported if absent).'
  required: true

The action-item Python block at ~line 495 (sys.exit(1) on missing key) is correct and intentional — the description in the secrets block is the thing that needs to change.

@kovtcharov-amd
kovtcharov-amd enabled auto-merge July 9, 2026 20:41
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 06820be Jul 9, 2026
27 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/1964-action-item-nightly-eval branch July 9, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants