FAILURE MAP
← Case archive

FA-73133 / Probabilistic sketches / Member archive

Space-Saving heavy hitters: hits do not refresh recency · case 03

Recently active entries are evicted as if they were stale.

Member previewVariant 3 · 3 implementations · 9 checks per implementation

Case contract

Input {k, stream, phi=[num, den]}. Keep k entries [count, error, last-touch tick]. A hit increments count and refreshes the tick. A miss with free space inserts [1, 0, tick]. Otherwise evict the entry with the smallest count, ties broken by the oldest tick, and insert the newcomer with count = victim count + 1 and error = victim count. Return [rows sorted by count descending then item, sorted items whose guaranteed count (count - error) exceeds phi * stream length].

Why this case matters

Top-k dashboards and abuse detectors use Space-Saving because its per-item error bound lets them separate guaranteed heavy hitters from possible ones.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
equal counts different recency[[["q", 3, 0], ["r", 3, 2]], ["q"]][[["q", 3, 2], ["r", 3, 2]], []]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 ↗