Improve Markdown document graph resolution - #239
Merged
Conversation
forhappy
marked this pull request as ready for review
August 13, 2026 20:12
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
Why
The per-file Markdown extractor previously guessed a
.mdendpoint before the full project inventory was available. Cross-file fragments stopped at the document root, extensionless and root-relative paths could not be selected accurately, and the generic endpoint-rewrite provenance correctly classified the later repair as inferred. Default-low publication therefore retained only two same-file HTTPX references and filtered the project-resolved links.The new flow preserves source spelling and the exact link site in
compass-languages, then performs unique target selection incompass-resolve. Because the resulting relationship is an exact source-backed document fact rather than heuristic endpoint repair, it survives low inference. Ambiguity remains explicit and unpublished.Impact
.md,.markdown,.mdx,.qmd, and.skilldocuments share the same bounded resolution rulesHTTPX default-low qualification
referencesAll 29 added edges have real endpoints and exact link-site evidence; no nodes were added. A fresh release-mode build completed in 1.25s. The cold release-mode CompassQL lookup was 0.13s on the baseline and 0.21s on the candidate; latency is reported for context and was not an optimization criterion.
Validation
cargo fmt --all -- --checkcargo clippy --workspace --lib --bins --locked -- -D warningscargo test --workspace --lib --bins --lockedcompass-languagesandcompass-resolvetest suites./scripts/qualify_code_graph_v1.sh --fixtures-onlysh scripts/check_product_boundary.shAn additional
cargo clippy -p compass-languages -p compass-resolve -p compass-core --all-targets --all-features --locked -- -D warningsrun reached two pre-existing test-only violations (expect_errinframework_qualification.rsanditems_after_test_moduleinevidence/projection/mod.rs). The documented workspace lib/bin Clippy gate passes.