When the invoker threw without running the dispatch delegate (open breaker /
bulkhead) after the claim had already been completed RejectedBeforeDispatch
by someone else, Complete(RichRejected) returned false, the path answered
OutcomeUnknown and never completed the physical task. The late-write slot,
the (driver, reference) target and the ticket's byte lease stayed reserved
for the process lifetime, so every later write to that tag was refused as
'Outstanding driver write capacity exhausted'.
Both catch paths now go through FailRichAttempt: an undispatched terminal
claim can never dispatch (dispatch is a CAS from pending), so the physical
task completes with the claim's pre-dispatch outcome and the caller hears
RejectedBeforeDispatch. Only a dispatched claim stays Unknown and is left
to the driver's own completion.
The late-write observer released the physical slot on its own continuation of
the driver task, while RunRichWriteAsync replied and told WriteCompleted on
another. A next write to the same target (queued, or sent right after the
reply) could reach TryReserve before the release and be rejected with
'Outstanding driver write capacity exhausted' although nothing was
outstanding. LateWriteReservation.Observe now returns a task that completes
after the slot is released; the actor awaits it (when the physical write has
finished) before replying and freeing the tag. The flaky unit test waited on
the lifetime counter, which is disposed just before the release - it now
awaits the settled task.
Repro: 200 sequential same-target actor writes failed 3/3 runs (no load);
0 failures in 15 runs at load avg ~468. Unit signal: lifetime-wait 22-39 /
2M false 'slot busy', settled-wait 0/2M.