Experiment 084: Late dispatch generation stamp

Date: 2026-04-20

Status: Rejected

Problem

The old stream rerun path captured writeGen too early: when the rerun

was requested, not when it actually got a reader. That made it plausible

that a simpler fix than a bounded scheduler might work:

Hypothesis

If the main issue is "reruns are marked stale because they waited too

long before starting", then moving the generation stamp to actual reader

dispatch time should recover most of the benefit with much less code than

the pre-dispatch queue.

Approach

Built a simpler variant in a separate branch:

request to a reader

That means a rerun no longer treats pool wait time as part of its stale

window.

Results

Scenario profiler: real but partial improvement

Median of two runs, compared to the clean observability baseline:

ScenarioMetricBaselineLate stamp
A11reruns started1081937.5
A11stale reruns1026792.5
A11wall442207 us440106.5 us
A11pool wait / rerun2155 us1715.8 us
A11breruns started1039925
A11bstale reruns933790
A11bwall459509 us432653.5 us
A11bpool wait / rerun3880 us3028.1 us

So the idea helped. It fixed part of the "stamped too early" problem.

But it did not remove the real bottleneck

Compared to Experiment 083's bounded queue:

ScenarioMetricLate stampPre-dispatch queue
A11reruns started937.5737
A11stale reruns792.5553
A11pool wait / rerun1715.8 us0.3 us
A11breruns started925705
A11bstale reruns790552
A11bpool wait / rerun3028.1 us0.1 us

The simpler fix still left the real bottleneck alive: reruns were still

allowed to pile up inside ReaderPool.

Primary Metrics

Decision

Rejected as the main fix.

This variant is valuable because it proved two things:

  1. The original path really was stamping too early.
  2. Fixing only that does not solve the broader queue-contention problem.

So the late-stamp idea is a legitimate partial improvement, but it is

materially weaker than the bounded pre-dispatch queue because it leaves

the scarce reader bottleneck saturated.