resolver: note razor marker removals; make retention counters mean what they log - #591
Merged
Merged
Conversation
zzet
approved these changes
Aug 17, 2026
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.
Follow-up to the #531 review — the four non-blocking notes. (The blocking one and the
test-comment fix I see you already landed in 9c9f8c9, along with the CI guards in
1d4c9d9 — thanks, that saved me the biggest half of this list.)
Razor marker removals now dirty the retention. The real adjacency mutation in
razor_using.gois theRemoveEdgeconsuming the@usingmarkers, and it had noremoval helper — the note above it was inert, exactly as the review said. Added
noteImportEdgeRemovals(removal-side sibling ofnoteImportEdgeReindexes: knownfile → per-file dirty, provenance-less → wholesale generation), wired it to the
marker consumption, and dropped the inert call. The new test follows the pattern
your pin test established: it drives the production
resolveRazorUsingspass withno
note*call in the test body, and the projected adjacency keeps the markertarget unresolved so the file can only be served by the adjacency retention —
watched it fail without the fix (
projection calls = 1, want 2). The write-siteaudit table now covers
RemoveEdgesites too and lists razor under removals;csharp_partial_merge.go's removals are classified kind-bounded (implements/extendsmoves between type nodes — imports edges never originate at a type).
Counters now mean what they log.
reach_fallbackis azap.Bool(it was aflag logged as a count), and
reach_retainedis renamedreach_occupancy— itreports the retention map's size, which is what it always measured; per-page
retention hits were already
reach_adj_cached. One log key changes name, soanything parsing the prepare line needs the new key.
Identity-preserving skip: kept, re-commented. The comment now names the one
shape that actually produces it — the deferred-LSP terminal clears, where
terminality is meta-only so
OldToequals the target — and says it runs after thepass's final prepare. I kept the skip rather than removing it: it encodes a true
invariant (an identity-preserving rewrite cannot change stored adjacency), and if a
future writer produces the shape mid-pass, skipping is the correct behavior where
removal would silently evict the files the retention serves.
Cap comment matches what the cap now bounds — both retentions, with the
adjacency entries called out as the heavy ones (~5 MB real, tens of MB at the cap,
per your measurement).
Testing: the new test failed before the fix and passes after;
./internal/resolverand
./internal/indexerFAIL name-sets on Windows are identical to clean main(zero new, zero repaired); gofmt clean.