function advanceStoredOutcomeOnce
advanceStoredOutcomeOnce(
sessionId: string,
fence: EnvKeyEncrypted,
to: StoredPaymentFailure,
): Promise<void>

One fenced attempt to move a session's stored outcome to to: the write lands only while the row still holds the exact fence bytes. When the fence misses, the row must have converged to to (a racing advance won) or vanished (pruned) — anything else is a real conflict and throws. Exported for that race arm: a test can hand it a stale fence deterministically, where a live race cannot be scripted.

Parameters

sessionId: string
fence: EnvKeyEncrypted
to: StoredPaymentFailure

Return Type

Promise<void>

Usage

import { advanceStoredOutcomeOnce } from "doc.ts";