Skip to content

feat(governance): advisory scan for retired-estate SPDX headers (pmpl-sweep runbook alignment) - #868

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/licence-consistency-retired-spdx-advisory
Sep 20, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
feat/licence-consistency-retired-spdx-advisory

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Why

check-licence-consistency.sh cross-checks the LICENSE identity against the
first build manifest only. Stray SPDX identifiers in ordinary source files
are invisible to it — that is exactly how
hyperpolymath/ipfs-overlay#134
hid: one .ipkg tripped the gate while three .idr files sat on
PMPL-1.0-or-later unseen (two of them carrying assertions that could never
pass). A tree-wide view of SPDX headers would have surfaced all four at seed
time.

What this adds

A section (6) to check-licence-consistency.sh: a tree-wide scan of
SPDX-License-Identifier: header lines for retired estate identifiers
(PMPL-1.0*, MPL-1.0*, MPL-1.1).

Design follows docs/migrations/pmpl-to-mpl-sweep-runbook.adoc:

  • WARN-level only — estate policy is "every licence edit is per-file,
    owner-approval-gated, and NEVER a bulk SPDX sweep."
    This surfaces drift for
    filing as issues; it never blocks CI. (Same spirit that produced [P2] ephapax: 11 partial + add ABI seam (Rust/SPARK NON-COMPLIANT) #134: a
    surfaced finding becomes an issue with acceptance criteria.)
  • Anchored match — a hit must be a comment-line SPDX header (optional
    comment marker, then the identifier). Badges, prose and test fixtures that
    merely quote the string in mid-line cannot match. An ERROR-level, unanchored
    first draft was rejected after testing: it failed palimpsest-license
    (126 legitimate PMPL files) and standards itself (runbook prose + a test
    fixture).
  • Carve-out repos skipped — palimpsest-license, palimpsest-plasma,
    007 (via GITHUB_REPOSITORY or git remote): PMPL/ARR is correct there
    (runbook §1, §3).
  • Licence-exhibit paths excluded — LICENSES/, legal/, exhibits/,
    PMPL-SPEC* (runbook §3).

Non-invasive by construction

  • The ERROR path and all exit codes are untouched. On a passing tree the only
    output change is one added [OK] line.
  • shellcheck -S warning: clean (same as the original).
  • No test asserts this script's output; it is only invoked from
    governance-reusable.yml.

Proof matrix (all runs 2026-09-20)

Scenario Result
ipfs-overlay@8176606 (pre-fix) exit 1 (existing manifest ERROR unchanged) + WARN naming exactly the 4 stray files, incl. the 3 the old check could not see
ipfs-overlay fix branch (merged as #141) exit 0, No stray retired-estate SPDX headers
standards@main tree exit 0 — runbook prose & test fixture do not match the anchored pattern; behaviour diff vs original = one added OK line
palimpsest-license carve-out detected via git remote, advisory skipped, exit 0

Surfaced from hyperpolymath/ipfs-overlay#134.

check-licence-consistency.sh cross-checks the LICENSE identity against the
first build manifest only, so stray SPDX identifiers in ordinary source files
are invisible to it. That is exactly how ipfs-overlay#134 hid: one .ipkg
tripped the gate while three .idr files sat on PMPL-1.0-or-later unseen (two
of them with assertions that could never pass).

Add a tree-wide scan of SPDX-License-Identifier header lines for retired
estate identifiers (PMPL-1.0*, MPL-1.0*, MPL-1.1). Design follows
docs/migrations/pmpl-to-mpl-sweep-runbook.adoc:

- WARN-level only. Estate policy is per-file, owner-approval-gated edits and
  NEVER a bulk sweep, so this surfaces drift for filing as issues; it never
  blocks CI.
- Anchored header match (optional comment marker then the identifier), so
  badges, prose and test fixtures that merely quote the string cannot match.
- Carve-out repos (palimpsest-license, palimpsest-plasma, 007) skipped via
  GITHUB_REPOSITORY / git remote - PMPL/ARR is correct there (runbook S1, S3).
- Licence-exhibit paths excluded (LICENSES/, legal/, exhibits/, PMPL-SPEC*).

Behaviour on passing trees is unchanged except one added OK line; the ERROR
path and exit codes are untouched. Proof matrix: pre-fix ipfs-overlay -> WARN
names exactly the 4 stray files; fixed ipfs-overlay, standards, and
palimpsest-license -> clean. shellcheck -S warning: clean.

Surfaced from hyperpolymath/ipfs-overlay#134.
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 837d02db-a0a4-4994-8586-b14f3df320aa

📥 Commits

Reviewing files that changed from the base of the PR and between e13e2ea and 296d270.

📒 Files selected for processing (1)
  • scripts/check-licence-consistency.sh
 ________________________________________
< My other transformer is Optimus Prime. >
 ----------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 6907433 into main Sep 20, 2026
22 of 29 checks passed
@hyperpolymath
hyperpolymath deleted the feat/licence-consistency-retired-spdx-advisory branch September 20, 2026 21:48
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