acdream/tests/AcDream.Core.Net.Tests
Erik 6bedbc4772 feat(net): FA1 -- S->C parsers for fellowship/allegiance, confirmation triple, allegiance version gates
Campaign FA slice FA1: pure parse functions + typed records only,
UNWIRED (FA2 registers them against the new RuntimeFellowshipState/
RuntimeAllegianceState owners -- see docs/research/2026-08-11-fa-acdream-seams.md
§2).

Fellowship family (GameEvents.cs), field orders from lane B §3.8-§3.13,
guid-first on 0x02C0 per the resolved Chorizite disagreement:
FellowshipFullUpdate (0x02BE), FellowshipUpdateFellow (0x02C0),
FellowshipQuitNotice/FellowshipDismissNotice (S->C 0x00A3/0x00A4),
FellowshipDisband (0x02BF, empty body), and the dead
FellowshipFellowUpdateDone/FellowshipFellowStatsDone (0x01C9/0x01CA,
parse-and-ignore, must never fail per lane B §2.7). ShareLoot is modeled
as a raw uint (D5) -- ACE encodes it two incompatible ways (0x10 in full
updates, <<1 incremental), so `!= 0` is the only safe read, never `== 1`.

Confirmation triple (D6): grepping the tree showed 0x0274/0x0276 already
had typed parsers in Core.Net; 0x0275 (client-authored) already had a
byte-correct builder but no typed representation. Added the
ConfirmationType enum (1 SwearAllegiance, 4 Fellowship, matching retail's
Handle_Character__ConfirmationRequest switch and ACE's enum verbatim) and
ParseConfirmationResponse, completing Core.Net's typed coverage of all
three legs and round-tripping against the existing
ClientCommandRequests.BuildConfirmationResponse byte-for-byte.

Allegiance small events (GameEvents.cs): AllegianceLoginNotification
(0x027A), AllegianceUpdateDone (0x01C8), AllegianceUpdateAborted (0x0003,
declared but never sent by ACE).

The heavyweight AllegianceUpdate (0x0020) extends
ClientCommandResponses.ParseAllegianceInfoResponse (0x027C) rather than a
second parser, per lane C §7.2's explicit reuse verdict -- both messages
now share ReadAllegianceProfileBody, which the discriminating leading u32
(targetGuid vs rank) is read around. That shared reader implements:

- The ELEVEN AllegianceHierarchy::UnPack version gates (lane C §4.2) --
  officers/spokesperson-skip, officer titles, the four broadcast
  counters, motd/motdSetBy, chatRoomId, bind point, allegianceName,
  isLocked, approvedVassal, each behind its own oldVersion threshold.
  AllegianceProfileVersionGateTests.cs pins all eleven with a
  boundary-crossing pair per gate (N-1 OFF vs N ON), including the
  negative proof that version 5 (BannedCharactersAdded) gates nothing
  in UnPack.
- The §4.4 tree-assembly rules: a record whose treeParent is not already
  in the tree (orphan), equals its own id (self-parent), or duplicates an
  id already seen makes AllegianceHierarchy::Add fail, which the whole
  parse now mirrors by returning null for the ENTIRE message -- not a
  partial tree. Sibling order REVERSES on assembly (each new record is
  prepended to its parent's vassal list), so FindVassals now walks
  records in reverse wire order; both rules have dedicated tests.
- AllegianceMemberRecord gained the panel-needed columns lane C §7.2
  names (rank, level, loyalty, leadership, cpCached, cpTithed, gender,
  heritage, MayPassupExperience) with defaulted trailing parameters so
  existing 4-arg positional construction sites keep compiling. Officers/
  officer titles/bind point are read (so every later field lands at the
  right offset) but deliberately left unsurfaced -- ACE always zeroes/
  empties them anyway (lane C §5.1), and bind point is a 32-byte Position
  the retail chat renderer never uses either; a future panel slice can
  extend the record without re-deriving the parse.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 00:13:10 +02:00
..
Cryptography feat(net): PacketHeader + PacketHeaderFlags + Hash32 checksum (Phase 4.2) 2026-04-11 14:17:37 +02:00
Messages feat(net): FA1 -- S->C parsers for fellowship/allegiance, confirmation triple, allegiance version gates 2026-08-12 00:13:10 +02:00
Packets feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction 2026-07-29 17:20:12 +02:00
Transport feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction 2026-07-29 17:20:12 +02:00
AcDream.Core.Net.Tests.csproj feat(net): AcDream.Core.Net scaffold + ISAAC keystream (Phase 4.1) 2026-04-11 14:14:28 +02:00
CombatStateWiringTests.cs feat(inventory): port retail weapon switching 2026-07-12 23:06:31 +02:00
GameEventWiringTests.cs fix(runtime,net): OP1 re-review residuals R1/R2/R3 (coordinator pass) 2026-08-11 01:13:57 +02:00
LiveHandshakeTests.cs fix(net): conform character entry and session shutdown 2026-07-21 10:33:03 +02:00
NetClientTests.cs perf(net): own one pooled async receive 2026-07-25 05:50:18 +02:00
NetProbeTests.cs feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction 2026-07-29 17:20:12 +02:00
NetProcessStaticsCollection.cs feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction 2026-07-29 17:20:12 +02:00
ObjectTableWiringTests.cs fix(ui): preserve retail item titles and spacing 2026-07-24 05:21:01 +02:00
PlayerDescriptionParserTests.cs feat: port retail magic lifecycle and retained spell UI 2026-07-15 10:55:22 +02:00
PrivateUpdateVitalTests.cs feat(player): #5 PlayerDescription parser — Stam/Mana via attribute block 2026-04-25 16:42:24 +02:00
SubscriptionSetTests.cs refactor(net): own live session composition 2026-07-22 10:36:06 +02:00
WorldSessionChatTests.cs feat(chat): port retail's @pklite client command (EnterPkLite 0x028F) 2026-08-03 18:57:17 +02:00
WorldSessionCombatTests.cs feat(ui): finish retail toolbar controls 2026-07-11 12:11:53 +02:00
WorldSessionConstructionTests.cs perf(net): own one pooled async receive 2026-07-25 05:50:18 +02:00
WorldSessionInboundBudgetTests.cs fix(net): timeslice WorldSession.Tick inbound drain (#2 flood) 2026-06-22 15:39:50 +02:00
WorldSessionInventoryActionTests.cs fix #234: port retail appraisal floaty and inscriptions 2026-07-23 12:12:57 +02:00
WorldSessionLinkStatusTests.cs feat(ui): share indicator detail panels 2026-07-17 10:27:41 +02:00
WorldSessionNegotiationShutdownTests.cs fix(net): conform character entry and session shutdown 2026-07-21 10:33:03 +02:00
WorldSessionNetReceiveLoopResilienceTests.cs feat(net): N3 - AckNakScheduler, retail 2.0s cumulative ack replaces per-packet acks 2026-07-29 13:51:57 +02:00
WorldSessionRadarTests.cs fix(ui): preserve retail item titles and spacing 2026-07-24 05:21:01 +02:00
WorldSessionShutdownTests.cs fix(net): conform character entry and session shutdown 2026-07-21 10:33:03 +02:00
WorldSessionVendorTests.cs feat(vendor): Slice 6b/6c — move-to-use, buy staging, selling; the vendor arc is functionally complete 2026-08-08 11:43:11 +02:00
WorldSessionWiringOwnershipTests.cs refactor(net): own live session routing 2026-07-21 11:17:09 +02:00