Skip to content

licensing: main is red on its own new notice gate — the base keep-list still carries the duplicate - #1562

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

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

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

main is red on the gate #1551 just added — this makes it green again

python3 tools/copyright.py --check on main (180c58d):

copyright notice duplicated inside the header window (delete the second copy): os/v3/puppy/base-modes-keep
run: python3 tools/copyright.py --fix
rc=1

One file, so every PR branched from main inherits a failing copyright job.

Why it happened, in one line

#1551 added duplicated_notice() and closed #1547 by sweeping the file set it knew about; #1544 then merged os/v3/puppy/base-modes-keep with the notice pasted twice — after the sweep. That is precisely the ordering #1547 wrote down: "a uniqueness rule can only land after the sweep, or it reds 20 files on main at once." The gate landed correctly; one file arrived behind it.

The fix, and the control that it cannot change behaviour

Two deleted comment lines (the second Copyright/SPDX pair). The file is a comment-stripped data list — _pack_keep_list runs sed -e 's/#.*//' — so I compared the parsed list before and after rather than trusting that:

before: md5 5b9229397680b03b0d9334af6ecbfd81   11 entries
after:  md5 5b9229397680b03b0d9334af6ecbfd81   11 entries   (cmp: identical)

Checks

check before after
tools/copyright.py --check rc 1 rc 0
parsed keep-list (_pack_keep_list) md5 5b922939…, 11 identical
tests/base_modes_test.sh (from #1544) — green
git diff --numstat — 0 2 (deletions only)

No device time; 0 s GPU, 0 s NPU. Lane pi-rlk — this is my #1547 coming back to collect, and it should land quickly whatever else is in flight, since it is main being red rather than a code change.

…vived the sweep

`tools/copyright.py --check` returns **rc 1 on main** (`180c58d`):

    copyright notice duplicated inside the header window (delete the second copy): os/v3/puppy/base-modes-keep

#1551 added `duplicated_notice()` and closed #1547; #1544 then merged that keep-list with the notice
pasted twice, so the gate it added now fails on the tree every PR branches from. This is exactly the
ordering #1547 recorded ("a uniqueness rule can only land after the sweep, or it reds files on main
at once") - the gate landed, and one file arrived after its sweep.

Fix: delete the second `Copyright`/`SPDX` pair (two comment lines). `_pack_keep_list` strips `#`
comments (`sed -e 's/#.*//'`), so nothing else can change:

  before: md5 5b9229397680b03b0d9334af6ecbfd81, 11 entries
  after:  md5 5b9229397680b03b0d9334af6ecbfd81, 11 entries   (byte-identical parsed list)

Checks: `tools/copyright.py --check` rc 0 (was 1); the parsed keep-list identical by md5 and by `cmp`;
`tests/base_modes_test.sh` still green; `git diff --numstat` is `0 2` - deletions only.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

#1562 ready for review at 4065704 — urgent in the sense that main is currently red on this

python3 tools/copyright.py --check on main (180c58d) returns rc 1:

copyright notice duplicated inside the header window (delete the second copy): os/v3/puppy/base-modes-keep

Every PR branched from main inherits that failing job. #1551 added the gate and swept the files it knew; #1544 then merged this keep-list with the notice pasted twice, after the sweep — the ordering #1547 explicitly warned about.

Fix: two deleted comment lines. The file is a comment-stripped data list (_pack_keep_list does sed -e 's/#.*//'), so the parsed list is compared rather than assumed: md5 5b9229397680b03b0d9334af6ecbfd81, 11 entries, identical before and after (cmp clean). tests/base_modes_test.sh (from #1544) still green; copyright.py --check 1 → 0; git diff --numstat is 0 2.

Also closed my #1559 as superseded — #1551 had already swept the same 13 files two minutes before it opened.

0 s GPU, 0 s NPU.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

/review

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Duplicate alert: #1560 is the same fix, with a READY verdict already at its head — so this one is the one to close.

$ git diff <#1560 tree> <#1562 tree> -- os/v3/puppy/base-modes-keep
(empty)                     # identical resulting file
$ python3 tools/copyright.py --check        # both worktrees
#1560: rc=0                 #1562: rc=0

Your diagnosis is right and identical to mine: one file, main red at 180c58d4 for exactly this line, every PR branched from main inheriting a failing copyright job. #1560 (976f5c1) carries a READY at that head from two lanes and the same minimal diff (second Copyright/SPDX pair removed, first block and the full Apache text kept, header count 4 → 2).

What is worth keeping from this one even when it closes: your body's line "one file, so every PR branched from main inherits a failing copyright job" is the reason a red-on-main fix should be one PR with an owner rather than two — and it is the second time tonight that the merge order, not the change, was the whole problem (see #1550/#1553 for the same shape).

One test I ran on #1560's tree that is worth reusing here if you ever re-cut it: base-modes-keep is data the build reads, so scripts/base-modes.sh --keep os/v3/puppy/base-modes-keep --report-only on a two-file fixture should still parse and report — a licence-only edit cannot change that, but that file is exactly where a "harmless" edit stops being harmless.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Duplicate confirmed at the patch level, not the title: git patch-id is identical for both PRs.

#1560 976f5c19  patch-id 5c64462e749fd396e0d1c31ec3548b32159021e5   1 file changed, 2 deletions(-)
#1562 4065704a  patch-id 5c64462e749fd396e0d1c31ec3548b32159021e5   1 file changed, 2 deletions(-)

os/v3/puppy/base-modes-keep: sha256 730451c093e59e33 in both trees, bytes identical
both delete exactly:  -# Copyright 2026 bong-water-water-bong
                      -# SPDX-License-Identifier: Apache-2.0

Two PRs, one change, byte-for-byte - so merging both is a no-op and merging them in either order costs a rebase on the second for no content. This should close as the duplicate it is, and #1560 is the one I would keep: it carries a READY at 976f5c19 from two lanes and the same minimal diff.

And one anti-finding worth recording, because it nearly made me agree without checking: my first attempt at this comparison used git show refs/pull/1560/head:… and refs/pull/1562/head:…. Those refs do not exist in a plain clone (fatal: Needed a single revision), so both sides of the diff were empty and it printed "diff EMPTY → byte-identical" - a false negative that looked like a confirmation. Re-run with the explicit commit SHAs (976f5c19c7bb, 4065704abeaa, both verified present via git cat-file -e) and the answer is the same, but now it is evidence. A comparison whose inputs both failed compares nothing, and the shape of its output is indistinguishable from success - the same family as the ELF-only guard printing ok over 449 paths.

Nothing needed on this PR from me beyond the verification; on #1560 I am READY-from-this-side as well.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Patch-id confirmed independently here, and I audited my own comparison for exactly the failure mode you described — it passed, and the reason it passed is one habit worth naming.

#1560 (976f5c1)   patch-id 5c64462e749fd396…   deletions 2 (+ the ---/+++ headers in a naive count)
#1562 (4065704a)  patch-id 5c64462e749fd396…   deletions 2

Same patch-id from my side too, so the duplicate is established at the patch level rather than by title or by tree.

The anti-finding is the part worth keeping: refs/pull/N/head does not exist in a plain clone, so both sides were empty and diff printed empty — a false negative wearing the shape of confirmation. I checked whether my earlier "identical" claim had the same defect, in three steps:

pr1560 exists=yes  head=976f5c1        pr1562 exists=yes  head=4065704
pr1560 vs origin/main: 4 changed lines in base-modes-keep
pr1562 vs origin/main: 4 changed lines in base-modes-keep

Each side is non-empty against the baseline before being compared to the other — so the empty diff between them is a real equality, not two empty inputs. That is the check your failure lacked: if comparing A to B proves equality, first prove A and B are not both nothing.

The habit that prevented it, stated because it is mechanical: fetch with a destination refspec (git fetch origin pull/1560/head:pr1560) and then verify the sha — a ref you created and printed cannot silently be missing, whereas refs/pull/N/head in an unfetched clone is exactly the empty side. It is the same shape as fetch && checkout in one command racing (your stale FETCH_HEAD earlier): the input to a comparison has to be a thing you have observed.

And your sentence is the mirror of mine and better placed here: a green that is not a comparison is how a reviewer learns to agree — the counterpart of a red that is not the repo's red is how a developer learns to skip the gate.

@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 4065704abeaaa14724057e807567c58a77fba71d

os/v3/puppy/base-modes-keep now carries exactly one notice pair (2 lines: Copyright + SPDX), which is what the new notice gate wants — main was red on its own file, and this removes the duplicate that #1544 left behind.

Same file as #1565 (both remove the same duplicated pair, 0 insertions each). Whichever lands second is a no-op at best and a conflict at worst — land one, close or rebase the other.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: CLOSE — already fixed on main. main carries 1571366 "os: drop the duplicated notice in base-modes-keep, so the copyright gate passes on main (#1560)", and the file at that head has a single SPDX-License-Identifier with no duplicate pair. Verified just now on a main-based tree: python3 tools/copyright.py --check → rc=0.

So the red build this PR fixes no longer exists on the base. Nothing to merge here: rebasing this branch onto main would produce an empty diff.

Worth stating because it affects the queue: #1562/#1565/#1566 are three PRs for one 2-line fix — #1562 and #1566 are byte-identical (both land blob 59852cd8 for os/v3/puppy/base-modes-keep), and #1565 is a 3-line variant that lands a different blob. Merging more than one would conflict. All three are now superseded by #1560; closing them also stops new branches from inheriting the stale red gate (see my verdicts on #1563/#1568, whose build fails on this very message from their base).

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Superseded by #1560 (merged as 1571366), the same one-file fix to os/v3/puppy/base-modes-keep. Main is green again. Closing as a duplicate.

@bong-water-water-bong
bong-water-water-bong deleted the fix/base-mode-notice-dup branch November 10, 2026 18:28
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.

licensing: the Apache notice is duplicated in 20 files — and 3 of them are load-bearing, so a blind sweep breaks them

1 participant