Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/AGENT_HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,33 @@ Publication/activation trust the supplied digest; the preceding checker and
composition own its content validation. No new crash or timeout-cleanup proof
is claimed. The detailed limits are in the living M8 implementation record.

## #226, #189 — private drift output is checked inside the step

[PR #235](https://github.com/sushiHex/constructicon/pull/235) adds the reviewed
G1 fence and private packager values. The fence retains output/status privately,
checks the supplied tool digest, zero exit, empty stderr and exact expected
stdout, and exits before the next command on mismatch. The expectation is
bounded UTF-8 encoded as shell-safe hex, final LF included. Captures are exclusive;
`launch_requested` does not mistake an unknown launch outcome for no execution.
An introduced descendant-output race was corrected with concurrent pipe drains:
both must reach EOF successfully before comparison. Direct-child exit alone is
not completed capture; drain errors refuse with partial bytes retained privately.

The connector found an introduced provenance gap: exact G1 could omit its
private declarations or borrow another step's values. The verified correction
requires exactly one canonical declaration for each input in that step, before
its first G1 fence; templates and deferred steps obey the same rule. Repeated
guards share one pair. Lexical placement is not arbitrary Bash control-flow
proof. The exact frozen q12 document remains assemblable for historical tests,
which gives no execution authority.

Credential-free tests exercise synthetic accepting output, plausible mismatches,
full diagnostic contracts and stopping before later commands. No actual host
expectation or tool digest is supplied. The digest check reopens the tool path
for execution, so trusted custody still owns that race. Capture has no timeout
or disk bound. This slice establishes neither qualification nor a complete q13
procedure, rehearsal or live attempt; the wider #189 audit remains separate.

## #230 — public-text backfill preserves coverage gaps

[PR #234](https://github.com/sushiHex/constructicon/pull/234) merged as
Expand Down
6 changes: 4 additions & 2 deletions docs/plans/MANIFEST.sha256
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
16e2e5bea4a5644b93f2fe4ba638df37dc1f1bda7578924e8724a90fdf88c25a README.md
c9ead64261c96e58f02a4412913d1ddd963c5031180ef16d32946d2d37ba7105 README.md
40dee5d5540368c77bc95818b61d61f9b05780cdfe10776893b8fa44c0fa9966 handoffs/M8-N5-read-session.md
8b93f511f42d665ddb8d24707a2739d540c9e44c82cc372ac2da616bcacab394 handoffs/M8-N5-stage3-read.md
f11045d5e3b0f0494f9760f5b31d4c083e5fb6477fe11a513a12d12299f76cad handoffs/M8-N5-host-session.md
Expand Down Expand Up @@ -30,7 +30,7 @@ dbf3597bc5ee035700160b7f10d479412b8cd2e85f4a924e745e4f779d34ea4c handoffs/M8-na
e1e37cde508985d3c578155d325a7eddf8b2bfc40c67faeb98824a93dce83d5b handoffs/M8-combined-startup-evidence.md
6f27af33925f0780ed4f00642c57db7b743931cb0e2c815f71b5304e906907fe handoffs/M8-controlled-startup-evidence.md
faf796e36ca5ebc5413208a3ba653d169c3d5716da93f7e79e5f682d81d7aa1a handoffs/M8-hook-execution-evidence.md
b46a94ddce395001917679012741e2f1251aa585f49c41e735eab6efaf7bc7fd handoffs/M8-implementation-record.md
8c12a0621a6f69c5c6e31d05f1a4cddd1369ccb12bacfa2f90aea2a94eafa009 handoffs/M8-implementation-record.md
75bd952c482f2a406dd218ff3941023c049b336b9db73b7b63d3d9353032f2e2 handoffs/M8-bounded-duplex-contract.md
0143bc6b75d032e48a4fcabdd19324852c7fd7ec9a2d4ae071a3057d406d8f18 handoffs/M8-native-mediation-probe.md
3a203483dc12022c55a53bb94b6b55b933d2d1f72046a2b457485845916b150c handoffs/M8-native-qualification-plan.md
Expand Down Expand Up @@ -98,3 +98,5 @@ a44983423444271ef56a17295edca3309af34e27fb54ff2d968e1b7bbe2ea0e9 handoffs/M8-ma
1d7731fb33e594badd698f802310028777e4ff150f427fa1d2051fe60ad25855 handoffs/M8-vm-custody.md
1fbd0a983fc9537f47198221b5a84937da6b3e79fe0c15fb77b3e9b2ba4d76b1 handoffs/M8-maintenance-q12-continuation.md
946a9a3df1a1817e374507e6bb91aafd1c06d577ef8996bf09429e07212220fe handoffs/M8-post-q12-review.md
648d5eb2eabc250874a548e5ef036f20657ed61d6149fd96075b60aff41139b7 handoffs/M8-private-output-guard.md
1895627a90417e49cc913685f8cd9aba537f94aafd90ed3425b43fb1b3bd091a handoffs/M8-post-q12-preparation-decision.md
2 changes: 2 additions & 0 deletions docs/plans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ the eventual code differs.
| [M8 private-maintenance continuation](handoffs/M8-maintenance-private-continuation.md) | Prepared additive procedure at merged controller `e7d40b1` after the positively diagnosed P8 custody refusal: kept-launch verification, fresh q10/g10 and a2/m2, bounded preflight-stage reporting and a verified immutable source bundle. No resumed host or application execution is established |
| [M8 maintenance lane output contract](handoffs/M8-maintenance-lane-output.md) | Additive #210 correction after the g11 stop at S4: replaces the blanket empty-stderr rule at the five lane boundaries with an exact summary/exit/fault contract bound to checked evidence, with separate command, capture and transport records. Credential-free joined CLI tests; no host execution or continuation authority |
| [M8 post-q12 review](handoffs/M8-post-q12-review.md) | The owner's timebox review after q12 stopped at C1. It records the one application attempt (g10) and three output-contract mismatches, each with a different test gap. It proposes a budget of one session and one attempt with no automatic relaxation of checks, source-only q13 preparation, a drift expectation the owner approves by digest, and the public-text order. A proposal only, and no execution authority |
| [M8 post-q12 preparation decision](handoffs/M8-post-q12-preparation-decision.md) | Records the owner's offline-wave decision: autonomous operation as the goal, bounded preparation, and a separate exact-procedure execution gate. Audits the existing composition-proof gaps without claiming a new rehearsal, historical diagnosis or host result |
| [M8 private host output guard](handoffs/M8-private-output-guard.md) | Source-only #226/#189 boundary: bounded private expectation, installed-tool digest input, exact in-step stdout/stderr/status checks, and successor call coverage. Portable synthetic evidence only; no measured host bytes, tool digest, qualification or live execution authority |
| [M8 VM custody and usage preflight](handoffs/M8-vm-custody.md) | Additive (#209): a read-only `scripts/m8_vm_usage.py` observation (`idle-observed`, `in-use` or `unknown`) and the hardline start/release custody notices. Keeps observation, cooperative custody and owner authorization distinct; no stale-claim stealing; starts, stops and connects to nothing |
| [M8 N6c READ source/state review](handoffs/M8-N6c-READ-state-review.md) | Pinned Claude mode and startup audit, confirmed omitted catalog fields, and independently reviewed conditional one-READ lifecycle; no READ implementation or native qualification |
| [M8 N6 startup restrictions](handoffs/M8-N6-startup-restrictions.md) | Source-proved ordinary tool membership restriction, initial versus refreshed MCP distinction, and the managed-policy-before-mode obstacle; no permitting READ implementation |
Expand Down
112 changes: 112 additions & 0 deletions docs/plans/handoffs/M8-implementation-record.md
Original file line number Diff line number Diff line change
Expand Up @@ -6581,3 +6581,115 @@ separate unmerged guard slice. Only documentation and archive reconciliation
followed the rebase; fresh exact-head CI is still required. This does not expand
the synthetic-peer proof into vendor qualification, installed-controller state,
a full C3/C4, q13, T5 or S6a rehearsal, or new crash/timeout-cleanup evidence.

### Private drift output boundary preparation (Refs #226, #189)

The [private output guard](M8-private-output-guard.md) adds one exact reviewed
fence for successor compositions. It captures the host tool's stdout, stderr
and numeric status privately, requires the supplied installed-tool digest,
status zero, empty stderr and complete expected stdout before printing the
repository-owned `drift-checked`. Its explicit shell exit stops the entire step
on mismatch, including when Bash's conditional context disables errexit.
Capture destinations are exclusive and validation retains the capture file
descriptors. `launch_requested` records the affirmative request; a launch
exception retains an unknown return code and makes no claim that no process ran.

The packager fills `DRIFT_STDOUT_HEX` and `DRIFT_TOOL_SHA256` from private
`--values` input as read-only shell variables. The decoded expectation is one
nonempty printable UTF-8 line, final LF included, at most 4,096 bytes; hex keeps
shell metacharacters inert. Every direct tool mention in a successor must be
inside the exact reviewed fence, after shell normalization. Counts are not
authority. Only the exact frozen q12 document retains its historical assembly
contract; a one-byte change removes that exemption, and all source pins are
still checked. This compatibility does not authorize executing q12.

The portable guard suite ran on Windows: 71 passed, with one symlink-creation
case skipped for platform privilege. Synthetic host-tool bytes are explicitly
labelled and paired with different plausible output that refuses. Accepting
steps assert the built declared output and whole actual stdout/stderr. Executed
cases cover the conditional branch, a condition disabling errexit, two diagnosis
calls including a second-call mismatch, unexpected stderr, nonzero status,
missing LF, extra lines, occupied captures, digest mismatch and launch failure.
The six executable fence fault cases fail outcome or evidence assertions when
their corresponding guards are removed. All 33 packager inventory mutants were
assertion-killed, including six new source mutations; inventory target and test
collection checks passed. Full verification and final-head CI remain PR evidence.

No actual host expectation, installed-tool digest or approved private evidence
reference is supplied. The digest is checked by reading a path that subprocess
later reopens; preventing intervening replacement still requires trusted host
custody. Capture is unbounded on disk before comparison and has no timeout.
The complete q13 composition, its rehearsal and its separate execution gate
remain outside this slice. The wider frozen-runbook and stock-utility audit in
#189 is not completed by these selected successor checks. No VM, credential,
vendor binary, model call, qualification or application attempt occurred.

The PR #235 connector finding is introduced: exact G1 bytes could be selected
without either private placeholder, and the values-used check was package-wide.
The real packager accepted a literal-only guarded step and guarded second steps
missing a declaration; new refusal assertions failed before the fix. A lexical
extension also reproduced: placing the declaration after G1 let the first guard
consume inherited values before its read-only fill executed.

Every step selecting the exact G1 fence now requires exactly one canonical
declaration for each private value, before its first G1 piece and before any
fill. Templates and deferred steps obey the same source contract. A repeated
guard in one step shares that pair; separate steps each declare their own.
Tests cover missing, inherited, literal, duplicate and late declarations and
the accepting multi-step fill. Count-only and package-wide checks were rejected
because they leave those distinct defects open. This is an honest-composition
lint, not a Bash control-flow proof. G1 bytes and the exact frozen q12 assembly
exception remain unchanged.

The focused guard, packager and frozen q12 suite passed 262 tests with 38
platform skips. All 37 packager inventory mutants were assertion-killed,
including the four new declaration/order removals, and inventory target and
collection checks passed. Ruff passed for the changed tests and scripts. These
are local focused results; final-head repository verification remains CI evidence.

After rebasing onto the public-text merge `146920d`, the packager, its mutation
inventory and the guard tests retain exactly their committed bytes from
`5507cd8`. Scanner source/tests and the main record, including its scanner
section, are preserved. The combined scope/manifest-link and guard/packager/frozen
q12 checks passed 322 tests with 38 platform skips. No full Windows gate or
repeated mutation run was launched; earlier exact-head CI remains historical
evidence until verification runs on the rebased head.

The next PR #235 connector finding, against `24430ac`, is introduced: direct
capture-file handles let a successful child leave a descendant writing after
comparison. Deterministic control-socket tests reproduced both stdout and stderr
cases as assertion failures: `drift-checked` and the next command appeared before
the descendant was released. This was not merely an unexecuted source premise.

G1 now gives the child two pipes and concurrently streams them into the retained
exclusive private files. Both drain futures must complete successfully before
flush and comparison; executor shutdown alone is not success evidence. The
direct-child status remains only that fact. A drain failure refuses and preserves
captured bytes without certifying capture completeness. Real descendant writes
are privately captured and refuse; a silent descendant closes both streams before
acceptance. Test-only socket synchronization determines ordering, with bounded
test timeouts only failing hangs. Four executable mutations remove either result
check or bypass both joins for each late stream; each fails the actual verdict
assertion, not by a harness exception.

This does not add a production timeout, disk bound, process-tree completion proof
or adversarial-filesystem containment. A descendant retaining a pipe can hold the
guard indefinitely; a trusted tool could reopen capture paths. No actual host
data, installed tool, model call or live procedure was used.

The complete guard and packager suites plus mutation-inventory structural checks
passed locally on Windows: 264 passed, one symlink-privilege skip. This includes
the nine new descendant/drain cases and their four assertion-proven fault cases.
Ruff passed for the changed script and tests. The broader mutation inventories
were structurally checked, not remeasured here; no full Windows gate was run.
The scope/manifest/link suite passed all 60 tests after named staged-document
manifest regeneration. The nine new cases passed again after tightening the
test-only socket reader and timeout cleanup; no timeout is a passing criterion.

Rebasing onto the isolated-qualification merge `459cc770` preserves its complete
record and handoff, together with the scanner sections. The packager, mutation
inventory, guard tests and complete G1 document are byte-identical to `5708b39`.
The rebased scope/manifest/link checks and nine new descendant/drain cases passed
69 tests, with 89 unrelated guard cases deselected. No full suite or mutation
inventory was re-executed after this rebase; earlier counts remain historical,
and exact-head CI is still required.
Loading
Loading