Profile
Back to NewsBack
Hacker News 1 min
Reader Mode
Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping

Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping

2 hours ago
$ git push origin main
sphinx · understanding check for main
11 files changed · +5,012 −3,147

Sphinx

Your webhook handler now saves the event ID before calling charge(). Stripe times out and sends the same event again. What happens on the retry?

You

It runs twice, so the customer is charged twice.

Sphinx

Not quite. The retry finds the saved ID and returns 200 without charging. But that ID is stored before the charge succeeds. If charge() fails, what does the next retry do?

You

It skips the charge, so the customer is never billed.

✓ Understood. Pushing to origin/main.

An illustrative exchange. Real questions come from your diff.

Chat with me