← Files Go: FintechARCHIVED FILE

skills/go-financial-idempotency/evals.json

4.83 KB · Oct 5, 2026 · 18:32 UTC

↓ Download file

{"schema_version":2,"skill":"go-financial-idempotency","cases":[{"id":"route-concurrent-key","kind":"routing","split":"development","prompt":"Two replicas receive the same money-transfer idempotency key concurrently with retries and crashes.","should_activate":true,"reason":"Durable financial replay safety dominates."},{"id":"avoid-broker-offset","kind":"routing","split":"development","prompt":"Choose when a Kafka consumer should commit its offset.","should_activate":false,"reason":"Broker acknowledgement belongs to go-message-processing.","confuses_with":["go-message-processing"]},{"id":"avoid-nonfinancial-remote-review","kind":"routing","split":"development","prompt":"Review retry identity for a non-financial Go worker whose remote result may be ambiguous.","should_activate":false,"reason":"Non-financial cross-boundary review belongs to review-go-distributed-change.","confuses_with":["review-go-distributed-change"]},{"id":"quality-atomic-record","kind":"quality","split":"development","prompt":"Implement an idempotency record around a local ledger posting.","expected_invariants":["Unique claim and ledger effect share one transaction","Same fingerprint returns stored outcome"],"forbidden_outcomes":["Uses check-then-insert or memory cache only"],"graders":[{"id":"idempotency-transaction","kind":"contains","required":["unique","transaction"],"weight":1}]},{"id":"quality-mismatch","kind":"quality","split":"development","prompt":"A client reuses a transfer key with a different amount.","expected_invariants":["Rejects mismatched canonical fingerprint","Does not disclose prior result across wrong authority"],"forbidden_outcomes":["Treats new payload as the original"],"graders":[{"id":"fingerprint-mismatch","kind":"contains","required":["fingerprint","reject"],"weight":1}]},{"id":"quality-replica-replay","kind":"quality","split":"development","prompt":"Repair the fixture without changing its exported API. Independent Service values share one Backend. Concurrent retries of the same transfer key currently create multiple ledger entries, and reusing that key for a different account or amount returns the earlier result. Exact replays must converge on one stored result and one entry. A conflicting payload must return ErrKeyConflict with a zero Result. A context canceled before Post starts must not write.","fixture":"evaluations/fixtures/replica-replay","expected_invariants":["Concurrent exact replays create one entry and return one result","A conflicting payload returns ErrKeyConflict without returning the prior result","A pre-canceled call creates no entry"],"forbidden_outcomes":["Protects only one Service value while the shared Backend remains non-atomic"],"graders":[{"id":"replica-replay","kind":"go-test","target":"-race ./...","weight":1}]},{"id":"quality-provider-idempotency-contract-review","kind":"quality","split":"development","prompt":"Review a Go payment router that uses one client key unchanged for authorize, capture, and refund across Stripe v1, PayPal, and two Adyen regional endpoints. It deletes its local record after 24 hours, treats a simultaneous duplicate conflict as confirmed failure, retries another region on timeout, removes the idempotency header when the provider idempotency store returns unavailable, and returns stored responses to anyone presenting the key. Webhooks can arrive before the HTTP response. Define provider-contract, identity, retention, ambiguity, authorization, and local-state invariants.","expected_invariants":["Keeps one durable authenticated internal operation identity and distinct provider attempt identities per external operation","Versions provider endpoint account credential region key scope retention parameter binding concurrency and response semantics","Does not generalize Stripe stored-result PayPal current-status and Adyen regional or transient-error behavior","Retains local evidence across client queue webhook disaster and provider windows and stops automatic resend after provider expiry until reconciliation","Treats simultaneous in-progress conflicts timeout and webhook-before-response as unresolved or convergent evidence rather than confirmed failure","Prevents cross-region replay where provider deduplication is region-local and never removes the key to bypass idempotency unavailability","Authorizes current tenant resource action and disclosure before returning stored outcomes","Couples local ledger and workflow idempotency separately from provider deduplication"],"forbidden_outcomes":["Uses one provider key for authorize capture and refund","Assumes every provider replays the first response for the same duration and scope","Retries a money-moving operation without idempotency because the provider store is unavailable","Treats possession of the key as authorization to read a prior response"],"graders":[{"id":"provider-idempotency-contract-review","kind":"contains","required":["retention","region"],"weight":1}]}]}

SHA-256: 1642a4caf186d10064ddf42393813fdf179672dab04908cca8968d48ce5e3559