Repository navigation
Import contract C7/C8; scala truth-side fixes take scala recall 51.6 → 93.5 (#3641) - #3666
Merged
Merged
Conversation
…-> 93.5 (#3641) Decided 2026-09-25 (docs/import_rule_contract.md): - C7: a whole-package wildcard (`import io.circe._`, `import a.b.*`) is an edge to the package's own file (a scala `package object`) or to nothing -- never one edge per file of the package. The comparison scores scala and kotlin by it; java/go keep "any file of the package" (nothing disagrees). - C8: a build-variant copy (scala-2/ vs scala-3/, a symlinked include/ copy) resolves to the importer's own variant. Engine fix filed as #3665. import_graph_accuracy truth side (mechanical, so code): - a top-level scala `import_declaration` was indexed as a DECLARATION of its first name, so every file importing `cats.x` "declared" `cats`, and every external `cats.*` / `scala.*` import resolved to 35-41 in-repo files; - a member import could cut back into the enclosing-package prefix (`munit.FunSuite` retried under io.circe -> package object circe) or two names down to a lowercase package (`io.circe.optics.JsonPath` -> circe). Together they were 410 "missed" imports that were never GitGalaxy's. scala: 1006 -> 521 resolvable imports, recall 51.6 -> 93.5, precision 99.4 -> 98.8 (baseline regenerated). The 16 remaining multi-file misses are all scala-2/scala-3 pairs: validated as GitGalaxy misses (#3665). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q
) The full-suite job does not install tree-sitter-language-pack; the scala tests parse with it, so they skip there, like test_import_graph_accuracy's own `needs_ts` tests. The ledger/geometry tests still run everywhere. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q
Contributor
2 tasks done
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.
Part of #3641. Follows #3661. This settles the Scala
truth-names-several-filesshape that #3661 left open.Rulings (decided 2026-09-25,
docs/import_rule_contract.md)import io.circe._,import a.b.*) is an edge to the package's own file, the Scalapackage object, or to nothing.scala-2/vsscala-3/, a symlinkedinclude/copy) resolves to the importer's own variant. The engine fix is filed as Import resolver: a build-variant copy resolves to the importer's own variant (import contract C8) #3665.Truth-side bugs in
import_graph_accuracy.py(mechanical, so fixed in code)Applying C7 exposed that most of the 410 were never GitGalaxy's:
import_declarationwas indexed as a declaration of its first name. Every file importingcats.x"declared"cats, so every externalcats.*/scala.*import resolved to 35–41 in-repo files.munit.FunSuite, retried underio.circe, becamepackage object circe). It could also cut two names down to a lowercase package (io.circe.optics.JsonPathbecamecirce).Result
Baseline regenerated. The 16 multi-file misses left are all
scala-2/scala-3pairs (semiauto.scala), validated in the ledger as GitGalaxy misses (#3665).Verification
io.circe.syntax.EncoderOpsstill reachessyntax/package.scala;import_graph_accuracy --ciOK (20 languages).🤖 Generated with Claude Code
https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q
Generated by Claude Code