fix #436: combat no-target refusal reaches the SpewBox with retail's exact text

Attacking with no valid target has told the player nothing since Campaign V
slice V11 orphaned the DebugVM toast the message was wired to (#434 found
the drop; this closes it retail-faithfully).

Ground truth from the Ghidra decompile of
ClientCombatSystem::ExecuteAttack (0x0056bb70): retail writes
"You must select a valid combat target before attacking" via
ClientSystem::AddTextToScroll(..., 0x1A, true, 0) — the ClientLocal
SpewBox channel this codebase already routes every other client-local
refusal through. And retail has ONE message, not the two we carried:
attacking outside melee/missile modes is silent (ExecuteAttack is
unreachable there), so the invented "Enter melee or missile combat first"
text is deleted rather than rerouted, and the invented "No monster
target" is replaced by the retail string, which joins ClientTextRefusals
with its decomp citation.

Wiring: CombatFeedbackSlot gains the sibling BindOwned session-lifetime
shape, and SessionPlayerComposition.CompleteSessionPlayer binds it to
RuntimeCommunicationState.AddText(ClientLocal) with session-owned
teardown — a torn-down session's slot returns to its silent unbound
state. A binding-seam test
(CompleteSessionPlayerBindsCombatFeedbackToTheClientLocalSpewBoxRoute)
inspects the compiled composition for the BindOwned call and its
AddText-routing lambda, so the slot can never again pass its unit tests
while production leaves it unbound — the exact failure mode that hid
this defect. The two tests that pinned the invented strings now pin the
retail contract (exact string; silence for the unsupported-mode case).

Full hermetic suite 15,325 passed / 0 failed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-24 12:53:11 +02:00
parent 7969a20c8c
commit 35454a9f58
7 changed files with 157 additions and 19 deletions

View file

@ -138,9 +138,29 @@ id list), so deletion order matters.
---
## #436 — Combat refusal text ("No monster target") is silently dropped
## #436 CLOSED: Combat refusal text ("No monster target") is silently dropped
**Status:** OPEN
**Status:** CLOSED 2026-08-24, retail-faithfully. Ghidra decompile of
`ClientCombatSystem::ExecuteAttack` (0x0056bb70) settled both open
questions: (1) retail's exact string is **"You must select a valid combat
target before attacking"**, routed via
`ClientSystem::AddTextToScroll(..., 0x1A, true, 0)` — the ClientLocal
SpewBox channel our chat pipeline already owns; (2) retail has ONE message,
not two — attacking while not in melee/missile mode is silent (that path is
unreachable in retail's dispatch), so the invented "Enter melee or missile
combat first" text is deleted rather than rerouted. Implementation: the
string joined `ClientTextRefusals` with its decomp citation;
`CombatFeedbackSlot` gained the sibling `BindOwned` session-lifetime shape;
`SessionPlayerComposition.CompleteSessionPlayer` binds it to
`RuntimeCommunicationState.AddText(ClientLocal)` with session-owned
teardown. Coverage includes a binding-seam test
(`CompleteSessionPlayerBindsCombatFeedbackToTheClientLocalSpewBoxRoute`)
so the slot can never again pass its unit tests while production leaves it
unbound — the exact failure mode that hid this for months.
**Original report follows.**
**Status (original):** OPEN
**Severity:** MEDIUM (missing user feedback on a common action)
**Filed:** 2026-08-24 (exposed by #434's dead-code removal)
**Component:** combat / chat presentation