Skip to content

Improve Python and TypeScript graph discovery - #238

Merged
forhappy merged 2 commits into
mainfrom
codex/python-typescript-graph-quality-round2
Aug 13, 2026
Merged

Improve Python and TypeScript graph discovery#238
forhappy merged 2 commits into
mainfrom
codex/python-typescript-graph-quality-round2

Conversation

@forhappy

@forhappy forhappy commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • improve deterministic natural-language ranking with language-neutral predicate, subject, operation-role, and owner evidence
  • keep TypeScript framework binding-alias interpretation inside the TypeScript framework resolver and limit compatibility identity propagation to declared handlers and middleware
  • add pinned, manually source-reviewed low-inference HTTPX and NestJS relevance oracles
  • add cross-language regression coverage for Python, TypeScript, Rust, Go, Java, and PHP symbol identities
  • document the qualification result in the changelog

Why

The HTTPX and NestJS evaluation exposed missing operation vocabulary, weak compound-owner handling, and overly broad TypeScript framework identity propagation. The original ranking refinement also proved too broad when audited against Rust and Java repositories. This PR now uses a total, language-neutral ordering and narrowly evidence-backed owner refinements; language-specific binding interpretation remains in the TypeScript utility.

Source-reviewed query impact

Corpus Compass 0.3.11 full / top-1 This change full / top-1 Graphify full / top-1
Python HTTPX 9 / 10 of 20 14 / 14 of 20 1 / 1 of 20
TypeScript NestJS 5 / 6 of 21 7 / 8 of 21 0 / 0 of 21
Rust delta-rs 9 / 12 of 20 11 / 14 of 20 not rerun
Go Entire 17 / 19 of 20 17 / 19 of 20 not rerun
Java Dicer 20 / 20 of 20 20 / 20 of 20 not rerun

All 25 absent-symbol negative controls pass. The comparison uses frozen low-inference graphs and independently source-reviewed expected seeds, relevant nodes, direction, and ambiguity.

The final low-inference NestJS rebuild retains 60,111 nodes and 79,446 edges, with zero dangling or duplicate edges and 100% source/occurrence backing. Eight invalid relationships remain safely omitted.

Universal qualification

The fixture qualification covers 57 languages, 27 semantic flows, 24 framework families, 1,775 invariants, 82 exact route resolutions, ambiguity and unresolved cases, deterministic clean/warm/rebuild/alternate-checkout byte equality, and enterprise scale ceilings.

The shared ranker contains no language switch. TypeScript occurrence-rule parsing is owned by frameworks/typescript.rs; other language utilities and resolvers remain isolated and can apply their own evidence encodings without inheriting TypeScript assumptions.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --lib --bins --locked -- -D warnings
  • cargo test --workspace --lib --bins --locked
  • focused Compass Query ranking and Compass Resolve handler-identity tests
  • ./scripts/qualify_code_graph_v1.sh --fixtures-only
  • sh scripts/check_product_boundary.sh
  • real-repository source-reviewed query evaluation for Python, TypeScript, Rust, Go, and Java against Compass 0.3.11 baselines

@forhappy
forhappy marked this pull request as ready for review August 13, 2026 19:01
@forhappy
forhappy merged commit 644cba5 into main Aug 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant