Skip to content

fix: apply reviewed maintenance repairs for #3490 - #3683

Merged
kovtcharov-amd merged 1 commit into
amd:fix/email-eval-judge-credentialfrom
kovtcharov:codex/maintenance-pr-3490
Sep 18, 2026
Merged

kovtcharov-amd merged 1 commit into
amd:fix/email-eval-judge-credentialfrom
kovtcharov:codex/maintenance-pr-3490

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

Follow-up fixes for #3490. Changed: .github/workflows/{email_scorecard_refresh,test_email_agent_eval,release_agent_email}.yml; .gitignore; docs/plans/email-eval-node-frontend.mdx; hub/agents/email/npm/EVALUATION.md; hub/agents/email/python/packaging/eval_{action_item,briefing,drafting}report.py; src/gaia/eval/judge_client.py; tests/unit/test_eval_judge_client.py; hub/agents/email/python/tests/test_eval{drafting,briefing}_report.py. Exact changed path list is available from git diff.

This PR targets the original feature branch because the current account cannot push to amd/gaia. It carries the prepared maintenance changes for that PR.

Test plan

  • Previously completed local validation: Validation: 43 tests passed covering judge selection, CLI invocation/error handling and all three report scripts (tests-3490.log). Exact live ClaudeCliClient transport using the existing authenticated Max subscription returned ['OK'] in about four seconds (3490-judge-probe.log). This proves actual tool flags/model/auth invocation works, not only mocked selection. All three workflow YAML files parse; Black/isort/Flake8/diff pass.
  • Fresh CI on the combined feature branch.
  • Remaining live-model, hardware or platform checks described in the original PR, where applicable.
  • Human review before merging the original PR.

Changed: .github/workflows/{email_scorecard_refresh,test_email_agent_eval,release_agent_email}.yml; .gitignore; docs/plans/email-eval-node-frontend.mdx; hub/agents/email/npm/EVALUATION.md; hub/agents/email/python/packaging/eval_{action_item,briefing,drafting}_report.py; src/gaia/eval/judge_client.py; tests/unit/test_eval_judge_client.py; hub/agents/email/python/tests/test_eval_{drafting,briefing}_report.py. Exact changed path list is available from git diff.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes eval Evaluation framework changes tests Test changes performance Performance-critical changes agent::email Email agent changes sidecar Agent sidecar contract / harness labels Sep 11, 2026
@kovtcharov
kovtcharov marked this pull request as ready for review September 17, 2026 20:04
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This PR fixes a judge that was silently running with its tool-blocking switch inert, makes the two judged email evals fail before they burn ~17 minutes of local-model time when the judge transport is unavailable, and corrects docs that had the two Claude credentials' precedence backwards. All three changes are correct, and the new tests actually lock the behaviour rather than just asserting the call happened.

The one thing worth fixing before merge: a third CI workflow installs the same Claude CLI without the version pin this PR adds to the other two. If the pin exists because a newer CLI release broke something, that workflow is still exposed to it — and the pin now lives in three separate files with nothing tying them together.

Real-world evidence

N/A — no evidence bundle was produced for this PR, and the shell was unavailable in this review environment (every bash invocation failed at sandbox startup, so I could not read the PR description or run anything). The verdict rests on static review of the diff plus cross-checking against the repo's own usage.

That matters most for one change: the judge's tool-blocking argument moved from space-separated to comma-separated, and nothing here demonstrates it against a real claude binary. The change is very likely right — every other Claude invocation in this repo passes tool lists comma-separated, and the old space-separated value was passed as a single argument that could only ever have matched zero tools — but "we changed the string" and "the CLI now actually blocks those tools" are different claims, and only the first is shown. One claude -p run confirming the judge refuses a tool call would close that gap cheaply.

🔍 Technical details

🟡 Important

