Skip to content

Add a simulated network#2

Merged
dhruvl merged 9 commits into
mainfrom
sim-network
Jul 16, 2026
Merged

Add a simulated network#2
dhruvl merged 9 commits into
mainfrom
sim-network

Conversation

@dhruvl

@dhruvl dhruvl commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Adds an in-memory network to the simulation, so real asyncio networking code runs unmodified on SimLoop with seeded, replayable faults:

  • host registry with per-host task pinning, addresses resolved inside the sim
  • datagram endpoints over a packet core with seeded drop / duplication / reordering / latency per link
  • stream connections behind the standard asyncio streams API (open_connection / start_server), including backpressure and half-close
  • network partitions that hold traffic until healed, and host crash injection that tears down the crashed host's open connections without emitting resets
  • close_clients / abort_clients on simulated servers, matching 3.13 stdlib semantics
  • replay stability proven for network workloads: byte-identical traces across 100 reruns per seed and across processes under varying PYTHONHASHSEED
  • docs: the simulated network and the updated supported-API page

82 tests green on 3.12 and 3.13, zero warnings, mypy strict clean on both.

@dhruvl
dhruvl merged commit 24c3974 into main Jul 16, 2026
4 checks passed
@dhruvl
dhruvl deleted the sim-network branch July 18, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant