fix(sitecalls): Parked is re-openable end to end — operator Retry/Discard reach the site tracking row and central SiteCalls (SCA-1, WP4 task 4.9)
This commit is contained in:
@@ -101,10 +101,19 @@ 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
|
||||
`Failed` never overwrites an earlier `Delivered`), 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.
|
||||
|
||||
**`Parked` is the one re-openable state (SCA-1, 2026-12).** A **strictly newer**
|
||||
`Attempted`, `Delivered`, `Failed` or `Discarded` packet replaces a `Parked` row
|
||||
(operator Retry re-opens the call, then its retried outcome arrives; operator
|
||||
Discard closes it). Only strictly newer — a stale pre-park packet replayed late,
|
||||
or any `Submitted`/`Forwarded`, leaves it `Parked`; `Delivered`/`Failed`/`Discarded`
|
||||
stay immutable. Before this a relayed Retry or Discard could never land: the row
|
||||
stayed `Parked` until the 365-day purge, the Parked KPI counted it forever and the
|
||||
page kept offering Retry/Discard on it.
|
||||
|
||||
From v1.x onward, the `CachedCallTelemetry` message additively carries the
|
||||
`AuditEvent` content alongside the existing operational fields. Central's
|
||||
`AuditLogIngestActor` (Audit Log #23) performs both the immutable `AuditLog`
|
||||
@@ -217,7 +226,16 @@ Parked cached calls live in the owning site's S&F buffer. Operator Retry/Discard
|
||||
from the Central UI is relayed to that site as a `RetryParkedOperation` /
|
||||
`DiscardParkedOperation` command over the command/control channel. The site
|
||||
applies the change and emits telemetry reflecting the new state; central never
|
||||
mutates the `SiteCalls` row directly. If the site is offline the command fails
|
||||
mutates the `SiteCalls` row directly. Concretely (SCA-1): the S&F service notifies
|
||||
the cached-call observer with `OperatorRetried` / `OperatorDiscarded`; the
|
||||
lifecycle bridge writes one `CachedSubmit`/`Submitted` row (operational status
|
||||
`Attempted`, no terminal stamp, RetryCount 0) for a Retry or one
|
||||
`CachedResolve`/`Discarded` row for a Discard; the forwarder re-opens the
|
||||
site tracking row (`ReopenParkedAsync`: `Attempted`, `TerminalAtUtc` cleared) or
|
||||
closes it (`RecordDiscardedAsync`), so `Tracking.Status(id)` follows too; the
|
||||
cached-telemetry drain and the reconciliation pull then carry the newer row to
|
||||
central, whose guard accepts it over `Parked`. A retried call's later attempts and
|
||||
outcome land normally because the row is no longer terminal. If the site is offline the command fails
|
||||
fast and the UI surfaces a "site unreachable" message.
|
||||
|
||||
On a **successful** relay (the site acks `Applied`), `SiteCallAuditActor` emits
|
||||
|
||||
Reference in New Issue
Block a user