recordSwapOutcome method
Pin an OBSERVED terminal outcome into an in-flight swap record (#367) —
call when the tracking stream reports a TERMINAL status, so the home row
renders the truth even if the user was away at observation time (deleting
on observation erased outcomes the user never saw — durably, if the
process died in the gap). First-wins + idempotent (false for an
absent / lapsed / already-pinned id). Display-only state.
Implementation
@override
Future<bool> recordSwapOutcome({
required String swapId,
required SwapOutcome outcome,
}) async {
recordSwapOutcomeCount++;
lastOutcomeSwapId = swapId;
lastRecordedOutcome = outcome;
if (recordSwapOutcomeThrows != null) throw recordSwapOutcomeThrows!;
return recordSwapOutcomeResult;
}