fix(chat): consolidated-review fixes — retail /help Detail extraction, seam wiring test
SHOULD-FIX 1: RetailClientCommandCatalog's ~45 catalog leaf verbs were showing acdream-authored Summary text for /help <verb> instead of retail's own Detail_HelpType(2) text. Byte-swept every Help* handler against the PDB-paired acclient.exe (verified MATCH), confirmed each Detail/Summary branch by reading the actual decompiled if/else shape (address order and string length both proved unreliable alone), and fixed a sweep_weenie_strings.py 800-char truncation bug that silently dropped several longer Detail branches. Resolved every ambiguous CmdHashData-registered verb (hor/hr/hom/hoa/alh/ah/friends_add/ friends_remove/squelch/unsquelch) by reading for Binary Ninja's nullptr-4th-arg decompiler artifact instead of trusting it. Coverage: 42 of 47 distinct catalog Definitions verbatim-extracted, 4 confirmed-null (index/clist/on/off register with a genuinely null help pointer — DoHelp falls to UnknownCommand for these, now reproduced), 1 honest UNVERIFIED (messagetypes builds its text from a runtime enum table, not a static string). ChatCommandRouter now prefers retail Detail text over the catalog summary; RetailCommandHelpTable's class doc no longer overclaims its own scope. SHOULD-FIX 2: extracted the a5a7eb4f-class OnInterfaceText wiring into a testable CreateChatViewModel method and added ComposedChatViewModelWiresOnInterfaceTextToSpewBox, which the prior FakeFactory-based test suite could never exercise. SHOULD-FIX 3: retires register row AP-113. DoLifestone/DoMarketplace print their own 0x1A refusal text (byte-recovered, UTF-16LE) instead of falling through to the generic 0x26 fallback; ChatCommandRouter's comment corrected to state the fallback's real scope. SHOULD-FIX 4: corrected the divergence register's stale AP section header sentence about AP-190's opacity default (refuted bycc582899). NITs: (a) HeadlessStaticStateAudit routes through the injected HeadlessDiagnosticWriter instead of Console.WriteLine; (b) a bounded 300-pump liveness diagnostic on the IsQuiescent conductor gate (no retry, no behavior change); (c) fixed the #365 hydration test's doc comment contradiction against diagnosis §8; (d) the 0x26 fallback dispatches on WeenieErrorMessages' own Type instead of hardcoding ClientLocal. Full Release suite: 12,553 passed / 4 skipped / 0 failed (baseline03404b71: 12,542/4/0; net +11 tests, zero regressions). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
03404b7121
commit
f7a6f46ba0
15 changed files with 947 additions and 85 deletions
|
|
@ -93,20 +93,23 @@ public class ChatCommandRouterTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void LifestoneWithArguments_ShowsRetailBadArgsRefusal_ViaInterfaceTextSeam()
|
||||
public void LifestoneWithArguments_ShowsRetailsBespokeRefusal_ViaInterfaceTextSeam()
|
||||
{
|
||||
// #363 / register row AP-183: a Definition with no bespoke
|
||||
// InvalidArgumentsText falls to retail's own generic bad-args
|
||||
// fallback (HandleFailureEvent(0x26), "That is not a valid
|
||||
// command.") at 0x1A ClientLocal — never the acdream-invented
|
||||
// "Usage: /lifestone" line this used to synthesize.
|
||||
// Consolidated-review round (2026-08-10), SHOULD-FIX 3: retires
|
||||
// register row AP-113. DoLifestone prints ITS OWN 0x1A string for
|
||||
// bad args and returns 1 -- retail never reaches the generic
|
||||
// HandleFailureEvent(0x26) fallback for it. Byte-recovered from the
|
||||
// PDB-paired acclient.exe (Binary Ninja mis-attributes the literal
|
||||
// to an unrelated vtable-slot symbol).
|
||||
var (vm, log, bus, interfaceTexts) = FixtureWithInterfaceSink();
|
||||
|
||||
var outcome = ChatCommandRouter.Submit("/ls now", vm, bus, ChatChannelKind.Say);
|
||||
|
||||
Assert.Equal(SubmitOutcome.ClientHandled, outcome);
|
||||
Assert.Empty(bus.Published);
|
||||
Assert.Equal("That is not a valid command.", Assert.Single(interfaceTexts));
|
||||
Assert.Equal(
|
||||
"Please see @help lifestone for more information on how to use this command.",
|
||||
Assert.Single(interfaceTexts));
|
||||
Assert.Empty(log.Snapshot());
|
||||
}
|
||||
|
||||
|
|
@ -122,10 +125,51 @@ public class ChatCommandRouterTests
|
|||
|
||||
Assert.Equal(SubmitOutcome.ClientHandled, outcome);
|
||||
var entry = Assert.Single(log.Snapshot());
|
||||
Assert.Equal("That is not a valid command.", entry.Text);
|
||||
Assert.Equal(
|
||||
"Please see @help lifestone for more information on how to use this command.",
|
||||
entry.Text);
|
||||
Assert.Equal((uint)RetailLogTextType.ClientLocal, entry.LogTextType);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PkArenaWithArguments_ShowsRetailsGenericBadArgsFallback_ViaInterfaceTextSeam()
|
||||
{
|
||||
// #363 / register row AP-183: a Definition with no bespoke
|
||||
// InvalidArgumentsText (PkArena never had one, unlike Lifestone/
|
||||
// Marketplace above) falls to retail's own generic bad-args
|
||||
// fallback (HandleFailureEvent(0x26), "That is not a valid
|
||||
// command.") at 0x1A ClientLocal -- never the acdream-invented
|
||||
// "Usage: /pkarena" line this used to synthesize. Carries the
|
||||
// generic-fallback coverage the two Lifestone tests above used to
|
||||
// own before Lifestone got its own bespoke text.
|
||||
var (vm, log, bus, interfaceTexts) = FixtureWithInterfaceSink();
|
||||
|
||||
var outcome = ChatCommandRouter.Submit("/pka now", vm, bus, ChatChannelKind.Say);
|
||||
|
||||
Assert.Equal(SubmitOutcome.ClientHandled, outcome);
|
||||
Assert.Empty(bus.Published);
|
||||
Assert.Equal("That is not a valid command.", Assert.Single(interfaceTexts));
|
||||
Assert.Empty(log.Snapshot());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MarketplaceWithArguments_ShowsRetailsBespokeRefusal_ViaInterfaceTextSeam()
|
||||
{
|
||||
// Same methodology and same vtable-mislabeling artifact as
|
||||
// Lifestone above -- see RetailClientCommandCatalog.Marketplace's
|
||||
// own citation.
|
||||
var (vm, log, bus, interfaceTexts) = FixtureWithInterfaceSink();
|
||||
|
||||
var outcome = ChatCommandRouter.Submit("/mar now", vm, bus, ChatChannelKind.Say);
|
||||
|
||||
Assert.Equal(SubmitOutcome.ClientHandled, outcome);
|
||||
Assert.Empty(bus.Published);
|
||||
Assert.Equal(
|
||||
"Please see @help marketplace for more information on how to use this command.",
|
||||
Assert.Single(interfaceTexts));
|
||||
Assert.Empty(log.Snapshot());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PkLiteAlias_ResolvesAsClientHandled_NotTheServerTextPath()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue