OneShot

All packsScheduling & Availability CoreSolve

seats_remaining counter non idempotent cancellation double decrement

A seats_remaining counter makes cancellation dangerous to retry

A stored seats-remaining integer decremented on cancel is the obvious model -- and it means a retried cancel decrements twice, quietly overbooking the resource for good.

This is one of the things Scheduling & Availability Core already handles. Bookings and availability that survive timezones, repeating events and daylight saving — without double-booking.

Buy for $993 of 3 clean-room builds passed · full refund if it fails on your machine

Is this you?

Storing remaining capacity as a counter and decrementing it on every cancellation looks correct for a single cancel -- and a retried cancellation request (a client retry after a timeout, a double-tapped Cancel button) decrements the same counter a second time for the same booking, silently freeing a seat that was never actually occupied and permanently overbooking the resource from that point forward.

Why this one is easy to get wrong

A counter is the most direct, obvious representation of 'how many seats are left' -- increment on book, decrement on cancel -- and it behaves correctly through every test that cancels a booking exactly once. The non-idempotence only shows up on a retried or duplicated cancel request, which most functional tests never simulate, because a single successful cancel looks like the whole feature working.

What you get instead

The pack keeps no counter anywhere -- remaining capacity is always computed by counting confirmed bookings that overlap the window in question. Cancellation itself is a conditional UPDATE (WHERE status='confirmed'), so a retried cancel of an already-cancelled booking returns zero rows -- reported to the caller as already_cancelled, a success, with nothing decremented twice because there was never anything to decrement.

Source: ARCHITECTURE.md 'Cancellation frees capacity idempotently (decided)' — checkable in the pack you receive

How you actually use this

You don’t install a library or wire up an SDK. Your own coding agent builds the code in your project, and you keep it — no runtime dependency on us.

  1. Step 1

    Download and unzip

    You get a folder: the docs that tell an agent what to build, a starting skeleton, and the test suite that decides when it's done.

  2. Step 2

    Open it in Claude Code or Cursor

    Point your coding agent at the folder. Nothing to install, no account with us, no API key.

  3. Step 3

    Paste one prompt

    The pack contains the exact prompt. Paste it as your first message and leave it alone — it works through the build itself, choosing a cheaper or stronger model per task.

  4. Step 4

    Run ./verify.sh

    One command. It prints a pass or fail for every check. Green means the build is done — the same script we ran to produce the receipt on this page.

Typical build: about 22 minutes of your agent working, mostly unattended. Then you integrate the working module into your app the way you would any code you’d written yourself.

Why you can believe this

3 of 3 runs passed

We ran this pack from an empty folder 3 times and published exactly what happened — every check, the model, the token cost, the wall time. Not a testimonial, and not our opinion: the same verify.sh you run yourself. Read the full receipt →

Buy for $9914-day refund if verify.sh fails →

Related problems