Skip to content

Commit 8ab233b

Browse files
hyperpolymathclaude
andcommitted
fix(licence-check): recognise AGPL-3.0 in the body classifier
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>
1 parent 08e2d24 commit 8ab233b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/check-licence-consistency.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ has_mpl2_text=$(count_in 'Mozilla Public License Version 2\.0|Mozilla Public Lic
7171
has_pmpl_text=$(count_in_i 'PMPL-1\.0-or-later|Palimpsest License \(PMPL')
7272
has_apache=$(count_in 'Apache License.*Version 2\.0')
7373
has_mit=$(count_in 'MIT License')
74+
has_agpl=$(count_in 'GNU AFFERO GENERAL PUBLIC LICENSE')
7475
has_gpl3=$(count_in 'GNU GENERAL PUBLIC LICENSE.*Version 3')
7576
has_bsd3=$(count_in 'BSD.*3-Clause')
7677
has_proprietary=$(count_in_i 'All Rights Reserved')
@@ -89,6 +90,13 @@ elif [ "$has_apache" -gt 0 ]; then
8990
body_class="Apache-2.0"
9091
elif [ "$has_mit" -gt 0 ]; then
9192
body_class="MIT"
93+
elif [ "$has_agpl" -gt 0 ]; then
94+
# AGPL before plain GPL-3.0: the AGPL body carries "GNU AFFERO GENERAL PUBLIC
95+
# LICENSE". These are deliberate co-developed-project exceptions to the estate
96+
# MPL-2.0 policy (e.g. the games airborne-submarine-squadron, the-nash-equilibrium)
97+
# and must be recognised so their full-text LICENSE files (which GitHub then
98+
# detects as AGPL, unlike an SPDX-stub) pass this check.
99+
body_class="AGPL-3.0"
92100
elif [ "$has_gpl3" -gt 0 ]; then
93101
body_class="GPL-3.0"
94102
elif [ "$has_bsd3" -gt 0 ]; then

0 commit comments

Comments
 (0)