Certitudo.Retentio (certitudo v0.1.0)

Copy Markdown View Source

Resolves the previous snapshot (retentio) — what the current impressio is compared against. Either the most recent prior run or an explicit --since target.

Summary

Functions

Stage: locates the retentio for ctx.impressio_run_dir, adding :retentio{:ok, path}, {:since_not_found, since} (an explicit --since target doesn't exist), or :skipped (--no-auto-diff). Computing the actual diff is Discordia.inferentia/1's job.

Types

resolution()

@type resolution() :: {:ok, binary()} | {:since_not_found, binary()} | :skipped

Functions

find(impressio_run_dir, opts \\ [])

@spec find(
  binary(),
  keyword()
) :: binary() | nil

previous(current_run_dir)

@spec previous(binary()) :: binary() | nil

previous(current_run_dir, exclude_run_dirs)

@spec previous(binary(), [binary()]) :: binary() | nil

resolve(ctx)

@spec resolve(map()) :: map()

Stage: locates the retentio for ctx.impressio_run_dir, adding :retentio{:ok, path}, {:since_not_found, since} (an explicit --since target doesn't exist), or :skipped (--no-auto-diff). Computing the actual diff is Discordia.inferentia/1's job.

resolve(opts, current_run_dir, impressio_run_dir)

@spec resolve(keyword(), binary(), binary()) :: resolution()