a topology document silently loses every link when a port name needs the full resolver #1519

Closed
opened 2026-11-15 18:01:08 +00:00 by jaylouisw · 0 comments
Owner

Topology.connect() resolves port names with the weak copy in engine/iface-name.js (MikroTik rules only). A document whose links name GigabitEthernet1/0/1 throws at engine/topology.js:361, and fromJSON swallows the throw at :607-611 with a comment that blames "port removed".

Proved: a two-device document with links loads as 2 devices and 0 links, with no error, no warning and no output. The copy that does resolve the name is engine/cli.js:232 (exported at :14085).

Why it matters: silent data loss on load. A saved document is not the document you get back, and the comment makes the loss look intentional.

Suggested fix: use the strong resolver in connect(), and make fromJSON report a link it could not resolve as a warning on the document rather than discarding it. A link that cannot be rebuilt is a fact about the file, not an absence.

`Topology.connect()` resolves port names with the weak copy in `engine/iface-name.js` (MikroTik rules only). A document whose links name `GigabitEthernet1/0/1` throws at `engine/topology.js:361`, and `fromJSON` swallows the throw at `:607-611` with a comment that blames "port removed". Proved: a two-device document with links loads as 2 devices and **0 links**, with no error, no warning and no output. The copy that does resolve the name is `engine/cli.js:232` (exported at `:14085`). **Why it matters:** silent data loss on load. A saved document is not the document you get back, and the comment makes the loss look intentional. **Suggested fix:** use the strong resolver in `connect()`, and make `fromJSON` report a link it could not resolve as a warning on the document rather than discarding it. A link that cannot be rebuilt is a fact about the file, not an absence.
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#1519
No description provided.