Skip to content

test: delete tests that can never run or cover removed code - #7033

Merged
kovtcharov-amd merged 1 commit into
amd:mainfrom
kovtcharov:kalin/delete-dead-tests
Nov 9, 2026
Merged

kovtcharov-amd merged 1 commit into
amd:mainfrom
kovtcharov:kalin/delete-dead-tests

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

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.
  • Lane tests: 64 passed, and util/check_test_lane_coverage.py reports OK after dropping the two allowlist lines.
🔍 Technical details
  • Deleted: test_kept_spec_matches_legacy_fields and its helper; the rebuild-embeddings "not implemented" test (an existing test already runs the real backfill_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 unused stub_inbox_path re-export.
  • Converted: the embedding-coverage "501" test is now 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%.
  • Fixed: 7 skip messages that named gaia.api.openai_server instead of gaia_agent_email.export_openapi, and the gaia docker up instruction in test_rag_integration.py.

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
@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

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 evidence

N/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 util/check_test_lane_coverage.py here, and it reports OK (1684 test files, all assigned to a lane or allowlisted). pytest isn't installed on this runner, so the author's run (200 passed) is the only record of the touched tests passing.

🔍 Technical details

Checks run

  • I grepped the tree for each deleted path (agent_ui_test_plan, IMPLEMENTATION_SUMMARY, fixtures/agent_ui, test_lemonade_health.py, test_sd_model_sweep). The only hits are historical notes in audit_reports/, which aren't live references.
  • stub_inbox_path is no longer used under tests/unit/. The integration suite defines its own copy (tests/integration/test_email_rest_api_e2e.py:69), so removing the re-export from tests/unit/email/conftest.py is safe.
  • In test_catalog_ledger.py, dropping import pytest is correct: no pytest. usage remains once the parametrized legacy test is gone.
  • /api/memory/stats health coverage still exists through tests/integration/test_lemonade_health_schema.py, which is gated by test_embeddings.yml.

Issues found

  • 🟢 TestEmbeddingCoverageEndpoint still has test_embedding_coverage_returns_200_when_implemented, which monkeypatches the store method. The new real-store test now covers the same route, so the mocked one adds little and could go in a later sweep. This is optional.

Strengths

  • Swapping a permanent pytest.skip for an assertion against the real store (2 / 1 / 1 / 50.0%) adds real coverage instead of deleting the test.
  • The corrected skip messages now name the module the import actually tries (gaia_agent_email.export_openapi), so a skip points at the right cause.
  • The test_rag_integration.py prerequisites now give gaia init / gaia daemon start instead of a dead command.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 9, 2026
Merged via the queue into amd:main with commit 6acb183 Nov 9, 2026
46 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/delete-dead-tests branch November 9, 2026 23:33
@kovtcharov kovtcharov mentioned this pull request Nov 10, 2026
5 of 8 tasks
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.

test: delete tests that can never run or test removed code

2 participants