poe: the budget audit can be asked, and it has a word for power that arrived upstream #2501
No reviewers
Labels
No labels
blocked-on-build
bug
device
device-request
enhancement
from-github
needs-datasheet
needs-info
needs-triage
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2501
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "catalogue/1124-0022"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
No open
device-requestissue remains � the queue is drained (#130 closed 2026-11-23 against the UDW tab, and PR #2495 is in flight for the UACC-LR-Endpoint outlet). So this run takes the next item the PoE audit cannot answer, which is the blocker its own plan names:docs/plans/poe-budget-variants.mdstep 1, "make the audit askable, and give it the fifth state".Why this, and not a device
scripts/audit-poe-budget.jsreports 3 of 408 PSE boxes that source power and cannot say how much:ubiquiti/UDB-Pro,ubiquiti/F-POE-G2,ubiquiti/UACC-LR-Endpoint. All three are passthrough boxes � the watts leave the box from a supply that arrived from upstream � and the audit had no word for that, so they printed as "silent" forever. Ubiquiti prints no outlet ceiling for any of them (checked this run for the F-POE-G2: tech specs, datasheet PDF text layer, and store page; the datasheet's whole spec table has no output-watt or output-current row at all), so abudgetWwould be a subtraction nobody published.Marking the three is step 2 and needs step 1 first, otherwise
poe.passthroughis a key nothing reads. This PR is step 1 (and step 4, the suite that proves it).What changed
auditPoeBudget(cat)is exported andmain()is guarded behindrequire.main === module, so a suite can call the census. The printout and exit codes are unchanged.passthrough(spec.poe.passthrough === true): printed on its own line, counted, excluded fromsilentand from the--strictfailure count.misdeclared, which the plan did not name but its own risk list demands: apassthroughflag beside abudgetWis the file answering one question twice, and a flag on a box with no PSE port claims a socket that is not there. Both fail--strictlike a silent one, so the fifth state cannot be used to buy a quiet audit line.test/poe-budget-gate.test.js(18 assertions): silent fixtures still fail,budgetUnknownpasses,passthroughpasses and is counted, both misdeclared shapes fail, no device in two cohorts on the real catalogue, and--strict's exit code agrees with the cohorts--jsonprints.Gate output
node scripts/audit-poe-budget.js� 2,352 models, 408 sourcing, silent 3, unknown 26, passthrough 0, misdeclared 0 (unchanged until step 2 marks the boxes);--strictexits 1, which is why step 3 is not taken here � a gate that is red on arrival teaches people to ignore it.node test/poe-budget-gate.test.js� 18 passed, 0 failednode scripts/syntax-check.js� 556 files (548 JS, 8 TS): all OKnode scripts/audit-port-types.js� gated: 0 contradicting their declared typenode scripts/audit-devices.js� gated: 0 hard defectsnode test/hardware-invariants.test.js� 26 passed, 0 failednode scripts/run-tests.js --concurrency=4� 472 of 473 suites green;test/canonical-urls.test.jsfailed under the runner's concurrency (the README-mutation race this same stream hit in #2495) and passes standalone: 88 passed, 0 failed, tree clean afterwards.Next passes: step 2 one vendor at a time � Ubiquiti F-POE-G2 and UDB-Pro get
poe.passthrough: truewith the documents read; then step 3 can put--strictintopackage.json, step 5 documents the field.The Node 22 leg came back red on
3451a240while Node 24, Typecheck, the Docker/smoke job and both automation jobs were green.Re-run against the same tree on this host, with the same runtime CI gives that leg:
node scripts/run-tests.js --concurrency=12- 473 suites, 15,938 assertions, 0 failed, 73.4 s (the same assertion total Node 26 reports, so no suite was skipped)node test/poe-budget-gate.test.js- 18 passed, 0 failedSo the diff is not the difference between the legs: the red is the host losing one suite at 12-way concurrency, the race ci.yml re-runs for.
test/canonical-urls.test.jsis the suite in this tree that mutates README.md, and it also failed once at 4-way here before passing 88/88 alone. The run logs on this instance are behind a login, so I cannot name the suite from the leg itself; the empty commit is only to give the matrix a fresh pull_request event. No code changed.