internal/discover does two things on top of the raw ecosyste.ms dependent list: filter out forks/archived/stale repos, and clone-and-score by test-file and import-file counts. The raw list already lives in git-pkgs/enrichment (RepositoryDependents).
alpha-omega-security/hyrum corpus wants the same ranked list to pick which dependents to generate contract tests from, and scrutineer could plausibly use it for "audit the top N dependents of X". Both would currently have to shell out to downstream discover --stdout and parse TOML.
Options:
- move
internal/discover → discover (public in this module)
- extract to
git-pkgs/dependents, importing enrichment for the ecosyste.ms call, and have downstream depend on it
The second keeps the clone-and-score step (which touches disk and can be slow) out of enrichment, which is otherwise a pure metadata-fetch library, and matches the one-purpose-library shape of the rest of the org.
hyrum will use enrichment.RepositoryDependents directly in the meantime and switch when this lands.
internal/discoverdoes two things on top of the raw ecosyste.ms dependent list: filter out forks/archived/stale repos, and clone-and-score by test-file and import-file counts. The raw list already lives ingit-pkgs/enrichment(RepositoryDependents).alpha-omega-security/hyrum
corpuswants the same ranked list to pick which dependents to generate contract tests from, andscrutineercould plausibly use it for "audit the top N dependents of X". Both would currently have to shell out todownstream discover --stdoutand parse TOML.Options:
internal/discover→discover(public in this module)git-pkgs/dependents, importingenrichmentfor the ecosyste.ms call, and havedownstreamdepend on itThe second keeps the clone-and-score step (which touches disk and can be slow) out of
enrichment, which is otherwise a pure metadata-fetch library, and matches the one-purpose-library shape of the rest of the org.hyrum will use
enrichment.RepositoryDependentsdirectly in the meantime and switch when this lands.