Repository navigation
licensing: the duplicated Apache notice, in the 13 quiet files (Refs #1547) - #1554
Conversation
…1547) Twenty files carry the notice twice: the block at the top, then the Copyright + SPDX pair repeated right after "limitations under the License". This is the issue's own suggested first step - the quiet files, comment-only, and never the ones where the second occurrence is load-bearing. git diff --numstat 0 added, 26 deleted across 13 files (two lines each, no other edit) tools/copyright.py --check rc 0 every touched file: exactly one SPDX-License-Identifier, except tools/npu-arena/make_task.sh which keeps two - its own, and the one its heredoc EMITS into the build.sh it generates (see below) bash -n on the shell scripts, python3 -m py_compile on the .py files: clean Two corrections to the issue's classification, both found by reading each file's second pair rather than deleting the second occurrence: 1. **tools/npu_leaderboard.py is load-bearing**, a fourth file for that list: its second pair sits inside `NOTICE = """<!-- ... -->"""`, the template the generator writes into docs/npu-leaderboard.md. It is skipped here untouched. 2. **tools/npu-arena/make_task.sh is load-bearing INSIDE a quiet file**: it carries three pairs - its own, the duplicate after the licence text (removed here), and one inside `cat > "$D/kernel/build.sh" <<'EOF'` which emits the header into a generated script. Removing "all but the first" would have stripped that generated header, exactly the failure the issue warned about. The sweep is anchored on the pair that follows "limitations under the License", so a heredoc's or a template's header is not a candidate by construction. Not in this PR, per the issue: the two live files (onnx/tests/ort_run_generic.sh, tools/fconst19_measure{,_test}.py) and the four load-bearing ones; and the uniqueness rule in has_notice() must come after the rest of the sweep, since it would red main immediately.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at e0bbd020e00aa260ba7935a6276ba7289dd7013a
All thirteen files now carry exactly one notice block, and the one file that shows four header lines is correct:
tools/npu-arena/make_task.sh:2-3 the script's own notice
tools/npu-arena/make_task.sh:55-56 inside a `cat > build.sh <<'EOF'` heredoc — a generated file's notice
so the count of 4 there is two legitimate blocks, not a miss. Every other file is 2 lines (one Copyright + one SPDX), which is what one notice looks like.
The gap this leaves, and it is the same one #1396 recorded: tools/copyright.py has no concept of "duplicate" — grep -cE "duplicate|twice" tools/copyright.py → 0. It checks presence, so 26 lines of duplicated notice across 13 files passed it, and the fourteenth will too. A second predicate ("more than one Copyright … / SPDX-License-Identifier pair in a file → flag it, unless the extra pair is inside a heredoc that writes another file") would have found all thirteen mechanically, and it is the only way this PR stays fixed.
One incidental observation, not this PR's fault: running copyright.py --check in a worktree that has a build dir flags 36 generated files under build1336/generated/ as "missing copyright notice". CI has no such directory, so it never sees them, but a lane running the check locally gets a wall of false positives — worth a skip for generated/build paths at some point.
The removal itself is mechanical and safe: two comment lines per file, nothing else touched (26 deletions, 0 insertions), and the licence terms are unchanged — a duplicate removal cannot alter what a file is licensed under.
…ate passes on main (#1560) #1544 added os/v3/puppy/base-modes-keep with the copyright + SPDX lines twice, and #1551/#1554 (merged in the same batch) made a duplicated notice inside the header window a gate failure. Each PR was green alone; together main failed tools/copyright.py --check (run 42530891923). This removes the second copy; the check passes over the whole tree. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Twenty files carry the Apache notice twice: the block at the top, then the
Copyright+SPDX-License-Identifierpair repeated right after "limitations under the License". This is the issue's own suggested first step — the quiet files, comment-only, and never the ones where the second occurrence is load-bearing.Refs #1547 (partial: 13 of the 20; the rest are named below and left where they belong).
What the diff is
Files:
onnx/build_ort.sh,os/v3/puppy/catalogue-manifest.py,os/v3/puppy/embed/etc/sysctl.d/60-1bit-console.conf,os/v3/puppy/shell-login.sh,scripts/check_repack_config.py,tools/flm_head_pb16i.py,tools/npu-arena/{TOOLCHAIN.lock.example,ceiling.sh,lib/env.sh,make_probe.sh,make_task.sh,oracle.sh,runner/build.sh}.Two corrections to the issue's classification
Both came from reading each file's second pair instead of deleting the second occurrence:
tools/npu_leaderboard.pyis load-bearing — a fourth file for that list. Its second pair sits insideNOTICE = """<!-- … -->""", the template the generator writes intodocs/npu-leaderboard.md. Untouched here.tools/npu-arena/make_task.shis load-bearing inside a quiet file — it carries three pairs: its own, the duplicate after the licence text (removed), and one insidecat > "$D/kernel/build.sh" <<'EOF'that emits the header into a generated script. "Remove all but the first" would have stripped that generated header, which is precisely the failure the issue warns about.The sweep is anchored on the pair that follows "limitations under the License", so a heredoc's or a template's header is not a candidate by construction — the anchor is what makes it safe rather than the file list.
Deliberately not in this PR
onnx/tests/ort_run_generic.sh,tools/fconst19_measure{,_test}.py) — touched the same day by their authors;scripts/mk-kernel-packages.sh,tests/copyright_check_untracked_test.py,tools/amd-rai-sweep/README.md, andtools/npu_leaderboard.pyabove);has_notice()— it must land after the whole sweep, since it would red 20 files onmainimmediately.