Vibe.SelfPatch (vibe v0.2.2)

Copy Markdown View Source

Development-only helpers for patching Vibe and continuing in the same BEAM.

Self-modification must be gated: write or update tests first, run a preflight before mutation, then run validation again before hot reload.

Summary

Types

reload_report()

@type reload_report() :: %{
  checks: map(),
  modules: [module()],
  snapshots: map(),
  warnings: [term()]
}

Functions

compile_and_reload(opts \\ [])

@spec compile_and_reload(keyword()) :: {:ok, reload_report()} | {:error, map()}

deployment_gate(opts \\ [])

@spec deployment_gate(keyword()) :: {:ok, map()} | {:error, map()}

preflight(opts \\ [])

@spec preflight(keyword()) :: {:ok, map()} | {:error, map()}

release_reload(opts \\ [])

@spec release_reload(keyword()) :: {:ok, term()} | {:error, term()}

snapshot_process(process)

@spec snapshot_process(pid() | atom()) :: {:ok, term()} | {:error, term()}

validate(opts \\ [])

@spec validate(keyword()) :: {:ok, map()} | {:error, map()}