CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/idempotency-test-author

Build-an-X for idempotency tests in any async/job/API context - idempotency-key handling (per Stripe / AWS prescriptive guidance pattern), retry-safe semantics (exactly-once vs at-least-once vs at-most-once), side-effect commutativity verification, fingerprint-based dedup, idempotency-window tuning. Use when authoring tests for any system where the same input could be processed twice (SQS Standard at-least-once, RabbitMQ requeue, retry-on-error logic, webhook redelivery, browser double-click, mobile-network retry).

87

1.01x
Quality

86%

Does it follow best practices?

Impact

95%

1.01x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-3/

{
  "context": "Concurrent-duplicate coverage where a sequential replay test already exists and passes. Predicted baseline failure: the agent writes another sequential test with different wording - awaiting the first call before starting the second - which exercises the completed-entry path already covered and never creates an interleave. When it does reach for concurrency it often starts both calls but awaits them one at a time, which serialises them again. The skill's value is knowing that the concurrent case is a distinct test with a distinct failure mode, and that the assertion is on the external side-effect count.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Test file created",
      "description": "A file src/refundJob.test.js exists and contains at least one test.",
      "max_score": 4
    },
    {
      "name": "Calls genuinely overlap",
      "description": "At least one test starts two or more handler invocations before awaiting any of them - collecting the promises then resolving together via Promise.all or Promise.allSettled. A test that awaits the first call before issuing the second is sequential no matter how it is named and scores zero on this criterion; it duplicates coverage that already exists in the fixture.",
      "max_score": 32
    },
    {
      "name": "Side effect asserted exactly once under the race",
      "description": "The concurrent test asserts the gateway issued exactly one refund - issuedCount equal to 1. Asserting only that the two returned values match scores zero: matching responses are compatible with two refunds having been issued.",
      "max_score": 24
    },
    {
      "name": "Every racing caller receives the same outcome",
      "description": "The test asserts all racing calls resolve to the same refundId, proving the loser of the race receives the winner's result rather than a null, a rejection, or a second refund.",
      "max_score": 14
    },
    {
      "name": "Race widened beyond two callers",
      "description": "At least one test races more than two simultaneous deliveries - five or ten - and still asserts a single refund. A suite that only ever tests two callers scores at most half; the reservation could hold for a pair and fail for a burst.",
      "max_score": 12
    },
    {
      "name": "No sleep used to sequence the race",
      "description": "MUST NOT. The test does not order the interleave with a real-time delay - no `await new Promise(r => setTimeout(r, N))` between the calls to make the race come out a particular way. Sequencing by sleep makes the result a property of timing on the runner rather than of the handler, and scores zero here.",
      "max_score": 10
    },
    {
      "name": "Fresh store and gateway per test",
      "description": "MUST NOT share one store or gateway across tests at module scope; each test builds its own so an earlier reservation cannot decide a later result.",
      "max_score": 4
    }
  ]
}

SKILL.md

tile.json