Skip to content

feat: add Kotlin universal evidence adapter - #254

Merged
forhappy merged 2 commits into
mainfrom
agent/kotlin-universal-evidence
Aug 16, 2026
Merged

feat: add Kotlin universal evidence adapter#254
forhappy merged 2 commits into
mainfrom
agent/kotlin-universal-evidence

Conversation

@forhappy

@forhappy forhappy commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the Kotlin universal evidence adapter for packages, imports, declarations, constructors, functions, extension functions, properties, annotations, generics, nullability, and named/default arguments
  • add Kotlin-specific deterministic resolution, including member-vs-extension precedence and named/default/vararg overload applicability
  • require exact compiler/SCIP evidence for Java/Kotlin cross-language calls
  • convert Spring Kotlin to the universal spring-kotlin framework pack and remove its replaced legacy publisher
  • harden update builds so fact-neutral edits skip project-wide resolution, refresh only file envelopes, point-update immutable store values, reuse unchanged graph JSON records, and amortize bounded store GC
  • add fixtures, conformance coverage, pinned-corpus qualification results, and contract documentation

Impact

Kotlin code graphs now use the universal evidence pipeline and Spring Kotlin participates through a universal framework pack. The adapter remains UniversalCandidate: the independent 2,000-accepted-relationship precision/recall audit is not complete, and the pinned Spring Framework corpus still shows a cold-build performance regression.

The incremental fix reduces the 388-file Spring Kotlin one-file restoration from the previous 30.13-second observation to 1.01 seconds with zero graph assembly and zero new immutable objects. Release-build checks also covered ripgrep/Rust, go-git/Go, NestJS/TypeScript, the FastAPI production package/Python, and ASP.NET Core Http.Extensions/C#; all edited runs used the fact-neutral path and published valid SQLite-backed graphs. Detailed observations are recorded in PERFORMANCE.md and docs/implementation/kotlin-universal-qualification.md.

Root cause

compass update was excluded from the existing fact-neutral path. Kotlin also encoded whole-file hashes, ranges, and range-derived internal IDs into normalized extraction facts, so harmless EOF edits appeared semantic. Once resolution was skipped, publication still rebuilt broad store indexes and ran full graph-store garbage collection on ordinary edits. The fix makes the proof update-aware, preserves exact anchors and unrelated partial diagnostics, validates secondary-index invariants before point updates, and falls back to complete publication whenever the proof fails.

Validation

  • cargo fmt --all -- --check
  • cargo clippy -p compass-graph -p compass-core --lib --bins --all-features --locked -- -D warnings
  • cargo test -p compass-core --lib --locked (76 passed)
  • cargo test -p compass-graph --test store_snapshot --locked (20 passed)
  • cargo test -p compass-languages --test kotlin_universal_conformance --locked
  • cargo test -p compass-resolve --test universal_resolution kotlin --locked
  • ./scripts/qualify_code_graph_v1.sh --fixtures-only (clean/warm/forced/incremental-restored/alternate byte equality)
  • sh scripts/check_product_boundary.sh
  • release-build real-repository incremental checks for Kotlin, Rust, Go, TypeScript, Python, and C#

The broader compass-graph --lib --tests run still exposes the pre-existing Markdown URI assertion in markdown_identity; the focused graph snapshot suite and the complete code-graph v1 qualification gate pass.

@forhappy
forhappy marked this pull request as ready for review August 16, 2026 02:12
@forhappy
forhappy merged commit 368bb51 into main Aug 16, 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