feat(verify): report a deleted subject as removed, not resolved #10

Merged
trevon merged 1 commit from feat/verify-removed into main 2026-09-25 13:34:02 +00:00
Owner

Problem

Found by dogfooding on nuwayze main: pipe verify against the ratchet baseline printed

resolved  1 no longer reported - these fixes are confirmed
  + service_browse_bloc.dart:20  LoadServicesByArtist  [dead-handler]

but nothing was fixed: nuwayze commit ccca9bd1e ("delete dead firestore query code") deleted the event and its handler. Under pipe's default wire-up policy a deletion is the exception that needs approval, so calling it a confirmed fix overstated what happened.

Solution

verify now separates the two. A gone finding is REMOVED when its subject no longer exists — its file is gone; for declaration-labelled rules the event/state/union/provider/owner is no longer declared; for dead-handler the on<Event> registration itself is gone. Everything else stays RESOLVED; member-labelled rules (a method or build) are classed by file only, never guessed. Removed entries still count as gone for --expect-resolved; they are just named honestly, in text (removed N gone because the code was deleted - not wired up, a REMOVED section) and JSON (removed, removedEntries). Documented in docs/usage.md.

On nuwayze main the entry now reads REMOVED.

Tests

A unit test over hand-built entries (a wired handler stays resolved, a deleted handler and a deleted file are removed, a member label is not guessed) and an end-to-end test that deletes a fixture's dead handler and runs verifyAnalysis. 216 tests pass; pre-push gate passed.


Written by Claude (Claude Code) at the maintainer's direction, from dogfooding pipe on nuwayze.

## Problem Found by dogfooding on nuwayze main: `pipe verify` against the ratchet baseline printed ``` resolved 1 no longer reported - these fixes are confirmed + service_browse_bloc.dart:20 LoadServicesByArtist [dead-handler] ``` but nothing was fixed: nuwayze commit `ccca9bd1e` ("delete dead firestore query code") deleted the event and its handler. Under pipe's default wire-up policy a deletion is the exception that needs approval, so calling it a confirmed fix overstated what happened. ## Solution `verify` now separates the two. A gone finding is **REMOVED** when its subject no longer exists — its file is gone; for declaration-labelled rules the event/state/union/provider/owner is no longer declared; for `dead-handler` the `on<Event>` registration itself is gone. Everything else stays **RESOLVED**; member-labelled rules (a method or `build`) are classed by file only, never guessed. Removed entries still count as gone for `--expect-resolved`; they are just named honestly, in text (`removed N gone because the code was deleted - not wired up`, a `REMOVED` section) and JSON (`removed`, `removedEntries`). Documented in `docs/usage.md`. On nuwayze main the entry now reads REMOVED. ## Tests A unit test over hand-built entries (a wired handler stays resolved, a deleted handler and a deleted file are removed, a member label is not guessed) and an end-to-end test that deletes a fixture's dead handler and runs `verifyAnalysis`. 216 tests pass; pre-push gate passed. --- Written by Claude (Claude Code) at the maintainer's direction, from dogfooding pipe on nuwayze.
feat(verify): report a deleted subject as removed, not resolved
Some checks failed
Lint Commits / commitlint (pull_request) Successful in 15s
Tests / Static Analysis (pull_request) Has been cancelled
Tests / Tests (pull_request) Has been cancelled
4f3f22acad
Found by dogfooding on nuwayze main: `pipe verify` against the ratchet
baseline printed

  resolved  1 no longer reported - these fixes are confirmed
    + service_browse_bloc.dart:20  LoadServicesByArtist  [dead-handler]

but nothing was fixed. nuwayze commit ccca9bd1e ("delete dead firestore
query code") deleted the event and its handler. Under pipe's default
wire-up policy, deleting an unreachable handler is the exception that
needs approval, so calling it a confirmed fix overstated what happened.

verify now separates the two. A gone finding is REMOVED when its
subject no longer exists:
- its file is not among the project's files;
- for rules labelled by a declaration (the event/state/union/provider or
  owner class), that name is no longer declared anywhere;
- for dead-handler, the on<Event> registration itself is gone.
Everything else stays RESOLVED. Member-labelled rules (a method or
build) are classed by file only, never guessed. Removed entries still
count as gone for --expect-resolved; they are only named honestly, in
text ("removed   N gone because the code was deleted - not wired up",
a REMOVED section) and JSON (removed, removedEntries).

On nuwayze main the entry now reads REMOVED. Tests: a unit test over
hand-built entries (a wired handler stays resolved, a deleted handler
and a deleted file are removed, a member label is not guessed), and an
end-to-end test that deletes a fixture's dead handler and runs
verifyAnalysis. 216 tests pass.
trevon merged commit 871812e187 into main 2026-09-25 13:34:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
trevon/pipe!10
No description provided.