Problem
Two phishing-guard tests assert against the retired email agent's system prompt, so they guard a surface no user reaches. TestPhishingBodyPromptInjection in tests/unit/agents/email/test_phishing_block_tool.py checks that gaia_agent_email.agent._SYSTEM_PROMPT contains the untrusted-body warning and tells the model to refuse acting on body instructions. Both of those properties now matter on the flagship's EmailToolsMixin path instead, where PR #4155 adds a real equivalent (tests/unit/agents/tools/test_email_phishing_guard.py, no import gate).
What makes them actively misleading rather than merely obsolete: the module is gated behind pytest.importorskip("gaia_agent_email"), so outside the one CI lane that installs the hub wheel they vanish from the run without a word. Anyone auditing phishing coverage locally, or reading the main unit lane, sees green and a test file with the right name.
Part of #3814. Related: #4150 (the defect), #4155 (the flagship guard), #4121 (the general collected-then-skipped sweep).
Spec: none: searched docs/spec/ — no spec governs test placement; the retirement is stated in milestone 59's description.
Outcome
Phishing-guard coverage lives on the path that actually serves mail, and no test file reads as coverage for a surface that has been retired.
Acceptance criteria
Scope & expectations
How to verify
CLI surface: pytest tests/unit/agents/tools/ -q in an environment with no gaia_agent_email installed — show the count and that nothing skips. Then the email lane's own run, showing the retired-agent class is gone rather than silently skipping.
🔍 Technical details
Claim class: reproduced (executed) — the skip below was run in this checkout at 572e8b79; the code and workflow citations were opened and checked.
$ python -m pytest "tests/unit/agents/email/test_phishing_block_tool.py::TestPhishingBodyPromptInjection" -q
1 skipped in 0.09s
import gaia_agent_email → ModuleNotFoundError in this environment. The gate is tests/unit/agents/email/test_phishing_block_tool.py:33.
The two tests, at :334 and :344:
def test_system_prompt_contains_untrusted_input_warning(self):
from gaia_agent_email.agent import _SYSTEM_PROMPT
assert "UNTRUSTED" in _SYSTEM_PROMPT
Correction to how this was first framed. These are not tests that "cannot fail". They do run — test_email_agent_unit.yml:143 installs -e hub/agents/email/python and :171 runs tests/unit/agents/email/ as a directory. #4121 already measured this and explicitly cleared the email-gated files as near-misses for exactly that reason. Where they silently skip is test_unit.yml, which installs only .[api] (:117) and runs tests/unit/ (:137) — and any dev machine without the hub wheel, as above.
So the defect is the target, not the lane: green assertions about a retired agent's prompt, in a file named as if it guards phishing today. The skip is what stops that being obvious.
Problem
Two phishing-guard tests assert against the retired email agent's system prompt, so they guard a surface no user reaches.
TestPhishingBodyPromptInjectionintests/unit/agents/email/test_phishing_block_tool.pychecks thatgaia_agent_email.agent._SYSTEM_PROMPTcontains the untrusted-body warning and tells the model to refuse acting on body instructions. Both of those properties now matter on the flagship'sEmailToolsMixinpath instead, where PR #4155 adds a real equivalent (tests/unit/agents/tools/test_email_phishing_guard.py, no import gate).What makes them actively misleading rather than merely obsolete: the module is gated behind
pytest.importorskip("gaia_agent_email"), so outside the one CI lane that installs the hub wheel they vanish from the run without a word. Anyone auditing phishing coverage locally, or reading the main unit lane, sees green and a test file with the right name.Part of #3814. Related: #4150 (the defect), #4155 (the flagship guard), #4121 (the general collected-then-skipped sweep).
Spec: none: searched
docs/spec/— no spec governs test placement; the retirement is stated in milestone 59's description.Outcome
Phishing-guard coverage lives on the path that actually serves mail, and no test file reads as coverage for a surface that has been retired.
Acceptance criteria
TestPhishingBodyPromptInjection(tests/unit/agents/email/test_phishing_block_tool.py:325) is deleted, or retargeted at the flagship's guard so it asserts againstsrc/gaia/agents/tools/_email/phishing.py/EmailToolsMixinrather thangaia_agent_email.agent._SYSTEM_PROMPTimportorskip— it must run intest_unit.yml, which installs only.[api]:334and:344against the retired agentpytest tests/unit/agents/tools/test_email_phishing_guard.pypasses with nogaia_agent_emailinstalled — expected0 skippedScope & expectations
tests/unit/agents/email/test_phishing_block_tool.py(theTestPhishingBodyPromptInjectionclass only,:325-352); the flagship guard tests added by fix(email): stop the flagship repeating a phishing lure's instructions #4155 undertests/unit/agents/tools/How to verify
CLI surface:
pytest tests/unit/agents/tools/ -qin an environment with nogaia_agent_emailinstalled — show the count and that nothing skips. Then the email lane's own run, showing the retired-agent class is gone rather than silently skipping.🔍 Technical details
Claim class:
reproduced (executed)— the skip below was run in this checkout at572e8b79; the code and workflow citations were opened and checked.import gaia_agent_email→ModuleNotFoundErrorin this environment. The gate istests/unit/agents/email/test_phishing_block_tool.py:33.The two tests, at
:334and:344:Correction to how this was first framed. These are not tests that "cannot fail". They do run —
test_email_agent_unit.yml:143installs-e hub/agents/email/pythonand:171runstests/unit/agents/email/as a directory. #4121 already measured this and explicitly cleared the email-gated files as near-misses for exactly that reason. Where they silently skip istest_unit.yml, which installs only.[api](:117) and runstests/unit/(:137) — and any dev machine without the hub wheel, as above.So the defect is the target, not the lane: green assertions about a retired agent's prompt, in a file named as if it guards phishing today. The skip is what stops that being obvious.