fix(chat): CH3 review fixes — phantom UN-9, allegiance-broadcast echo, /a legacy fallback
Applies the Opus review of Campaign CH slice CH3 (614a1e05):
- B1: UN-9 was a phantom divergence — ACE's CharacterOptions1.cs:47
OR-sum is 0x50C4A54A (its own comment confirms 1355064650), identical
to acdream's literal. The wrong 0x50C48D4A existed only in the research
doc. Row deleted, register §5 reverted to 4 rows, research doc corrected
with dated notes.
- S1/S4: AllegianceBroadcast (0x02000000) is a server-echoing channel —
ACE's GameActionChatChannel handler includes the sender in its real-name
Allegiance.Members broadcast (retail's DoAllegianceBroadcast has no
AddTextToScroll), so the client must skip its local optimistic echo, not
keep it. ChatChannelInfo.Legacy.IsSelfEchoChannel() now returns true for
it; RouteLegacyChannel's comment corrected; Turbine.IsSelfEchoChannel()'s
backwards comment rewritten truthfully.
- S3: retail's /a stays on the legacy AllegianceBroadcast bitflag until
StartupTurbineChatSystem successfully starts Turbine chat — "never
started" (TurbineChatState.Enabled == false) now falls back to legacy in
both LiveSessionCommandRouter.RouteChat and
DirectGameRuntimeCommandAdapter.TrySendChannel, while "enabled but no
allegiance room" still correctly refuses locally.
- S5: added a LiveSessionEventRouter test proving the Options.Replace ->
OnCharacterOptionsChanged seeding order, and RuntimeSettingsTargets /
GameWindowLiveSessionOwnershipTests tests proving the concrete
ICommandBus.Publish wiring and the single LiveSessionCommandSurface
construction site.
- S6: AP-181 rewritten to name both of retail's omitted pre-send checks
(IsMessageSafe silent-drop, then IsMessageSpam) and stop misattributing
either to RouteLegacyChannel, which has no such gates.
- N1-N7: CharacterOptionId moved below SocialActions so its doc comment
re-attaches; TurbineChatMembershipGate reuses TurbineChatDisplayNames
instead of a duplicate table; the gate-to-refusal-text mapping is now
shared via TurbineChatMembershipGate.ResolveRefusalText instead of
duplicated in both hosts; ChatSettings.Default now matches ACE's real
CharacterOptions2.Default (Roleplay/Society start off); a doc-comment
clarifies only the five Hear toggles are server-backed; the register's
§3 header recounted 129 -> 128.
Suite: 11,964 passed / 4 skipped / 0 failed (baseline 11,957/4/0 + 7 new
tests). Campaign ledger CH3 review column updated to APPROVE-WITH-FIXES.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
d3f1c21835
commit
e07fba5731
21 changed files with 582 additions and 153 deletions
|
|
@ -33,9 +33,14 @@ public enum ChatChannelSource
|
|||
/// echoes the client's own outgoing messages back on this channel
|
||||
/// (so the client should suppress its optimistic local echo). Per
|
||||
/// holtburger's predicate at <c>chat.rs::is_self_echo_channel</c>
|
||||
/// (lines 492-507) this is true ONLY for the legacy fellowship/vassals/
|
||||
/// patron/monarch/co-vassals channels — server resends those with
|
||||
/// empty sender. Turbine and tells do not echo.
|
||||
/// (lines 492-507) this is true for the legacy fellowship/vassals/
|
||||
/// patron/monarch/co-vassals channels — server resends those with an
|
||||
/// empty sender. S1 (CH3 Opus review, 2026-08-09) added
|
||||
/// AllegianceBroadcast to this same group: ACE's GameActionChatChannel
|
||||
/// handler includes the sender as an ordinary member of its real-name
|
||||
/// broadcast — a different mechanism from the other five's empty-sender
|
||||
/// resend, but the same consequence for the client (suppress the local
|
||||
/// echo). Turbine and tells do not echo.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Source)
|
||||
|
|
@ -47,17 +52,22 @@ public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Sou
|
|||
public override bool IsSelfEchoChannel()
|
||||
{
|
||||
// Per holtburger: the legacy fellowship + allegiance-tree
|
||||
// channels are the ones the server echoes back to the sender
|
||||
// with an empty sender field. Bitflag values from
|
||||
// channels are the ones the server echoes back to the sender.
|
||||
// Bitflag values from
|
||||
// references/holtburger/.../messages/chat/types.rs::ChatChannel.
|
||||
//
|
||||
// CH3 (2026-08-09, research doc §3.7/§5.4): AllegianceBroadcast
|
||||
// (0x02000000) deliberately falls to the `false` default below —
|
||||
// ACE's GameActionChatChannel handler includes the sender in the
|
||||
// normal real-name member broadcast for that channel (no
|
||||
// separate "" -sender echo the way Fellow/Vassals/Patron/
|
||||
// Monarch/CoVassals get), so the client must keep its own local
|
||||
// optimistic echo or the sender never sees their own line.
|
||||
// S1 (CH3 Opus review, 2026-08-09) — corrects the original CH3
|
||||
// filing at research doc §3.7/§5.4: AllegianceBroadcast
|
||||
// (0x02000000) belongs in the `true` group below, NOT the
|
||||
// `false` default. ACE's GameActionChatChannel handler iterates
|
||||
// player.Allegiance.Members, and the sender IS a member, so
|
||||
// they receive their own line back with their REAL name — a
|
||||
// different mechanism from Fellow/Vassals/Patron/Monarch/
|
||||
// CoVassals' separate ""-sender resend, but the same
|
||||
// consequence: keeping a local optimistic echo double-prints.
|
||||
// Retail agrees: ClientCommunicationSystem::DoAllegianceBroadcast
|
||||
// @0x005761F0 calls Event_ChannelBroadcast(0x2000000, &text)
|
||||
// with no AddTextToScroll of its own.
|
||||
return ChannelId switch
|
||||
{
|
||||
0x00000800u => true, // Fellow
|
||||
|
|
@ -65,6 +75,7 @@ public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Sou
|
|||
0x00002000u => true, // Patron
|
||||
0x00004000u => true, // Monarch
|
||||
0x01000000u => true, // CoVassals
|
||||
0x02000000u => true, // AllegianceBroadcast
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
|
@ -86,9 +97,20 @@ public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Sou
|
|||
{
|
||||
public override bool IsSelfEchoChannel()
|
||||
{
|
||||
// Turbine rooms do NOT echo the sender's own messages back.
|
||||
// The client must emit its own optimistic local echo to give
|
||||
// the player feedback that the message was sent.
|
||||
// S4 (CH3 Opus review, 2026-08-09): the comment this replaced
|
||||
// was wrong in both directions. ACE's TurbineChatHandler
|
||||
// resends via GetAllOnline() WITH the sender included — there
|
||||
// is no sender exclusion, so the sender's own outgoing line
|
||||
// comes back through the SAME broadcast every other member
|
||||
// gets. Retail's SendTurbineChat @0x0057db10 emits no local
|
||||
// AddTextToScroll on success either way. Production correctly
|
||||
// shows no local optimistic echo for Turbine channels, but NOT
|
||||
// because of this return value — RouteTurbineChat
|
||||
// (LiveSessionCommandRouter / DirectGameRuntimeCommandAdapter)
|
||||
// never calls OnSelfSent for a Turbine send at all, so this
|
||||
// method is currently unread for the Turbine variant (only
|
||||
// Legacy.IsSelfEchoChannel() has a caller). Kept `false` here
|
||||
// since no caller depends on the value either way.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue