docs: add Replay Testing section to CLAUDE.md
Browse filesCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLAUDE.md
CHANGED
|
@@ -44,6 +44,28 @@ cp target/i686-pc-windows-msvc/release/openwa_validator.dll "I:/games/SteamLibra
|
|
| 44 |
|
| 45 |
WormKit auto-loads any `wk*.dll` from the game directory. Logs appear in the game directory as `OpenWA.log` and `OpenWA_validation.log`.
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
## Crate Architecture
|
| 48 |
|
| 49 |
- **`openwa-types`** — Enums, structs, addresses, parsers (no_std compatible). The source of truth for all reverse-engineered type layouts and known addresses (`address.rs`). No game dependency.
|
|
|
|
| 44 |
|
| 45 |
WormKit auto-loads any `wk*.dll` from the game directory. Logs appear in the game directory as `OpenWA.log` and `OpenWA_validation.log`.
|
| 46 |
|
| 47 |
+
## Replay Testing
|
| 48 |
+
|
| 49 |
+
Use the `/replay-test` skill to automatically build, deploy, launch WA.exe with a replay file, capture validation logs, and present results. This is the fastest way to validate struct layouts, hooks, and game state against live WA.exe.
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
# Manual invocation (skill runs this automatically):
|
| 53 |
+
powershell -ExecutionPolicy Bypass -File replay-test.ps1
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
How it works:
|
| 57 |
+
1. `replay-test.ps1` builds both DLLs, deploys to game dir, sets `OPENWA_REPLAY_TEST=1`, launches `WA.exe` minimized with a replay file
|
| 58 |
+
2. The validator DLL detects the env var and enters **auto-capture mode**: waits 5s, runs all validation + dumps, then calls `ExitProcess(0)`
|
| 59 |
+
3. Script copies logs to `testdata/logs/` and prints a PASS/FAIL summary
|
| 60 |
+
|
| 61 |
+
Key paths:
|
| 62 |
+
- Replay files: `testdata/replays/*.WAgame`
|
| 63 |
+
- Captured logs: `testdata/logs/` (gitignored, `validation_latest.log` / `openwa_latest.log`)
|
| 64 |
+
- Script: `replay-test.ps1`
|
| 65 |
+
- Skill: `.claude/skills/replay-test/SKILL.md`
|
| 66 |
+
|
| 67 |
+
Without `OPENWA_REPLAY_TEST`, the validator runs in interactive mode with hotkeys (F9=team blocks, F10=landscape) and timed dumps.
|
| 68 |
+
|
| 69 |
## Crate Architecture
|
| 70 |
|
| 71 |
- **`openwa-types`** — Enums, structs, addresses, parsers (no_std compatible). The source of truth for all reverse-engineered type layouts and known addresses (`address.rs`). No game dependency.
|