acdream/tests/AcDream.App.Tests/Composition
Erik 35454a9f58 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>
2026-08-24 12:53:11 +02:00
..
AnimationHookRegistrationSetTests.cs refactor(app): compose live presentation startup 2026-07-22 17:55:15 +02:00
CompositionAcquisitionScopeTests.cs refactor(app): define ordered composition contract 2026-07-22 15:03:40 +02:00
ContentEffectsAudioCompositionTests.cs test: replace composition source freezes 2026-08-18 15:50:53 +02:00
FrameRootCompositionTests.cs test: replace composition source freezes 2026-08-18 15:50:53 +02:00
GameWindowCompositionPipelineTests.cs refactor(app): close ordered startup composition 2026-07-22 19:20:20 +02:00
GameWindowPlatformAcquisitionTests.cs refactor(app): define ordered composition contract 2026-07-22 15:03:40 +02:00
HostInputCameraCompositionTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
InteractionRetainedUiCompositionTests.cs fix(ui): restore retail vitals and window interactions 2026-08-20 13:26:35 +02:00
InteractionUiRuntimeSourcesTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
LivePresentationCompositionTests.cs test: replace composition source freezes 2026-08-18 15:50:53 +02:00
PreparedSetupResolverTests.cs perf(content): remove exception-driven setup probes 2026-07-24 15:12:21 +02:00
SessionPlayerCompositionTests.cs fix #436: combat no-target refusal reaches the SpewBox with retail's exact text 2026-08-24 12:53:11 +02:00
SessionStartCompositionTests.cs feat(runtime): define borrowed views commands and ordered events 2026-07-25 19:08:42 +02:00
SwapchainRecreateViewportTargetTests.cs fix #387: window resize never recreated the Vulkan swapchain (stretch) 2026-08-13 09:05:13 +02:00
TestGameWindowGraphics.cs feat(render): Vulkan campaign V11 step 2 — delete the OpenGL backend 2026-07-29 02:19:53 +02:00
WorldRenderCompositionTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00