K
…
Loading account
No account data shown
Explorer
Editor
Code Review
Recent Coding Jobs
Code Health
Output
Tests
Deployment
Diff Preview
Explorer
Editor
Terminal
Assistant
Tests and deployment
ws-117 · checkout retry guard
Developer IDE with file tree, editor, assistant, terminal, tests and route/cost controls.
Route · auto
Budget $25/day
SOC 2
Explorer
RUZZLER-WEB
src
components
routes
services
checkout.ts
M
payments.ts
tests
.env.example
package.json
M
README.md
OUTLINE
TIMELINE
workspace.tsx
api.ts
tests.ts
src
›
services
›
workspace.tsx
1
import
{ routeRequest }
from
'@/lib/router'
;
2
import
{
BudgetCap
}
from
'@/lib/budget'
;
3
4
export default async function
WorkspaceSession
() {
5
const
cap =
await
BudgetCap
.
for
(
'ws-117'
);
6
const
route =
await
routeRequest
({
7
task:
'checkout-retry-guard'
,
8
policy:
'auto'
,
// up to 70% savings
9
maxCost: cap.daily,
10
});
11
12
return
<
Ide
route={route} cap={cap} />;
13
}
Ln 13, Col 9
Spaces: 2
UTF-8
LF
TypeScript React
TERMINAL · feat/checkout-retry
$ pnpm test:ci -- checkout
✓ checkout.retry › idempotent on 3DS timeout (184ms)
✓ checkout.retry › surfaces issuer decline (96ms)
Tests 24 passed · 0 failed · 1.8s
$ ruzzler route --policy auto
route: claude-sonnet → gemini-flash for lint passes (saved $0.41)
Assistant
Review
Guard the checkout retry so a 3DS timeout can't double-charge.
Added an idempotency key to services/checkout.ts and a retry guard test. Diff touches 2 files, +42/-8.
Apply diff
Run the payments suite on the cheap route.
24/24 passed on gemini-flash. Cost $0.03 vs $0.11 on sonnet — 73% saved.
Ask RuzzCode…
Tests and deployment
96%
Pass Rate
Passed
142
Failed
3
Skipped
5
checkout.test.ts
✓ 24
1.8s
payments.test.ts
✓ 18
0.9s
session.test.ts
✗ 1
0.7s
Route
auto · sonnet→flash
Cost today
$3.42 / $25.00
Policy
Up to 70% savings
Run tests
View diff