Conversation
In two passes the same defect was found four times, in four emitters,
and every one is a fixed list of node kinds with a case absent:
Verilog test-block statements StmtIf a test that could not fail
Rust has_body StmtAssign 53 functions became a stub
Rust expr_is_bool ExprFieldAccess !x.flag became (x.flag)==0
compound_binop /= x /= 2 became x = 2
None is a subtle algorithm. Each is one identifier absent from a
`matches!`, and two of the four are findable mechanically, because the
comment beside the arm ENUMERATES the cases and the pattern does not
match the enumeration:
NodeKind::StmtForRange | NodeKind::StmtWhile | NodeKind::StmtFor => {
// Control flow in a test block: a `for`/`while`/`if` was dropped
`if` is in the sentence and not in the pattern. That is a diff, not a
judgement.
The command reads the comment INSIDE an arm's body, never the one above
its pattern: a comment above belongs to the previous arm as often as to
this one, and reading it as this arm's claim hits every second arm in
the file. That is a test.
Silent on master, and it says so rather than printing nothing: "Zero is
a result here and not a silence: 57 arms were read and each one's
comment was compared against its own pattern."
Historical control: run against the commit before #2871 it reports
exactly one arm, `StmtForRange | StmtWhile | StmtFor` missing `StmtIf` --
the defect it was written after, on the commit where it still existed.
The word `assignment` unquoted was in the vocabulary and produced two
hits on master, both prose. Requiring the backtick took the false
positives to zero and left the control firing.
5 tests. Skill sections 317-318.
gHashTag
enabled auto-merge (squash)
August 29, 2026 19:54
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-29 19:54:21 UTC
Summary
Seal Status
|
The PR body carried no `Refs`, so `check-linked-issue` and `Check L1 TRACEABILITY` were both red -- law L1 requires every change to name the issue it belongs to, and I wrote a PR about a detector for "the comment claims something the code does not" without linking it to either defect it was written after. Refs #2844, #2871
Contributor
PR DashboardGenerated at: 2026-08-29 20:00:06 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
gHashTag
added a commit
that referenced
this pull request
Aug 29, 2026
§317 ended with "That is a five-line script, not an audit -- and it
would have found all four." No such script existed when I wrote that.
Built and measured:
naive diff of constructed variants against each list
-> 10 lists of 10 flagged. Almost every list is a legitimate
subset, so it finds everything, which is finding nothing.
the same grouped into families (control flow / binding / exit),
flagging a list that covers PART of a family
-> 3 of 10, and on the commit before #2875 it points at the exact
`has_body` line. But all three of its hits on a clean tree are
correct code: `StmtLocal | StmtAssign` collects NAMED bindings
and `StmtExpr` has no name; the loop arm at 10979 excludes
`StmtIf` on purpose.
two of the four are not NodeKind lists at all: `compound_binop` maps
operator strings and `expr_is_bool` is a match whose missing arm
nobody enumerated.
So: 1 of 4, three false positives. `tri kinds drift` also finds 1 of 4
and costs zero false positives, which is why that is the one that
shipped. §317 now carries these numbers instead of the prediction.
319 is the general form. A sentence in the conditional tense, inside a
document whose purpose is to hold measurements, takes authority from the
numbers around it -- and unlike a wrong claim about existing code, it
cannot be checked until somebody builds the thing. Either build it and
write the number, or write "untested" beside it.
Refs #2876
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In two passes the same defect was found four times, in four emitters, and every one is a fixed list of node kinds with a case absent:
StmtIfhas_bodyStmtAssign{ unimplemented!() }expr_is_boolExprFieldAccess!x.flagbecame(x.flag) == 0, E0308compound_binop/=x /= 2emitted asx = 2, three backendsNone is a subtle algorithm. Each is one identifier absent from a
matches!— and two of the four are findable mechanically, because the comment beside the arm enumerates the cases and the pattern does not match the enumeration:ifis in the sentence and not in the pattern. That is a diff, not a judgement.The command
tri kinds driftreads the comment inside an arm's body, never the one above its pattern — a comment above belongs to the previous arm as often as to this one, and reading it as this arm's claim hits every second arm in the file. That is one of the five tests.Silent on master, and it says so rather than printing nothing:
Historical control — run against the commit before #2871:
It finds the defect it was written after, on the commit where that defect still existed.
The word
assignmentunquoted was in the vocabulary and produced two hits on master, both prose — "the declaration was already emitted at the assignment site". A backticked word is a name; the same word in a sentence is not. Requiring the backtick took the false positives to zero and left the control firing.Skill sections 317–318 land with it: the four-lists table, and why a peer backend is the cheapest oracle this project has — four languages from one source means three oracles per construct, at one command each. Also where that fails:
while (c) : (step)was wrong in all four, so no comparison could see it.Refs #2844, #2871