Skip to content

test(mcp): read mcp 2.x result fields in the email stdio parity test - #7050

Merged
kovtcharov-amd merged 2 commits into
amd:mainfrom
kovtcharov:kalin/mcp2-test-attrs
Nov 10, 2026
Merged

kovtcharov-amd merged 2 commits into
amd:mainfrom
kovtcharov:kalin/mcp2-test-attrs

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

The email MCP parity test hasn't been able to pass since the mcp 2.x upgrade. It read result.isError, which 2.x renamed is_error, so every case failed before comparing anything. It now reads the 2.x field. The four cases that triage with the local LLM skip cleanly when no Lemonade is running, as util/test_lane_allowlist.yml already says they need one; the other six still run.

Refs #7045

Test plan

  • pytest tests/mcp/test_email_mcp_stdio_parity.py with no Lemonade running: 6 passed, 4 skipped (before: 4 failed on the attribute).
  • With a live Lemonade and the email model loaded: all 10 pass.

The test read `result.isError`, which mcp 2.x renamed `is_error`, so every
parity case failed before it compared anything. The four cases that triage
with the local LLM now skip when no Lemonade is running.

Refs amd#7045
@github-actions github-actions Bot added the tests Test changes label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This fixes the email MCP parity test so it can pass again on mcp 2.x. It reads the renamed error field, and the four cases that need a local model now skip cleanly when Lemonade isn't running, so they no longer fail. The change is small, correct and limited to the test.

One thing to know: the six cases that don't need a model, including the send-confirmation security checks, still don't run in any CI lane. The lane allowlist excludes the whole file because it needs Lemonade. Now that only four cases depend on it, the file could be narrowed and added to a lane. That's a follow-up, not a reason to block this PR.

Real-world evidence

N/A: this PR only changes tests, and no evidence bundle was produced. The verdict rests on static review and the author's reported run (6 passed, 4 skipped, with no Lemonade).

🔍 Technical details

