Koder Web Test — `engines/sdk/koder_web_test`
Canonical headless-testing SDK for Koder web products (R1 fidelity contract per policies/headless-first.kmd).
Drives the real Kruze binary (Chrome as a logged fallback) headless over a dependency-free native CDP/WebSocket client, with programmatic input, consolenetworkpopup observation, golden assertions, and clock/RNG determinism. It is the policies/headless-first.kmd R2 mechanism for the Web surface; see registries/headless-coverage.md.
Role in the stack
| Area | Sector | Consumers |
|---|---|---|
| engines/sdk | test-infrastructure | every Koder web product (hub, drive, talk, …); kruze comparative driver (#219) |
Primary couplings
| Module | Nature |
|---|---|
| productshorizontalkruze | drives kruze --headless --cdp-port (R1 fidelity backend) |
| productsdevhub | first adopter — headless smoke + regression (hub#158) |
| enginessdkkodertestclock / kodertestrng | future JS-binding unification of the determinism shims |
Status
v0.5.0 (2026-06-07) — active. Core engine + testing.T sugar + R5 determinism + Attach + InputTracing + XHR-intercept (CaptureXHREvalFetch, #002) shipped; all three adopters done (hub#158, kruze#219, KOVER-040 — chromedp fully dropped from Kover). Actionable backlog zeroed.
| Feature | Status |
|---|---|
Native CDPws client + LaunchSession + actions/observation |
✅ |
testing.T sugar (NewWaitForFlutterReadyAssertNoFlutterError) |
✅ |
AssertGolden + pixel diff |
✅ |
Determinism R5 (WithClockWithRNGPumpFrames, 100-run repro) |
✅ |
Attach(wsURL) — externally-launched / multi-target browser |
✅ |
Real input (TypeTextPressMouseClickAtClickElement) + Tracing (StartStopTracing) |
✅ |
| Adopters: hub#158 ✅ · kruze#219 ✅ · Kover (KOVER-040) ✅ | ✅ #003 |
| Web-surface contract in stack-RFC-005 | ✅ |
XHR-intercept API discovery (CaptureXHR/EvalFetch) |
✅ #002 |