From c84891e75d95d25dda40002fea7c6e1b8f082154 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Sat, 30 May 2026 08:43:06 +0200 Subject: [PATCH] docs(selftest): add binding render-path selftest standard --- HellionChat/SelfTests/README.md | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 HellionChat/SelfTests/README.md diff --git a/HellionChat/SelfTests/README.md b/HellionChat/SelfTests/README.md new file mode 100644 index 0000000..e499afb --- /dev/null +++ b/HellionChat/SelfTests/README.md @@ -0,0 +1,48 @@ +# HellionChat SelfTest Standard + +These steps run in-game via `/xlperf`. They are HellionChat's real test layer: +Dalamud-coupled classes cannot be instantiated in an xUnit AppDomain, so the +honest verification path is the running plugin, not a headless harness. + +## The render-path rule (binding for every step) + +A SelfTest exists to catch a broken **runtime** path. To do that it MUST: + +1. **ENTRY = the real runtime entry the game calls** per frame or on the real + action — `HonorificHeader.Draw`, `ChunkRenderer.DrawChunks`, + `InputBar.TrySend`, `Sidebar.Draw`, `MessageList.Draw`, + `Lender.Borrow()`. NEVER a helper only the test calls. +2. **ASSERT observable state produced _through_ that entry** — a rendered or + suppressed slot, a set flag, a held vs. sent message. Do NOT re-implement the + helper's logic inside the test and assert against your own copy. +3. **Wire first.** Where the real path does not yet call the correct helper, + wiring it is part of the restoration work; the SelfTest verifies only after. + +## Reviewer trick (run before trusting any step) + +For every helper a step calls: + +```bash +grep -rn '' HellionChat/ | grep -v SelfTests | grep -v Tests +``` + +Zero non-test callers = false-green suspect. The step is passing on dead code. + +## The hard gate + +Green steps + clean build + clean csharpier are NOT sufficient. In-game smoke +(Linux/Wine, via `/xlperf`) is the true gate. Where headless cannot honestly +verify (scroll state, real send, atlas rebuild, warm object pools), mark the +step explicitly as smoke-only instead of faking a headless pass. + +## Anti-pattern of record + +`HonorificService.ShouldRenderSlot` had zero production callers and was green +only because the test called it directly — a test passing on a path the game +never runs. That is the failure this standard prevents. + +## Step classification + +The current real-path / helper-only / mixed classification of every registered +step (with false-green suspects flagged) lives in the Obsidian vault: +`Projekte/FFXIV/Hellion Chat/Audits/HellionChat SelfTest-Klassifikation 2026-05-29.md`.