Repository navigation
refactor(audit): share the flag-presence verdict and tighten the line classifier - #180
Open
brettdavies wants to merge 1 commit into
Open
brettdavies wants to merge 1 commit into
brettdavies wants to merge 1 commit into
Conversation
… classifier No audit result changes: every evidence string, every definition read from the 71 help fixtures, and every probe the audits send stay as they were. Audits: - Seven audits ended in the same pass-or-warn-with-the-dash-rule-note shape. `flag_presence::pass_or_warn` holds it once, for `p6-color-flag`, `p2-raw-flag`, `p7-verbose`, `p2-json-aliases`, `p7-quiet`, `p8-install-all` and `p1-flag-existence`. - `p1-flag-existence` and `p1-non-interactive` each kept their own copy of the help-on-bare markers and of the sentence that says no non-interactive flag is declared. `non_interactive.rs` owns both now. - The declared `[p2] json_probe` call, which `p2-json-output` and `p2-schema-print` both run, moves to `declared_probe.rs`. `json_output.rs` drops from 239 to 188 lines of non-test code. - `subcommands_to_probe` takes the help it always had. Flag model: - The classifier's two exclusive fields, the description column and the indent of a definition still waiting for one, become one `Description` enum. - `Lead` had three variants and one question asked of it. It is a predicate now, and the bracket check sits where it is used. - `column_of` moves to `pieces.rs`, so `classify.rs` and `header.rs` no longer import each other. - `Piece` kept two join flags that were only ever read together. They are one. - The tokenizer's TAB handling is gone: `normalize` expands TABs before any line reaches it. Tests read help fixtures through one `fixture()` helper.
This was referenced Oct 9, 2026
brettdavies
added this pull request to stack #166
October 9, 2026 15:40
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.
Summary
A cleanup pass over the stack below it (#163 to #179), with no change to any audit result.
Audits:
flag_presence::pass_or_warnholds it once, forp6-color-flag,p2-raw-flag,p7-verbose,p2-json-aliases,p7-quiet,p8-install-allandp1-flag-existence.p1-flag-existenceandp1-non-interactiveeach kept a copy of the help-on-bare markers and of the sentence that says no non-interactive flag is declared.non_interactive.rsowns both.[p2] json_probecall, whichp2-json-outputandp2-schema-printboth run, moves todeclared_probe.rs.json_output.rsdrops from 239 to 188 lines of non-test code.subcommands_to_probetakes the help it always had, in place of anOption.Flag model:
Descriptionenum.Leadhad three variants and one question asked of it. It is a predicate, and the bracket check sits where it is used.column_ofmoves topieces.rs, soclassify.rsandheader.rsno longer import each other.Piecekept two join flags that were only read together. They are one.normalizeexpands TABs before any line reaches it.Tests read help fixtures through one
fixture()helper.Changelog
No user-facing changes.
Type of Change
refactor: Code refactoring (no functional changes)Related Issues/Stories
docs/plans/2026-10-06-0034-fix-help-flag-names-across-frameworks-plan.md(the simplification pass after U10)Testing
Test Summary:
normalizeowns) and one assertion on the removedNoneargument.cargo test --test dogfoodpasses.Expected moves. Written before the corpus run.
None. Replaying the full registry capture set through the base (#179) and head builds moves no row.
Corpus before/after. Run after the table above was written. Base
8a8ae3ef2419, head8134d09b7510. Imagesha256:05db16cf226cd14a93a2682aea41b72d3e6b4d240cadba006f2881d3ffa996b3, networkbridge. 98 tools selected, 95 scored under both builds, 1 rerun three times (mods).Moved rows (0)
None.
Derived fields moved (0)
None.
No row and no derived field moved, as expected.
modsp3-should-about-long-about, the one row on the A/A noise list, did not move. No row is unstable, no harness bug is flagged, and no tool failed to score under one build only.cursor,nvidia-smiandxai-grok-buildare absent from the image and ran under neither build.Files Modified
Modified:
src/audits/behavioral/:color_flag.rs,raw_flag.rs,verbose_flag.rs,json_aliases.rs,quiet.rs,install_all.rs,flag_existence.rs,non_interactive.rs,json_output.rs,schema_print.rs,force_yes.rs(test helper only),mod.rssrc/runner/help_probe/flags/:classify.rs,header.rs,pieces.rs,mod.rs(test helper only)src/runner/help_probe/fixture_snapshots.rs,src/runner/help_probe/mod.rs: the sharedfixture()readerCreated:
src/audits/behavioral/flag_presence.rssrc/audits/behavioral/declared_probe.rsRenamed:
Deleted:
Breaking Changes
Deployment Notes
Checklist