Skip to content

Commit 0b479f4

Browse files
chore(dispatch): refuse auto licence/SPDX fixes (neurophone#99 closeout) (#247)
## Summary - **Refusal gate** in `scripts/dispatch-runner.sh` `execute_entry()`: any dispatch whose `recipe_id` or `category` matches `{license,spdx,pmpl,mpl-2,agpl,palimpsest}` is refused before any fix script can run. Records outcome `refused_license_policy`. - **Refusal banner** in `scripts/fix-license-hygiene.sh`, `scripts/fix-license-file.sh`, `scripts/fix-missing-spdx.sh`: prepend `exit 1` so any direct invocation also refuses. ## Why Owner directive 2026-06-02 forbids automated licence/SPDX edits. Triggered by [neurophone#99](hyperpolymath/neurophone#99) — an auto-generated PR by the Claude bot reverting PMPL-1.0-or-later → MPL-2.0 across ~140 files, closed by the owner. The underlying pipeline kept being able to fire because the dispatcher had no licence-category early-exit and the fix scripts had no self-refusal. Five-way classification (verbatim owner directive): > "mpl-2.0 is for my sole repos, all rights reserved is for 007, agpl-3.0-or-later is for those shared with my son, and leave other people's forked stuff alone … only palimpsest license for obvious reasons should be talking about palipsest and palimpsest plasma, and consent-aware-http, but in that case prospectively" ## Test plan - [ ] Smoke-test `dispatch-runner.sh --dry-run` against a synthetic manifest entry with `category: LicenseCompliance` — should print `REFUSED` and not call any fix script. - [ ] Direct invocation `./scripts/fix-license-file.sh /tmp/repo /tmp/finding.json` exits 1 with the refusal banner. - [ ] Direct invocation `./scripts/fix-license-hygiene.sh /tmp/finding.json` exits 1 with the refusal banner. - [ ] Direct invocation `./scripts/fix-missing-spdx.sh /tmp/repo /tmp/finding.json` exits 1 with the refusal banner. Related: hyperpolymath/hypatia rules/license-no-auto-fix, hyperpolymath/standards docs/license-no-auto-policy. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent eeda4d6 commit 0b479f4

4 files changed

Lines changed: 65 additions & 0 deletions

File tree

scripts/dispatch-runner.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,36 @@ execute_entry() {
223223
fi
224224
done
225225

226+
# --- License/SPDX auto-fix refusal gate (owner directive 2026-06-02) ---
227+
#
228+
# Estate policy forbids automated licence/SPDX edits. Licence remediation
229+
# is manual, file-by-file, owner-only (see canonical memory
230+
# `feedback_no_automated_licence_edits.md` and
231+
# `feedback_estate_license_policy_umbrella.md`).
232+
#
233+
# Triggered by neurophone#99 (auto-PR reverting PMPL → MPL-2.0 across
234+
# ~140 files, closed by owner). This gate refuses any auto_execute
235+
# dispatch whose recipe_id or category looks license/SPDX-related,
236+
# regardless of confidence score.
237+
#
238+
# Carve-out: the three palimpsest carve-out repos may still receive
239+
# licence-related work — but only with manual owner approval, NOT
240+
# auto-execute. So even those repos are gated here.
241+
local category lower_recipe lower_category
242+
category=$(echo "$entry" | jq -r '.category // ""')
243+
lower_recipe=$(echo "$recipe_id" | tr '[:upper:]' '[:lower:]')
244+
lower_category=$(echo "$category" | tr '[:upper:]' '[:lower:]')
245+
case "$lower_recipe$lower_category" in
246+
*license*|*spdx*|*pmpl*|*mpl-2*|*agpl*|*palimpsest*)
247+
echo " REFUSED: $pattern_id$repo (license/SPDX auto-edits forbidden per estate policy 2026-06-02)"
248+
echo " recipe_id=$recipe_id category=$category"
249+
echo " Owner must approve and apply licence changes manually, per-file."
250+
((SKIPPED++)) || true
251+
record_outcome "$pattern_id" "$recipe_id" "$repo" "" "refused_license_policy"
252+
return
253+
;;
254+
esac
255+
226256
# Skip if repo doesn't exist locally
227257
if [[ ! -d "$repo_path" ]]; then
228258
echo " SKIP: $repo (not found at $repo_path)"

scripts/fix-license-file.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
#
44
# fix-license-file.sh — Auto-create LICENSE with MPL-2.0 text
55
#
6+
# DISABLED 2026-06-02 per owner directive on licence policy.
7+
# See `feedback_no_automated_licence_edits.md` and
8+
# `feedback_estate_license_policy_umbrella.md`. Licence remediation is
9+
# manual, file-by-file, owner-only. Triggered by neurophone#99 (auto-PR
10+
# reverting PMPL → MPL-2.0 across ~140 files, closed by owner).
11+
#
612
# Category: LicenseCompliance
713
# Usage: fix-license-file.sh <repo-path> <finding-json>
814
#
@@ -11,6 +17,11 @@
1117

1218
set -euo pipefail
1319

20+
echo "REFUSED: fix-license-file.sh is disabled per estate policy 2026-06-02." >&2
21+
echo " Licence/SPDX edits MUST be manual, per-file, owner-approved." >&2
22+
echo " See feedback_no_automated_licence_edits.md." >&2
23+
exit 1
24+
1425
REPO_PATH="${1:?Usage: fix-license-file.sh <repo-path> <finding-json>}"
1526
FINDING_JSON="${2:?Usage: fix-license-file.sh <repo-path> <finding-json>}"
1627

scripts/fix-license-hygiene.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
# SPDX-License-Identifier: MPL-2.0
33
# fix-license-hygiene.sh — Ensure REUSE-compliant dual-license setup
44
#
5+
# DISABLED 2026-06-02 per owner directive on licence policy.
6+
# See `feedback_no_automated_licence_edits.md` and
7+
# `feedback_estate_license_policy_umbrella.md`. Licence remediation is
8+
# manual, file-by-file, owner-only. Triggered by neurophone#99 (auto-PR
9+
# reverting PMPL → MPL-2.0 across ~140 files, closed by owner).
10+
#
511
# Applies: LICENSE (MPL-2.0), LICENSES/ dir, NOTICE file
612
# Idempotent: only modifies what's missing or incorrect.
713
#
@@ -10,6 +16,11 @@
1016
# /var$REPOS_DIR/palimpsest-license/legal/PALIMPSEST-MPL-1.0.txt
1117
set -euo pipefail
1218

19+
echo "REFUSED: fix-license-hygiene.sh is disabled per estate policy 2026-06-02." >&2
20+
echo " Licence/SPDX edits MUST be manual, per-file, owner-approved." >&2
21+
echo " See feedback_no_automated_licence_edits.md." >&2
22+
exit 1
23+
1324
FINDING_FILE="${1:?Usage: fix-license-hygiene.sh <finding.json>}"
1425

1526
if [[ ! -f "$FINDING_FILE" ]]; then

scripts/fix-missing-spdx.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
#!/bin/bash
22
# SPDX-License-Identifier: MPL-2.0
33
# Add SPDX license identifier to files missing it
4+
#
5+
# DISABLED 2026-06-02 per owner directive on licence policy.
6+
# See `feedback_no_automated_licence_edits.md` and
7+
# `feedback_estate_license_policy_umbrella.md`. Licence remediation is
8+
# manual, file-by-file, owner-only. Triggered by neurophone#99 (auto-PR
9+
# reverting PMPL → MPL-2.0 across ~140 files, closed by owner).
410

511
set -euo pipefail
612

13+
echo "REFUSED: fix-missing-spdx.sh is disabled per estate policy 2026-06-02." >&2
14+
echo " Licence/SPDX edits MUST be manual, per-file, owner-approved." >&2
15+
echo " SPDX choice depends on the five-way owner classification" >&2
16+
echo " (sole-repo / 007 / son-shared / fork / palimpsest carve-out)." >&2
17+
echo " See feedback_estate_license_policy_umbrella.md." >&2
18+
exit 1
19+
720
REPO_PATH="$1"
821
FINDING_FILE="$2"
922

0 commit comments

Comments
 (0)