GenClass for online shops
Find double orders and stale carts before customers hit them.
GenClass finds checkout bugs that raise no error, such as an order sent twice or an old cart over a newer one, on your machine and on each pull request. On your machine, your coding agent gets a replay and a Playwright test that fails while the bug is there.
genclass_findings (@genclass/mcp 0.2.0, runtime 0.3.0-beta.2). Full captureagent % genclass_findings {}
- f10 [stale-write] "/" · 1× in 1 run(s) · 24 s ago
The response to "GET /api/search" "?q=r" overwrote "search.query" after a newer "GET /api/search" had already written it
- f14 [duplicate-request] "/" · 1× in 1 run(s) · 19 s ago
"POST /api/cart" was sent twice, 0 ms apart, by two separate user actions while the first was in flight
What it finds
Three checkout bugs that raise no error.
An order sent twice
A second click while the first order request is in flight.
A stale cart or total
A slow response lands last and writes an old cart or total over a newer one.
A checkout that breaks on a phone
The pay button sits under a fixed bar, or the total reads $NaN. Measured checks find both at phone size.
Detection rates, each next to its false-intervention rate: benchmarks.
On your machine
Find it, replay it, keep the test.
Connect your development build to @genclass/mcp.
Record
Two identical requests in flight together become a duplicate-request finding. A late response written over newer data becomes a stale-write finding.
Explore
genclass_explorereruns the steps with overlapping responses in different seeded orders and reports what ends differently.Replay
genclass_replaydelivers the exact order that produced the bug again, before your fix and after it.Keep the test
genclass_explainwrites a Playwright test that fails while the bug is there.
On each pull request
The same findings, from your tests.
- The Playwright fixture
- Both findings, with no model downloadSeeded chaos holds matched requests before they leave, and never changes them.
- The GitHub App
- A check on each commit, and a comment on the pull request when something is flaggedIt reads the race files your workflow uploads and its own settings file,
.github/genclass.yml; of the diff it uses only which files and lines changed.
Before release
Check the checkout at phone size.
npx @genclass/runtime scan <address> checks a page at phone and desktop sizes in headless Chromium and suggests a CSS fix for each problem.
- Sideways scrolling
- The page scrolls sideways, with the element at fault
- A covered button
- A fixed element covers it, even at the end of the page
- A price that reads
$NaN - A currency sign next to NaN, undefined or null
In production
Observe by default. Checkout left alone.
Observe, the default mode, never holds, delays or changes a request, a response or a state write.
To keep checkout observe-only in every mode, add requests: { protect: ["preset:payments", "/api/cart"] }. Requests with URL words such as checkout, order, payment or stripe, and your cart path, are then never held, retried, coalesced or discarded.
Limits
What GenClass does not do.
Your server's records
What to knowGenClass sees the page, not what your server or payment provider recorded: keep idempotency keys and server-side deduplication (how).
State it cannot see
What to knowStale writes need React state, Redux, Zustand with devtools, or a store you register. Double submits need no state.
Plain form posts
What to knowA form that posts and loads a new page is not seen as a request.
Questions
Running GenClass on a shop.
What does it add to page load?
About 108 KB of gzipped JavaScript with the /auto import, then on a first visit about 13 MB for the model and its runtime on WASM, cached after that. The measured costs include page-load timing.
What does it send from our storefront?
From public hosts only: anonymous diagnostics, and the visitor analytics that npx genclass setup turns on, both with no page text. Live Watch sends page text, but only if you turn on watch; telemetry: false turns all of them off, and every field is listed.