You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(testing): cannot-fail scan counts a Python or Go test's own name as an assertion #6211
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
PR A of #6040 fixed a C# leak in the testing plugin's cannot-fail scanner (plugins/testing/skills/audit/scripts/cant-fail-scan.awk): the test's own declaration line was counted as an assertion token, so a test named, for example, Check... or taking an expected parameter was treated as asserting even when its body asserted nothing.
While doing it, the implementer reported that the Python and Go lanes have the same leak: the name on the declaration line counts as an assertion token. None of #6040's PRs A to D covers it.
Unverified beyond that report; reproduce first.
Proposed work
Reproduce with a Python and a Go fixture whose test name contains an assertion-shaped token but whose body asserts nothing. Then apply the same declaration-line blanking the C# fix uses.
Acceptance criteria
For Python and for Go: a bad fixture with an assertion-shaped name and no assertion fires rule-zero-assertion, and is red on the current engine.
A stay-quiet fixture per language: a test with the same kind of name that does assert stays quiet.
No finding changes on existing tracked Python and Go tests except the intended ones.
Thanks for the report. This describes a follow-on to #6040's C# fix for cant-fail-scan.awk: the Python and Go lanes reportedly have the same leak, where a test's own declaration line (its name or a parameter like expected) is counted as an assertion token, so a zero-assertion test can pass the cannot-fail scan undetected.
The acceptance criteria are concrete: a red fixture per language (assertion-shaped name, no real assertion), a stay-quiet fixture per language (same naming, real assertion present), and no regressions on existing tracked tests. The report notes this is unverified beyond the implementer's observation while fixing the C# case, so reproduction is the first step.
No duplicate open issue found; #6040 and its sibling PRs (A–D) cover C# only and don't touch Python or Go.
Reproduced on the current scanner: a pytest test named test_assert_total_is_computed and a Go test named TestCheckTotal, each with no assertion in its body, are not reported; the same bodies under neutral names (test_plain_total_is_computed, TestPlainTotal) fire rule-zero-assertion.
Basis: verified, cant-fail-scan.sh --file run this session on two scratch fixtures; the py-pytest adapter's assertion calls include [Aa]ssert and the go-testing adapter's include [Cc]heck, [Vv]erify, [Ee]xpect, [Ee]nsure, [Vv]alidate, matched against the declaration line.
Agent Brief
Type: Bug Summary: The cannot-fail scanner's Python and Go lanes count the test's own declaration line (its name) as an assertion token, so a zero-assertion test with an assertion-shaped name is never flagged.
Current behavior:
For Python (pytest and unittest adapters) and Go (testing adapter), the assertion-token match runs over the test's declaration line as well as its body. A test whose name contains an assertion-shaped token (assert, check, verify, expect, ensure, validate, and similar) is treated as asserting even when its body asserts nothing.
Other lanes (JS/TS, Bash, PowerShell) unless the same fixture shape reproduces there; file a separate item if it does.
Routing: delegable. Work class scoped (bug fix). Priority medium (assessed default: a scanner false negative hides cannot-fail tests). Ordering: #6213 edits the same scanner and carries the reference fix, so this work should start after it merges.
Ratify autonomous dispatch of this C3 bug-fix item?
Classification: work-class: scoped (C3), bug-fix-shaped (confirmed at triage). Intended dispatch: the work-loop worker lane, through /work-items:work, to a draft PR the lane never merges. First drain is not complete and no item-level ratification exists, so it is queued here. Ratify through /work-items:attend-queue.
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
Activity
github-actions commentedon Oct 4, 2026
Thanks for the report. This describes a follow-on to #6040's C# fix for
cant-fail-scan.awk: the Python and Go lanes reportedly have the same leak, where a test's own declaration line (its name or a parameter likeexpected) is counted as an assertion token, so a zero-assertion test can pass the cannot-fail scan undetected.The acceptance criteria are concrete: a red fixture per language (assertion-shaped name, no real assertion), a stay-quiet fixture per language (same naming, real assertion present), and no regressions on existing tracked tests. The report notes this is unverified beyond the implementer's observation while fixing the C# case, so reproduction is the first step.
No duplicate open issue found; #6040 and its sibling PRs (A–D) cover C# only and don't touch Python or Go.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 4, 2026
This was generated by AI during triage.
Reproduced on the current scanner: a pytest test named
test_assert_total_is_computedand a Go test namedTestCheckTotal, each with no assertion in its body, are not reported; the same bodies under neutral names (test_plain_total_is_computed,TestPlainTotal) firerule-zero-assertion.Basis: verified,
cant-fail-scan.sh --filerun this session on two scratch fixtures; the py-pytest adapter's assertion calls include[Aa]ssertand the go-testing adapter's include[Cc]heck,[Vv]erify,[Ee]xpect,[Ee]nsure,[Vv]alidate, matched against the declaration line.Agent Brief
Type: Bug
Summary: The cannot-fail scanner's Python and Go lanes count the test's own declaration line (its name) as an assertion token, so a zero-assertion test with an assertion-shaped name is never flagged.
Current behavior:
For Python (pytest and unittest adapters) and Go (
testingadapter), the assertion-token match runs over the test's declaration line as well as its body. A test whose name contains an assertion-shaped token (assert,check,verify,expect,ensure,validate, and similar) is treated as asserting even when its body asserts nothing.Desired behavior:
Key interfaces:
expect:annotations).Acceptance criteria:
rule-zero-assertion, and is red on the current engine.Out of scope:
Routing: delegable. Work class scoped (bug fix). Priority medium (assessed default: a scanner false negative hides cannot-fail tests). Ordering: #6213 edits the same scanner and carries the reference fix, so this work should start after it merges.
kyle-sexton commentedon Oct 4, 2026
This was generated by AI during work-loop.
Ratify autonomous dispatch of this C3 bug-fix item?
Classification:
work-class: scoped(C3), bug-fix-shaped (confirmed at triage). Intended dispatch: the work-loop worker lane, through/work-items:work, to a draft PR the lane never merges. First drain is not complete and no item-level ratification exists, so it is queued here. Ratify through/work-items:attend-queue.Lane: work-loop, instance melo-worker-1, cycle 2.