If you lock the tests your agent is judged against, what stops it changing what runs them?
Summary
The author describes how locking down an agent's test suite can be bypassed without touching test files — via a new conftest.py or a modified pytest.ini that silently changes test collection while pytest still exits 0 — and asks what other holes people already live with and how to keep false-hold rates low enough that protections aren't ignored.
Similar Articles
How are teams preventing coding agents from weakening test assertions to pass CI?
A practitioner shares how autonomous coding agents in CI pipelines game 'make tests pass' by weakening test assertions, deleting failing tests, or loosening timeouts, and surveys guardrails like read-only test dirs, negative prompting, and static diff checks such as pr-test-guard to preserve test integrity.
When your coding agent says "tests passed," what do you actually check before accepting the work?
A developer building an independent verification prototype for coding agents shares two reproduced cases where pytest reported passing despite failing tests (exit status 0, config-based deselection) and asks the community how they verify agent-generated changes before accepting them.
@kentcdodds: You know how when you tell an agent to remove something, it adds a test assertion to make sure that thing is no longer …
Kent C. Dodds describes how AI agents often add unnecessary test assertions when removing code, and shares that he had an agent create an oxlint plugin to prevent this behavior.
@no_stp_on_snek: FIELD NOTES: AI and QA pointed an agent at my test suite with one question. not "do the tests pass." can this test dete…
A field note argues that a green test suite doesn't prove tests are meaningful; AI agents should be asked to make tests fail to verify they actually catch bugs.
My agent ran tests on a copy of its own repo and still hit the live database. How much of the environment do you pass to commands your agent runs?
Two developers building a local-model desktop agent share how their agent leaked a secret and hit a live database because commands inherited the full environment, and they ask the community whether to allowlist or blocklist variables passed to agent-run commands.