Repository navigation
test: delete tests that can never run or cover removed code - #7033
Conversation
These tests always skipped, ran a removed code path, or were superseded scripts and docs, so the suite reported coverage it did not have. Closes amd#7020
|
Verdict: Approve This PR removes tests that could never run (they always skipped, or covered deleted code), plus a stale manual test plan and its orphaned fixtures. One always-skipped memory test becomes a real check of the embedding-coverage endpoint. Nothing still references the deleted files, and the CI lane-coverage check passes with the two allowlist lines removed. Nothing blocks the merge. Real-world evidenceN/A: the PR only touches tests and the test-lane allowlist, so there's no user-facing surface to exercise. The verdict rests on static review. I also ran 🔍 Technical detailsChecks run
Issues found
Strengths
|
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]>
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]>
Some tests could never run, and others covered code that's gone, so the suite claimed coverage it didn't have. One test always skipped because the module it compared against was deleted. Two memory-router tests skipped because the feature they said was missing now exists. A top-level Lemonade health check was superseded by a stricter integration test. A 2,085-line manual test plan described a chat agent file that no longer exists. These are removed. One of the skipped memory-router tests is now a real test of the embedding-coverage endpoint, which had no coverage at all.
Closes #7020
Test plan
pytest tests/unit/test_memory_router.py tests/unit/connectors/test_catalog_ledger.py tests/unit/agents/email/test_draft_token_provider_binding.py: 200 passed.util/check_test_lane_coverage.pyreports OK after dropping the two allowlist lines.🔍 Technical details
test_kept_spec_matches_legacy_fieldsand its helper; the rebuild-embeddings "not implemented" test (an existing test already runs the realbackfill_embeddings);tests/test_lemonade_health.py;tests/test_sd_model_sweep.py(a script, not a suite);tests/agent_ui_test_plan.md;tests/fixtures/agent_ui/;tests/electron/IMPLEMENTATION_SUMMARY.md; the unusedstub_inbox_pathre-export.test_embedding_coverage_counts_real_store_items. With one item that has a vector and one that doesn't, it expects 2 / 1 / 1 / 50.0%.gaia.api.openai_serverinstead ofgaia_agent_email.export_openapi, and thegaia docker upinstruction intest_rag_integration.py.