ReplayDiagnostics

Returned by RestoreFromJson(string, RecoveryMode, ResolutionPolicy) to describe the outcome of a save-restore operation. Inspect this after a restore to decide whether the recovered session is usable, to show the player a warning, or to request a fresh start.

public class ReplayDiagnostics

Inheritance System.Object → ReplayDiagnostics

Remarks

The two most important fields are CommitsApplied (how many commits from the original Path were replayed successfully) and Warnings (non-fatal anomalies such as id-fallback resolution or version drift). A restore is considered fully successful when CommitsApplied == TotalCommits and Warnings.Count == 0.

The chosen RecoveryMode and ResolutionPolicy are echoed back on this object so the result is self-describing when logged or displayed to QA.

Properties

CommitsApplied

Number of commits from Path that were successfully applied. Equal to TotalCommits on a fully successful restore; less than TotalCommits when commits were skipped (BestEffort) or the restore was aborted (Transactional).

public int CommitsApplied { get; }
Property Value

System.Int32

FailureCommitIndex

Zero-based index of the commit that caused the restore to fail, or null if the restore completed without a hard failure. Only populated when Transactional aborts the restore.

public Nullable<int> FailureCommitIndex { get; }
Property Value

System.Nullable<System.Int32>

FailureReason

Human-readable description of why the restore failed, or null if it completed successfully. Only populated when Transactional aborts the restore.

public string? FailureReason { get; }
Property Value

System.String

RecoveryMode

The RecoveryMode that was active during the restore — either the value passed explicitly or the default (BestEffort).

public RecoveryMode RecoveryMode { get; }
Property Value

RecoveryMode

ResolutionPolicy

The ResolutionPolicy that was active during the restore — either the value passed explicitly or the default (Lenient).

public ResolutionPolicy ResolutionPolicy { get; }
Property Value

ResolutionPolicy

TotalCommits

Total number of commits in the Path — the denominator for CommitsApplied.

public int TotalCommits { get; }
Property Value

System.Int32

Warnings

Non-fatal anomalies encountered during the restore — for example uuid-to-id fallback resolutions, skipped commits, version drift, or bridged variables. Empty when the restore was clean. Each entry is a ReplayWarning with a machine-readable Code and structured Context for logging or display.

public List<ReplayWarning> Warnings { get; }
Property Value

System.Collections.Generic.List<ReplayWarning>

Docs last synced: 2026-07-08
Screenshot viewer