fix(license): restore canonical Apache 2.0 LICENSE + add NOTICE#88
Merged
Conversation
The previous `LICENSE` had dozens of substantive wording deviations from the canonical Apache 2.0 text — the kind of drift you get from running the license through a reformatter at some point. Examples caught by `diff` against `https://www.apache.org/licenses/LICENSE-2.0.txt`: - `"Contribution" shall mean any work` → `"Contribution" shall mean, as defined in Section 5, any work` (invalid cross-ref) - `consequential damages` → `exemplary damages` (changed term) - `Accepting Warranty or Additional Liability` → `Accepting Warranty or Liability` (dropped "Additional" — different clause name) - `you may act only on Your own behalf` → `you may offer such obligations only on Your own behalf` (restructured clause) - The entire `APPENDIX: How to apply the Apache License to your work` section was missing. GitHub's license detector (Licensee) requires high-similarity match against the canonical text and correctly fell back to `NOASSERTION` ("Other") for this file. From a legal-hygiene standpoint the deviations are also a real problem: a reformatted Apache 2.0 is *not* Apache 2.0, just a license that looks like it. Fix: replace `LICENSE` with the verbatim `https://www.apache.org/licenses/LICENSE-2.0.txt` (11,358 bytes, 202 lines, byte-identical to upstream). The project's actual copyright assertion ("Copyright 2026 PCR.dev") moves into a new `NOTICE` file, which is the Apache 2.0-defined location for it (Section 4(d): "If the Work includes a 'NOTICE' text file as part of its distribution…"). This keeps the LICENSE detectable AND preserves the copyright attribution. `Cargo.toml` (`license = "Apache-2.0"`) and `crates/pcr-napi/package.json` (`"license": "Apache-2.0"`) already use the SPDX identifier correctly — no changes there. Verification: $ diff <(curl -s https://www.apache.org/licenses/LICENSE-2.0.txt) LICENSE (no output) After merge GitHub should re-scan the default branch and show "Apache-2.0" instead of "Other" in the repo sidebar. Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <cursoragent@cursor.com>
Merged
KaluJo
added a commit
that referenced
this pull request
May 18, 2026
Bumps the workspace to 0.3.0 — the 0.x minor (rather than 0.2.10 patch) is motivated by the breaking signature change to `pcr_core::config::pcr_dir()` from #86 (returns `Result<PathBuf>` instead of `PathBuf`). The CLI surface (`pcr <cmd>` flags / exit codes / output format) is unchanged. Version touchpoints: * `Cargo.toml` workspace.package.version → 0.3.0 * `crates/pcr-napi/package.json` version + all 4 optionalDependencies * `crates/pcr-napi/npm/{darwin-arm64,darwin-x64,linux-x64-gnu, win32-x64-msvc}/package.json` versions * `README.md` TUI mock version stamp * `CHANGELOG.md` `[Unreleased]` promoted to `[0.3.0] — 2026-05-18` with full release notes catalogued by PR (#85, #86, #87, #88) and grouped Added / Changed / Fixed / Tests. Workspace verification: * `cargo fmt --all --check` clean * `cargo clippy --workspace --all-targets -- -D warnings` clean * `cargo test --workspace` — 153 passing, 0 failing (was 128 on the v0.2.9 baseline; +25 across the 4 merged PRs) * `cargo build -p pcr-cli --release` → `pcr 0.3.0 (rust)` After this lands on `main`, the release commit is tagged `v0.3.0` locally and pushed; that triggers the release workflow which publishes npm + builds binaries + dispatches the homebrew formula update. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitHub shows the
clirepo's license as "Other" instead ofApache-2.0 because
LICENSEcontains dozens of substantive wordingdeviations from the canonical text — the kind of drift you get from
running an Apache 2.0 file through a reformatter at some point. This
PR replaces it with the verbatim upstream text and moves the
project's actual copyright assertion into a dedicated
NOTICEfile.Root cause
diffof the previous LICENSE againstapache.org/licenses/LICENSE-2.0.txtsurfaces wording changes like:
cli/LICENSE\"Contribution\" shall mean any work\"Contribution\" shall mean, as defined in Section 5, any workconsequential damagesexemplary damagesAccepting Warranty or Additional LiabilityAccepting Warranty or Liabilityyou may act only on Your own behalfyou may offer such obligations only on Your own behalfAPPENDIX: How to apply the Apache License...(full section)GitHub's license detector (Licensee)
needs a high-similarity match against canonical SPDX text and
correctly fell back to
NOASSERTION("Other") for this file:Beyond the detection issue, the deviations are a real legal-hygiene
problem: a reformatted Apache 2.0 is not Apache 2.0, it's a license
that looks like it. Anyone reading
LICENSEwas getting a slightlydifferent agreement than the one declared by
Cargo.toml'slicense = \"Apache-2.0\"SPDX identifier.What this PR does
Replaces
LICENSEwith the verbatimhttps://www.apache.org/licenses/LICENSE-2.0.txt(11,358 bytes,202 lines, byte-identical to upstream).
Adds a
NOTICEfile that carries the project's copyrightassertion (
Copyright 2026 PCR.dev). This is the locationdefined by Apache 2.0 §4(d):
The NOTICE pattern keeps the LICENSE file detectable AND
preserves attribution properly. Most major Apache-licensed
projects use this split (kubernetes, terraform, hashicorp tools,
ASF projects).
Verification
After this lands on
main, GitHub re-scans within a few minutes andthe repo sidebar should flip from "Other" to "Apache-2.0". I'll
verify post-merge.
Out of scope
homebrew-pcr/LICENSEcurrently detects as MIT on GitHubdespite obviously containing Apache 2.0 text — that's a separate
detection quirk (probably due to a stray pattern Licensee
fingerprints). Tracking that for a follow-up; this PR focuses on
the
clirepo since that's the user-facing one withCargo.tomland
package.jsondeclaring Apache-2.0.Cargo.tomlalready haslicense = \"Apache-2.0\"(valid SPDX),same for
crates/pcr-napi/package.json— no changes needed.Test plan
diffagainst upstream returns emptyLICENSEsize matches upstream exactly (11358 bytes)NOTICEreads as a proper attribution file (not a license)via
gh api repos/pcr-developers/cli --jq '.license')Made with Cursor