Skip to content

[code-genetics] feat: resolve conflicting origins to detect the ultimate origin of files #1930 - #2289

Open
tdruez wants to merge 21 commits into
mainfrom
code-genetics-1930-ultimate-origin
Open

tdruez wants to merge 21 commits into
mainfrom
code-genetics-1930-ultimate-origin

Conversation

@tdruez

@tdruez tdruez commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Issues

Changes

  • Add the shared copy, embedded archive, single tool and license header cases to the origin test data set
  • Ignore the snippet origin matches covering fewer than 20 lines, such as a common license header
  • Merge the MatchCode.io snippets of the same origin file, previously dropped by the unique constraint
  • Fetch the path of the MatchCode.io matched files in their package from PurlDB, by batches of 1000 sha1
  • Log a missing PurlDB configuration in the find_origins pipeline
  • Add the containment rule: propose the candidate vendored by all the other candidates
  • Add the highest-similarity rule: propose the candidate more similar than all the others by at least 20 points
  • Add the earliest-release rule: propose the candidate released before all the others
  • Add the preferred-version rule: propose the clearly most similar version, or else the only release
  • Find the scan package of an origin despite PURL qualifiers
  • Stop collecting the PurlDB results on a failed next page request
  • Document the origin determination rules

Notes

Reputation is not covered: the match data has no reliable popularity signal, and the PURL type alone would favor a published copy over an original only hosted on GitHub, such as a Python binding embedding a C library.

tdruez added 21 commits November 3, 2026 16:18
…gin cases

Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
…sions

Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
…larity margin

Signed-off-by: tdruez <tdruez@aboutcode.org>
… a copy

Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
…ackage paths

Signed-off-by: tdruez <tdruez@aboutcode.org>

This branch has not been deployed

No deployments
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