The cable inspector asserts a physical-layer check that nothing ran, and load never validates #1303

Closed
opened 2026-11-10 00:21:50 +00:00 by jaylouisw · 0 comments
Owner

The cable inspector printed, for every cable, unconditionally:

Cages mate and the media is supported at both ends — this cable passed the physical-layer check when it was
created. An impossible combination is refused at that moment, not silently accepted.

Nothing computed that. It was a sentence in the renderer.

And there is a path that produces a cable nobody ever checked: POST /topologies/:id/load swaps a whole document
in with no validation at all (Topology.fromJSON(body), straight into the map). A hand-edited file, or one
written before a physical-layer rule existed, therefore carried an impossible cable through the entire UI wearing
the same confident sentence as a good one. Meanwhile validateTopology() had the exact answer available — and, by
its own comment, "nothing but tests ever called it".

Measured: a document whose only cable claims 10gbase-sr between two Aruba CX 6000 RJ45 ports loads silently, and
the engine's own verdict for it is:

E_MEDIA_NOT_SUPPORTED: 10GBASE-SR (10gbase-sr) is not supported by both Aruba CX 6000 24G 4SFP (R8N88A)/1/1/1
and Aruba CX 6000 24G 4SFP (R8N88A)/1/1/1; possible media: 10BASE-T, 100BASE-TX, 1000BASE-T.

A 5 km copper run (1000BASE-T reaches 100 m) loads the same way.

What it must do instead

  • the server runs validateTopology(topo) when it builds a state payload, so state.verdicts carries
    {ok, errorCount, warningCount, byLink, issues} — one verdict per cable, filed under the cable that caused
    it
    , so a panel with one cable selected does not have to filter the whole lab;
  • the cable inspector prints the engine's message for the selected cable, in red, and a good cable says
    "checked by the engine, not assumed by this panel";
  • loading still takes the document as written — an imported lab has to be fixable in place — but the response
    carries the verdict and the UI says Imported, but 1 cable cannot be used instead of Topology imported;
  • a payload with no verdict at all reads This cable has not been checked, never the reassuring sentence;
  • an issue with no linkId (a lab-level problem) must not vanish when a cable is selected, or the panel would
    report a clean cable inside a broken lab.
The cable inspector printed, for **every** cable, unconditionally: > Cages mate and the media is supported at both ends — this cable passed the physical-layer check when it was > created. An impossible combination is refused at that moment, not silently accepted. Nothing computed that. It was a sentence in the renderer. And there is a path that produces a cable nobody ever checked: `POST /topologies/:id/load` swaps a whole document in with **no validation at all** (`Topology.fromJSON(body)`, straight into the map). A hand-edited file, or one written before a physical-layer rule existed, therefore carried an impossible cable through the entire UI wearing the same confident sentence as a good one. Meanwhile `validateTopology()` had the exact answer available — and, by its own comment, *"nothing but tests ever called it"*. Measured: a document whose only cable claims `10gbase-sr` between two Aruba CX 6000 RJ45 ports loads silently, and the engine's own verdict for it is: ``` E_MEDIA_NOT_SUPPORTED: 10GBASE-SR (10gbase-sr) is not supported by both Aruba CX 6000 24G 4SFP (R8N88A)/1/1/1 and Aruba CX 6000 24G 4SFP (R8N88A)/1/1/1; possible media: 10BASE-T, 100BASE-TX, 1000BASE-T. ``` A 5 km copper run (`1000BASE-T` reaches 100 m) loads the same way. ## What it must do instead * the server runs `validateTopology(topo)` when it builds a state payload, so `state.verdicts` carries `{ok, errorCount, warningCount, byLink, issues}` — one verdict per cable, **filed under the cable that caused it**, so a panel with one cable selected does not have to filter the whole lab; * the cable inspector prints the engine's message for the selected cable, in red, and a good cable says *"checked by the engine, not assumed by this panel"*; * loading still takes the document as written — an imported lab has to be fixable in place — but the response carries the verdict and the UI says `Imported, but 1 cable cannot be used` instead of `Topology imported`; * a payload with no verdict at all reads `This cable has not been checked`, never the reassuring sentence; * an issue with **no** `linkId` (a lab-level problem) must not vanish when a cable is selected, or the panel would report a clean cable inside a broken lab.
Sign in to join this conversation.
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#1303
No description provided.