Issues

  • 🟡 Follow-up: Run the email MCP send-gate tests in a CI lane (util/test_lane_allowlist.yml:43). The whole file is still allowlisted out of every lane because "both surfaces triage with the local LLM". After this PR that's only true for the four require_lemonade cases. The other six, test_tools_list_exposes_rest_surface and the send-token gate tests such as test_token_does_not_authorize_a_different_payload, run without a model but are never collected. If they were in a lane, the next mcp major bump would be caught by CI instead of found by hand. Either reword the allowlist entry or move the file into a lane, since the skips now handle the no-Lemonade case.
  • 🟢 Stale docstring (tests/mcp/test_email_mcp_stdio_parity.py:241). It still says "inspect isError"; the 2.x field is is_error.
        where we need to inspect ``is_error``)."""
    

Strengths

  • Uses the shared require_lemonade fixture, so the skip is consistent with the rest of the suite and stays scoped to the four cases that need a model.
  • No other test reads the old attribute on a CallToolResult object. The remaining isError hits elsewhere are JSON-RPC wire dicts, where camelCase is correct.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 10, 2026
Merged via the queue into amd:main with commit 1a0e7c6 Nov 10, 2026
32 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/mcp2-test-attrs branch November 10, 2026 03:27
kovtcharov-amd added a commit that referenced this pull request Nov 19, 2026
The standalone email agent from the hub is removed, so GAIA has one mail
implementation to maintain: the flagship's. That takes out the
`gaia-agent-email` and `@amd-gaia/agent-email` packages, the `gaia
email` command, the `/v1/email` routes, six workflows and about 173,000
lines. `gaia agent list` goes too: GAIA ships one agent, so there is
nothing to list.

**Mail and calendar through connectors are unchanged.** The flagship
still reads and triages Gmail or Outlook with its eight reading tools
and the `inbox-triage` skill, drafts and sends through the `send-email`
skill (asking before anything leaves), and works with calendars through
the `calendar` skill. The Google and Microsoft connectors, Settings >
Connectors, the Connect buttons under a reply that says an account is
not connected, and the "connected, ask again" banner all stay.
Organizing (labels, archive, delete), undo, briefings, scheduled sends
and autonomous mail runs went with the old agent on purpose.

Closes #6102
Closes #7200
Closes #4825

## What a reviewer should weigh
- **Connect prompt now grants GAIA.** The in-chat Connect buttons used
to give mailbox access to the email agent. They now give it to the
flagship and to no other installed agent, and sign-in asks only for the
scopes the flagship declares. The work Microsoft 365 button is gone from
the chat; that connector stays in Settings.
- **Upgrade cleanup.** At daemon start a leftover `~/.gaia/agents/email`
is deleted only when it is provably the old install. A folder holding an
`agent.py` or anything else is left alone and logged, so a person's own
agent named `email` is safe. The same pass also cleans up the retired
agent's leftover connector state, and names, once, each email the old
agent had scheduled that will not be sent. `~/.gaia/email/` is kept. A
saved chat made with the email agent opens read-only.
- **Installing `email` is refused** with a pointer to the flagship;
`gaia email` and `gaia agent list` print what replaced them.
- **Old sidecar binaries.** The deprecated environment-variable path for
delivering secrets to a sidecar is gone. A sidecar binary too old for
file delivery is refused with an update remedy.
- **Renamed, not removed.** `gaia.ui.email_sidecar` becomes
`gaia.ui.sidecar`, because it also serves the flagship. An open PR that
imports the old name needs a one-line change after this merges.
- **Moved.** The Terminal UI's release publisher lived inside the email
package; it is now `hub/components/terminal-hub/publish_to_r2.py`, and
`release_components.yml` points at it.
- **After merge, maintainer only:** deprecate `@amd-gaia/agent-email` on
npm and `gaia-agent-email` on PyPI, and unpublish `email` from the hub
index.

## Test plan
- [x] Mail stays with the flagship:
`hub/agents/gaia/python/tests/test_flagship_mail_capability.py` builds
the flagship on a full-tier model and checks its eight mailbox reading
tools are registered, the `send-email` skill adds its eight tools, and
an unconnected mailbox is reported per provider.
`MessageBubble.connectCta.test.tsx` checks a not-connected reply shows
the Connect buttons in the Agent UI.
- [x] Upgrade cleanup: `tests/unit/test_daemon_retired_agents.py` covers
a person's own `agent.py` surviving, the old install being removed, a
mixed folder left alone and logged, scheduled mail being named once, and
a retired id being refused by the installer.
- [x] Agent UI: `npx tsc --noEmit -p .` clean and the full `npx vitest
run` (counts in the comment below).
- [x] `tests/unit/agents`, `tests/unit/chat/ui`,
`tests/unit/connectors`, `tests/unit/test_amd_gaia_urls.py` and the
relay tests on the tree merged with `main`.
- [x] `check_workflow_triggers`, `check_test_lane_coverage`,
`check_ci_path_coverage`, `check_dependabot`, internal doc links, black,
isort and flake8 pass on the merged tree.
- [ ] `util/verify_publish_pipeline.py` for the flagship and Terminal UI
publishers. It was 7/9 for the flagship before this change and wasn't
re-run on the final tree.
- [ ] Upgrade on a PC that has the email sidecar installed: the daemon
removes it and the Agent UI and TUI start normally.
- [ ] Next RC: watch the `gaia_email` eval category and the relay/chat
categories.

<details>
<summary>🔍 Technical details</summary>

- Kept for the flagship: `agents/tools/email_tools.py`,
`agents/tools/_email/`, the `email` entry in `KNOWN_TOOLS`,
`hub/skills/inbox-triage/`, `hub/skills/send-email/`,
`eval/scenarios/gaia_email/`, the mail fixtures it uses,
`src/gaia/connectors/`, and the generic daemon sidecar framework. The
PR's edits under `_email/`, `readiness.py`, `registry.py` and
`connectors/setup_routes.py` are docstrings and comments only.
- Kept in the Agent UI: `ConnectorRetryBanner`, `EmailConnectCta`
(`mailGrantIds` now targets the flagship), and their wiring in
`ChatView` and `MessageBubble`.
- Removed with the package: the `email_pre_scan` card (only the email
agent's `pre_scan_inbox` tool produced it), `gaia eval benchmark` and
the email eval modules, the `email` init profile, the daemon and UI
email spec, router and proxy, and the TUI's email catalog entry and
mailbox gate.
- The connector scope drift guard now checks the flagship's declared
mail scopes (`mail_scopes.json`).
- Overlaps with other open PRs, which this one supersedes for those
files: #7042 (the `email_sidecar.errors` shim), #7033 (email test skip
messages) and #7050 (the email MCP parity test).
- The four `wip:` commits are a save point from development;
squash-merge with this description.
</details>

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
rapuckett pushed a commit to rapuckett/gaia that referenced this pull request Nov 19, 2026
The standalone email agent from the hub is removed, so GAIA has one mail
implementation to maintain: the flagship's. That takes out the
`gaia-agent-email` and `@amd-gaia/agent-email` packages, the `gaia
email` command, the `/v1/email` routes, six workflows and about 173,000
lines. `gaia agent list` goes too: GAIA ships one agent, so there is
nothing to list.

**Mail and calendar through connectors are unchanged.** The flagship
still reads and triages Gmail or Outlook with its eight reading tools
and the `inbox-triage` skill, drafts and sends through the `send-email`
skill (asking before anything leaves), and works with calendars through
the `calendar` skill. The Google and Microsoft connectors, Settings >
Connectors, the Connect buttons under a reply that says an account is
not connected, and the "connected, ask again" banner all stay.
Organizing (labels, archive, delete), undo, briefings, scheduled sends
and autonomous mail runs went with the old agent on purpose.

Closes amd#6102
Closes amd#7200
Closes amd#4825

## What a reviewer should weigh
- **Connect prompt now grants GAIA.** The in-chat Connect buttons used
to give mailbox access to the email agent. They now give it to the
flagship and to no other installed agent, and sign-in asks only for the
scopes the flagship declares. The work Microsoft 365 button is gone from
the chat; that connector stays in Settings.
- **Upgrade cleanup.** At daemon start a leftover `~/.gaia/agents/email`
is deleted only when it is provably the old install. A folder holding an
`agent.py` or anything else is left alone and logged, so a person's own
agent named `email` is safe. The same pass also cleans up the retired
agent's leftover connector state, and names, once, each email the old
agent had scheduled that will not be sent. `~/.gaia/email/` is kept. A
saved chat made with the email agent opens read-only.
- **Installing `email` is refused** with a pointer to the flagship;
`gaia email` and `gaia agent list` print what replaced them.
- **Old sidecar binaries.** The deprecated environment-variable path for
delivering secrets to a sidecar is gone. A sidecar binary too old for
file delivery is refused with an update remedy.
- **Renamed, not removed.** `gaia.ui.email_sidecar` becomes
`gaia.ui.sidecar`, because it also serves the flagship. An open PR that
imports the old name needs a one-line change after this merges.
- **Moved.** The Terminal UI's release publisher lived inside the email
package; it is now `hub/components/terminal-hub/publish_to_r2.py`, and
`release_components.yml` points at it.
- **After merge, maintainer only:** deprecate `@amd-gaia/agent-email` on
npm and `gaia-agent-email` on PyPI, and unpublish `email` from the hub
index.

## Test plan
- [x] Mail stays with the flagship:
`hub/agents/gaia/python/tests/test_flagship_mail_capability.py` builds
the flagship on a full-tier model and checks its eight mailbox reading
tools are registered, the `send-email` skill adds its eight tools, and
an unconnected mailbox is reported per provider.
`MessageBubble.connectCta.test.tsx` checks a not-connected reply shows
the Connect buttons in the Agent UI.
- [x] Upgrade cleanup: `tests/unit/test_daemon_retired_agents.py` covers
a person's own `agent.py` surviving, the old install being removed, a
mixed folder left alone and logged, scheduled mail being named once, and
a retired id being refused by the installer.
- [x] Agent UI: `npx tsc --noEmit -p .` clean and the full `npx vitest
run` (counts in the comment below).
- [x] `tests/unit/agents`, `tests/unit/chat/ui`,
`tests/unit/connectors`, `tests/unit/test_amd_gaia_urls.py` and the
relay tests on the tree merged with `main`.
- [x] `check_workflow_triggers`, `check_test_lane_coverage`,
`check_ci_path_coverage`, `check_dependabot`, internal doc links, black,
isort and flake8 pass on the merged tree.
- [ ] `util/verify_publish_pipeline.py` for the flagship and Terminal UI
publishers. It was 7/9 for the flagship before this change and wasn't
re-run on the final tree.
- [ ] Upgrade on a PC that has the email sidecar installed: the daemon
removes it and the Agent UI and TUI start normally.
- [ ] Next RC: watch the `gaia_email` eval category and the relay/chat
categories.

<details>
<summary>🔍 Technical details</summary>

- Kept for the flagship: `agents/tools/email_tools.py`,
`agents/tools/_email/`, the `email` entry in `KNOWN_TOOLS`,
`hub/skills/inbox-triage/`, `hub/skills/send-email/`,
`eval/scenarios/gaia_email/`, the mail fixtures it uses,
`src/gaia/connectors/`, and the generic daemon sidecar framework. The
PR's edits under `_email/`, `readiness.py`, `registry.py` and
`connectors/setup_routes.py` are docstrings and comments only.
- Kept in the Agent UI: `ConnectorRetryBanner`, `EmailConnectCta`
(`mailGrantIds` now targets the flagship), and their wiring in
`ChatView` and `MessageBubble`.
- Removed with the package: the `email_pre_scan` card (only the email
agent's `pre_scan_inbox` tool produced it), `gaia eval benchmark` and
the email eval modules, the `email` init profile, the daemon and UI
email spec, router and proxy, and the TUI's email catalog entry and
mailbox gate.
- The connector scope drift guard now checks the flagship's declared
mail scopes (`mail_scopes.json`).
- Overlaps with other open PRs, which this one supersedes for those
files: amd#7042 (the `email_sidecar.errors` shim), amd#7033 (email test skip
messages) and amd#7050 (the email MCP parity test).
- The four `wip:` commits are a save point from development;
squash-merge with this description.
</details>

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants