acdream/tests/AcDream.Core.Net.Tests/Packets
Erik f9c5e47e7f feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction
Campaign N Slice N6, the final implementation slice.

ConnectResponse handshake retransmit:
- While the connection is unconfirmed, the Connect character-list pump
  resends the IDENTICAL cleartext ConnectResponse (same sequence 1, same
  cookie, the one encoded datagram - no new outbound state) on retail's
  strict 0.333333333 s gate. Retail: ClientNet::ProcessConnection
  @ 0x00545450, case cs_ConnectionRequestAcked @ 0x0054547B (the constant
  load at 0x00545481; the mask-0x41 strictly-greater x87 test at
  0x0054548C); ClientNet::SendConnectAck @ 0x005440F0 re-stamps
  lastSentHandshake_ (0x00544102) and rebuilds the same cookie packet.
- Confirmation = the first checksum-valid post-negotiation packet whose
  header lacks the ConnectRequest flag: retail's cs_ConnectionRequestAcked
  -> cs_Connected edge (ClientNet::ProcessPacket @ 0x00545100, the 0x40000
  exclusion at 0x0054514E, SetConnectionState(..., 5) at 0x00545160).
- The cadence rides the TransportClock (virtual-clock testable through
  TransportClockSource); the Connect deadline stays wall-clock.
- ACE safety pinned against the N0 model: a duplicate while still
  AuthConnectResponse re-routes idempotently through NetworkManager's
  pre-route; after acceptance CheckState clause 2 drops it pre-CRC at
  zero keystream cost.
- Pre-N6, one lost ConnectResponse was a hang to the Connect deadline;
  the N5 decorator deliberately arms after this window, so nothing
  covered it.

FragmentAssembler eviction (divergence register row AD-52):
- Partials evict 60 s after their last ACCEPTED fragment; the stamp
  refreshes on every new fragment (retail's re-stamp rule,
  ArrivedEphInfo::UpdateNetBlobID @ 0x0054AE00), so a merely-slow partial
  can never age out - 60 s is a floor, not a tunable. Swept from
  ReliableTransport.Sweep on retail's 5 s flush cadence
  (Indicator::FlushTimedOutEphInfo @ 0x0054A3D0, the gate at 0x0054A3DC;
  per-entry ArrivedEphInfo::fTimedOut @ 0x0054AE30). N4's RejectRetransmit
  abandonment made an unrecoverable partial a REACHABLE permanent state;
  the TTL reclaims it.
- A 64-entry completed-sequence ring drops late duplicate fragments of
  already-completed messages instead of allocating a fresh partial that
  can never complete (the completed-then-duplicate leak).

Fold-ins:
- N5 review LOW-5: NetProbeTests + LossyTransportDecoratorTests (the
  static NetDiagnostics / Console.SetOut mutators) share one
  DisableParallelization xunit collection so they never run alongside
  classes constructing WorldSession.
- Campaign section 9: N6 ledger row recorded; N5 row verified carrying
  4e290f00.

Gates: 757 Core.Net Release tests green (10 new); full solution Release
green (0 failures / 5 skips); connected lifecycle gate PASS; the
N5-strengthened connected loss gate PASS on its first live run (2%/seed 1:
dropped out=3 in=10, resends=1 nak-in=1 nak-out=5, cksum-fail=0
sanity-drop=0 uncached-nak=0).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 17:20:12 +02:00
..
BorrowedPacketCodecTests.cs feat(net): N2 - inbound sequence-aligned ISAAC + NAK set 2026-07-29 13:10:20 +02:00
ConnectRequestTests.cs feat(net): live ACE handshake verified — ConnectRequest received and parsed (Phase 4.6a/b/c/d) 2026-04-11 14:46:19 +02:00
FragmentAssemblerTests.cs feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction 2026-07-29 17:20:12 +02:00
LoginRequestTests.cs feat(net): PacketWriter + LoginRequest payload builder (Phase 4.5a/b) 2026-04-11 14:36:39 +02:00
MessageFragmentHeaderTests.cs feat(net): message fragment header + fragment + assembler (Phase 4.3) 2026-04-11 14:20:53 +02:00
MessageFragmentTests.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
PacketCodecEncodeTests.cs perf(net): frame recurring sends in place 2026-07-25 06:02:52 +02:00
PacketCodecTests.cs feat(net): PacketHeaderOptional + full packet decode + CRC verify (Phase 4.4) 2026-04-11 14:24:29 +02:00
PacketHeaderFlagsConformanceTests.cs test(net): pin the transport flag word against ACE, all twenty-three bits 2026-07-29 01:54:56 +02:00
PacketHeaderTests.cs feat(net): PacketHeader + PacketHeaderFlags + Hash32 checksum (Phase 4.2) 2026-04-11 14:17:37 +02:00
PacketWriterTests.cs feat(net): PacketWriter + LoginRequest payload builder (Phase 4.5a/b) 2026-04-11 14:36:39 +02:00
TransportDisconnectTests.cs fix(net): honor retail graceful logout handshake 2026-07-20 23:31:23 +02:00