acdream/tests/AcDream.Runtime.Tests/Session
Erik 544f8cb2d7 fix(CT): CT2 fix round — dedupe client-side title add, drop retail-inexact send guard
Opus dual-lens review of CT2 (bcfddc97) found 4 SHOULD-FIX + notes; this
applies the campaign lead's rulings.

F1 (the important one): retail's client-side table add is DEDUPED —
gmCharacterTitleUI::RecvNotice_AddCharacterTitle @0x0049a990 walks
mTitleList and returns without effect when the id is already present,
only inserting on a miss. The server-side SendNotice_AddCharacterTitle
broadcast is unconditional, but RuntimeCharacterTitleState.ApplyUpdateTitle
models the CLIENT receive side, so TitleAdded now fires only on a genuine
new membership. Inverted the pin:
ApplyUpdateTitle_AlreadyEarnedId_DoesNotFireTitleAddedOrBumpRevision.

F3: removed the send-side titleId==0 rejection from both command
adapters. Retail's own send path (Event_SetDisplayCharacterTitle
@0x006a5720) packs whatever id it is handed, and ACE accepts id 0
(CharacterTitle.Invalid is a defined enum value) — retail's real
protection is the UI ghost-when-current gate (CT3's job), not a
send-side rejection. No register row: this makes acdream MORE
retail-exact.

A2: ResetSession now publishes TableReplaced unconditionally and
DisplayTitleChanged when the display id was non-zero before the clear,
matching the LocalPlayerState.Clear() precedent (publish every category
even when Clear is repeated, so a failed reset can converge on retry).

A3: RuntimeCharacterState.CaptureOwnership reads the new non-allocating
Titles.Count instead of EarnedTitleIds.Count; EarnedTitleIds now carries
an XML warning that every read allocates.

A4/A5: ReplaceTable/ApplyUpdateTitle now mutate under one _gate hold with
change flags computed inside the lock and events raised after release;
every revision bump is gated on an actual state change (a no-op wire
resend produces zero revision edges), matching the change-gated
RuntimeMovementSkillState precedent. TableReplaced itself still fires
unconditionally per retail's own Refresh() dispatch on 0x0029.

A1/A6/A7/A8: CharacterTitleResolverLiveDatTests honors ACDREAM_DAT_DIR
first (CT1 fix-round pattern); documented the EmitResult
primaryObjectId-as-title-id precedent inline; corrected the "third
consumer" comment (CT1 §5 already records gmAttributeUI::PostInit's
icon-DID lookup — CT5 factors the shared GetDIDByEnum helper); added a
titleId -> resolved-string memo to CharacterTitleResolver, the DAT-static
equivalent of retail's lazy-hash cache on the string buffer.

Appended a "CT3 anchors from the CT2 review" list to the plan doc's CT2
ledger entry for CT3 to consume.

Build green. Runtime (102), Core.Net (12), and App (27 + 3 InstalledDat
pins under ACDREAM_RUN_INSTALLED_DAT_TESTS=1) title-scoped tests pass.
Full hermetic solution suite (Lane exclusions per the release gate) is
green: 0 failures across all 15 test projects.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 22:27:07 +02:00
..
DirectGameRuntimeCommandAdapterTests.cs fix(CT): CT2 fix round — dedupe client-side title add, drop retail-inexact send guard 2026-08-24 22:27:07 +02:00
LiveSessionControllerCharacterCreationTests.cs fix(chargen): Campaign CC CC7 review fix round — F1-F9 — REVIEW-CLOSED 2026-08-16 03:13:02 +02:00
LiveSessionControllerTests.cs feat(session): the in-world logoff — LogOut animation, reverse wormhole, live return to character select 2026-08-17 14:02:40 +02:00
LiveSessionEventRouterTests.cs feat(runtime) Campaign CA CA3 #431: live derived-stat recompute — a raise is visible without a relog 2026-08-24 13:46:00 +02:00
LiveSessionHostTests.cs feat(runtime): share chat commands and run login sequence 2026-08-14 20:27:45 +02:00
LiveSessionLifecycleHostTests.cs feat(app): Campaign CC slice CC4 — chargen screen shell + Heritage/Profession/Skills/Town pages 2026-08-15 17:45:51 +02:00
LiveSessionSubscriptionSetTests.cs refactor(runtime): move session lifetime and ordered transport 2026-07-25 19:39:24 +02:00
RuntimeAcceptedPositionDriveControllerTests.cs docs: Campaign LA — pinned launch-contract schema COMMITTED into plan LA1 2026-08-14 16:04:32 +02:00
RuntimeCharacterSelectionStateTests.cs fix(ui,net): Campaign LA gate round 2 — char-select exit confirmation, authored row justify, world name 2026-08-15 11:50:45 +02:00
RuntimeLiveEntitySessionControllerTests.cs fix(ui): night-round review — F2 HouseQuery fires at login, not tab-open 2026-08-17 04:28:46 +02:00
RuntimeLiveSessionNoWindowTests.cs docs: Campaign LA — pinned launch-contract schema COMMITTED into plan LA1 2026-08-14 16:04:32 +02:00
RuntimeRemotePlacementDriveControllerTests.cs fix(physics): C4 route 5 — projectile authoritative placement (#276 partial) 2026-08-04 21:03:41 +02:00
SessionStatusWriterTests.cs CC2 review fix round: latch scope narrowed, AD-100, creationFailed reason key 2026-08-15 13:10:24 +02:00
TurbineChatDisplayNamesTests.cs feat(chat): Campaign CH slice CH1 — retail LogTextType color table 2026-08-09 15:24:09 +02:00