A saved lab reopens with an empty flow table: serialize() never writes flows, fromJSON() never reads them #1435

Closed
opened 2026-11-11 18:34:51 +00:00 by jaylouisw · 0 comments
Owner

The flow table lives on the topology (runtime state of the board), but Topology.serialize() never wrote it and Topology.fromJSON() never read it. Measured live: build a -- sw -- r1, open an established TCP flow, save, reload —

saved document:  flows absent
reloaded board:  flow table empty   <- the board says nothing is connected

while the document the user saved said a conversation existed. One more surface that had the fact and one that did not.

What should be true

  1. serialize() writes flows (id, state, hops, counters) with the board;
  2. fromJSON() restores them — same id, same state, same hops, so a later removal still knows the path;
  3. the next flow id does not collide with a restored flow-N;
  4. a document carrying a flow whose endpoints are not on the board is refused the flow, not the board — reported in loadIssues (E_FLOW_GHOST_ENDPOINT), and the board still opens;
  5. a board with no flows serializes flows: [], not a missing key.
The flow table lives on the topology (runtime state of the board), but `Topology.serialize()` never wrote it and `Topology.fromJSON()` never read it. Measured live: build `a -- sw -- r1`, open an established TCP flow, save, reload — ``` saved document: flows absent reloaded board: flow table empty <- the board says nothing is connected ``` while the document the user saved said a conversation existed. One more surface that had the fact and one that did not. ### What should be true 1. `serialize()` writes `flows` (id, state, **hops**, counters) with the board; 2. `fromJSON()` restores them — same id, same state, same hops, so a later removal still knows the path; 3. the next flow id does not collide with a restored `flow-N`; 4. a document carrying a flow whose endpoints are **not on the board** is refused the flow, not the board — reported in `loadIssues` (`E_FLOW_GHOST_ENDPOINT`), and the board still opens; 5. a board with no flows serializes `flows: []`, not a missing key.
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#1435
No description provided.