CLI: add idempotent assert --ensure with theory and signer preconditions #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add an idempotent assertion mode with theory-ID and signer preconditions so interrupted
agent runs can resume safely without hand-written journal/SID guards.
Motivation from the grounded two-machine run
Machine B successfully wrote six one-statement assertions, then the query battery
failed in a wrapper before artifacts were complete. Re-running the original script
would have issued the six writes again. The recovery script therefore had to hard-code
all returned SIDs and verify, for each one, the expected signer and active status in
log --jsonbefore continuing.The run also relied on a local alias. A pre-write full theory-ID check was essential
because aliases are local and may point somewhere unexpected.
Proposed CLI
For example:
Suggested JSON result:
An explicit idempotency key could complement content-based
--ensureif exactstatement identity is not sufficient.
Semantics to define
existing SID and performs no append.
silently reassert; any reassert/revive behavior should require an explicit option.
--ensurecalls do not create duplicates.assertretains its current append semantics.Acceptance criteria
and concurrent calls.
Environment / evidence
Observed with Elephant 0.1.2. The run's manual recovery guard is in
finalize-machineB.sh:github.com/anuna-cooperative/flf-elephant-experiment@96ca63675e/runs/2026-07-16/grounded-machineB/finalize-machineB.sh