Skip to content

R28

What to build

Repeated deliveries of one identity cannot grow retained latency or snapshot output without bound.

Source and evidence

Repository scientific/architectural review, snapshot 86c8517, item R28. Classification: confirmed defect; high severity.

The sink bounds retained unique identifiers but appends a latency for every item with a valid scheduled timestamp, including duplicates. Retrying the same identity does not approach the unique-item ceiling and can grow _source_latency_ns indefinitely. Snapshot copies that list, and the HTTP snapshot endpoint serializes it without an output ceiling. The artifact writer's size check occurs after serialization and does not bound the live process. Sink memory/serialization load can distort or terminate a capacity experiment under repeated delivery.

The retained retained synthetic probe lowers only the unique quota to two and records one scheduled identity 1,000 times. It retains one unique identity and 1,000 latency values without rejection. The same append path has no sample bound at the production quota; the smaller quota makes the independence explicit.

Acceptance criteria

  • [ ] Deliver one scheduled ID more times than the latency budget: storage remains bounded independently of unique-ID count.
  • [ ] Snapshot copying/serialization respects an explicit output bound and reports truncation/approximation rather than hiding it.
  • [ ] Latency scope explicitly distinguishes attempts from unique delivered items; counts and duplicates remain exact.
  • [ ] Fault/retry tests verify bound enforcement before append, without relying on an artifact writer's late size check.
  • [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
  • [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.

Design guidance

Introduce bounded online/sketch/reservoir evidence or an explicit bounded sample buffer with declared semantics. Keep counting exact; sampling must not make incomplete latency look complete.

Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.

Blocked by

None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.

Verification scope

Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.