Verifies that the file list inside the published Hex tarball for X.Y.Z
matches the file list at git tag vX.Y.Z over Relyra's full package.files
scope (lib/, priv/, docs/, guides/, and root artifacts).
Usage
mix verify.release_parity 1.4.0
mix verify.release_parity 1.4.0 --jsonExit codes
0— parity (no drift)2— drift detected ortest_supportpath in published tarball1— runtime error (network failure, missing tag, tarball fetch failure)
Retry behavior
RELYRA_RELEASE_VERIFY_ATTEMPTS (default 10) and
RELYRA_RELEASE_VERIFY_SLEEP_MS (default 15_000) allow CDN propagation
retries after a freshly-cut release.
Implementation notes
Path-set equality is the primary gate — outer .tar SHA256 may differ while
extracted contents match. Any published path containing test_support fails
closed before the path-set diff (TD-02 defense-in-depth).
Summary
Functions
Hard-fails with exit 2 when published paths include test_support.
Pure path-set comparison. Returns :parity when the two MapSets are equal,
otherwise {:drift, only_in_git_sorted, only_in_hex_sorted}.
Returns sorted path prefixes and root files matching mix.exs package.files.
Filters relative paths to the package.files scope and excludes test_support.
Validates the version argument against canonical semver before any subprocess.
Returns true when any path contains test_support.
Renders the --json output envelope. Parity renders as "ok".
Retry loop with env-configurable attempts and sleep between transient failures.
Functions
Hard-fails with exit 2 when published paths include test_support.
@spec compute(MapSet.t(String.t()), MapSet.t(String.t())) :: :parity | {:drift, [String.t()], [String.t()]}
Pure path-set comparison. Returns :parity when the two MapSets are equal,
otherwise {:drift, only_in_git_sorted, only_in_hex_sorted}.
@spec expected_relative_paths() :: [String.t()]
Returns sorted path prefixes and root files matching mix.exs package.files.
Filters relative paths to the package.files scope and excludes test_support.
Validates the version argument against canonical semver before any subprocess.
Returns true when any path contains test_support.
Renders the --json output envelope. Parity renders as "ok".
@spec retry_until!(String.t(), pos_integer(), non_neg_integer(), (-> :ok | {:error, term()})) :: :ok | no_return()
Retry loop with env-configurable attempts and sleep between transient failures.