audit(devices): 33 fibre devices read as copper, and no job ran the audit #2301
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2301
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "catalogue/1120-1852"
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?
Does not close #130 or #803 — the two open device requests are blocked on their vendors, exactly as their threads record, and nothing here touches
devices/.docs/plans/catalogue-audit-agreement.md, steps 1-6. Two audits asked one question and answered it differently:scripts/audit-devices.jscounted an optical cage with its ownOPTICAL_CAGES = ['sfp','sfp+','sfp28','qsfp+','qsfp28']at:16, whiletest/hardware-invariants.test.jskept a longer list of its own.engine/media.jsalready classifies every cage, and neither read it.Its answer was 33, and the true answer was 0.
sc-apc/sc-upc— GPON ONT/ONUfc-sfp28,fc-sfpdd,fc-qsfp28—brocade/g720,dell/ds-6630b,hpe/sn3600brj45only —watchguard/firebox-m290,microsemi/syncserver-s600The five names are the Ethernet cages. A Brocade SAN switch modelled with
fc-sfpddcages and a GPON ONT modelled withsc-apcare both fibre-ended; the list called every one of them copper, and the two module-bay descriptions are correct documentation of what ships.What this does.
engine/media.js:isOpticalCage(cage)— true for familyoptical(SFP through CFP2, and the SC/LC PON connectors) orfibre-channel(fc-sfp,fc-sfp28,fc-sfpdd,fc-qsfp28).combois deliberately not optical: one cage position holding either an RJ45 or an SFP, and copper until a module is fitted.scripts/audit-devices.js: uses that predicate; strips the optional/unfitted-module clause before reading a claim; splits behindrequire.mainsotest/can ask it anything; exportsauditCatalog()andclaimsOptics().test/hardware-invariants.test.jsimportsclaimsOpticsandisOpticalCageinstead of carrying a private copy of each. The denial strip now runs before the clause split —SFP: nonewas being split at the colon into a bareSFPand a droppednone.test/audit-agreement.test.js(11 checks): the three shapes that were wrong, the control that must still be caught (24-port 1G switch with 4 x 10G SFP+ uplinksover 24 RJ45 ports), and the catalogue-wide agreement between the audit's answer and the invariant's.package.json+docs/CI.md:audit:devicesjoins the test chain — a fileCHANGELOG.mdhas advertised since it was written and no job ran. Measured 0.43 s. The file is kept, not deleted.Measured.
No spec under
devices/changed and no engine rule changed a verdict: the one new export reads the tableengine/media.jsalready owns.test/hardware-invariants.test.jsgains a control-flow note above the one skip whose condition is now a named predicate (isOptical(is whattest/skip-audit.test.jslooks for), because the check is scoped to fibre cages by construction rather than exempting a device.scripts/audit-devices.js answered "does this description promise optics the ports cannot deliver?" from its own OPTICAL_CAGES = ['sfp','sfp+','sfp28','qsfp+','qsfp28']. Every Fibre Channel cage and every PON connector fell outside that list, so brocade/g720, dell/ds-6630b and hpe/sn3600b (fc-sfpdd/fc-sfp28/fc-qsfp28) and 28 GPON ONTs on sc-apc read as copper: 33 findings, none of them a defect, against 0 from the invariant that gates the same rule. - engine/media.js: isOpticalCage(cage), true for the 'optical' and 'fibre-channel' families in the cage table the engine already cables from. Both audits call it. - scripts/audit-devices.js: uses it; strips the optional/unfitted-module clause before reading a claim (the denial strip now runs before the clause split, since "SFP: none" was split at the colon into a bare "SFP"); require.main guard; exports auditCatalog()/claimsOptics(); 33 -> 2 -> 0. - test/hardware-invariants.test.js: imports the same claimsOptics and isOpticalCage instead of keeping a private copy and a private list. Same 26 checks, same answers. - test/audit-agreement.test.js: 11 checks - the three shapes that were wrong, the control that must still be caught, and the catalogue-wide agreement (0 vs 0). - package.json: audit:devices in the test chain (0.43 s) and as an npm script; docs/CI.md names it instead of leaving it a documented tool no job ran. - audit-devices and audit-port-types verdicts name what they gated and what they only reported ("Gated: 0 ... Reported, not gated: 2,704"). Closes no issue: docs/plans/catalogue-audit-agreement.md, steps 1-6.