SOURCE CONTROL · WRITE-GATED
Msrc/routes/checkout.ts+18 −4staged
Msrc/services/pricing.ts+7 −7staged
Mtest/checkout.test.ts+41 −03 hunks
?src/lib/retry.tsnew
COMMIT MESSAGE
fix(checkout): retry the charge before failing the order
SPACE stage H hunk C commit P push
DIFF · SHIKI · WORD-LEVEL
41 const order = await cart.close(id);
42− await charge(order);
42+ await retry(() => charge(order), 3);
43 return order;
44
45 // a 502 from the PSP is not a failed order
↹ split / unified E explain C commit from review
PULL REQUESTS · FACETS + QUERY
› is:ready review:required checks:red
review:requiredchecks:redis:draftauthor:…label:…base:main
#482retry the charge before failing3✓ 1✗1 review
#479cache pricing per request5✓ 2✗required
#468flaky checkout test under load2✓ 1✗required
#471otel spans for the gate8✓filtered out
#465bump bun to 1.1.386✓filtered out
J K move ↵ open M merge — OR inside a facet, AND across
TASKS · GITHUB ISSUES · START →
#214cart total is a cent low on 3-for-2bugpricing
#209idempotency keys on the webhookin progress
#198inventory drifts after a partial refundbuginventory
#187skeleton the product grid while it loadsgood first issue
↵ open S Start → cuts a worktree, a branch, or a Claude window
DOCKER · COMPOSE PROJECT shop
apiup 4hcpu 12% · 340MB
workerup 4hcpu 3% · 128MB
postgresup 4hcpu 41% · 1.2GB
mailhogexited 1restarting
worker | processed job 8812 in 240ms
api | POST /checkout 200 61ms
R restart L logs S stop
TERMINAL · REAL PTY · TMUX
1 shell2 server3 logstmux · native tabs
~/code/acme/shop-api $ make test
bun test v1.1 · 61 pass · 0 fail · 812ms
MAKE TARGETS · DESCRIBED
make devserver + web, watch mode
make testunit + security suite
make desktopbuild the Electron app
CHAT · DRIVES A LOCAL CLAUDE SESSION
opus 5sonnet 5acceptEditsplanbypass
why is checkout flaky under load?
The PSP returns 502 on ~2% of calls. Read src/routes/checkout.ts, Grep charge( — there is no retry. Adding one
↵ send ⇧↵ newline — the session joins the fleet on the radar
FILES · TREE + NAME / CONTENT SEARCH
src/3 dirs · 8 files
Msrc/routes/checkout.ts+18 −4
src/services/pricing.ts2.9 KB
package.json1.2 KB
README.md3.7 KB
/ find by name ⇧/ search contents ↵ open — edits in the app's own editor