fix: stop verify, reports and briefs from claiming more than pipe checked #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/verify-soundness-and-injection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Several paths let pipe report more than it checked, or crash instead of explaining:
verify --rule Xcompared against the whole baseline, so other rules' findings showed as RESOLVED (exit 0).analysis_optionswere silently unscanned, and verify counted their findings as resolved. This is live on word_alive, wherelib/functions/**(14 files) is excluded.--write-baseline/--yamsstatus lines went to stdout after--format json, which brokejq.--dirwas skipped silently. Filesystem errors, including the analyzer's ownFileSystemExceptionfor an unreadable SDK, crashed with exit 255.Solution
One commit per item; each commit body explains the change.
coverageblock (JSON) or a coverage line (brief/plan) that budget trimming never drops.bin/pipe.dart: 0 / 1 gate failed / 2 could not do what was asked / 64 usage.Rule changes
Release Note
verifyno longer reports unscanned or out-of-scope findings as resolved; every report states its scan coverage.emitted-not-rendered(dormant unions),notifier-field-unread,notifier-inert-consumer, andloading-not-reset. v1 baselines still decode and match throughlegacyFingerprint. Rewrite them with--write-baselineto drop line sensitivity (new baselines are"version": 2).Breaking Changes
--dirthat doesn't exist is now an error (exit 2). The JSON fields are additive.Tests
scripts/lint.sh format|analyze|test: clean, 134 passed.pipe recall --strict): not run; needs the labelled repo corpus.Documentation
AI usage
A finding with no discriminating key fell back to `line=N`, and three rules had none: a dormant emitted-not-rendered union carried only {union, owner}, and notifier-field-unread and notifier-inert-consumer only {owner}. loading-not-reset embedded the catch's absolute line as `catchLine`. Any edit above one of those findings changed its fingerprint, so `check --baseline` re-reported an accepted finding as new and `verify` reported its entry as RESOLVED. union and owner now count as discriminating (each of those rules emits at most one finding per union or notifier), and loading-not-reset carries `catchSite`, the catch's index among the catch clauses of its enclosing member (`twoSwallowedAwaits#1`), which does not move when code outside the member does. The test that guarded this shifted only findings.first. It now shifts every finding, and a second test really inserts lines at the top of every fixture file, re-analyses, and requires the same fingerprint set. Migration: fingerprints change for emitted-not-rendered (dormant unions), notifier-field-unread, notifier-inert-consumer and loading-not-reset. Old baselines stay readable and keep working - both `check --baseline` and `verify` also match the version-1 fingerprint (`legacyFingerprint`) - but those entries stay line-sensitive until the baseline is rewritten with --write-baseline, which now writes `"version": 2`.A report listed findings without saying how much of the project they were drawn from, so "0 findings" from 3 of 40 files looked like a clean project - and an agent handed a brief had no way to know otherwise. check, guide and suggest JSON now carry a `coverage` block {discovered, selected, resolved, failed, skipped, complete}. The guide brief, the markdown report, the suggest agent plan and both text outputs open with a one-line coverage note, which says PARTIAL whenever a discovered file was not analysed. The note lives in the brief's header, which budget trimming never touches. The "Coverage (what was actually examined)" caveats section was the first thing dropped under a tight budget, silently; when it no longer fits, a one-line pointer now says how many caveats were left out.`guide --yams` persists the markdown report, not the brief, and the markdown had neither the brief's caution line ("static reachability claims ... confirm each against the cited file") nor the [severity/confidence] of each finding - so a report read back from the corpus presented every finding as equally certain, with no framing. Its metadata still carried a stale `owner=pi` and nothing to date or reproduce it. The markdown now opens with the caution line, headings read `### N. [severity/confidence] rule — location`, and the metadata records `generated=<ISO-8601 UTC>` and, when the project is a git checkout, `commit=<HEAD>`. `owner=pi` is gone.d29255b0bad6b6bcb438