Returner tests every release as a new user and a returning user in real Chrome with Kane CLI, then a coding agent repairs what breaks until Kane's replay passes.
Browser tests start with an empty profile, so they only meet new users. Bugs hitting returning users (renamed storage keys, changed models, cookie shifts, broken migrations) ship silently. Returner is a zero-dependency CLI and GitHub Action for teams shipping web apps that save user state in localStorage, cookies, or IndexedDB — static builds or running server apps proxied at one localhost origin. What Kane CLI does in the flow: Returner launches real Chrome, Kane attaches over --cdp-endpoint to create and verify saved work on the previous release, and Returner captures a CDP storage-key X-ray (names only) before closing Chrome cleanly so cookies flush to disk as an untouched snapshot. On the new build at the same origin, Kane runs a fresh user and the returning snapshot side by side, then merges their packs into rehearsal.evidence (with--policy gates). When the returning user fails, Kane's verdict, .evidence console errors, storage-key diff, and server stack trace (--start) go to Codex or Claude Code on a disposable copy. Returner rebuilds/restarts, replays the snapshot, and writes repair-report.html. Markers are redacted, passing fixes must survive a fresh rehearsal, and holdout profiles(--holdout-seed/--holdout-check) stay outside the agent's workspace and prompt. The agent never grades its own fix. All 6 closed loops: https://fexx301.github.io/returner/
How the agent and Kane CLI talk to each other: src/repair.mjs runs returner.mjs to reproduce the regression, then extracts Kane's verdict, steps, and browser console errors directly from Kane's sealed .evidence zip (src/shots.mjs), plus a CDP browser-state X-ray diff (storage/cookie/IndexedDB key names only) and the app server's stack trace under --start. That prompt (with random markers redacted) plus read-only reference files from the previous release goes to `codex exec` or `claude -p` inside a disposable copy. Returner rebuilds or restarts the candidate and runs `returner --replay` from the untouched v1 snapshot, merging packs with `kane-cli evidence merge` and writing repair-report.html. Passing fixes must also survive a fresh rehearsal with a brand-new marker and, when configured, an isolated holdout profile (--holdout-seed/--holdout-check) whose snapshot and expected answers never enter the agent's workspace or prompt (on failure, only corrupted field names are reported back). Returner launches Chrome itself (src/chrome.mjs), lets Kane attach over --cdp-endpoint, and closes Chrome cleanly with Browser.close so cookies reach disk before snapshotting. What Kane caught (all while a fresh new user passed): - PKI Consortium self-assessment #148 (model 1.0.0 -> 1.1.0, real shipped regression): blank page with console error "Cannot read properties of undefined (reading 'result')". Repaired by Claude Code, in an uninterrupted 20-minute Codex run, and verified with a two-profile holdout check at commit c752cc7: Profile A (3/4/2) + holdout Profile B (5 / 1 untouched default / 4). A deliberate incomplete 3/4/2 patch passed Profile A, failed Profile B on Sourcing (2 - Basic instead of 4 - Managed), and was rejected overall (exit 1). A separate genuine Codex run passed both profiles, the new Cryptography category, and a fresh rehearsal on attempt 2 (exit 0). - Rackula #935 (v0.6.16 -> v0.7.0-dev, real pre-release regression): saved rack vanished; Kane's .evidence pack captured "Cannot read properties of undefined (reading 'map')" even when its prose summary missed it; Codex repaired it and replay passed. - Quillpad v1 -> v2 (our running server fixture, proxied with --start): 500 Internal Server Error on old draft cookies; Codex fixed it on attempt 1 from the server stack trace, confirmed by replay and fresh rehearsal. - Clean control & CI: DeckMark v2.5.3 -> v2.5.4 confirmed clean; GitHub Actions on ubuntu-latest (--config + --policy) passed Fieldnotes (policy pass) and caught PKIMM 1.1.0 (policy fail): https://github.com/fexx301/returner/actions/runs/45484890341 How to run it (Node 22+, Chrome, kane-cli, zero npm dependencies): - Rehearse any static or running app: `npx github:fexx301/returner --config returner.json` (or pass --old, --new, --promise, --policy directly; works with static folders or http:// URLs) - Reproducible examples: `npm run demo`, `npm run demo:repair`, `examples/pkimm/prepare.sh && examples/pkimm/run.sh codex`, `examples/pkimm/negative-control.sh` (deliberate negative control), `examples/rackula/`, `examples/server/run.sh codex` - Contract tests (0 Kane credits, 18 tests including cheating-agent, holdout isolation, and --config tests): `npm test` - GitHub Action: `uses: fexx301/returner@main` (supports `config: returner.json` and `policy:`) - All 6 closed loops & HTML reports: https://fexx301.github.io/returner/ - Two-profile Codex repair report: https://fexx301.github.io/returner/evidence/pkimm-1.0.0-to-1.1.0/two-profile/codex-repair/repair-report.html - Two-profile rejected negative control report: https://fexx301.github.io/returner/evidence/pkimm-1.0.0-to-1.1.0/two-profile/negative-control/repair-report.html What's next: WebSocket proxying for hot-reload dev servers, combining browser-profile snapshots with server database snapshots and OAuth sign-in flows, and synthesizing general multi-version migrations instead of release-specific mappings.
Built in two weeks for the KaneCLI Online Hackathon.
See the hackathon →