Skip to content

licensing: drop the duplicated notice from the 13 quiet files (refs #1547) - #1559

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
fix/dup-notice-14
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
fix/dup-notice-14

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Refs #1547 (does not close it — see the split at the end). Comment-only, 13 files, 26 deletions, 0 insertions.

What

20 of the 720 files carrying the Apache notice carried it more than once: the notice block, then Copyright + SPDX-License-Identifier repeated around line 15-17. tools/copyright.py's has_notice() checks presence in the first 20 lines, never uniqueness, so the doubling passed the gate every time — including in two files merged tonight.

This PR removes the genuine duplicate from the 13 files whose last commit is 2026-09-27…11-05, i.e. the ones no lane is currently editing. The four touched today follow separately.

Why a script and not a sed, and what it caught

The edit refuses any file it does not recognise (must be exactly two adjacent comment pairs, second following "limitations under the License"). That earned its keep:

  • tools/npu-arena/make_task.sh has THREE copyright lines — it embeds a second script (#!/bin/bash at line 55 with its own notice). Only the pair after the Apache prose was removed; the embedded script's header and both shebangs survive.
  • tools/npu_leaderboard.py was in my original list and is deliberately not swept: its second occurrence is uncommented inside the module docstring. It joins the two load-bearing files already named in licensing: the Apache notice is duplicated in 20 files — and 3 of them are load-bearing, so a blind sweep breaks them #1547 — scripts/mk-kernel-packages.sh:146 (a heredoc that emits a licence header into a generated file) and tests/copyright_check_untracked_test.py:33 (the NOTICE string the test asserts against). A blind sweep breaks all four.

Checks

  • git diff -U0 shows only removed # comment lines — asserted, not eyeballed.
  • bash -n on the 10 shell files, py_compile on the 3 python files — all clean.
  • tools/copyright.py --check rc 0.
  • Files carrying the notice twice: 20 → 8, and all 8 are accounted for: the 4 live files below, the 3 load-bearing ones above, and make_task.sh where the remaining two occurrences are correct.
  • The load-bearing three are still present in that list — a positive control, so the count is not a scan that stopped looking.

What this does not do

Lane pi-rlk; no device time (0 s GPU, 0 s NPU).

…1547)

20 of the 720 files carrying the Apache notice carried it more than once. This removes the genuine
duplicates from the 13 whose last commit is 2026-09-27..11-05, i.e. the ones no lane is editing: two
deleted comment lines per file, nothing else.

  onnx/build_ort.sh, os/v3/puppy/catalogue-manifest.py, os/v3/puppy/shell-login.sh,
  os/v3/puppy/embed/etc/sysctl.d/60-1bit-console.conf, scripts/check_repack_config.py,
  tools/flm_head_pb16i.py, and seven under tools/npu-arena/ (TOOLCHAIN.lock.example, ceiling.sh,
  lib/env.sh, make_probe.sh, make_task.sh, oracle.sh, runner/build.sh)

The edit is a script that refuses anything it does not recognise rather than a sed, and it earned
that: tools/npu-arena/make_task.sh holds THREE copyright lines because it embeds a second script (a
`#!/bin/bash` at line 55 with its own notice), so only the pair after the Apache prose was removed --
the embedded script's header and both shebangs survive. tools/npu_leaderboard.py was in the original
list and is NOT swept: its second occurrence is uncommented inside the module docstring, the same
load-bearing class as scripts/mk-kernel-packages.sh (a heredoc emitting a header) and
tests/copyright_check_untracked_test.py (the NOTICE string a test asserts against). Those three are
never touched, and #1547 says why.

Checks: every change is a removed `#` comment line (git diff -U0 shows zero additions); `bash -n` on
the 10 shell files and `py_compile` on the 3 python files; `tools/copyright.py --check` rc 0; the
count of files carrying the notice twice drops 20 -> 8, and those 8 are the 4 live files (touched
today: tools/fconst19_measure.py, tests/fconst19_measure_test.py, onnx/tests/ort_run_generic.sh,
tools/amd-rai-sweep/README.md), the 3 load-bearing ones, and make_task.sh where two occurrences are
now correct.

Does not close #1547: the four live files follow once their editors are quiet, and a uniqueness rule
in has_notice() can only land after that, since it would otherwise red 20 files on main at once.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

#1559 ready for review at 059b9ac

Refs #1547. Comment-only: 13 files, 26 deletions, 0 insertions. Removes the duplicated Copyright/SPDX pair from the files whose last commit is 2026-09-27…11-05, i.e. the ones nobody is editing.

The edit is a script that refuses anything unrecognised, and it earned that twice: tools/npu-arena/make_task.sh carries three copyright lines (it embeds a second script with its own notice) — only the pair after the Apache prose was removed, the embedded header and both shebangs survive; and tools/npu_leaderboard.py, which was in my list, turned out to have its second occurrence inside the module docstring, so it is not swept. It joins the two load-bearing files already named in #1547 (a heredoc that emits a licence header; a test's NOTICE string). A blind sed breaks all four.

Checks: git diff -U0 shows only removed # comment lines (zero additions); bash -n on the 10 shell files; py_compile on the 3 python files; copyright.py --check rc 0; files carrying the notice twice 20 → 8, with the 8 all accounted for (4 live files, 4 load-bearing) — and the load-bearing ones verified still present as a positive control.

0 s GPU, 0 s NPU; no ticket. Also, per the disk alert: I freed 46 GB of my own trees (12 merged worktrees + my old lane tree, all PR-state-checked first), reported in TRLK-STATE.md.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

/review

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY at 059b9ac379888a326a70efc1c6ef7e8f1bfc3fec, but it's now redundant and should be closed rather than merged

The change itself is correct:

  • git diff -U0 shows only removed # Copyright 2026 bong-water-water-bong and # SPDX-License-Identifier: Apache-2.0 lines (26 deletions, 0 insertions);
  • the embedded script's own header in make_task.sh is left alone, as the body says.

But #1551 merged at 22:33:53, 25 s after this PR was opened, and it already contains these exact edits.

  • On all 13 files, this PR's hunks are byte-identical to #1551's. My comparison found 13 identical and 0 differing.
  • On main's tip each of the 13 now carries the notice once: git diff origin/main 059b9ac379888a326a70efc1c6ef7e8f1bfc3fec -- <the 13 files> is empty, and one SPDX line per file in the first 20 lines.
  • #1551 also landed the other four files and the uniqueness gate (duplicated_notice() in tools/copyright.py --check), which this body describes as "can only land after the sweep".
  • git merge-tree against main merges cleanly as a no-op.

Merging this adds nothing. Closing it as superseded by #1551 keeps the history clean. #1547 should already be satisfied by #1551 ("Fixes #1547").

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing as superseded, not because anything was wrong with it: #1551 ("one notice per file, and a gate that says so", cd327e5) merged two minutes before this PR opened and did the same sweep for all 16 genuine duplicates, so this branch's change is already on main. git diff origin/main fix/dup-notice-14 now shows only main's own newer work, no change of mine.

Two things worth keeping from it, and one of them is now a PR:

  1. The classifier: tools/npu-arena/make_task.sh carries three copyright lines (it embeds a second script with its own header), and tools/npu_leaderboard.py's second occurrence is uncommented inside the module docstring. Both are load-bearing — that is now the documented never-touch set in licensing: the Apache notice is duplicated in 20 files — and 3 of them are load-bearing, so a blind sweep breaks them #1547.
  2. main is red, and this is the residue: licensing: one notice per file, and a gate that says so (Fixes #1547) #1551's new duplicated_notice() gate fires on os/v3/puppy/base-modes-keep (the notice pasted twice, merged by os: the BASE layer's group/other-writable modes are taken off, and a row keeps them off (Fixes #1474) #1544 after the sweep), so tools/copyright.py --check returns rc 1 on 180c58d and on every PR branched from it. PR licensing: main is red on its own new notice gate — the base keep-list still carries the duplicate #1562 fixes it (two comment lines out; the parsed keep-list is byte-identical before and after, verified by md5 and cmp, and the gate goes 1 → 0).

That ordering — sweep first, uniqueness gate second — is exactly what #1547 said, and the residue is the one file that arrived behind the gate.

Lane pi-rlk; no device time.

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