Unpublished candidate. It stacks on the 0.11.0b2 onboarding work. The published release remains 0.11.0b1. These pages do not describe a private multi-layer control engine.
Upgrade from 0.11.0b1. An existing 0.11.0b1 Shield tool journal continues to work for direct Shield calls in 0.12.0b1, but it cannot back DurableApprovals: it lacks the authenticated journal instance id required for approval binding. Submitting an intent can succeed before approval is refused. To use durable approvals, create a new journal with 0.12 using a separate configuration and fresh state and witness locations, then bind a new approval directory to it. Retain the original journal, keys and evidence; do not delete or reinitialize the original journal in place. This is not a migration of existing approval or execution history.
Backup restore safety. Joint restoration of the approval database, published head and freshness witness is undetectable. A jointly restored approval directory, or an ambiguous R3 rollback accepted with recover-approvals, can make a previously completed intent appear approved again. After the original authorization expires, refreshing it with a new signed request and reviewer approval can cause the external action to run a second time, even while the original bound Shield journal retains the completed receipt. Do not run recover-approvals after restoring an approval directory from a backup. Use recovery only for a known interruption of the current, non-restored directory with its original bound journal. If state was restored or its provenance is uncertain, stop dispatch and refresh, retain the existing evidence, and reconcile outstanding effects with the provider and operator before considering further actions. Never treat a missing approval record or a fresh authorization as proof that the original action did not occur.
DurableApprovals is optional. The host names an intent and keeps the arguments. The directory stores the tenant, audience, agent, tool, argument digest, resource, destination, workflow, policy version, policy pin, and any mission or checkpoint reference. It does not store raw arguments, credentials, or a Python execution frame.
from quaspar_shield.approval_manager import DurableApprovals
directory = DurableApprovals(
"approvals",
tenant=shield.config.tenant,
audience=shield.config.audience,
checkpoint_key=checkpoint_key,
checkpoint_hook=hook,
)
directory.submit("intent-1", ..., now=now, lifetime=86400)
directory.approve("intent-1", signed_request, approval, shield=shield, now=now)
directory.execute_approved(
"intent-1", signed_request, approval, arguments, shield=shield, now=now,
)
refresh requires a new request and a new reviewer signature. The old approval is not reused and the directory does not sign a replacement.execute_approved checks the current identity, policy pin, mission, quarantine, dependency, and budget before it claims the intent. The claim is one database transition. A second caller does not run the tool.execute_approved always calls Shield.execute. complete accepts completion only when that Shield journal already records it for the same execution.acknowledge_pending does not override that. quaspar-shield recover-approvals is the operator path. It is bound to the directory, journal identity, generation, and pending transition. It does not execute a tool or erase a claimed, completed, or uncertain record. A witness ahead of the database stays refused. Deleting the pending witness file is not detected.capacity. pending_approvals returns one page. Its next value is the cursor passed back as after.python -m quaspar_shield.examples.durable_approval approves one intent, jumps a simulated day, restarts in a new process, and runs it once.DurableApprovals share one failure object. It has a stable code, the journal execution status, a retryable flag, and resolution text. A side-effecting timeout is uncertain_effect and is not retryable. A Data Passport refusal after the handler ran is result_withheld. Temporary capacity is capacity_exhausted. Capacity held by unresolved executions is capacity_held and is not retryable. Arguments and credentials are not included.ExternalEffects commits a host-owned idempotency key, and appends it to a log, before the provider runs. The same key is not sent again, including after the sqlite file is rolled back. A duplicate provider result does not mark a Shield execution completed. A provider-status hook reports confirmed, absent, or unknown. The first confirmed or absent answer is kept. The hook does not call the provider. This is not universal exactly-once execution. It needs trusted persistent storage and a provider that honors the key. A corrupt log fails closed.ExternalEffects is not signed or witnessed. It requires a provider that honors idempotency keys. Deleting both its database and its log, or restoring an older copy of that directory, can submit a key again.This candidate is not a production deployment. Production would still need multi-host operation, bounded approval history, authenticated external-effect records, hardware-rooted keys, joint-restore detection, and operational telemetry. It does not provide universal exactly-once execution.
Onboarding, recovery, and journal counts stay documented for 0.11.0b2.