OutcomeLock

OutcomeLock

PythonAI AgentsAgent ReliabilitySQLiteDevOpsLocal First

The Challenge

An agent can correctly remember that work is complete while an older plan remains in its execution queue. That gap can repeat releases, deployments, submissions, or operational tasks even though the real-world outcome has already changed.

The Solution

OutcomeLock places a deterministic evidence check between planning and execution. Trusted adapters record outcome evidence with a stable work key, source, timestamp, confidence, and content hash. The guard then classifies each action as proceed, suppress, or blocked and uses non-zero exit codes to prevent unsafe execution.

System Architecture

Evidence Gate Between Plan and Act

OutcomeLock reconciles a queued plan against newer trusted evidence before any executor is allowed to create side effects.

01Trusted Sources
source adapterRead a tracker, API, database, email confirmation, CI result, or explicit user assertion.
provenanceRecord the source, opaque locator, timestamp, confidence, and content hash.
02Local Evidence Ledger
stable work keyMatch one logical outcome even when plans use different wording.
SQLite historyKeep observations idempotent, ordered, local, and auditable.
03Deterministic Guard
reconcileCompare plan time with the newest strong or contradictory evidence.
policy resultReturn proceed, suppress, or blocked without asking an LLM to judge.
04Executor Boundary
exit code gateOnly an all-clear exit code can reach the executor.
decision reportPreserve the reason and evidence trail in JSON or escaped HTML.
Prevents duplicate side effectsFails closed on ambiguityLocal and zero runtime dependencies
  • ✓Stable semantic work keys for matching plans to outcomes
  • ✓Local SQLite evidence ledger with provenance and timestamps
  • ✓Deterministic proceed, suppress, and blocked decisions
  • ✓Fail-closed handling for weak or contradictory evidence
  • ✓Mechanical executor control through documented exit codes
  • ✓Escaped HTML reports and machine-readable JSON output
  • ✓Zero runtime dependencies and Python 3.10 to 3.13 support
  • ✓GitHub Action for guarding generated execution plans