acdream/tests/AcDream.Core.Net.Tests/Transport
Erik 7e9134b4d1 test(net): N0 - ACE-behaviour double, virtual clock, lossy link
Campaign N slice N0 (docs/plans/2026-07-29-network-transport-campaign.md):
the referee that slices N1-N5 are graded against, test-project only, zero
production changes.

- VirtualClock: Stopwatch-shaped deterministic time source (fixed 100 ns
  ticks) that N1 will inject behind the production TransportClock.
- AceCryptoModel: verbatim port of ACE CryptoSystem Search/ConsumeKey over
  our IsaacRandom - 256-key window, parked-key set, Headroom/OrphanCount
  diagnostics (CryptoSystem.cs:8-49 cited per method).
- AceSessionModel: transport-free ACE NetworkSession over raw datagrams,
  every rule cited to NetworkSession.cs - CRC-before-everything silent
  drop, cleartext-NAK early return (no timeout refresh, :283-308),
  60 s timeout refresh (:329-331), exact-equality ack dedup exemption
  (:342-347), desired+2 NAK trigger with 1 s limit (:351-363), >window
  AbnormalSequenceReceived (:393-397), the :474-476 watermark hole,
  ack-value cache prune (:663-673), fragment gate (:532-543), seq>=2
  caching (:730), Retransmission-flag resends with the ORIGINAL IssacXor
  (:675-686), RejectRetransmit, 2 s cleartext cumulative ack, 20 s
  TimeSync, EchoResponse, 120 s cache prune (:251-262). ACE's raw
  wrap-unsafe comparisons are modeled bug-for-bug, not fixed.
- LossyLink: deterministic drop/reorder/seeded-loss fault injector, pure
  data structure.
- FakeAceTransport: IWorldSessionTransport binding a REAL WorldSession to
  the model through the link, with the handshake scripted (ConnectRequest
  reusing the negotiation fixture layout, CharacterList, ServerReady,
  logoff confirmation) - genuine Connect/EnterWorld/Tick/Dispose with no
  sockets.
- 19 new tests pin the double, including
  CleartextNonAckAdvancesWatermark_TheAceHole (the self-induced wedge
  behind scope rows TS-57/TS-58/AP-125), re-key = permanent orphan,
  unrequested-resend window burn, the 115-id NAK cap boundary, and a
  full no-socket session lifecycle with both ISAAC streams verified
  aligned end-to-end.

Core.Net suite: 678 passed / 0 failed (659 existing + 19 new).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 11:07:13 +02:00
..
AceCryptoModel.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00
AceSessionModel.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00
AceSessionModelTests.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00
FakeAceTransport.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00
FakeAceTransportTests.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00
LossyLink.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00
VirtualClock.cs test(net): N0 - ACE-behaviour double, virtual clock, lossy link 2026-07-29 11:07:13 +02:00