The canvas draws an impossible cable exactly like a working one #1305

Closed
opened 2026-11-10 00:33:55 +00:00 by jaylouisw · 0 comments
Owner

#1304 gave every state payload a verdict per cable (state.verdicts, one verdict per cable, filed under the
cable that caused it) and taught the cable inspector to print it. The canvas is the last surface still drawing on
its own opinion: an impossible cable — copper terminated in a fibre cage, an optic the port cannot seat — comes
out as the same 2 px line as a good one. In a diagram the broken thing has to be the thing you see.

link-down already exists for a cut cable, and it is not the same fault: a cut is a state, an impossible cable is
up and simply cannot be what it claims. They need different fixes, so they need different pictures.

What the drawing must say

what the engine says the line
error (copper in a fibre cage, an optic the port cannot seat) dotted red, link-invalid
warning (a run longer than the medium's reach — it links, it will not carry) amber, link-caveat
state: down (a cut cable) dashed red, link-down — unchanged
nothing wrong unchanged, data-link-valid="true"
  • every cable line carries data-link-valid (true / warn / false / unchecked), data-link-issue (the
    code) and data-link-issue-text (the sentence), plus a <title> so the message is there on hover without a
    click;
  • unchecked means the payload carried no verdict — the drawing claims nothing rather than implying the cable is
    fine (the same rule as #1299 and #1301);
  • the verdict is filed per cable, so one bad run must not redden the lab;
  • a malformed issue entry must be filtered, not thrown on: the per-link try/catch would swallow the throw and
    a refused cable would vanish from the canvas entirely — worse than drawing it as good;
  • the drawing must not claim anything the engine has not said, and must not throw on the shapes a future server
    might send.
#1304 gave every state payload a verdict per cable (`state.verdicts`, one verdict per cable, filed under the cable that caused it) and taught the cable inspector to print it. The canvas is the last surface still drawing on its own opinion: an impossible cable — copper terminated in a fibre cage, an optic the port cannot seat — comes out as the same 2 px line as a good one. In a diagram the broken thing has to be the thing you see. `link-down` already exists for a cut cable, and it is not the same fault: a cut is a state, an impossible cable is *up* and simply cannot be what it claims. They need different fixes, so they need different pictures. ## What the drawing must say | what the engine says | the line | |---|---| | error (copper in a fibre cage, an optic the port cannot seat) | dotted red, `link-invalid` | | warning (a run longer than the medium's reach — it links, it will not carry) | amber, `link-caveat` | | `state: down` (a cut cable) | dashed red, `link-down` — unchanged | | nothing wrong | unchanged, `data-link-valid="true"` | * every cable line carries `data-link-valid` (`true` / `warn` / `false` / `unchecked`), `data-link-issue` (the code) and `data-link-issue-text` (the sentence), plus a `<title>` so the message is there on hover without a click; * `unchecked` means the payload carried no verdict — the drawing claims nothing rather than implying the cable is fine (the same rule as #1299 and #1301); * the verdict is filed **per cable**, so one bad run must not redden the lab; * a malformed issue entry must be **filtered, not thrown on**: the per-link `try/catch` would swallow the throw and a refused cable would vanish from the canvas entirely — worse than drawing it as good; * the drawing must not claim anything the engine has not said, and must not throw on the shapes a future server might send.
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#1305
No description provided.