MutationSummary
Defined in: packages/contracts/src/runtime.ts:73
A registry-wide mutation-journal summary for warm-store observability: the
per-status counts across EVERY writable table’s journal, folded from one aggregate query/subscription over
the pgxsinkit_all_mutations view — so a consumer renders a global sync indicator with ONE subscription
instead of one live query per writable journal. Cheap enough to mount permanently.
unsettledCount and settledCount PARTITION the total — the user-facing “is any local edit still owed?”
split, NOT the automatic state machine’s terminal/non-terminal split:
unsettledCount=pending+sending+failed+conflicted+quarantined— every write still needing work or user action.conflictedandquarantinedare journal-TERMINAL in the state machine (no auto-transition — seeMUTATION_TRANSITIONS) yet BOTH count as unsettled: their optimistic Overlay is KEPT, later writes for the entity stay blocked,destroy()refuses them withoutforce, and local-store reconciliation counts them owed. The user must act (discardConflict/discardQuarantined, then re-author) — so from the consumer’s data-safety standpoint they are NOT done. This is exactly the restore case, where pgxsinkit deliberately quarantines recovered writes for the user to resolve, so a global “unsynced changes” indicator MUST include them.settledCount=acked+rejected— the writes that are truly done from the user’s standpoint (acked awaits only its synced echo to be reconciled away; rejected’s Overlay was auto-discarded, nothing owed).
The field is settledCount (not terminalCount): “terminal” is the state-machine word, and quarantine is
legitimately terminal there while being unsettled here — the old name invited exactly that confusion.
Properties
Section titled “Properties”ackedCount
Section titled “ackedCount”ackedCount:
number
Defined in: packages/contracts/src/runtime.ts:76
conflictedCount
Section titled “conflictedCount”conflictedCount:
number
Defined in: packages/contracts/src/runtime.ts:79
failedCount
Section titled “failedCount”failedCount:
number
Defined in: packages/contracts/src/runtime.ts:77
pendingCount
Section titled “pendingCount”pendingCount:
number
Defined in: packages/contracts/src/runtime.ts:74
quarantinedCount
Section titled “quarantinedCount”quarantinedCount:
number
Defined in: packages/contracts/src/runtime.ts:80
rejectedCount
Section titled “rejectedCount”rejectedCount:
number
Defined in: packages/contracts/src/runtime.ts:78
sendingCount
Section titled “sendingCount”sendingCount:
number
Defined in: packages/contracts/src/runtime.ts:75
settledCount
Section titled “settledCount”settledCount:
number
Defined in: packages/contracts/src/runtime.ts:87
acked + rejected — settled writes; the complement of unsettledCount.
unsettledCount
Section titled “unsettledCount”unsettledCount:
number
Defined in: packages/contracts/src/runtime.ts:85
pending + sending + failed + conflicted + quarantined — every write still needing work or user
action (see the interface JSDoc; quarantined + conflicted are owed local edits, not settled).