Autonomic Postgres Logo

autonomic_postgres

GitHub Hex.pm HexDocs MIT License

PostgreSQL durable authority store and transactional ledger for the Autonomic Kernel.


What is this package?

autonomic_postgres implements the Autonomic.Store behaviour using Ecto and PostgreSQL. It maintains the durable authority state, capability leases, effect transaction logs, checkpoints, recovery audit records, and epoch fencing boundaries that allow the BEAM control plane to reconstruct episodes after worker or node restarts.

When should I install it?

Install autonomic_postgres when running an Autonomic Kernel deployment backed by PostgreSQL for durable authority.

What does it depend on?

Installation

Add autonomic_postgres to your mix.exs:

def deps do
[
{:autonomic, "~> 0.1.0"},
{:autonomic_postgres, "~> 0.1.0"}
]
end

autonomic_postgres is opt-in from the application's point of view, but its Mix dependency is autonomic_postgres → autonomic. Installing this package does not make autonomic depend on it; an application chooses this adapter by adding the package and configuring the corresponding core behaviour.

How do I configure it?

In your config/config.exs:

config :autonomic,
store: Autonomic.Store.Postgres
config :autonomic_postgres,
ecto_repos: [Autonomic.Store.Repo]
config :autonomic_postgres, Autonomic.Store.Repo,
url: System.get_env("DATABASE_URL") || "ecto://autonomic:autonomic@localhost/autonomic_prod",
pool_size: 10

Run database migrations:

mix ecto.migrate -r Autonomic.Store.Repo

What public modules and concepts does it own?

TypeSafe evidence is part of the durable audit path

In the reference composition, autonomic_typesafe produces typed semantic observations and core turns them into trajectory state and effect decisions. autonomic_postgres is where those consequences become durable.

The store persists observation frames, trajectory/version state, and exact-revision effect decisions so an operator can relate semantic evidence to the authority consequence it influenced. A semantic decision is not a reusable "AI approval": it remains bound to the effect revision, epoch, policy version, trajectory version, and payload identity that were current when it was evaluated.

See Semantic Evidence and Trajectories.

How does it fit into Autonomic?

autonomic_postgres is the official durable authority adapter:

autonomic_postgres other backends
│ │
└──────────────────┬──────────────────┘
┌─────────────────────┐
│ autonomic │
└─────────────────────┘

The arrows are dependency arrows: concrete adapters depend on the core contracts. The application chooses which implementation to configure at runtime.

Where are the full system docs?

See the repository root at GitHub and HexDocs.