Skip to content

fix(licence-check): recognise AGPL-3.0 in the body classifier#501

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/licence-classifier-agpl
Jul 17, 2026
Merged

fix(licence-check): recognise AGPL-3.0 in the body classifier#501
hyperpolymath merged 1 commit into
mainfrom
fix/licence-classifier-agpl

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

scripts/check-licence-consistency.sh classifies 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 root LICENSE is the full GNU AFFERO GPL text (and carries no SPDX-License-Identifier: line, exactly like the estate's canonical MPL LICENSE files) classifies as UNKNOWN and fails the check.

Two estate-wide consequences:

  1. The deliberate AGPL exceptions — the games co-developed with son (airborne-submarine-squadron, the-nash-equilibrium) — were forced to use an SPDX-stub LICENSE to pass this check. GitHub's licensee can't identify a stub, so those repos read NOASSERTION / "Other" instead of AGPL.
  2. It actively rejected the correct state: when 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 (matches GNU 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 — acceptedexit 0 (was exit 1)
  • nextgen-typing (MPL-2.0) → [OK] body is verbatim MPL-2.0 text — acceptedexit 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-license invariant) is a separate follow-up.

🤖 Generated with Claude Code

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>
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review July 17, 2026 22:50
@hyperpolymath
hyperpolymath merged commit 8ab233b into main Jul 17, 2026
18 checks passed
@hyperpolymath
hyperpolymath deleted the fix/licence-classifier-agpl branch July 17, 2026 22:50
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.

1 participant