Crosswake.Adoption.RouteInventory (crosswake v0.2.4)

View Source

Closed, sanitized route-row validation for first-adopter planning inputs.

This module deliberately records only opaque route references and low-cardinality posture. It is not a runtime route registry and never supplies route-local safety values from product-surface defaults.

Summary

Types

posture()

@type posture() :: %{:status => status(), optional(:value) => term()}

status()

@type status() ::
  :confirmed_sanitized | :known_default | :unknown_blocking | :not_applicable

t()

@type t() :: %Crosswake.Adoption.RouteInventory{
  auth: term(),
  disablement: term(),
  fallbacks: term(),
  media_requirement: term(),
  mutation_categories: term(),
  offline_posture: term(),
  path_pattern: String.t(),
  queued_data_retention: term(),
  recent_auth: term(),
  route_id: String.t(),
  runtime_owner: term(),
  scope_posture: term(),
  staleness_class: term()
}

Functions

promotion_status(row)

@spec promotion_status(t() | [t()]) :: {:eligible, t() | [t()]} | {:blocked, map()}

status_values()

@spec status_values() :: [status()]

validate(input)

@spec validate(keyword() | map()) ::
  {:ok, t()} | {:error, Crosswake.Adoption.RouteInventory.ValidationError.t()}

validate!(input)

@spec validate!(keyword() | map()) :: t()

validate_inventory(rows)

@spec validate_inventory([keyword() | map()]) ::
  {:ok, [t()]} | {:error, Crosswake.Adoption.RouteInventory.ValidationError.t()}