[Bug]: a link label is set, drawn and then lost by serialize() #1513
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1513
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happened
Setting a label on a link appears to work and the property is readable, but the label is
absent from
Topology.serialize(), so any cable annotation (e.g. "via 0-LR-FP1 keystone 2","USB Ethernet adapter", "DOWN - host decommissioned") is dropped the moment the board is saved
and reloaded. Interface
descriptionsurvives the round trip; the link label does not.Steps to reproduce
const t = new Topology(); add two switches;t.connect('a','p1','b','p1')t.links.get(id).label = 'via faceplate 0-LR-FP1 keystone 2'const doc = t.serialize()and inspectdoc.links[0]/api/topologies/<id>/loadand GET it back - the label is gone.
Expected
Either the label is part of the link document (and survives save/load), or setting it on the
live Link is refused so the caller knows it is not persisted. Silently accepting a value that
the serialiser discards is the failure mode that costs a user a whole cabling record.
Logs / output
Environment
Node v24.11.0, Windows 11, main (
2625add0)