The CLI pin is partial and un-anchored. .github/workflows/test_eval_agent_gemma_consolidation.yml:368 still runs npm install -g @anthropic-ai/claude-code unpinned. That workflow drives gaia eval agent, which shells out to claude -p via src/gaia/eval/runner.py — the same transport family this PR is stabilising. If the @2.1.218 pin is defensive against a CLI regression, this lane keeps floating; if it is purely for reproducibility, it is now inconsistent across three files (claude-run.yml:307, email_scorecard_refresh.yml:244, test_email_agent_eval.yml:371) with no shared anchor, so a future bump will miss at least one.

Either pin the third one too, or leave a note in each saying why the judge workflows are pinned and the eval-driver workflow is not.

          npm install -g @anthropic-ai/[email protected]

🟢 Minor

The new pins lack the bump note the existing one has. claude-run.yml:306 carries # claude-code pinned — bump deliberately.; the two added here (email_scorecard_refresh.yml:244, test_email_agent_eval.yml:371) have no comment, so the why is invisible at the point a maintainer would bump it.

          # claude-code pinned — bump deliberately, in lockstep with claude-run.yml.
          npm install -g @anthropic-ai/[email protected]

Orphaned line fragment in the rewritten header. test_email_agent_eval.yml:46 leaves # The key alone is on its own line mid-sentence, an artifact of the edit.

# The key alone is what this workflow asked for until the account behind it ran
# out of credit and every run on every branch died ~25 minutes in.

(and drop the now-duplicated line 47 continuation)

Ambiguous parenthetical. hub/agents/email/npm/EVALUATION.md:89 reads CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY (takes precedence when both are set) — the parenthetical is doing real work but a skimmer can attach it to either name.

  `CLAUDE_CODE_OAUTH_TOKEN` or `ANTHROPIC_API_KEY` — the API key wins when both
  are set. With neither it

"Terminal 1" now has no command. docs/plans/email-eval-node-frontend.mdx:129-131 is a copy-pasteable three-terminal block where the first terminal is three comment lines and nothing to run; it also repeats the 13305 port that line 129 already states.

# Terminal 1 — Lemonade (canonical discovery port is 13305, NOT 8000)
# The standalone `lemonade-server serve` CLI was removed; `gaia init` is what
# installs and starts the server.
gaia init

Pattern note (pre-existing, out of scope here): lemonade-server serve still appears in ~30 places, including runtime, user-facing error strings — hub/agents/email/python/gaia_agent_email/api_routes.py:649,3013,3199, query_routes.py:440, and the playground's copy-to-clipboard button in playground_html.py:307. CLAUDE.md forbids telling anyone to run that command, and describe_start_hint() exists for exactly this. Worth its own sweep rather than expanding this PR.

Strengths

  • The tool-blocking fix is a real bug, not a cosmetic one. _DISALLOWED_TOOLS was passed as a single argv element (judge_client.py:154), so a space-separated string could only ever have matched zero tool names — the isolation the comment at line 60 promises was not in effect. The comma form matches how every other Claude call in this repo passes tool lists (e.g. claude-run.yml:309).
  • The test change locks the format, not just the presence. tests/unit/test_eval_judge_client.py:180-181 splits on , before asserting, so a revert to the space-separated form now fails — the old "Bash" in <string> assertion passed either way, which is exactly why the bug survived.
  • The hoisted make_claude_judge() is placed correctly in both reports: after the judge_credential_present() guard, before generation. The OAuth-token-set-but-claude-not-on-PATH case now dies in seconds instead of after the full Lemonade generation pass, and the two new tests assert generate.assert_not_called() rather than just that an exception escaped.
  • The docs correction is accurate. make_judge_client (judge_client.py:230-239) does check ANTHROPIC_API_KEY first, and every judged step in both email workflows blanks the key when the OAuth token exists — so the new "workflow selects by blanking" wording describes what the YAML actually does. release_agent_email.yml inherits that behaviour through secrets: inherit at line 412, so its updated header is correct too.

@kovtcharov-amd
kovtcharov-amd merged commit 372e9bd into amd:fix/email-eval-judge-credential Sep 18, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent::email Email agent changes devops DevOps/infrastructure changes documentation Documentation changes eval Evaluation framework changes performance Performance-critical changes sidecar Agent sidecar contract / harness tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants