Harden Compass performance and improve semantic graph dominance - #86
Merged
Conversation
forhappy
marked this pull request as ready for review
July 30, 2026 21:33
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.
Summary
prototype/.fnmethods and correctly anchor grouped/generated Go typesURLResolverWhy
Compass needed repeatable, fail-closed evidence for both performance and graph quality. Literal Graphify comparison mixed real omissions with cases where Compass owns a stronger canonical definition. The implementation therefore improves native extraction/resolution first, then uses Graphify only as a development oracle to prove exact coverage or bounded semantic dominance.
Root causes fixed in this phase include lexical/canonical cache-root disagreement, empty generic files being cleared after extraction, Python re-export provenance stopping short of anchored definitions, qualified external calls losing their endpoints, JavaScript prototype assignments not becoming owned methods, and Go receiver placeholders winning over later real or grouped type declarations.
Real-repository quality results
Both final graphs have zero validation errors.
This improves substantially over literal missing counts of Django 1,175 nodes / 10,600 edges and Entire 720 nodes / 7,470 edges. Strict Graphify-superset quality is intentionally not claimed: the remaining cases fail closed and are concentrated in config/vendored-resource relations, shell entry points, Go embedding occurrences, and ambiguous inherited/generated identities.
The final generated-Go correction publishes
ErrorModelStatusCodeat its declaration andoptionFuncas an anchoredtype_alias; on Entire it reduces ambiguous nodes from 20 to 6 and missing nodes from 52 to 50.Performance
Pinned corpora: Django
50d706d0, Entire279b9885. Fresh comparison: Graphify 0.9.31 at4fe11092; historical baseline: Graphify 0.9.30 atecfcd160.Django remains 5.05x faster than the pinned Graphify 0.9.30 median. Graphify 0.9.31 itself became materially faster, so current-head cold ratios are 4.05x on Django and 4.35x on Entire. Django warm is 11.96% above the prior 1.949s baseline, narrowly outside the 10% phase gate. Peak RSS also remains higher than Graphify. These remain explicit follow-up performance gaps.
Query verification
Single fresh-process semantic checks (not latency medians): Compass passed all four repository oracles. Graphify passed three; its Django URL-resolution result omitted required
URLResolverevidence.Validation
cargo fmt --all -- --checkcargo test -p compass-files --test contracts(23 passed)compass-languages,compass-resolve, andcompass-graphsuitespython3 -m unittest discover -s benchmarks/performance/tests -v(60 passed)git diff --checkgraphify update .refresh completedDetailed implementation context, exact constraints, methodology, and remaining gaps are in
docs/superpowers/plans/2026-07-30-semantic-graphify-dominance.mdanddocs/superpowers/reviews/2026-07-30-compass-performance-baseline.md.