LiveFreev0.1.0MIT

Execution & retry governance / 03

Attempt Boundary

Distinguish “preflight failed” from “the real attempt started” before a costly or stateful command consumes retry lineage.

01Fail-closed preflight

Failure, timeout, output overflow, spawn failure, or protected-path mutation prevents execution.

02Bounded observation

Protected paths and command-output metadata are hashed without collecting output content.

03Honest lineage

The receipt distinguishes an unconsumed attempt from a command that was actually invoked.

Use it when

A failed check must not masquerade as a consumed run.

Attempt Boundary is for model runs, migrations, deployments, batch jobs, and other costly or stateful work where retry accounting matters. It places one bounded preflight in front of one configured execution command and records the exact side of the boundary where the attempt stopped.

Workflow

Define, observe, distinguish.

01 / Define

Declare the boundary

Name the preflight, execution command, working directory, time and output limits, protected paths, and receipt path.

Inspect plan contract
02 / Observe

Snapshot protected state

Hash bounded files and directories before and after preflight. Store only byte counts and digests for command output.

Open neutral plan
03 / Distinguish

Write the receipt once

Record an unconsumed attempt when preflight prevents execution, or consumed once the wrapper invokes the real command.

Inspect receipt contract

Quick start

Run a reviewed plan, then verify its receipt.

npm install https://kaldenframelabs.com/downloads/kaldenframe-labs-attempt-boundary-0.1.0.tgz
npx attempt-boundary run ./attempt-plan.json --root ./workspace
npx attempt-boundary verify ./workspace/receipts/attempt-001.json

Exit 4 means preflight stopped execution. Exit 5 means execution was invoked but failed, timed out, or exceeded its output limit.

Included

A narrow boundary with inspectable mechanics.

  • Runner and verifierExecute a reviewed plan, produce a create-only receipt, and verify canonical receipt content hashes.
  • Two JSON SchemasStrict contracts for the execution plan and the resulting attempt receipt.
  • Neutral planA safe example showing syntax preflight and bounded protected-path observation.
  • Thirty testsCoverage for paths, overlap, timeouts, output limits, mutation, tampering, CLI exits, schemas, and examples.

Adjacent decision

Need to decide whether an exact artifact may advance after verification?