← Files Go: FintechARCHIVED FILE
skills/go-money-and-ledgers/evals.json
7.24 KB · Oct 3, 2026 · 06:33 UTC
{"schema_version":2,"skill":"go-money-and-ledgers","cases":[{"id":"route-ledger-rounding","kind":"routing","split":"development","prompt":"Implement exact multi-currency allocation and balanced immutable ledger journals in Go.","should_activate":true,"reason":"Money representation and ledger invariants dominate."},{"id":"avoid-provider-state","kind":"routing","split":"development","prompt":"Map PaymentIntent asynchronous statuses and webhook transitions.","should_activate":false,"reason":"Provider lifecycle belongs to go-payment-lifecycles.","confuses_with":["go-payment-lifecycles"]},{"id":"quality-allocation","kind":"quality","split":"development","prompt":"Fix the fixture so JPY 100 is allocated exactly with a stable residual recipient independent of input order.","fixture":"evaluations/fixtures/money-rounding","expected_invariants":["Uses exact integer units and deterministic remainder","Parts sum exactly to source"],"forbidden_outcomes":["Uses float64 or discards remainder"],"graders":[{"id":"exact-allocation","kind":"go-test","target":"./...","weight":1}]},{"id":"quality-journal","kind":"quality","split":"development","prompt":"Fix the fixture so journals balance independently per currency and cross-currency netting is rejected.","fixture":"evaluations/fixtures/ledger-balance","expected_invariants":["Balances every currency independently","Rejects cross-currency netting"],"forbidden_outcomes":["Accepts a globally zero but per-currency unbalanced journal"],"graders":[{"id":"immutable-journal","kind":"go-test","target":"./...","weight":1}]},{"id":"quality-fx-booking-review","kind":"quality","split":"development","prompt":"Review a Go multi-currency booking path that stores only a float64 spot rate, rounds every item independently during map iteration, declares a mixed USD/EUR journal balanced because signed numeric amounts sum to zero, and recomputes refunds at the latest rate. State the financial-integrity invariants and evidence needed for deterministic replay; do not choose a commercial rate source or accounting policy for the product.","expected_invariants":["Uses an exact rate and amount representation with explicit scale and named rounding stage instead of binary floating point","Persists quote identity, source and time, base/quote direction, booked rate, input and output amounts, and policy version","Allocates conversion residual deterministically so item outputs equal the booked total and persists that allocation","Balances each currency independently and represents the exchange through explicit FX position or clearing accounts","Reverses or refunds from the original booked rate and allocation unless a new conversion is an explicit product event"],"forbidden_outcomes":["Treats a numeric sum across unlike currencies as a balanced journal","Recomputes an economic reversal from the latest market rate","Uses map iteration order to choose who receives a rounding residual"],"graders":[{"id":"fx-booking-invariants","kind":"contains","required":["currency","rate"],"weight":1}]},{"id":"quality-reservation-race-review","kind":"quality","split":"development","prompt":"Review a Go stored-value authorization path for financial integrity. Two replicas can concurrently read Available(account, currency), then InsertHold with a new random ID in a separate commit. Capture deletes the hold before posting its journal; an expiry job deletes holds when its local clock passes ExpiresAt. Calls can retry or crash between every operation, partial capture is allowed, and provider capture evidence can arrive late. State the invariants; do not choose the product's overdraft or partial-capture policy.","expected_invariants":["Defines posted pending reserved and available balance dimensions per account and currency","Makes the sufficiency predicate and authoritative reservation mutation one conditional or serializable durable transition","Commits the stable operation claim with the reservation so exact retry returns the same hold","Rejects reuse of a reservation identity with a different canonical payload before financial state changes","Models capture release expiry and reversal as legal persisted transitions rather than row deletion","Makes capture consume reserved amount at most once and post the corresponding immutable journal atomically","Requires an explicit product or rail rule for the remainder after partial capture","Uses authoritative expiry or effect evidence and defines late-capture reconciliation instead of trusting a replica timer alone"],"forbidden_outcomes":["Uses a process mutex or eventually consistent balance cache as the spend authority","Generates a fresh hold identity on retry","Deletes reservation history before the related journal or late effect is resolved"],"graders":[{"id":"reservation-concurrency-contract","kind":"contains","required":["atomic","reserv"],"weight":1}]},{"id":"quality-backdated-ledger-correction-review","kind":"quality","split":"development","prompt":"Review a Go ledger correction endpoint. An operator can PATCH the amount, account, effective_at, and posted_at of a posted journal so a prior-month report looks right. A closed-period error is backdated without approval; the reversal uses today's FX rate and current allocation policy. Two concurrent correction requests can both reverse the original. BalanceAt(t) selects only effective_at, so rerunning an old statement after the correction silently changes what the system claims it knew then. The endpoint uses one timestamp for provider evidence, receipt, posting, and economic occurrence. Define correction, time, replay, period, and as-of invariants without choosing the entity's accounting policy or materiality threshold.","expected_invariants":["Preserves the original posted journal and creates linked reversing replacement or adjusting journals with reason approval source and policy evidence","Separates economic effective time posted time recorded time and external source time with defined timezone business-date and ordering semantics","Uses original booked amounts currencies accounts FX rate and allocation when undoing the original booking unless a new economic event is explicit","Makes correction identity unique and replay-safe so concurrent requests cannot reverse the same amount twice","Atomically bounds partial or cumulative corrections under an explicit product and accounting policy","Routes closed-period backdating through the applicable reopen retrospective-restatement or current-period-adjustment approval rather than inventing a policy","Distinguishes an error correction from a change in estimate and treats IAS 8 as reporting evidence rather than an application schema","Supports both effective-as-of using current knowledge and known-as-of historical replay when the product promises those views","Reconciles the original reversal replacement affected statements external evidence and current projection"],"forbidden_outcomes":["Mutates or deletes a posted journal to make the current balance correct","Recomputes an economic reversal using the current FX rate or allocation policy","Uses one mutable timestamp for occurrence receipt posting and recording","Claims retrospective financial reporting rules uniquely determine the application's journal schema or authorization workflow"],"graders":[{"id":"ledger-correction-time-contract","kind":"contains","required":["effective","recorded"],"weight":1}]}]}
SHA-256: 534d3cccb98af1967a1057c79518e388d39cf11f23536baa166b05cdf759bcc9