Skip to content

R32

What to build

Benchmark recording mode does not retain every emitted observation indefinitely.

Source and evidence

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

the reviewed implementation uses RecordingTelemetry, whose ordered operation and observation buffers intentionally retain all items for contract testing. The benchmark's 10,000 timing-sample cap at line 130 does not bound those buffers. The retained probe emitted 20,000 metrics and observed 20,000 retained observations. Memory therefore grows O(emitted items), and measured in-memory call cost includes ever-growing recorder allocation/GC pressure. This is a benchmark adapter problem; RecordingTelemetry's test-recorder semantics are appropriate. Use a benchmark-only bounded recording adapter or explicitly describe and bound the capture workload. No default-duration memory benchmark or OOM experiment was run.

Acceptance criteria

  • [ ] More than 20000 synthetic emissions leave benchmark capture within a declared constant or configured bound.
  • [ ] RecordingTelemetry's existing test-recorder semantics remain unchanged.
  • [ ] Disabled/in-memory/OTLP modes keep comparable workload/timing scope with disclosed adapter costs.
  • [ ] Memory/retention characterization and a bounded observable contract distinguish the 10000 timing cap from emission storage.
  • [ ] 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

Use a benchmark-specific bounded/discarding adapter with the public Telemetry contract, or explicitly bounded capture workloads. Do not change the shared test recorder to conceal benchmark allocations.

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.