CDP probe scripts validate profile launches, navigation, and extraction paths against a running Koko server. They are the fastest way to debug regressions without full test suites.
Profile CDP smoke
npm run test:profile -- --profile chrome-macos-catalina
Runs scripts/cdp-profile-probe.mjs — navigates, extracts, and verifies CDP health for a profile.
Probe timeout rule
All scripts/cdp-*.mjs probes enforce a 20 second maximum (--max-sec, default 20):
- >20s = hang → SIGKILL Koko, exit code 3,
[HANG]marker - No retry on the same hung command
- Helper:
scripts/lib/cdp-probe-budget.mjs
Manual CDP inspection
# Start server
zig build run -- serve --port 9222
# Check targets
curl http://127.0.0.1:9222/json/version
curl http://127.0.0.1:9222/json/list
Google offline fixtures
Use code-check/tmp/google-serp-skeleton.html for offline Google SERP probes — not live google.com in CI.
Connect with Playwright CDP
For comparison debugging, attach Playwright directly:
import { chromium } from "playwright";
const browser = await chromium.connectOverCDP("http://127.0.0.1:9222");
When probes hang
- Check if Koko process is alive (
/json/version) - Kill stale
koko serveprocesses - Re-run with
--max-sec 20— do not increase timeout to mask hangs - File a bug with probe output and profile ID