Skip to content

fix(license): require distinct names in composite license rules - #1459

Merged
mstykow merged 1 commit into
mainfrom
fix/composite-license-heading-overmatches
Oct 14, 2026
Merged

mstykow merged 1 commit into
mainfrom
fix/composite-license-heading-overmatches

Conversation

@mstykow

@mstykow mstykow commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Require distinguishing license names in two composite-license rules. Repeated BSD-3-Clause HTML headings now remain BSD-3-Clause instead of disappearing into a BSD-2/BSD-3 clue, and MPL-2.0 headings no longer acquire unrelated Elastic/SSPL licenses.

The regenerated embedded index includes both fixes. Scanner coverage exercises BSD-2, BSD-3, MPL-2.0, Apache-2.0, and Eclipse-2.0 in two page layouts, plus valid BSD and Elastic/SSPL composite notices.

Issues

Closes #1457. Completes the adjacent matching fixes found while investigating #1456.

How to verify

Scan the new maven-bsd-heading.html and maven-mpl-heading.html fixtures under testdata/license-golden/datadriven/external/ with --license --json-pp -. Their detected expressions should be bsd-new and mpl-2.0, respectively, with no composite clues. The neighboring maven-composite-* fixtures should retain bsd-new AND bsd-simplified and elastic-license-v2 OR mongodb-sspl-1.0.

Expected-output fixture changes

Four new golden fixtures cover the two heading regressions and two valid composite notices. Existing golden expectations remain unchanged.

🤖 Prepared with Codex.

Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Tightens two composite-license rules so each match must include both license names.

  • BSD-3-Clause headings keep their own license result.
  • MPL-2.0 headings keep their own license result.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "fix(license): require distinct names in ..." · Reviewed by Greptile

@mstykow
mstykow merged commit dd605e7 into main Oct 14, 2026
13 checks passed
@mstykow
mstykow deleted the fix/composite-license-heading-overmatches branch October 14, 2026 17:54
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.

Partial cross-license matches can mask HTML license headings or add unrelated licenses

1 participant