Skip to main content

Module claim

Module claim 

Source
Expand description

Code-claim state machine (RFC-005).

Pure, storage-free logic: given the result of an atomic conditional UPDATE … WHERE … AND used_at IS NULL AND expires_at > :now, classify the outcome. No I/O, no async. Tested exhaustively.

Enums§

ClaimOutcome
Outcome of a claim_code attempt (RFC-005 §3).

Functions§

classify_claim
Classify an atomic claim attempt from the affected-row count.