FAILURE MAP
← Case archive

FA-74883 / CRDT convergence / Member archive

PN-Counter with local floor: decrementing to exactly zero is refused · case 03

A decrement that would leave the counter at exactly zero is rejected.

Member previewVariant 3 · 3 implementations · 9 checks per implementation

Case contract

Replicas keep a positive map and a negative map (replica->total). ["inc", r, k] and ["dec", r, k] need k > 0, otherwise the event index is rejected. A decrement is also rejected when r's locally observed value is below k. ["sync", src, dst] merges both maps of src into dst by pointwise maximum. Return values and rejected indices.

Why this case matters

Positive/negative counters are the standard way to support decrements in a state-based counter.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
decrement to exactly zero is allowed{"rejected": [1], "values": [3, 0, 0]}{"rejected": [], "values": [0, 0, 0]}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