Harden versioned graph builds and comparison UX#44
Merged
Conversation
forhappy
marked this pull request as ready for review
July 26, 2026 05:05
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
Root cause
compass history buildrepeated graph construction and validation already completed bycompass initorcompass update, then reconstructed and revalidated stored artifacts more than once. The comparison UI also inferred counts only from presentation graphs, omitted source patches, and rendered the complete graph while comparison mode was active.User impact
Clean current revisions can enter immutable history without a detached checkout or redundant extraction, while stale, custom-profile, semantic, and explicit-rebuild cases retain exact reconstruction. Version comparisons now distinguish a genuinely unchanged topology from source-only changes and keep exact parent-specific counts visible.
Performance
Measured with a release build against the real
fjallrepository under/Volumes/Workspace/Github:history build HEAD --code-onlyThe 1.85s confirmation used a fresh history store on
fjall(about 16.8K source lines) after the normal CLI capability/version warmup performed by the extension. A newly linked binary's first cold invocation measured 3.74s, so the sub-two-second result applies to the warmed production sequence rather than macOS first-launch overhead. Fast promotion and explicit exact rebuilds produced the same realization ID.Diff verification
13baf811 → 60264f822: exact topology is correctlynodes +0 −0 ~0,edges +0 −0 ~0; theCargo.tomlversion bump is retained as a complete source patch2e12d2e7 → 864c18590: exact history diff reportsnodes +1 −0 ~4,edges +4 −2 ~0, two source files, and four semantic findingsKnown follow-up
The numeric counts, source patches, and semantic evidence are exact. The focused presentation graph can still over-select records when community assignments are renumbered or index-derived viewer edge IDs shift. This draft keeps that limitation explicit for follow-up before claiming fully stable visual identity across every clustered revision.
Validation
cargo fmt --all -- --checkgit diff --checkcargo test -p compass-history --lib --tests(64 passed, 1 explicit performance test ignored)cargo test -p compass-core --test history_materialize(7 passed)cargo test -p compass-cli --lib(63 passed)cargo test -p compass-cli --test history_cli(23 passed)npm test -w @compass/viewer(16 files / 41 tests)npm test -w compass-vscode(18 files / 41 tests)tests/viewer/history.spec.ts(13 passed)