Who it is forA developer building a promo code, voucher or credit ledger who needs to prove that a code cannot be spent twice under load.
The problemSingle-request tests miss double-spend bugs that only appear when many requests hit the database at the same moment.
The outcomeA test plan with the same three checks: one redemption, one ledger entry and one balance after parallel attempts.
What you need first
- Git and a terminal to clone the public source
- A web browser to visit inkloom.art
- An Inkloom early access code, only if you want to test account and credit features
Steps
- Clone the public source with
git clone https://github.com/Inkloom-art/inkloom.git. (inferred, check the README) - Find the test that fires twenty-five simultaneous redemptions of a single code at a real database.
- Note its three assertions: exactly one redemption, exactly one ledger entry, and exactly one balance change.
- Rebuild the same setup against your own database and code path, without copying the source into your project.
- Run the parallel attempts and confirm the three assertions hold. If they fail, the bug is in your transaction boundary.
Prompt for your agent
In the Inkloom-art/inkloom repository, locate the test that sends twenty-five simultaneous redemptions of one code. Summarise its three assertions and describe, in plain steps, how a similar test could be written for a different database. Verify by quoting the assertion lines and the file path they come from.
Caveat. The source is all rights reserved and not a distribution, so use it to design your own test rather than copying its code.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Inkloom-art/inkloom and "Model a race-safe code redemption test on the published one"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer