Durable Postgres queue plugin for Animus.
Version 0.2 adds the generation-fenced queue/v2/* contract used by the
five-slot coding fleet:
- idempotent enqueue with a monotonic generation per qualified subject;
- exact repository/base/head-ref reservations;
- Pending-only fresh leasing (expired assignments are never silently reused);
- compare-and-swap lease renewal, expired-lease recovery, completion, and return-to-pending;
- stable workflow and subject identity across daemon restart/recovery;
- stale-owner fencing after every lease transfer.
Legacy queue/* methods remain available for older daemons. They cannot lease
or mutate v2 entries, so mixed-version deployment fails closed instead of
creating a second workflow or node.
DATABASE_URLorANIMUS_POSTGRES_URL: Postgres connection URL.ANIMUS_QUEUE_LEASE_TTL_SECS: maximum lease TTL (default 1800 seconds).ANIMUS_QUEUE_TABLE: safe table identifier (defaultqueue_item).
The plugin applies additive, idempotent schema changes. Its health check is not ready until both Postgres and the complete v2 schema are available.
cargo test --all-targets
cargo clippy --all-targets --all-features -- -D warningsPostgres integration tests use TEST_DATABASE_URL, falling back to
postgres://postgres:postgres@localhost:55432/animus_test.