Vixen
02b45cc4
csharp
public static class ContentDiff

Compares two catalogs and says whether the difference can be applied to a running fleet.

Read the guide page for this →

Remarks

Doc 27 § Upgrades: "'Additive' is proven by the build, not asserted by a human." That sentence is this class. The gate is vixen live upgrade --content refusing to apply a non-additive diff live, with the reason, rather than applying it and finding out.

⚠ The classifier is deliberately pessimistic, and the asymmetry is the whole safety argument. Calling a non-additive change additive means a live reload that corrupts a running world; calling an additive change non-additive means a drain nobody needed. The first is unrecoverable and the second costs an evening, so every case this cannot decide is not additive.

⚠ A removal is never additive, even of something nothing is using. Whether an address is in use is a question about every entity in every world in the fleet, and this compares two files. A classifier that guessed would be guessing about the one case that deletes a player's sword.

Fields and properties (1)

  • public static ImmutableArray<string> LiveReloadable

    Kinds whose content a running realm can reload.

Methods (3)

  • public static ImmutableArray<ContentDelta> Compare(IReadOnlyCollection<ContentEntry> before, IReadOnlyCollection<ContentEntry> after)

    Compares two catalogs.

  • public static bool IsAdditive(IReadOnlyCollection<ContentDelta> deltas)

    Whether a whole diff can be applied to a running fleet.

  • public static ImmutableArray<string> Blockers(IReadOnlyCollection<ContentDelta> deltas)

    Why an update cannot be applied live, as sentences for an operator.

Used by (1)

  • ContentDiffTestsVixen.Live.Orchestrator.Tests