feat(verify): report a deleted subject as removed, not resolved #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/verify-removed"
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
Found by dogfooding on nuwayze main:
pipe verifyagainst the ratchet baseline printedbut 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
verifynow 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; fordead-handlertheon<Event>registration itself is gone. Everything else stays RESOLVED; member-labelled rules (a method orbuild) 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, aREMOVEDsection) and JSON (removed,removedEntries). Documented indocs/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.
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.