Repository navigation
fix(agent): a line of warnings or skips alone is not a test run - #4173
Conversation
The "did you run the tests?" reminder is cancelled by any output that looks like a runner summary, and the pattern accepted a line made only of soft counts — `2 warnings`, `12 skipped`. A compiler, a downloader or a packager printing one of those convinced the turn its tests had run, so the reminder never appeared. Soft counts now need pytest's own rule or timing tail to qualify. A real outcome, `no tests ran`, and unittest's `Ran N tests` still stand alone, so a genuine skips-only run is unaffected. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Verdict: Approve with suggestions This tightens the "did you actually run the tests?" check so that a bare line like One thing worth a second look before merge: the fix stops short of the most common offender. A line reading just Nothing here is blocking: this is strictly better than what's on main, touches no public API, CLI or UI surface, and the existing recognition cases are unaffected. Real-world evidenceN/A — internal helper change with no CLI, API, MCP or Agent UI surface; no 🔍 Technical detailsIssues🟢 A bare
pytest never emits a bare No existing case regresses: 🟢 That string is filtered by the pre-existing (Pair this with the constant change above — as-is it asserts current behaviour inverted.) 🟢 Test placement and redundant import ( The new parametrized test sits at module level while its siblings ( Strengths
|
The agent is asked to run the tests when it changed code and did not check it. That reminder is cancelled by anything in the turn that looks like a test-runner summary — and the check accepted a line made only of soft counts, like
2 warningsor12 skipped. A compiler, a downloader or a packager printing one of those convinced the turn its tests had already run, so the reminder never appeared and an unverified change was reported as done.Soft counts now need pytest's own rule or timing tail to qualify. A real outcome,
no tests ran, and unittest'sRan N testsstill stand on their own, so a genuine skips-only run is unaffected.Test plan
pytest tests/unit/agents/test_answer_quality_checks.py tests/unit/agents/test_verification_scope.py— 200 passed.2 warnings/12 skipped/Found 3 errorsare not a run;===== 2 warnings =====,3 skipped in 0.01s,no tests ranandRan 4 tests in 0.003sstill are.🤖 Generated with Claude Code