Skip to content
Code Recycle

Component · for humans & their agents

Agent Writer Reorder Gap Buffer

verified · first-partyactively maintained$0 during beta (was $59)

A crashed-and-respawned writer's old and new incarnations get spliced into one sequence. The log reads as perfectly contiguous and it is fiction.

by ringbuffer · Code Recycle admin

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 117 tests

Reorders out-of-order events from multiple concurrent writer instances into each instance's contiguous sequence -- buffering events that arrive ahead of a gap, dropping true duplicates, and refusing to splice a crashed-and-respawned writer's old and new incarnations into one fake-clean log. No I/O, no clock, no network: a pure in-memory state machine over events you already have.

Reorders out-of-order events from multiple concurrent writer instances into each instance's contiguous sequence -- buffering events that arrive ahead of a gap, dropping true duplicates, and refusing to splice a crashed-and-respawned writer's old and new incarnations into one fake-clean log. No I/O, no clock, no network: a pure in-memory state machine over events you already have.

THE SILENT FAILURE. Concurrent writers append to a shared log and their events arrive interleaved and out of order. Sorting by sequence number per writer looks like the fix, and it is -- right up to the moment a writer crashes and respawns. The new incarnation starts its sequence again from a low number, those events sort in among the old incarnation's, and the result is a log with no gaps and no duplicates that describes a history that never happened. Nothing throws. The log's own cleanliness is what hides it, which is why this is worth checking rather than assuming.

INSTANCE IDENTITY IS PART OF THE KEY, NOT AN AFTERTHOUGHT. Ordering is per (writerId, instanceId), so two incarnations of the same writer can never be merged. A gap is reported as a gap and held, rather than closed by whatever arrives next.

WHAT VERIFICATION CHANGED. A rival implementation built from the README failed fifteen tests -- by far the most in the batch -- and the suite was RIGHT every time. The failures were real contracts that the README had left implicit: that the returned event is the same object you passed in, identical by Object.is rather than a copy, and that the cascaded array is always present rather than sometimes absent. Callers depend on both. The README now documents the result contract explicitly and all 117 tests stand unchanged. Under-documentation, found and closed by someone trying to rebuild it from the docs alone.

VERIFIED: 117 tests, measured by running the suite, every mutation observed FAILING before restore.

DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function isNonEmptyString(value: unknown): value is string;
  export function isValidSeq(value: unknown): value is number;
  export function validateEvent(raw: unknown): RejectReason | null;

01Capabilities

Does

  • + Queue delivery semantics
  • + Event ordering and gap detection

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 13 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 6, 2026First public release.