Conversation
github-actions Bot
added a commit
to citizenadam/desloppify
that referenced
this pull request
Sep 24, 2026
This branch has not been deployed
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.
Problem
The Kotlin dependency graph assumes
import data.Recordlives in a file nameddata/Record.ktbeneath a fixed source root. Valid Kotlin projects with flat source directories, multiple declarations per file, or same-package test references therefore lose real dependency edges. Kotlin package membership comes from the package header, not the directory or filename (language reference).A minimal example is
feature/ui/src/main/kotlin/Screen.ktimportingdata.Record, declared incore/data/src/main/kotlin/Records.kt. The old builder emits no edge. Discovering more module roots alone, as in #739, cannot resolve this layout.On a real Android project, the same 238 discovered Kotlin/KTS files produced zero edges even with #781's path normalization. This patch produces 455 edges, including 196 edges from test sources. Concrete recovered relationships include
WatchStateRepositoryTest.kt→WatchStateRepository.ktandCatalogViewModelTest.kt→CatalogViewModel.kt. No application sources, discovery exclusions, zones, scores or scanner state were changed for this comparison.Change
Build a scan-local package/declaration index from the already discovered parsed files. Explicit imports resolve classes, top-level functions/properties, aliases, operator functions and members owned by an outer type. Graph keys retain the discovered path spelling; unscanned files cannot become candidates.
Same-package and star-import inference is deliberately limited to unique type declarations referenced through bare type uses or constructor-shaped calls. Local declarations, type parameters and explicit imports/aliases suppress inferred matches. Private declarations and ambiguous owners are not credited across files. Star imports do not connect every file in a package.
This is not compiler resolution: implicit extension/property/function usage, overload selection, fully qualified references, inherited binding resolution and Gradle source-set visibility remain outside this patch. Conservative whole-file shadow suppression can omit valid edges. It does not claim every remaining orphan/test-gap finding is real, or that graph connectivity proves behavioral test coverage.
Validation
test_do_run_batches_dry_run_generates_packet_and_promptsprompt-contract cases; both reproduce on pristine base3a7735d.scanandnextcompleted on an isolated copy of the same 238 authored Android files and configuration: 136 production / 88 test / 14 config. The scan exercised graph and test mapping registration. ktlint was unavailable in that isolated CLI invocation, so this is graph integration evidence, not a complete lint assessment.