fix(tri): a paths: entry is not a call, and the 30-line window was on a cliff - #3020
Merged
Conversation
… a cliff `control_forms` decides whether a workflow demonstrates that a gate can fail: it looks for `fixture`/`expect_`/`planted` within 30 lines of a mention of the script. The 30 had no stated reason. Priced before changing anything. At windows 3, 5, 10, 20 and 30 the sweep reports 0 candidates and one NONE; at 50, 100 and unbounded it reports 1 candidate and no NONE. The verdict the command exists to give flips between 30 and 50 -- the constant sat one step below a cliff. The evidence at 45 lines: `catalog-count-gate.yml` names the script at line 29 as a `paths:` TRIGGER ENTRY, and the word `planted` is at line 74 in a comment about a different control. That is the 400-character arXiv window again, an order of magnitude closer. So the reading is structural now: a `paths:` list says which changes RUN a workflow, never what it does, and a script named there has not been invoked. After the rule the verdict is identical at every width from 3 to unbounded. The predicate ended at TWO clauses from four: a colon test, a path-shape test and a non-empty test each survived their own mutation and were removed rather than kept as prose with a compiler behind it. Mutation 3 of 3 on what remains. Refs #2994 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… a sweep declined 450: the 30-line attribution window sat one step below a cliff -- the verdict flips between 30 and 50. Replaced by a structural rule; the verdict is now identical at every width. 451: four clauses in the new predicate, three survived their own mutation and all three were removed. Two remain and both bite. 452: the sweep that found it is not shippable -- 66 threshold literals, 57 uncommented, and about five are the class. The finding survives, the tool does not. Refs #2994 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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.
Price the constant before you defend it
tri gates sweepdecides whether a gate has ever been demonstrated to fail. One of its four forms asks whetherfixture,expect_orplantedappears within 30 lines of a mention of the script in a workflow. The comment above that code explains which words were chosen and why two were dropped. It says nothing about the 30.Priced by sweeping the constant and re-running:
workflow candidateNONEThe verdict this command exists to give flips between 30 and 50. The constant sat one step below a cliff, and which side it landed on was luck — nobody had run this table.
What lies at 45 lines:
catalog-count-gate.ymlnames the script at line 29 as apaths:trigger entry, and the wordplantedis at line 74, in a comment about a different control. So the wider window buys a false candidate — exactly the failure this code's own comment describes ("the wordmustsitting in a prose comment 760 lines away"), one order of magnitude closer and therefore invisible.The repair is structural, not a better number
A
paths:list says which changes run a workflow, never what it does; a script named there has not been invoked. After the rule:workflow candidateNONEIdentical at every width — which is what a constant that has stopped being load-bearing looks like, and is the check to run after any such repair. Same shape as the 400-character arXiv window replaced by the contiguous
///block.Four clauses, three survived their own mutation, three deleted
The predicate was written with a
-prefix test, non-empty, no space, no colon, and a path shape. Mutating each separately — §436's rule, applied on purpose this time:- name: …,- uses: …,- run: ….- mainunderbranches:read as a call.All three removed. Two clauses remain and each turns the suite red when broken.
The sweep that found it, measured and declined
The option this pass started from was "sweep the code for other undocumented thresholds". It was run, and it is not shippable: 66 threshold literals in
cli/tri/src(outside tests and string literals, excluding 0 and 1), 57 with no comment within two lines — but by shape, 11 are bit/mask work, 25 arelen()minimums, 7 are enum constants, and only 14 could contain the defect. Reading all fourteen gives about five. A detector with a precision of 5 in 57 is the one that died astri claims superlative.The first attempt was worse: without stripping string literals it reported 234, most of them format-width specifiers like
{:>10}— a matcher describing its input, caught because the number was implausible for the size of the tree.The finding survives; the tool does not.
Controls
cargo test -p tri-prefix testpaths:rule from the call testgates.rs+108 −1Skill §450–452.
Refs #2994
🤖 Generated with Claude Code