A reopened lab forgets its splitter ratio and its passive taps #1459

Closed
opened 2026-11-12 02:19:55 +00:00 by jaylouisw · 0 comments
Owner

A run the console refuses to draw sits in a reopened lab as a clean board.

% OLT/gpon0/1 <-> PON Splitter 1:32/uplink: downstream at 1490 nm Path loss 31.3 dB exceeds the B+ budget
  of 28 dB by 3.3 dB. splitting costs 17.5 dB, fibre costs 13.2 dB      <- refused when drawn

Save that lab (at a length inside the budget), edit the saved document's lengthM to 60000, reopen it:

links: 2   loadIssues: []   validateTopology: ok true, 0 errors

Cause

A document states a device's identity, its ports and its configuration. Topology.fromJSON rebuilt the device spec from a hand-picked handful of keys (vendor, model, label, category, capabilities, interfaces) and dropped the rest. Two rules read the rest:

  • the optical budget reads spec.splitRatio / spec.ponClass — a 1:32 splitter came back splitting nothing, so the path lost its 17.5 dB and the budget check went quiet;
  • isPassiveTap() reads spec.passive — a passive tap came back as a box that learns MAC addresses.

What should be true

  1. a saved board keeps the spec facts its rules read: splitRatio, insertionLossDb, channelCount/channelPlan, passive, ponClass;
  2. an over-budget run in a document is reported by the board sweep as an error, with the identical sentence the connect door refuses with (same path loss, same budget, same splitter cost);
  3. a run inside the budget stays clean;
  4. the door is live on a reopened board — a new over-budget run drawn after load is refused again;
  5. documents written before this rule still open, with nothing to report and no wrong facts invented;
  6. the document does not grow: ports stay in the port list, catalogue prose (description, notes, sourceUrl) stays out of the file.

Fix: Device.serialize() writes the spec minus the keys the document already carries elsewhere, and fromJSON merges that record underneath the document's own identity and ports.

test/spec-survives-load.test.js, 32 checks. Reverting engine/device.js + engine/topology.js fails 14. Neighbours green: pon-splitter 33, hybrid-cord-use 64, cable-length 22, flows-survive-save-load 16, state-payload-complete 16, port-roundtrip 32, config-roundtrip 46, engine 12, acl-data 21.

A run the console refuses to draw sits in a reopened lab as a clean board. ``` % OLT/gpon0/1 <-> PON Splitter 1:32/uplink: downstream at 1490 nm Path loss 31.3 dB exceeds the B+ budget of 28 dB by 3.3 dB. splitting costs 17.5 dB, fibre costs 13.2 dB <- refused when drawn ``` Save that lab (at a length inside the budget), edit the saved document's `lengthM` to 60000, reopen it: ``` links: 2 loadIssues: [] validateTopology: ok true, 0 errors ``` ### Cause A document states a device's identity, its ports and its configuration. `Topology.fromJSON` rebuilt the device **spec** from a hand-picked handful of keys (vendor, model, label, category, capabilities, interfaces) and dropped the rest. Two rules read the rest: * the optical budget reads `spec.splitRatio` / `spec.ponClass` — a 1:32 splitter came back splitting nothing, so the path lost its 17.5 dB and the budget check went quiet; * `isPassiveTap()` reads `spec.passive` — a passive tap came back as a box that learns MAC addresses. ### What should be true 1. a saved board keeps the spec facts its rules read: `splitRatio`, `insertionLossDb`, `channelCount`/`channelPlan`, `passive`, `ponClass`; 2. an over-budget run in a document is reported by the board sweep as an **error**, with the identical sentence the connect door refuses with (same path loss, same budget, same splitter cost); 3. a run inside the budget stays clean; 4. the door is live on a reopened board — a *new* over-budget run drawn after load is refused again; 5. documents written before this rule still open, with nothing to report and no wrong facts invented; 6. the document does not grow: ports stay in the port list, catalogue prose (`description`, `notes`, `sourceUrl`) stays out of the file. Fix: `Device.serialize()` writes the spec minus the keys the document already carries elsewhere, and `fromJSON` merges that record underneath the document's own identity and ports. `test/spec-survives-load.test.js`, 32 checks. Reverting `engine/device.js` + `engine/topology.js` fails 14. Neighbours green: `pon-splitter` 33, `hybrid-cord-use` 64, `cable-length` 22, `flows-survive-save-load` 16, `state-payload-complete` 16, `port-roundtrip` 32, `config-roundtrip` 46, `engine` 12, `acl-data` 21.
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#1459
No description provided.