Repository navigation
ci(eval): wire the action-item extraction scorecard into the nightly email eval - #1964
kovtcharov wants to merge 2 commits into
Conversation
|
Verdict: Approve. This adds an offline, deterministic precision/recall/F1 eval for the email agent's action-item extractor, wired into the nightly email-eval workflow in report mode (no LLM, no gate failure) — a real regression signal for a feature that today reaches users' task lists untested. The design cleanly mirrors the existing triage FP/FN gate: same No blocking issues. Two small robustness notes below, neither merge-blocking. 🔍 Technical details🟢 MinorMetadata-key convention differs between scorer and tests ( Greedy fuzzy matching is heuristic, not optimal ( Strengths
Note: this is CI-internal eval infra (no new |
Action-item extraction (#1605, PR #1917) shipped with unit tests only — nothing measured whether triage pulls the RIGHT action items, so an extraction-quality regression would pass CI and reach users. This adds a precision/recall/F1 eval over a hand-labeled 26-case corpus (19 expected items, 10 hard negatives incl. cue traps like 'No action required'), in the same report-mode gate pattern as the triage quality/perf gates. - tests/fixtures/email/action_items_ground_truth.json: labeled seed corpus; labeling policy + counts documented in its _meta block. - gaia.eval.action_item_metrics: sibling scorer to quality_metrics — set-based matching (normalized-exact, then difflib fuzzy >=0.80, then an opt-in budget-capped Claude judge for the ambiguity band), reusing Confusion so the action_items block matches the existing quality axes; gate manifest loader + evaluate gate with the same passed/breaches/enforce/should_fail contract. - tests/fixtures/email/action_items_gate_thresholds.json: reported (NOT enforced) bars, enforce:false; measured deterministic baseline precision 0.8889 / recall 0.8421 / f1 0.8649 recorded in the manifest. - test_email_agent_eval.yml: self-contained report-mode step (offline, no LLM — the extractor is deterministic) writing eval-out/action_items_report.json; keys off gate.should_fail exactly like the existing gates. - tests/unit/email/test_action_item_eval.py: corpus integrity (dup-key rejection, ActionItem-contract validation, negative/link/due-hint coverage) + hand-checked scorer math + offline end-to-end run. Closes #1949
d4510c2 to
2096fba
Compare
…the workflow wiring Main landed the action-item extraction eval via #1962 (action_item_quality.py + fixtures + corpus-integrity test), an independent implementation of what this branch carried. Resolve the overlap by taking main's implementation wholesale — this branch's action_item_metrics.py, its unit test, and its fixture variants are dropped — and keep the one piece main lacks: the nightly email-eval workflow step, rewritten against action_item_quality's real API (live triage-path generation on the lemonade-eval runner, optional Claude equivalence judge, report-mode gate keyed off should_fail).
…that files an issue on failure (#1964)
… + release gates (amd#1964) (amd#1976) amd#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 amd#1315 (nonexistent runner label + a 90-min perf ceiling), so gating on it now would fail every release. Fast-follow once amd#1315 lands (noted inline in `publish.yml`). ## Test plan - [x] All four workflow YAMLs parse (`yaml.safe_load`); every `needs:` resolves; both release gates + the weekly issue job depend on `email-eval` - [x] Embedded step scripts compile; action-item imports from `gaia.eval.action_item_quality` resolve; no `judge_fn=None` / fuzzy-only path remains - [x] `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 amd#1964 --------- Co-authored-by: Ovtcharov <[email protected]>
Resolve the test_email_agent_eval.yml conflict from main's two new eval blocks (action-item extraction #1964, daily-briefing summary #1951) and the reusable workflow_call trigger, keeping this branch's Windows stx + PowerShell + extracted-script conversion. - Convert both new eval blocks from bash heredocs to the branch's pattern: new packaging/eval_action_item_report.py and eval_briefing_report.py, called from PowerShell steps (matching eval_gate_report.py / eval_drafting_report.py) - Point the top-level env at inputs.* (not github.event.inputs.*) so model/limit propagate for the new workflow_call path as well as workflow_dispatch - Keep per-step env minimal (ANTHROPIC_API_KEY only); the centralized top-level env supplies EMAIL_EVAL_MODEL/LIMIT/EXPERIMENTS
#1962 shipped the extraction-quality eval (precision/recall/F1 over the hand-labeled corpus), but nothing runs it on a schedule — a regression in what the agent extracts would still reach users silently. This wires the eval into the nightly email-eval workflow as a report-mode step: the run prints an extraction scorecard and uploads
action_items_report.jsonalongside the triage/perf/drafting reports, so a quality drop shows up in the nightly report instead of a user's task list.After merging main (which landed #1962), this PR's net diff is the single workflow file. Generation drives the real triage path on the
lemonade-evalrunner (same serial slot as the other evals); borderline description matches use the Claude equivalence judge when the runner hasANTHROPIC_API_KEY, and fall back to token-overlap-only matching with the mode logged and recorded in the report. The gate follows the existing contract:enforce:falsein the committed manifest, keyed offshould_fail, so it reports and never blocks until a baseline confirms the bars.Test plan
python -m pytest tests/unit/email/ -q— 171 passedscore_generations→summarize_extraction→ gate) — gate reportsshould_fail=falseaction_items_report.json