Skip to content

R24

What to build

Stalled cooperative stream closure cannot delay timeout evidence indefinitely.

Source and evidence

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

After consumption times out, the observer awaits iterator closure outside the timeout context. An async iterator with a cooperative but stalled aclose() can therefore prevent the timeout observation from returning indefinitely. The documented duration is a consumption limit; this finding concerns missing bounded cleanup, rather than claiming that duration promises a total wall-clock deadline.

The retained probe sets a 10 ms consumption limit and uses separately blocked iteration and closure. The observer is still unfinished after 100 ms, waiting in closure. The probe cancels and joins it to avoid retaining experiment tasks.

Acceptance criteria

  • [ ] Blocked iteration plus blocked aclose returns timeout evidence within the consumption deadline plus a documented cleanup bound.
  • [ ] Caller cancellation remains cancellation when close stalls or fails.
  • [ ] Limit/normal/error closure paths run once and retain payload-free aggregates with truthful cleanup status.
  • [ ] Tests verify no owned cooperative closure task survives and disclose inability to forcibly interrupt hostile code.
  • [ ] 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

Make cleanup a bounded lifecycle phase with its own safe status/precedence. Keep the documented consumption limit distinct from total wall-clock guarantees.

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.