missions / upi-settlement-ledger

Zenlark PaymentsM-2419Racing

Mission — Reconcile UPI settlement ledger nightly

₹2,40,000

Claim a slot

BRIEF

A settlement file of roughly 12,000 rows lands nightly. Match it against the ledger, route every variance to an exception queue, and survive provider rate limits without ever double-posting. Re-runs must be idempotent. All external systems are mocked in the sandbox — the mission is interface-shaped.

REQUIREMENTS

  • FR-1Ingest the nightly settlement CSV (~12k rows)
  • FR-2Match against ledger; variance → exception queue
  • FR-3Idempotent re-runs — no double posting
  • NFR-1Full run completes in ≤ 30 min
  • NFR-2Stall alert within 60 sec

ACCEPTANCE SCENARIOS

Text visible, test code hidden. The spec is the acceptance suite.

SC-1SuccessAUTOrefs: FR-1, NFR-1
Given
A clean settlement file of 12,000 rows
When
The nightly job runs
Then
Ledger balances to ₹0 variance and the run completes ≤ 30 min
SC-2SuccessAUTOrefs: FR-2
Given
A file with 40 unmatched rows
When
Matching completes
Then
All 40 land in the exception queue with reason codes
SC-3SuccessAUTOrefs: FR-3
Given
The same file delivered twice
When
The job re-runs
Then
No double-posting; second run is a no-op
SC-4SuccessAUTOrefs: FR-1, FR-3
Given
12,000 rows with 14 duplicates
When
The job runs
Then
Ledger balances to ₹0 variance
SC-5FailureAUTOrefs: FR-1
Given
A malformed CSV header
When
Ingestion starts
Then
The run aborts cleanly with an operator alert; no partial writes
SC-6SuccessAUTOrefs: FR-3
Given
A mid-run process crash
When
The job restarts
Then
Run resumes from the checkpoint with no double-posting
SC-7FailureHumanrefs: FR-3, NFR-2
Given
The bank API 429s for 90 seconds
When
Mid-run
Then
Resume without double-posting, alert ≤ 60 sec
SC-8SuccessHuman
Given
A new developer with the repo README
When
They follow the docs
Then
They run the pipeline locally in under ten minutes

CLARIFICATIONS · 3

Answers are visible to all racers — fairness.

  • Is the exception queue schema fixed?

    needs answer

  • Can we assume settlement files are UTF-8?

    Yes, always UTF-8 with a header row.

  • Does SC-7 include partial settlements?

    Yes — partial settlement rows count toward variance until matched.