Commit graph

4 commits

Author SHA1 Message Date
trvon
74b5aa95e3
style: apply dart format to the two tests added in 4c65166
Some checks failed
Tests / Static Analysis (push) Has been cancelled
Tests / Tests (push) Has been cancelled
The committed versions were not in canonical format; they were reformatted after
the commit, which would have made the pre-commit hook rewrite them on the next
commit and block it.
2026-09-20 21:59:32 -06:00
trvon
4c65166347
fix: close two more ways a check could pass without checking anything
Some checks failed
Tests / Static Analysis (push) Has been cancelled
Tests / Tests (push) Has been cancelled
Continuing the "where else can pipe report success without doing the work?"
line, which produced the --limit false verification last iteration.

1. The empty-scan guard from 51929e2 had a hole at a different layer. It fires in
   loadProject, which counts DISCOVERED files, so a project whose only source is
   generated still had one file:

     $ pipe check . --no-include-generated
     files  0/0 resolved  (1 discovered, 0 selected, 1 generated, ...)
     findings 0   exit 0

   Files were discovered, then every one was filtered out of the selection, and
   the analysis ran over nothing. The guard now also fires where selection
   happens - the single place a file can be dropped - naming the cause:
   "nothing to analyse: all 1 discovered file(s) were excluded by
   --no-include-generated".

2. `recall` reported "0/0 known bugs accounted for" and exited 0 - including
   under --strict - when it had verified nothing: an empty manifest, or a --root
   under which none of the repos exist. "0/0 accounted for" reads as a pass, so
   both are now failures that name why:

     recall evaluated none of its 5 case(s): no repo was present under /corpus
     recall manifest has no cases: recall/manifest.json

   The per-case `skipped:` lines are kept; this only changes the case where there
   is no result at all to report.

Verified: the two new tests fail without these changes and pass with them; a
healthy recall run still reports 3/5 with its notes, a project with generated
files included still exits 0, and `check --baseline <unrelated>` is still clearly
distinguishable from a clean project.

Also probed and CLEAN, so they are not re-tested blindly: `--budget 1` discloses
omissions in both text and JSON ("All 20 findings omitted ... Raise --budget"),
and a baseline matching nothing prints `findings 20 new=20` against a clean
project's `findings 0 new=0`.

104 tests (was 102), dart analyze clean.
2026-09-20 21:58:57 -06:00
trvon
03df9d01de
fix(cli): repair graph, which crashed on every invocation
Some checks failed
Tests / Static Analysis (push) Has been cancelled
Tests / Tests (push) Has been cancelled
`pipe graph` was completely non-functional. GraphCommand had no constructor, so
it never called _addCommonOptions, yet its body reads --dir, --sdk,
--concurrency, --include-generated, --limit and --format. It therefore registered
only --help:

  $ pipe graph lib
  Unhandled exception:
  Invalid argument(s): Could not find an option named "--dir".   (exit 255)
  $ pipe graph lib --format json
  Could not find an option named "--format".                     (exit 64)

So a documented command died on an unhandled exception instead of a clean CLI
error, and its JSON output was unreachable. Fixed by registering the common
options like every other project command.

Found by smoke-testing every command, which is what the two external audit
rounds never did: this round's auditor listed "run pipe graph and pipe check" as
a NEXT area to audit and never ran graph, and reported no confirmed defects.

Guard: test/cli_options_test.dart asserts every project command registers every
common option it reads (recall is exempted - it deliberately targets a corpus
root and registers its own equivalents). It fails without this fix (+0 -2).

Also, from the same round's unconfirmed suspicions, both of which reproduced:
- recall: an unrecognised `status` is now rejected instead of silently read as
  `open`. `status` decides whether a case is a bug pipe must find or a permanent
  regression guard, so a typo like "fix" defaulted to `open`, printed MISSED, and
  sent the reader hunting for a regression that was really a manifest typo.
- recall: MISSED and REGRESSED entries now print their `note`. The manifest
  already carried the explanation for the two nuwayze misses ("wired up on branch
  wire/nuwayze-* (unmerged)") but the report never showed it, so an expected miss
  looked exactly like a regression in pipe.

Recorded as NOT a defect: `pipe verify` exiting 0 while listing "new" findings.
`--expect-resolved` is documented - and implemented - as failing only on
baselined findings that are still reported; `verify` fails correctly in that case
(exit 1). It has no fail-on-new flag, which is a gap for CI use rather than a
contract violation, so the documented behaviour was left alone.

90 tests pass (was 84), dart analyze clean.
2026-09-20 21:43:36 -06:00
pipe-loop
f2949dfbfd feat: rule contracts + recall measurement (5/5 real bugs) + real --fail-on gate 2026-09-20 16:00:10 -06:00