fix(site-call-audit): same-rank freshness tiebreaker — retrying calls no longer freeze RetryCount/LastError at first write
Within an equal NON-terminal rank the newest UpdatedAtUtc wins, unfreezing the Attempted-phase RetryCount/LastError/HttpStatus. Terminal ranks (>=3) are excluded from the tiebreaker so terminal immutability is preserved (Delivered never overwrites Parked); equal stamps stay idempotent, lower rank stays a no-op.
This commit is contained in:
@@ -73,9 +73,15 @@ mirror — never queried by scripts (`Tracking.Status()` is answered site-locall
|
||||
## Ingest & Idempotency
|
||||
|
||||
Telemetry ingestion is **insert-if-not-exists** keyed on `TrackedOperationId`,
|
||||
then **upsert-on-newer-status**. The lifecycle is monotonic, so status only
|
||||
advances and never regresses; at-least-once and out-of-order telemetry are
|
||||
therefore harmless.
|
||||
then **upsert-on-newer-status, with a newest-`UpdatedAtUtc` tiebreaker within
|
||||
equal non-terminal rank**. The lifecycle is monotonic on status rank, so status
|
||||
never regresses. Within an equal *non-terminal* rank (the `Attempted`/`Skipped`
|
||||
retry phase), the packet with the newest `UpdatedAtUtc` wins — so a retrying
|
||||
call's `RetryCount`/`LastError`/`HttpStatus` stay live instead of freezing at the
|
||||
first `Attempted` write. Equal *terminal* rank stays immutable (a later
|
||||
`Delivered` never overwrites an earlier `Parked`), equal stamps are an idempotent
|
||||
no-op, and a lower rank is always a no-op — so at-least-once and out-of-order
|
||||
telemetry remain harmless.
|
||||
|
||||
From v1.x onward, the `CachedCallTelemetry` message additively carries the
|
||||
`AuditEvent` content alongside the existing operational fields. Central's
|
||||
|
||||
Reference in New Issue
Block a user