plan: one question, one answer � a flow verdict and the state it reads (#1518) #1614

Merged
jaylouisw merged 1 commit from plan/1116-0610 into main 2026-11-16 06:17:26 +00:00
Owner

Forward plan only, no code. docs/plans/flow-determinism.md.

What I measured on bfc4f2ea

#1518 claims the first openFlow on a fresh topology always fails E_UNREACHABLE. I could not reproduce it: 13 shapes (plain L2, two switches with VLAN 10, routed, router-on-a-stick, switch SVI, DHCP client, UDP, LAG, serialize/fromJSON round trip, three identical rebuilds) all returned ok: true on their first flow.

What does reproduce, on the same board, asked the same question:

  • SRV port shut: ping says peer port shut (d2 Fa0/2) (dropped by d3); openFlow says E_UNREACHABLE / no response from 10.0.0.80:80 while its own timeline shows the shut port. _flowFailure() (simulator.js:3764) does not use the ranked _lastDiscard() (simulator.js:2922) that #1431/#1445 gave ping.
  • After a live ping on a settled lab, dev.arpSeenAt is empty and every macTable entry is atMs: null, because _nowMs() (simulator.js:4275) returns null when runAtMs is Infinity � the default. So the 300 s / 4 h TTLs that docs/SIMULATION.md:69-74 advertises never fire.

Plan

Five steps, one PR each: a determinism suite (S), a flow that reports the ranked reason (S), dating what was learned (M, needs Jay on which clock), openFlow({atMs}) (S, needs Jay on the API field), and � only if a divergence survives � moving run state onto the Simulator (L, would move docs/SIMULATION.md:66 with it).

Closes #1518 via steps 1-3. Deliberately out: the /reset table-clear omission, server-exposure work, ping wording already in flight.

Forward plan only, no code. `docs/plans/flow-determinism.md`. ## What I measured on bfc4f2ea #1518 claims the first `openFlow` on a fresh topology always fails `E_UNREACHABLE`. I could not reproduce it: 13 shapes (plain L2, two switches with VLAN 10, routed, router-on-a-stick, switch SVI, DHCP client, UDP, LAG, serialize/fromJSON round trip, three identical rebuilds) all returned `ok: true` on their first flow. What does reproduce, on the same board, asked the same question: - SRV port shut: `ping` says `peer port shut (d2 Fa0/2) (dropped by d3)`; `openFlow` says `E_UNREACHABLE / no response from 10.0.0.80:80` while its own timeline shows the shut port. `_flowFailure()` (simulator.js:3764) does not use the ranked `_lastDiscard()` (simulator.js:2922) that #1431/#1445 gave ping. - After a live ping on a settled lab, `dev.arpSeenAt` is empty and every `macTable` entry is `atMs: null`, because `_nowMs()` (simulator.js:4275) returns null when `runAtMs` is Infinity � the default. So the 300 s / 4 h TTLs that docs/SIMULATION.md:69-74 advertises never fire. ## Plan Five steps, one PR each: a determinism suite (S), a flow that reports the ranked reason (S), dating what was learned (M, needs Jay on which clock), `openFlow({atMs})` (S, needs Jay on the API field), and � only if a divergence survives � moving run state onto the Simulator (L, would move docs/SIMULATION.md:66 with it). Closes #1518 via steps 1-3. Deliberately out: the `/reset` table-clear omission, server-exposure work, ping wording already in flight.
plan: a flow's verdict should not depend on what ran before it (#1518)
All checks were successful
CI / Classify the change (pull_request) Successful in 11s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 16s
CI / Server smoke test (pull_request) Successful in 49s
CI / Docker build (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Successful in 1m34s
CI / Test (Node 18) (pull_request) Successful in 1m43s
CI / Test (Node 22) (pull_request) Successful in 1m51s
859ad9d52f
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 06:17:18 +00:00
Sign in to join this conversation.
No reviewers
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!1614
No description provided.