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 judges a line, not a statement, so a second assertion on the same line is missed #6218
Found by the Codex review on PR #6216 (#6040 PR B). The testing plugin's cant-fail scanner judges oracles per line, not per statement. A C# line holding two statements, such as Assert.True(true); Assert.NotNull(x);, is classified as a whole: the inert first statement decides the line, so the weak second assertion is never reported as rule-weak-oracle. Main has the same miss, so PR B did not introduce it; fixing it needs per-statement splitting in the scanner, larger than that PR.
Proposed work
Split C# lines on top-level ; (outside strings, char literals and parentheses) before oracle classification, so each statement is judged on its own. Check whether the Python, JS and Go lanes share the same per-line assumption.
Acceptance criteria
A bad fixture with Assert.True(true); Assert.NotNull(x); on one line reports both inert and weak-oracle; red on the current engine.
A stay-quiet fixture with two strong assertions on one line reports nothing.
Findings on existing tracked C# tests are unchanged except where intended.
Thanks for the report. As I understand it: the testing plugin's cant-fail scanner classifies oracle strength per source line rather than per statement, so a C# line holding two semicolon-separated statements (e.g. Assert.True(true); Assert.NotNull(x);) gets judged as a whole — the inert first assertion decides the line, so a weak second assertion on the same line is never flagged as rule-weak-oracle. This predates PR #6216/#6040 and is present on main.
The proposed fix (splitting C# lines on top-level ; outside strings/chars/parens before classification, and checking whether the Python, JS, and Go lanes share the same per-line assumption) looks well-scoped, with clear red/stay-quiet fixture criteria already specified. I didn't find any existing duplicate issues for this.
No fix or timeline is implied by this triage pass.
Activity
github-actions commentedon Oct 4, 2026
Thanks for the report. As I understand it: the testing plugin's cant-fail scanner classifies oracle strength per source line rather than per statement, so a C# line holding two semicolon-separated statements (e.g.
Assert.True(true); Assert.NotNull(x);) gets judged as a whole — the inert first assertion decides the line, so a weak second assertion on the same line is never flagged asrule-weak-oracle. This predates PR #6216/#6040 and is present on main.The proposed fix (splitting C# lines on top-level
;outside strings/chars/parens before classification, and checking whether the Python, JS, and Go lanes share the same per-line assumption) looks well-scoped, with clear red/stay-quiet fixture criteria already specified. I didn't find any existing duplicate issues for this.No fix or timeline is implied by this triage pass.
Automated triage. A maintainer reviews it.