Repository navigation
Track A memo cut: per-module normalize+ownership memoization — resolve 371s→319s, both stages −95%, fingerprints byte-identical - #6539
Merged
Conversation
…stered (whole-corpus red; selection gap, third instance of #6530's masking class) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 13, 2026
Closed
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.
Track A memo cut: normalize + ownership per-module memoization (−52s of the receipted 371s)
The resolve-split receipt (#6535) priced two per-entry recomputations at ~15% of whole-corpus resolve:
normalize(28.5s, 8%) andownership(24.3s, 7%) — both pure per-module facts recomputed per entry at zero marginal information. This PR collapses them to first-touch-per-module within a worker.Model first, then host cache (the typed_module_cache pattern)
src/v1/03_normalize.dag,src/v1/compile.dag): the per-module row of each stage's fold is factored into a named fn —normalize_module_diagnostics(m, source_indices)andmodule_ownership_proofs(m)— withnormalize_graph/extract_ownership_proofsnow folding over exactly those rows. Pure factoring; seed regenerated (regen_divergence_count=0).cli_run.rs): twoMultiEntryIndexRefCell caches keyed by declaring-file path (the same in-process source-stability contractparse_cache/typed_module_cacheride;module_source_identitywalls name↔file divergence loud).resolve_entry_with_parse_cacheassembles diagnostics per module in authority order — a module with no bodied items contributes the same empty row the authority's filter skips, so the assembled list is identical by construction.Receipts (all by execution)
corpus_fingerprint=95da9a3c56e6bcaf,emit_graph_fingerprint=97a9b47b34c387e3, 1,104 modules — byte-identical. (The probe path bypasses the memo, so this isolates the authority refactor; the memo path's equivalence rides the full corpus below.)forced_serial=0,hard_backoffs=0):normalizeownershiptypecheck/reconcile_assemblycargo test --release -p v1-compiler --lib214 passed / 0 failed;regen_stage0 --verifydivergence 0.Note on an overlapping hunk
The branch carries the one-row nfr roster backfill also shipped standalone as #6541 (main is whole-corpus red without it — #6533 landed
frontier_blocker_class_matchesunrostered; my falsifier receipt above needs the row to run green). Whichever merges first, the other's hunk falls out cleanly.Remaining Track A mass after this cut, per the receipt:
typecheckcold computes (197s — cross-worker share, Inc B territory) andreconcile_assembly(104s — resolver-graph-major lane), both handed off with numbers.🤖 Generated with Claude Code