Skip to content

Licence: fix notice agreement regressions - #652

Merged
bact merged 4 commits into
mainfrom
licence-notice-agreement
Dec 3, 2026
Merged

bact merged 4 commits into
mainfrom
licence-notice-agreement

Conversation

@bact

@bact bact commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Fixes three #651 licence regressions found in the 0.25.2 combined review.

  • A notice of licence A ranked first beside the whole text of licence B (python-dateutil LICENSE) is several licences: no licence, no license-ambiguous/notice line.
  • A stated licence name LicenseID reads (Apache License 2.0) agrees with a notice, as in 0.25.1.
  • A License header or project.license.text notice agrees with the licence the same package's own files give (explicit file_licence, file stage only): one declared id again.

Rule: an id is stated when classify_license reads it in the stated value, or when it is the package's own file licence passed as file_licence.

No CHANGELOG entry (unreleased behaviour).


Generated by Claude Code

- A notice ranked first beside the whole List text of a licence outside
  its text (python-dateutil's LICENSE: an Apache 2.0 notice, then
  BSD-3-Clause) holds several licences: no licence and no
  license-ambiguous/notice line, stated or not.
- A stated licence name counts as the id classify_license reads it as
  ("Apache License 2.0" agrees with the Apache 2.0 notice), the same
  reading as the declared licence.
- A stated licence text (License header, project.license.text) that is
  a notice of the licence the same package's own files give agrees with
  it through an explicit file_licence argument: one declared licence, as
  in 0.25.1.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the test-all-os Use this to trigger full tests on all platforms label Dec 3, 2026 — with Claude
@codecov-commenter

codecov-commenter commented Dec 3, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.98%. Comparing base (fb78ae0) to head (f58a6f6).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #652   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         545      546    +1     
  Lines       35708    35768   +60     
  Branches     5028     5037    +9     
=======================================
+ Hits        35701    35761   +60     
  Misses          4        4           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

bact added 3 commits December 3, 2026 15:24
Owner ruling 2026-12-03: a declared licence is what its source says;
another source never changes it.

- Drop the file_licence agreement: a project.license.text notice stays
  declared as written, the whole LICENSE beside it is the concluded
  licence; a dependency's License header stays as on main.
- Each licence read from a licence file names the rule that decided it
  (provenance Rule: stated-in-file, single-text, variant-default,
  text-variant, stated-twin, stated-agrees, stated-tie), defined once in
  extract/_license_rules.py and listed in the docs.
- New INFO license-ambiguous/several-texts for a licence file holding
  several licences (several whole texts, or a notice beside another
  licence's text), said once per file on every surface.
- A project.license.text kept as written names that field on the CLI
  and the hook alike.
- Roadmap: a setting not to guess a licence variant, after 0.25.2.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>

# Conflicts:
#	CHANGELOG.md
- A license = {file = ...} table is project.license on the CLI and the
  sdist route, as on the Hatchling hook; only a {text = ...} table is
  project.license.text.
- A notice whose own variant overrides a stated twin is decided by
  text-variant, not stated-agrees.
- A Hub model's licence read from its licence file records its Rule,
  through one LicenseTextReading.provenance() helper shared with the
  licence-file route.
- Docs: the Rule key row lists every route that records it.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact
bact merged commit a0b0c79 into main Dec 3, 2026
26 checks passed
@bact
bact deleted the licence-notice-agreement branch December 3, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-all-os Use this to trigger full tests on all platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants