fix(licence-check): recognise AGPL-3.0 in the body classifier#501
Merged
Conversation
check-licence-consistency.sh classified MPL-2.0, PMPL-1.0, GPL-3.0, Apache-2.0, MIT and BSD-3-Clause verbatim texts, but had no AGPL-3.0 template. A repo with a full-text GNU AFFERO GPL LICENSE (and no SPDX header line) therefore classified as UNKNOWN and failed the check. This forced the estate's deliberate AGPL exceptions (the co-developed-with-son games) into an SPDX-stub LICENSE to pass — which GitHub then reads as NOASSERTION/"Other" rather than AGPL. It also actively rejected airborne-submarine-squadron once its wrongly-clobbered MPL LICENSE was restored to its intended AGPL (asq PR #57): the check passed the wrong state and failed the right one. Add has_agpl (matches "GNU AFFERO GENERAL PUBLIC LICENSE"), classified before plain GPL-3.0 so the Affero title wins. A full-text AGPL LICENSE is now accepted as a canonical licence file, so AGPL repos can use GitHub-detectable full text like the MPL repos already do. Verified: modified script exits 0 against airborne-submarine-squadron (full-text AGPL) and still exits 0 against nextgen-typing (MPL) — no regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
hyperpolymath
marked this pull request as ready for review
July 17, 2026 22:50
9 tasks
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.



Problem
scripts/check-licence-consistency.shclassifies verbatim LICENSE bodies against a template set — MPL-2.0, PMPL-1.0, GPL-3.0, Apache-2.0, MIT, BSD-3-Clause — but has no AGPL-3.0 template. A repo whose rootLICENSEis the full GNU AFFERO GPL text (and carries noSPDX-License-Identifier:line, exactly like the estate's canonical MPL LICENSE files) classifies asUNKNOWNand fails the check.Two estate-wide consequences:
airborne-submarine-squadron,the-nash-equilibrium) — were forced to use an SPDX-stubLICENSEto pass this check. GitHub's licensee can't identify a stub, so those repos readNOASSERTION/ "Other" instead of AGPL.airborne-submarine-squadron's wrongly-MPL-clobbered LICENSE was restored to its intended AGPL (asq PR #57), this check flipped red. It passed the repo while it was wrongly MPL and fails it now that it's correctly AGPL.Fix
Add
has_agpl(matchesGNU AFFERO GENERAL PUBLIC LICENSE) and classify it before plain GPL-3.0 so the Affero title wins. A full-text AGPL LICENSE is now accepted as a canonical licence file — so AGPL repos can carry GitHub-detectable full text just as the MPL repos do, instead of a detection-blind stub.Six lines, no behaviour change for any existing template.
Verification
Ran the modified script directly:
airborne-submarine-squadron(full-text AGPL) →[OK] body is verbatim AGPL-3.0 text — accepted→ exit 0 (was exit 1)nextgen-typing(MPL-2.0) →[OK] body is verbatim MPL-2.0 text — accepted→ exit 0 (unchanged — no regression)shellcheck on the file reports only pre-existing SC2126/SC2012 style nits on untouched lines; the added lines are clean.
Related
Root-cause of the estate MPL-normalisation sweep (#40-style) flattening AGPL exceptions. This is the governance half; the sweeper itself (which rewrote the LICENSE without honouring the
agpl-licenseinvariant) is a separate follow-up.🤖 Generated with Claude Code