A saved lab reopens with its conversations still in it (#1435) #1436
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1436
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/flows-survive-save-load"
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?
Closes #1435.
The flow table lives on the topology — runtime state of the board — but
serialize()never wrote it andfromJSON()never read it. A lab with an established TCP flow, saved and reopened, came back with an empty flow table: the reloaded board said nothing was connected while the saved document said a conversation existed.Fixed
serialize()writesflows(id, state, hops, counters) with the board;fromJSON()restores them — same id, same state, same hops, so a later removal still knows the path;flow-N, so the next flow cannot collide;loadIssues(E_FLOW_GHOST_ENDPOINT, naming the flow and the missing endpoints), exactly like an unrestorable cable, and the board still opens;flows: [], not a missing key;npm run examples) since they now carryflows: [].Evidence — 16 checks
test/flows-survive-save-load.test.js: the round trip (same id, state, hops), no id collision, ghost endpoints reported and dropped while the board opens, a no-id record reported, and the empty-list case. Revertingengine/topology.jsfails the serialize assertion (and crashes the restored path on the missingflowState).Suite: 218 suites, 8,176 assertions, 0 failed; syntax 286 files OK. Docs:
docs/ARCHITECTURE.md, "A saved lab reopens with its conversations still in it".