Model-check the agent run execution lease and durable step journal with TLA+. Use when changing turn lease claim, renew, release, fenced writes, reapers, aborts, run pruning, beginAgentExecutionStep and its siblings, or the code that dispatches a tool effect after markAgentExecutionStepDispatched.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
verification/execution-lease/ExecutionLease.tla models one turn's execution
lease, its runs, and one durable execution step. TLC checks it exhaustively for
three runs. The promise it guards:
never runs its external effect at
most once, across every run and lease generation, including deposed workers
that keep running. If this breaks, an email or a non-idempotent write goes
out twice after a crash or takeover.agent_execution_steps.P8 is per step row. It assumes every retry of a call reaches the same step id; whether a re-planned call does is the tool-call journal's job, which the model does not cover (NOTES.md, "Outside the model").
verification/execution-lease/NOTES.md has the assumptions, the bounds, what
is left out, the results, the known findings, and a code-to-action map.
pnpm verify:execution-leasebrew install openjdk@21, or any java on PATH). The
first run downloads the pinned TLA+ tools to .tmp/tla/ and checks their
sha256.--quick runs only the two checks (2 to 3 minutes).manifest.json lists the covered code with a hash of each entry, recorded at
coverage.syncCommit: named functions, plus anchored regions (from/to
exact strings) for logic that lives inside a large closure. If you edit one,
the runner fails with "covered code changed"; if an anchor no longer matches
exactly once, it exits 2 until you update the anchors.
pnpm verify:execution-lease.pnpm verify:execution-lease --update-coverage to move the sync commit.A violation in ExecutionLease.cfg or ExecutionLeasePolicyFlip.cfg is
either a real bug or a modelling error. Walk the TLC trace step by step
against the cited code.
A mutation that stops failing means the check has lost the ability to catch that break. Fix the model before anything else.
findings/ holds configs that reproduce real gaps in the current code (F2,
F3; F1 and F4-F6 are code-reading findings). They are expected to fail. When one is
fixed, the runner reports that it no longer reproduces. Move its config into
checks in manifest.json and update NOTES.md.
BuilderIO/agent-native
46ed84c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.