Stop devices claiming power they do not have, and 10G ports in 1G cages #954

Merged
jaylouisw merged 1 commit from fix/spec-contradictions into main 2026-11-08 06:55:37 +00:00
Owner

Closes the issue for main being red since the sync commit.

Devices that accept power declared as power sources

EP-R6, ER-10X, ACB-AC each say "PoE-in" in their own description and declared every port a
PSE. They now keep the input and source nothing. The same sweep checked EP-R8 (passes power
through), EP-S16 (4 PoE / 12 PoE+) and N-SW (3 PoE out) and left them alone, because their
descriptions say what they do.

The invariant could not tell a declaration from a guess

"off a switch, only ports that name themselves PoE source power" tested the port name, which is a
proxy for intent, not the thing itself: it fired on an NVR whose datasheet names its ports
"PoE 1..16". derivePortHardware() now records poeOutDeclared, and the rule asks the question
that matters - on a non-switch, power is only sourced where the datasheet says so. A wrongly
declared port stays a data bug, fixed in the spec file rather than excused by the test, which is what
the first section of this PR is.

poe_in is not a power source

isPoePse() returned true for any name containing "poe", so planet/POE-E201 and
poe-texas/GAF-12V12W became PSEs on the strength of their own input jack's name. Input markers are
excluded first now.

10G in a 1G cage

ER-8-XG (8 ports) and ENVR (2) declared sfp at 10G. Ubiquiti's pages for both say SFP+:
EdgeRouter Infinity is 8x 10G SFP+, Enterprise NVR is 2x 10G SFP+. Same defect as #1069, on
hardware that arrived in the sync.

83 suites, 4182 assertions, all passing.

Closes #953.

Closes the issue for `main` being red since the sync commit. ## Devices that accept power declared as power sources `EP-R6`, `ER-10X`, `ACB-AC` each say "PoE-in" in their own description and declared every port a PSE. They now keep the input and source nothing. The same sweep checked `EP-R8` (passes power through), `EP-S16` (4 PoE / 12 PoE+) and `N-SW` (3 PoE out) and left them alone, because their descriptions say what they do. ## The invariant could not tell a declaration from a guess "off a switch, only ports that name themselves PoE source power" tested the port name, which is a proxy for intent, not the thing itself: it fired on an NVR whose datasheet names its ports "PoE 1..16". `derivePortHardware()` now records `poeOutDeclared`, and the rule asks the question that matters - on a non-switch, power is only sourced where the datasheet says so. A wrongly declared port stays a data bug, fixed in the spec file rather than excused by the test, which is what the first section of this PR is. ## `poe_in` is not a power source `isPoePse()` returned true for any name containing "poe", so `planet/POE-E201` and `poe-texas/GAF-12V12W` became PSEs on the strength of their own input jack's name. Input markers are excluded first now. ## 10G in a 1G cage `ER-8-XG` (8 ports) and `ENVR` (2) declared `sfp` at 10G. Ubiquiti's pages for both say SFP+: EdgeRouter Infinity is 8x 10G SFP+, Enterprise NVR is 2x 10G SFP+. Same defect as #1069, on hardware that arrived in the sync. **83 suites, 4182 assertions, all passing.** Closes #953.
Stop devices claiming power they do not have, and 10G ports sitting in 1G cages
All checks were successful
CI / Server smoke test (pull_request) Successful in 54s
CI / Docker build (pull_request) Successful in 15s
CI / Test (Node 18) (pull_request) Successful in 1m44s
CI / Test (Node 20) (pull_request) Successful in 1m43s
CI / Test (Node 22) (pull_request) Successful in 1m49s
e4ba56cc6e
The GitHub->Forgejo sync brought in specs that contradict their own descriptions, and main has
been red since: hardware-invariants (1 failure) and poe-inference (1 failure).

Devices that accept power declared as power sources
  EP-R6, ER-10X and ACB-AC each say "PoE-in" in their own description and declared every port a
  PSE. An EdgeRouter 10X with ten self-powered ports is not an EdgeRouter 10X. Each now keeps its
  PoE input and sources nothing.
  EP-R8, EP-S16 and N-SW were checked in the same sweep and left alone: R8 passes power through,
  S16 has 4 PoE + 12 PoE+, N-SW has 3 PoE out. The description says so in each case.

The invariant could not tell a declaration from a guess
  "off a switch, only ports that name themselves PoE source power" tested the port *name*, which
  is a proxy for intent rather than the thing itself. It fired on legitimate PoE outputs (an NVR
  whose datasheet names its ports "PoE 1..16") while never asking the question that matters.
  derivePortHardware now records poeOutDeclared, so the rule can say: on a non-switch, power may
  only be sourced where the datasheet says so. A wrongly declared port is a data bug and is fixed
  in the spec file, not hidden by the test.

"poe_in" is not a power source
  isPoePse() returned true for any port whose name contains "poe", so the inline splitters (planet
  POE-E201, poe-texas GAF-12V12W) became power sources on the strength of their own input jack's
  name. Input markers are now excluded first.

10G in a 1G cage
  ER-8-XG (8 ports) and ENVR (2 ports) declared connector "sfp" - a 1G cage - at 10G. Ubiquiti's
  pages for both say SFP+: EdgeRouter Infinity is 8x 10G SFP+, Enterprise NVR is 2x 10G SFP+.
  Recaged. That is the same defect as #1069, on new hardware.

83 suites, 4182 assertions, all passing.
jaylouisw deleted branch fix/spec-contradictions 2026-11-08 06:55:38 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!954
No description provided.