11# Terminal proof planning
22
3- Status: local proof for an uncommitted change based on
4- ` f211e21fb89d00777ac07cc13c358f9f7b02a939 ` . This record does not authorize a
5- commit, publication, or live mutation.
3+ Status: fresh constrained generation and local proof at runtime head
4+ ` ca48d41487affa905cb775da8a985d1b128b18c3 ` , with the generator and documentation
5+ fix still uncommitted. Exact final-head replay remains pending. This record does
6+ not authorize a commit, publication, or live mutation.
67
78## Claim and provenance
89
@@ -39,8 +40,11 @@ media, and preserves intentional repeated commands.
3940## Reproduce
4041
4142Use Node 24 or newer, the repository pnpm, real tmux, and an authenticated Codex
42- CLI using the host's approved routing. Do not put private model identifiers or
43- raw agent transcripts in proof records. Run from this checkout after building:
43+ CLI with the built-in ChatGPT-backed provider. The generation helper currently
44+ attests macOS Seatbelt and CLI ` 0.150.0-alpha.13 ` ; other platforms or versions
45+ must be re-attested, not allowed to fall back to full access. Do not put private
46+ model identifiers or raw agent transcripts in proof records. Run from this
47+ checkout after building:
4448
4549``` bash
4650pnpm run build
@@ -56,21 +60,49 @@ Codex inference, without executing any commands from the prompt:
5660
5761``` bash
5862proof_bundle=" $PWD /.artifacts/terminal-proof-planning/fast"
59- planner_cwd=$( mktemp -d)
60- codex exec --yolo --ephemeral --skip-git-repo-check -C " $planner_cwd " \
61- --output-schema " $proof_bundle /schema.json" \
62- -o " $proof_bundle /decision.json" - < " $proof_bundle /prompt.md" \
63- > /dev/null 2> " $planner_cwd /codex.stderr"
63+ node scripts/e2e/terminal-proof-generate.mjs " $proof_bundle "
6464node scripts/e2e/terminal-proof-planning.mjs run " $proof_bundle " fast
6565```
6666
67+ An optional second helper argument selects the host-approved model for this
68+ invocation only; it is never written into the sanitized receipt. User routing
69+ configuration is intentionally ignored. Authentication uses the existing login;
70+ no credentials are copied or extracted.
71+
72+ Generation is a distinct constrained workflow. The helper supplies the entire
73+ production prompt and schema as data to `codex exec --ignore-user-config
74+ --ignore-rules --ephemeral --strict-config` , with approval ` never` and the named
75+ ` terminal-proof ` permission profile. That profile allows minimal OS reads and
76+ reads of an empty workspace, no writable paths, and no child network access.
77+ The CLI adds read access to its bundled shell and executable shim; the helper
78+ also verifies those effective runtime roots from the session-start trace.
79+ Shell execution, image reads, web search, MCP, plugins, skills, hooks, and nested
80+ agents are disabled; no executable fixture is placed in the workspace. Ancestor
81+ project configuration is refused and project instructions are disabled. Only
82+ the CLI's own inference/authentication transport may contact the configured
83+ service. A temporary cwd or a textual instruction alone is not this boundary.
84+
85+ Before inference, a trusted sandbox probe must fail to read a harmless sentinel
86+ outside the workspace and fail to create a file inside it. After inference, the
87+ helper checks actual startup settings and the model-facing request's tool
88+ inventory, requires zero tool calls, and only then copies the generated decision
89+ into the bundle. This CLI has no blanket no-tools flag: its remaining
90+ ` apply_patch ` tool is restricted by the same read/write sandbox. Model metadata
91+ can require Code Mode despite feature flags, so the helper fingerprints the
92+ inspected ` exec ` /` wait ` wrappers: their V8 environment has no Node, filesystem,
93+ or network primitives and exposes only sandboxed ` apply_patch ` . An optional
94+ user-message tool has no filesystem or network authority. Unexpected tools,
95+ changed wrapper definitions, missing trace evidence, or failed checks stop the
96+ helper. Do not replay a decision until its attestation passes.
97+
6798Repeat with a fresh directory and ` delayed ` instead of ` fast ` in both script
6899invocations. The delayed command emits a startup line, then takes 34 seconds,
69100longer than entry startup polling. No driver timeout is extended. Existing
70101directories are refused; use new names for subsequent captures.
71102Inspect temporary Codex diagnostics locally if generation fails; do not copy
72- them into the proof bundle or public artifacts. Retain only the structured
73- decision and a sanitized generation receipt.
103+ them into the proof bundle or public artifacts. The helper retains only the
104+ structured decision and sanitized ` generation.json ` in the bundle. Local raw
105+ traces are diagnostic evidence, never publication artifacts.
74106
75107The replay script parses the full model decision through the production parser,
76108requires the generated plan to survive unchanged, checks its command allowlist,
@@ -82,32 +114,44 @@ marked separately from model-generated proof: an exact leading duplicate must
82114execute and fail, identical later commands must observe a changed state, exit 7
83115must fail, and a silent 40-second command must hit the real 30-second timeout.
84116
85- ` inputs.json ` , ` decision.json ` , ` generation.json ` (when captured by the parent) ,
117+ ` inputs.json ` , ` decision.json ` , ` generation.json ` ,
86118per-scenario ` live-verification.json ` , and ` receipt.json ` remain under ignored
87119` .artifacts/terminal-proof-planning/ ` . Compact receipts beside this note record
88120actual results, provenance, and hashes; no raw transcripts are included. The
89121source-hash guard rejects replay after any recorded implementation input changes.
90- The recorded head is the base plus those uncommitted input hashes, not a claim
91- that the change has been committed; record the final head if it is committed later.
122+ The receipt distinguishes the runtime head, original base, source hashes, and
123+ generator hash. It does not claim proof of a later commit .
92124
93125## Observed results
94126
95- Both fresh Codex generations passed on local macOS with Node ` v26.7 .0` and
127+ Both fresh constrained Codex generations passed on local macOS with Node ` v24.19 .0` and
96128tmux ` 3.7c ` . The fast plan put the command only in entry and chose static text.
97- The delayed plan chose setup entry, one run, a 35-second wait, and expectations.
129+ The delayed plan chose setup entry, one run, and expectations, with no explicit
130+ wait; existing expectation polling observed the delayed completion.
98131Both observed all five success assertions and invoked the proof exactly once.
99132Both refused a replay with exit 17 and preserved the original result bytes. In
100133each run, the exact leading duplicate executed and failed, the intentional later
101134repeat observed changed file state, exit 7 failed, and the silent command hit the
102135existing 30-second timeout. ` receipt.json ` records normalized plans, outcomes,
103136generation provenance, source hashes, and hashes of the full ignored receipts.
104137
105- An independent repeat generated two more plans from the same production inputs
106- and replayed them on Node ` v24.19.0 ` with tmux ` 3.7c ` . Both again invoked once,
107- observed all five assertions, preserved bytes on refused replay, and passed all
108- four negative/intentional-rerun controls. The delayed generation used setup plus
109- one run without an explicit wait; existing expectation polling observed completion.
110- This is four observed generations, not a guarantee of all future planner output.
138+ Each generation trace shows one actual inference request and zero tool calls,
139+ approval ` never ` , the active ` terminal-proof ` profile, restricted filesystem
140+ reads, no writable paths, and restricted network access. The harmless outside
141+ sentinel read and workspace write were both denied. The generated workspace
142+ remained empty. No model-directed fixture execution occurred during generation.
143+
144+ The latest receipt comes from two fresh inference calls using the final helper
145+ unchanged, followed by real-tmux execution. Both calls passed the built-in
146+ permission and tool-inventory checks directly; neither decision was edited,
147+ reused from an earlier generation, or retrospectively re-attested. Diagnostic
148+ attempts during helper development remain local and are not the published proof.
149+
150+ This receipt supersedes the full-access generation receipt preserved at
151+ [ the previous head] ( https://github.com/openclaw/clawsweeper/blob/ca48d41487affa905cb775da8a985d1b128b18c3/docs/proof/terminal-proof-planning/receipt.json ) .
152+ The earlier four runtime demonstrations are historical observations, not evidence
153+ of isolated generation. None of their decisions was reused here. These two new
154+ observations are not a guarantee of all future planner output.
111155
112156Focused validation passed all 138 tests:
113157
@@ -116,9 +160,11 @@ node --test test/decision-parser.test.ts test/review-prompt-policy.test.ts \
116160 test/review-prompt-context.test.ts test/live-proof.test.ts
117161```
118162
119- Documentation checks and ` git diff --check ` passed. The full repository check was
120- started with ` pnpm run check ` ; see ` .artifacts/terminal-proof-planning/check.log `
121- for the actual final outcome, rather than inferring success from focused proof.
163+ Build, helper syntax/lint/format, documentation checks, and ` git diff --check `
164+ passed. The full repository suite was not rerun for this narrow correction:
165+ the earlier run's 49 diagnosed host-fixture failures (Git pruning, offline pnpm,
166+ and timing) remain outside this patch. No full-suite success is claimed; CI must
167+ run again after the parent-reviewed commit.
122168
123169## Limits
124170
0 commit comments