Record generation attempts and retry delays
This commit is contained in:
@@ -22,6 +22,14 @@ FIFO permit. Preparation failures dispatch nothing. When a positive retry
|
||||
budget ends with eligible failures, the internal exhaustion error retains the
|
||||
final cause and actual dispatched-attempt count.
|
||||
|
||||
When an invocation-local [observation recorder](observation.md) is present in
|
||||
the context, each acquisition emits an attempt event, including canceled
|
||||
capacity waits without dispatch. Each actual retry wait emits a delay event,
|
||||
including interrupted waits. Active permits are released before callbacks;
|
||||
generation duration ends before callback delivery. Built-in successful-envelope
|
||||
usage retains reported-field presence, while injected clients use explicit
|
||||
presence when supplied and otherwise treat zero fields as unknown.
|
||||
|
||||
Focused coordinator tests use controlled transport and wait functions. They
|
||||
cover eligibility, exhaustion, cancellation, backoff, request freezing, permit
|
||||
release, and the injected-client path. The capacity manager tests own permit
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
aggregation, measured phase totals, and synchronous metadata event delivery.
|
||||
Its event values and callback type live in `internal/domain` so internal
|
||||
requests can carry them without depending on the recorder package. The
|
||||
recorder currently supplies run IDs to the runner; attempt and lifecycle
|
||||
instrumentation is added at their owning boundaries.
|
||||
recorder currently supplies run IDs to the runner and receives attempt and
|
||||
retry-delay measurements from the generation coordinator. Run lifecycle
|
||||
instrumentation is added at the runner boundary.
|
||||
|
||||
A recorder keeps only counters, resolved identity fields, and the selected
|
||||
callback. It has no global history, queue, goroutine, or mutex held across a
|
||||
@@ -28,4 +29,5 @@ attempt events.
|
||||
The [recorder tests](../../internal/observation/recorder_test.go) own usage
|
||||
presence, phase sums, event ordering, empty-run accounting, identity snapshots,
|
||||
and callback panic behavior. The [generation coordinator](generation.md) owns
|
||||
attempt and retry-delay measurements once connected to this recorder.
|
||||
attempt and retry-delay measurements and emits their completion events after
|
||||
releasing active permits.
|
||||
|
||||
@@ -360,6 +360,8 @@ wiring in this stage. Update the internal inventory when the package lands.
|
||||
|
||||
## Stage 7 — Instrument Attempts And Retry Delays
|
||||
|
||||
**Completed:** 2026-09-23.
|
||||
|
||||
Connect the coordinator to the internal recorder through context. Record measured
|
||||
capacity wait even on interrupted acquisition, actual dispatch and outcome, usage
|
||||
from Stage 3, and completed/canceled backoff. Release the active permit before
|
||||
|
||||
Reference in New Issue
Block a user