Skip to content

fix(license): restore canonical Apache-2.0 text and split attribution into NOTICE#54

Merged
leodido merged 2 commits intomainfrom
fix/license-apache2-canonical
May 4, 2026
Merged

fix(license): restore canonical Apache-2.0 text and split attribution into NOTICE#54
leodido merged 2 commits intomainfrom
fix/license-apache2-canonical

Conversation

@leodido
Copy link
Copy Markdown
Owner

@leodido leodido commented May 4, 2026

Fixes the License: UNKNOWN classification on pkg.go.dev/github.com/leodido/kfeatures.

Problem

pkg.go.dev currently reports:

  • License: UNKNOWN
  • Redistributable license: ❌
  • "Documentation not displayed due to license restrictions."
  • Imported by: 0 (the importer graph is suppressed for unknown-license modules).

Cause: pkg.go.dev runs the LICENSE file through google/licensecheck, which fuzzy-matches against canonical license templates and needs ~75% confidence. Our LICENSE shipped through v0.5.0 had small body-text deviations and substituted Apache-2.0's appendix placeholders inline:

Deviation Canonical Apache-2.0
to the Licensor for inclusion (line 51) to Licensor for inclusion
excluding any notices (line 109) excluding those notices
Missing leading newline leading newline present
Missing APPENDIX: How to apply the Apache License to your work. section present
Copyright 2026 Leonardo Di Donato Copyright [yyyy] [name of copyright owner] (placeholders)

Combined, those edits dropped the file to 5.98% licensecheck coverage (only the boilerplate-notice tail matched). I confirmed locally with licensecheck against v0.3.1:

old LICENSE:  Coverage: 5.98%   Apache-2.0  5.47%  [10180:10769]
new LICENSE:  Coverage: 100.00% Apache-2.0  100.00% [0:11358]

Changes

Two commits, one logical change each:

  1. dadc706 fix(license): restore canonical Apache-2.0 text — replaces LICENSE with the verbatim text from https://www.apache.org/licenses/LICENSE-2.0.txt.
  2. 6e46fcd docs(notice): add NOTICE file with project copyright attribution — moves Copyright 2026 Leonardo Di Donato to a new top-level NOTICE file, which is Apache-2.0's intended mechanism for project-level attribution that downstream consumers must propagate.

CHANGELOG.md updated under [Unreleased] with one entry per commit (### Fixed for the LICENSE restore, ### Added for the NOTICE file).

Effect on pkg.go.dev

The v0.5.0 snapshot on pkg.go.dev is immutable, so this fix does not retroactively unhide the docs at the current version. The License: Apache-2.0 badge, restored docs, and importer graph appear once v0.5.1 (or any subsequent tag) is published.

Verification

# Locally, against the same library pkg.go.dev uses:
go run github.com/google/licensecheck/cmd/licensecheck@latest LICENSE
# (or the small driver pinned in this PR's verification: 100.00% Apache-2.0)

Co-authored-by: Ona no-reply@ona.com

leodido and others added 2 commits May 4, 2026 12:19
The LICENSE shipped through v0.5.0 had body-text deviations ("to the Licensor" instead of "to Licensor", "excluding any notices" instead of "excluding those notices", missing leading newline, missing APPENDIX section) and substituted [yyyy] / [name of copyright owner] inline with 2026 / Leonardo Di Donato.

licensecheck (used by pkg.go.dev) scored the file at ~6% Apache-2.0 match, well below the 75% confidence floor. pkg.go.dev classified the module as License: UNKNOWN, hid the documentation behind a license-policy notice, marked Redistributable license as failed, and refused to compute the importer graph.

Replace LICENSE with the verbatim text from https://www.apache.org/licenses/LICENSE-2.0.txt. licensecheck now scores 100% Apache-2.0 coverage. The pkg.go.dev page picks this up on the next tagged version; the v0.5.0 snapshot is immutable.

Co-authored-by: Ona <no-reply@ona.com>
Apache 2.0 distinguishes the canonical, verbatim license text (in LICENSE) from project-level attribution that downstream consumers must propagate (in a NOTICE file). The previous setup folded the copyright line into LICENSE itself, which conflated the two.

Move "Copyright 2026 Leonardo Di Donato" to a top-level NOTICE file. LICENSE stays the verbatim Apache-2.0 text from the previous commit.

Co-authored-by: Ona <no-reply@ona.com>
@github-actions github-actions Bot added the bug Something isn't working label May 4, 2026
@leodido leodido self-assigned this May 4, 2026
@leodido leodido merged commit e64a67f into main May 4, 2026
7 checks passed
@leodido leodido deleted the fix/license-apache2-canonical branch May 4, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant