Repository navigation
os: drop the duplicated licence header that #1544 left in base-modes-keep — main is red on the copyright gate - #1565
bong-water-water-bong wants to merge 1 commit into
Conversation
…keep -- main is red on the copyright gate `tools/copyright.py --check` fails on main since #1544 merged: copyright notice duplicated inside the header window (delete the second copy): os/v3/puppy/base-modes-keep The file carries the Apache notice twice: lines 1-14, then a second `# Copyright 2026 … / # SPDX-License-Identifier: Apache-2.0 / #` at lines 15-17 before the keep-list's own explanation. `copyright.py` treats the second copy as a defect, so **every PR opened against main right now fails the copyright step for a reason none of them caused** (I hit it on my own #823 work). Fix: delete the three duplicated lines. Nothing else changes -- the keep-list's explanation and all **11** entries are byte-identical to main (checked by counting non-comment lines before and after: 11 and 11). Verified: `python3 tools/copyright.py --check` -> rc 0 with the tree staged (rc 1 before); `git diff --cached` shows exactly the three removed lines; `git add <paths>` only. Fixes the red introduced by #1544; refs #1474 (whose row the file belongs to).
|
#1565 ready for review at 1df22f3 — mechanical fix for a red that landed with #1544: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 1df22f3d7bde71756dd575b98b7a904369bfb0b0
Verified: os/v3/puppy/base-modes-keep is at one notice pair (2 header lines) at this head — the duplicate #1544 introduced is gone.
Same file as #1562, same one-pair removal, same 0 insertions. Two PRs for one deletion: whichever merges second is a no-op or a conflict, so one should be closed with a pointer at the other. The content is right either way.
|
VERDICT: CLOSE — already fixed on main. So the red 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 |
…nd (engine#823) #823 is "only the front USB-A port works on this board", and its remaining step is one plug on a 1bit-OS boot. That step has a precondition nobody could check in one command -- is the shipped keepawake rule even applicable to the machine in front of me, and are the controllers awake right now? -- so the one thing that would make the plug meaningful could not be verified before doing it. tools/xhci_keepawake_check.sh # read-only: DMI match, per-controller power state, verdict tools/xhci_keepawake_check.sh --require-awake # exit 1 unless every controller the rule matches is in D0 It reads the rule's own predicates (board_name == AXB35-02, vendor 0x1022, devices 0x1587/0x1588/0x1589/0x158b, driver xhci_hcd) and walks every PCI function rather than a hardcoded list, because a BIOS update can move them and a hardcoded list is how a check silently stops checking anything. Four verdicts, only one of which means "go ahead and plug": NOT THIS BOARD, would bind nothing, N asleep, all awake. Read-only by default; --apply/--revert perform the rule's single action (power/control=on|auto, root) so the mechanism is verifiable without a reboot, and revert is the documented way back. Measured on the board (kernel 7.4.0-rc1-1bit, stock Ubuntu dev boot i.e. WITHOUT the rule): 0000:c5:00.4 0x1587 xhci_hcd D3cold auto 0000:c7:00.0 0x1588 xhci_hcd D0 auto <- front USB-A / BT / JetKVM 0000:c7:00.3 0x1589 xhci_hcd D3cold auto 0000:c7:00.4 0x158b xhci_hcd D3cold auto verdict: 4 controller(s) match the rule; 3 of them are NOT in D0 so the premise still holds on the current kernel -- the fix is not addressing something a newer kernel already fixed -- and --apply moves all three D3cold -> D0 with --revert putting them back, which is the rule's mechanism verified on this kernel. tests/xhci_keepawake_check_test.py builds fake sysfs trees (--sysfs-root) and asserts all four verdicts, because CI is not an AXB35-02: a non-board machine must print NOT THIS BOARD and exit 0 rather than reporting a verdict, an unknown-id AXB35 must say the rule would bind nothing, three-asleep must fail --require-awake, all-awake must pass it. Registered as ctest xhci_keepawake_check. docs/axb35-usb-ports.md records the diagnosis, the rule, the measured table, the four verdicts and what is still owed (the plug, and the _DSM comparison against Windows if a port is still dead after it). Verified: ctest -R 'xhci_keepawake|spec_decode' in a CI-parity configure -> 2/2 Passed; the test file's 13 checks pass; bash -n; copyright --check rc 0 for these files (main is red on an unrelated duplicated header, fixed separately in #1565). refs #823, refs #1474's file (no entry touched).
…nd (engine#823) precondition nobody could check in one command -- is the shipped keepawake rule even applicable to the machine in front of me, and are the controllers awake right now? -- so the one thing that would make the plug meaningful could not be verified before doing it. tools/xhci_keepawake_check.sh # read-only: DMI match, per-controller power state, verdict tools/xhci_keepawake_check.sh --require-awake # exit 1 unless every controller the rule matches is in D0 It reads the rule's own predicates (board_name == AXB35-02, vendor 0x1022, devices 0x1587/0x1588/0x1589/0x158b, driver xhci_hcd) and walks every PCI function rather than a hardcoded list, because a BIOS update can move them and a hardcoded list is how a check silently stops checking anything. Four verdicts, only one of which means "go ahead and plug": NOT THIS BOARD, would bind nothing, N asleep, all awake. Read-only by default; --apply/--revert perform the rule's single action (power/control=on|auto, root) so the mechanism is verifiable without a reboot, and revert is the documented way back. Measured on the board (kernel 7.4.0-rc1-1bit, stock Ubuntu dev boot i.e. WITHOUT the rule): 0000:c5:00.4 0x1587 xhci_hcd D3cold auto 0000:c7:00.0 0x1588 xhci_hcd D0 auto <- front USB-A / BT / JetKVM 0000:c7:00.3 0x1589 xhci_hcd D3cold auto 0000:c7:00.4 0x158b xhci_hcd D3cold auto verdict: 4 controller(s) match the rule; 3 of them are NOT in D0 so the premise still holds on the current kernel -- the fix is not addressing something a newer kernel already fixed -- and --apply moves all three D3cold -> D0 with --revert putting them back, which is the rule's mechanism verified on this kernel. tests/xhci_keepawake_check_test.py builds fake sysfs trees (--sysfs-root) and asserts all four verdicts, because CI is not an AXB35-02: a non-board machine must print NOT THIS BOARD and exit 0 rather than reporting a verdict, an unknown-id AXB35 must say the rule would bind nothing, three-asleep must fail --require-awake, all-awake must pass it. Registered as ctest xhci_keepawake_check. docs/axb35-usb-ports.md records the diagnosis, the rule, the measured table, the four verdicts and what is still owed (the plug, and the _DSM comparison against Windows if a port is still dead after it). Verified: ctest -R 'xhci_keepawake|spec_decode' in a CI-parity configure -> 2/2 Passed; the test file's 13 checks pass; bash -n; copyright --check rc 0 for these files (main is red on an unrelated duplicated header, fixed separately in #1565). refs #823, refs #1474's file (no entry touched).
…nd (engine#823) (#1567) * tools+docs: the AXB35-02 plug test gets its precondition in one command (engine#823) precondition nobody could check in one command -- is the shipped keepawake rule even applicable to the machine in front of me, and are the controllers awake right now? -- so the one thing that would make the plug meaningful could not be verified before doing it. tools/xhci_keepawake_check.sh # read-only: DMI match, per-controller power state, verdict tools/xhci_keepawake_check.sh --require-awake # exit 1 unless every controller the rule matches is in D0 It reads the rule's own predicates (board_name == AXB35-02, vendor 0x1022, devices 0x1587/0x1588/0x1589/0x158b, driver xhci_hcd) and walks every PCI function rather than a hardcoded list, because a BIOS update can move them and a hardcoded list is how a check silently stops checking anything. Four verdicts, only one of which means "go ahead and plug": NOT THIS BOARD, would bind nothing, N asleep, all awake. Read-only by default; --apply/--revert perform the rule's single action (power/control=on|auto, root) so the mechanism is verifiable without a reboot, and revert is the documented way back. Measured on the board (kernel 7.4.0-rc1-1bit, stock Ubuntu dev boot i.e. WITHOUT the rule): 0000:c5:00.4 0x1587 xhci_hcd D3cold auto 0000:c7:00.0 0x1588 xhci_hcd D0 auto <- front USB-A / BT / JetKVM 0000:c7:00.3 0x1589 xhci_hcd D3cold auto 0000:c7:00.4 0x158b xhci_hcd D3cold auto verdict: 4 controller(s) match the rule; 3 of them are NOT in D0 so the premise still holds on the current kernel -- the fix is not addressing something a newer kernel already fixed -- and --apply moves all three D3cold -> D0 with --revert putting them back, which is the rule's mechanism verified on this kernel. tests/xhci_keepawake_check_test.py builds fake sysfs trees (--sysfs-root) and asserts all four verdicts, because CI is not an AXB35-02: a non-board machine must print NOT THIS BOARD and exit 0 rather than reporting a verdict, an unknown-id AXB35 must say the rule would bind nothing, three-asleep must fail --require-awake, all-awake must pass it. Registered as ctest xhci_keepawake_check. docs/axb35-usb-ports.md records the diagnosis, the rule, the measured table, the four verdicts and what is still owed (the plug, and the _DSM comparison against Windows if a port is still dead after it). Verified: ctest -R 'xhci_keepawake|spec_decode' in a CI-parity configure -> 2/2 Passed; the test file's 13 checks pass; bash -n; copyright --check rc 0 for these files (main is red on an unrelated duplicated header, fixed separately in #1565). refs #823, refs #1474's file (no entry touched). * tools: --require-awake fails CLOSED on the two "cannot confirm" verdicts (engine#823 review) The CHANGES review was right and it is the point of the tool: `--require-awake` is "the precondition in one command", so it has to fail closed. It exited **0** on two of the four verdicts: | verdict | before | after | |---|---|---| | `NOT THIS BOARD` | 0 | **1** | | `would bind nothing` | 0 | **1** | | `N asleep` | 1 | 1 | | `all awake` | 0 | 0 | A green on "not this board" reads as *the rule is in force here*, and a green on "would bind nothing" reads as *something is being kept awake* - on a boot where a plug into a rear or Type-C port would fail for the rule's reason and be read as evidence about the ports. Report mode is unchanged and still exits 0 on every verdict: its job is to describe a machine, and the doc's exit line now separates the two modes instead of listing one contract for both. The test was pinning the fail-open behaviour (`--require-awake on a non-board machine is not a failure either`), so it now pins the opposite, and a new case covers "would bind nothing" in both modes. Verified: `tests/xhci_keepawake_check_test.py` **all checks passed**, `bash -n` clean, `shellcheck -S warning` 0, and on this AXB35-02 the read-only run is unchanged. --------- Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
tools/copyright.py --checkfails on main since #1544 merged, and it fails every PR opened against main for a reason none of them caused — I hit it on my own engine#823 work:What is wrong
The file carries the Apache notice twice — lines 1-14, then a second copy at lines 15-17:
Fix
Delete the three duplicated lines. Nothing else changes: the keep-list's explanation and all 11 entries are byte-identical to main (non-comment line count before and after: 11 and 11), and
git diff --cachedshows exactly the three removed lines.Verified
Fixes the red introduced by #1544; refs #1474, whose keep-list this is — the fix is mechanical and touches no entry.