Repository navigation
docs(m8): bind lane boundaries to the CLI's own stderr summary - #211
Merged
Merged
Conversation
g11's blanket empty-stderr rule rejects every clean lane: codex_lane.main
always prints its {evidence_digest, faults} summary to stderr after it
publishes evidence. The additive lane output contract replaces that rule
at the five audited boundaries:
- S4;
- H7 active, S6b and S6c;
- ER R1.
At each, the captured stderr must equal the summary rebuilt from checked
evidence, the exit must be 1 exactly when there are faults, and stdout must
be only the declared verdict. Command status, capture success and ssh
transport status are recorded separately.
Credential-free tests drive the real CLI in a subprocess through the actual
blocks, on accepting and refusing paths.
Frozen procedures and the CLI are unchanged. This adds no host action and
no continuation authority.
Refs #210
Refs #186
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7VMTaJ9XePzc8fjmBBFfs
Review of ddf1e33 found two introduced defects: - L2 left the rest of g11 C5 to be copied verbatim. Those lines hardcode g11 paths, so a g12 composition would read evidence and policies that do not exist. - No size bound had a test input where it binds. L2 is now one complete C5 replacement, with the GEN, GEN_PRIOR and W_PRIOR literals declared. Its test runs the whole block, including the active-refresh selection, the derived no-chatgpt policy and the stale binding check. It covers the measured and unmeasured variants, and its S6b denial record is produced under that derived policy. New tests accept the stderr and status bounds at exactly the limit and refuse them one byte past it. Also: - Each helper's arity check now returns failure, so a call inside a command substitution cannot proceed. - The doc states that only lane_capture's own zero exit establishes a complete capture. - The doc names both RunHost exception-handler reports, and that a maintain refusal can surface as a traceback. Refs #210 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S7VMTaJ9XePzc8fjmBBFfs
sushiHex
marked this pull request as ready for review
October 15, 2026 22:44
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #210
Refs #186
Problem
The bounded g11 session stopped at its first S4 lane. The g11 procedure (
M8-maintenance-g11-continuation.mdline 40) requires "empty stderr at every boundary". Butcodex_lane.main(codex_lane.py:860-865) always prints one{"evidence_digest": ..., "faults": [...]}summary line to stderr after it publishes evidence, on success too. That rule rejects every clean lane. Only the outer transport exit was retained, so the live S4 exit and qualification stay unknown.Change
This adds a new document,
M8-maintenance-lane-output.md, plus its README row and manifest entry. No frozen procedure and no CLI byte changes.Class audit. Every g11 boundary was audited from source at C. Exactly five write the lane summary:
maintain;The rest are CLEAN or UNKNOWN and keep the empty-stderr rule:
/dev/null.run: UNKNOWN. Its only implicit stderr writer is asyncio's default exception logging, which fires only after a walker drive has already failed.L0 helpers, each a Python fence run by the host's stock interpreter, as every existing checker is:
lane_capture(operator, outsidemaintain) records stdout, stderr and returncode in exclusively created files. It checks identities on the retained descriptors before it publishes the status, and its own success is separate from the command's status.lane_expectation(service) requires that the recomputed evidence digest equals the frozencheck_evidencedigest. For schema-5 explicit refresh it does a closed-field consistency check instead.lane_boundary(operator) requires the stderr bytes to equal the summary rebuilt from that evidence, the exit to be 1 exactly when there are faults, and stdout to be empty or the declared verdict.L1-L3: complete replacement blocks for S4, the three H7 controls and ER R1.
L4: a Python workstation transport that keeps ssh's returncode, stdout and stderr in three separate files and accepts only exit 0, empty stderr and the exact declared stdout.
Tests (
tests/test_m8_lane_output.py, credential-free, no vendor or host)Real CLI in a subprocess.
codex_lane.mainruns in a subprocess (tests/lane_cli_double.py) with only custody and launch substituted. Publication, the summary, the verdict and the exit are its own. The evidence comes from the production lane code with a scripted peer.Accepting paths. That output flows through the actual L0 capture, the frozen
check_evidencebytes, the expectation and the boundary. The six accepting cases are initial, active, denial, wrong plan, and measured and unmeasured refresh.Refusing paths. Sixteen damages are each applied to the clean, refusal and refresh cases:
Reordered refusal faults and a mismatched refresh verdict also refuse.
Expectation and capture. The expectation binds the checked digest, and the closed schema-5 record refuses damage. Capture failure is kept separate from the command's status. The capture refuses before dispatch. Identity loss refuses before the status is published (POSIX only, since Windows cannot rename an open file).
Guard removal. Removing the stderr guard, the exit guard or the capture identity guard is caught by an assertion failure.
Composed shell blocks. L1, L2 and L3 execute with the real lane CLI and a fake
maintain. An injectedsudowarning stops S4, and an accepted S6b control stops the remaining H7 controls.Transport and reproduction. L4 is tested over fake ssh exits 0, 255 and 1, stderr noise and stdout mismatches. The frozen g11 predicate rejects a clean real CLI run, which reproduces Reconcile operator procedure output checks with real lane CLI summaries #210.
Local evidence (Windows, Python 3.14)
tests/test_m8_lane_output.pyatcb86a88: 92 passed, 7 skipped (the POSIX-only rename tests).test_m8_ci_scope,test_mutation_inventories, the g11 continuation tests and the operator-command tests: 529 passed, 7 skipped.uv run verifywas not run locally. Hosted CI on the exact head is the gate.Review
The design was reviewed before implementation by Codex (gpt-6.1-sol, high).
Adopted:
Rejected, with the reason: a semantic schema-5 refresh checker. It would be new verification authority outside #210, and the frozen ER R2 already defines what the verdict means. The doc labels the refresh binding as consistency-only.
The implementation at
ddf1e33then got one focused Codex pass (gpt-6.1-sol, high).Introduced defects, both fixed in
cb86a88:GEN,GEN_PRIORandW_PRIORliterals declared. Its test runs the whole block, including the active-refresh selection, the derived no-chatgpt policy and the stale binding check. It covers both verdict variants, and its S6b denial record is produced under the derived policy.Nits, all adopted:
lane_capture's own zero exit establishes a complete capture. A status file alone does not.maintainrefusal can surface as a traceback.Design choice, kept and recorded: the double substitutes
run_startupwith a record the production lane produced. It therefore proves the CLI's publication, summary, verdict and exit, not that CLI arguments produce that record.Not established
🤖 Generated with Claude Code
https://claude.ai/code/session_01S7VMTaJ9XePzc8fjmBBFfs