The policy
runnable
The code
This script runs on SQLite offline and on Postgres whenCTRLRUN_STORE_URL names one; the
part that changes is open_store.
runnable file=main.py
What the agent sees
CTRLRUN_STORE_URL=postgresql://ctrlrun@db.internal/ctrlrun the first line reads
PostgresStateStore and the rest is identical, and now it holds across hosts: the refusal
comes from a unique index on the effect key and compare-and-set updates whose row counts are
checked, instead of SQLite’s file lock.
The receipt
runnable
CTRLRUN_STORE_URL is set, or with
--store-url 'postgresql://db.internal/ctrlrun?ctrlrun_schema=ctrlrun'. A read command
migrates nothing and creates nothing.
When an AMBIGUOUS appears
One new case: a connection lost duringCOMMIT. Postgres very often did commit, so the store
treats it as unknown and re-reads the row to find out which; only if the re-read fails does it
refuse to proceed. Your executor’s lost replies are handled as before. Resolve them with
ctrlrun resolve --store-url … from any host.
Next
- Run on Postgres: the schema, the grants, failover.
- Effect keys · Get started · Why.