Skip to content

Proof-or-Stop v0.3.400 — Private Reviewer Shell Temporary Directory Repair

Choose a tag to compare

@Harmonynet Harmonynet released this 17 Sep 17:38
· 1633 commits to main since this release

Overview

This release fixes a private-lane shell failure in isolated managed review. The provider-specific shell bookkeeping directory was left outside the admitted temporary filesystem, so legitimate read-only review commands could fail with EPERM even though authentication, prompt transport, and structured result handling were working correctly.

The release contains six commits across 14 files, with 418 insertions and 352 deletions since v0.3.399. The package and repository CLI both report version 0.3.400.

Problem

A real concept-review run attempted to execute a Bash hashing command and tried to create bookkeeping data under /private/tmp/claude-501. The read-only review sandbox correctly rejected that external write. The affected review then substituted a placeholder digest, which reduced the assurance of the imported result and required the review inventory to be cancelled and rerun.

The lane already supplied TMPDIR, TMP, and TEMP, but the provider uses a dedicated CLAUDE_CODE_TMPDIR variable for its shell bookkeeping. Without that mapping, provider-internal temporary files escaped the lane's admitted private directory.

A real isolated diagnostic reproduced SHELL_UNAVAILABLE in 11,956 ms. Changing only the dedicated variable to the already admitted lane temporary directory allowed the identical real Bash SHA-256 command to complete in 9,503 ms. Those observations isolated the failure to temporary-directory routing rather than credentials, prompt transport, command content, or the read-only source policy.

Resolution

  • managedReviewLaneEnvironment now maps CLAUDE_CODE_TMPDIR to lane.layout.temporary.
  • The mapping is derived alongside the standard temporary-directory variables for every private review lane.
  • The runtime environment registry now declares the provider-specific variable.
  • The runtime contract verifier binds the new field to the production lane environment.
  • The existing provider-state verifier exercises both environment derivation and the real macOS write boundary.
  • Static evidence bindings were refreshed for the changed source and regression excerpts without changing existing exception identifiers or classifications.
  • Documentation now explains the private shell temporary-directory behavior and its security boundary.

Before and after

Area Before After
Shell bookkeeping Provider shell state defaulted to an external per-user temporary directory. Provider shell state is routed to the lane's existing private temporary directory.
Real Bash tools A valid read-only hashing command could fail with EPERM before producing evidence. The same hashing command runs inside the admitted lane and returns the expected digest.
Source protection Source and external sibling locations were read-only. Source and external sibling locations remain read-only; only the existing private lane is writable.
Credentials Private credentials were isolated from ambient homes. Credential handling is unchanged and remains isolated.
Review evidence A tool-unavailable result could force placeholder evidence and reduce assurance. The reviewer can execute the required shell tool without widening source or ambient write access.
Controller semantics Ambient environment merge precedence was outside the exercised repair. It remains unchanged and is not claimed by this release.

Security and compatibility boundaries

The repair does not widen the filesystem allowlist. The new value points to the same already admitted temporary directory used by the lane's standard temporary variables. Source files, immutable probes, external siblings, ambient provider homes, and user policy remain outside the writable boundary.

Reviewer credentials, signed subjects, run bindings, terminal receipts, import gates, provider admission, and user configuration are unchanged. The provider-specific variable is consumed only by the matching provider; other providers retain their existing behavior.

Verification evidence

The exact tagged commit ebd55913fc2df691de7267aab55bd175778d9204 was rebuilt and rechecked before publication.

  • npm run build passed, including the full-suite build-binding check.
  • node scripts/verify-managed-provider-state.mjs passed.
  • The provider-state verifier emitted CLAUDE_PRIVATE_TEMP_SANDBOX_PASS.
  • The same verifier retained the prior Keychain and isolated-authentication PASS markers.
  • The real macOS sandbox allowed provider bookkeeping inside the private lane while refusing writes to source, the immutable probe, and an external sibling.
  • Static edge validation emitted U18_STATIC_PASS with zero needs-review rows, zero nested rows, zero unexpanded commands, 17 intentionally skipped rows, and 1,676 reviewed exceptions.
  • The remote pre-push gate rebuilt the main package and passed tsc --noEmit for lab, graph, utils, and main during both branch and tag publication.

Retained integration evidence also records a real provider probe using the production lane environment, normal production host runner, and actual read-only OS boundary. It completed the Bash shasum operation with the exact expected digest in 14,488 ms, exited successfully, produced one structured terminal, and required no manual temporary-directory override. This is tool-availability evidence, not a formal Story review PASS.

Independent audit correction

The first candidate included a locally constructed object-spread assertion that appeared to cover controller environment precedence but did not exercise that production boundary. Independent audit rejected that overclaim. The assertion was removed, the documentation was narrowed to the behavior actually exercised, and the final test now proves only the production lane derivation and real filesystem boundary covered by this repair.

Known limitations

  • The broad runtime contract still reaches an unrelated existing STATIC_AST_PARSER_OBSERVER_SOURCE_DRIFT failure in a nested static-AST reuse verifier. The same failure was reproduced on untouched v0.3.399, so it is not represented as a regression fixed by this release.
  • The full repository test matrix was not run. Passing claims are limited to the exact build, provider-state regression, real sandbox behavior, static scan, retained production probe, and pre-push type checks listed above.
  • The repair does not establish controller ambient-environment merge precedence beyond the exercised production lane boundary.
  • Three separately reported managed-asset synchronization items remain outside this reviewed change.
  • This maintenance release does not assert formal completion of the broader benchmark Story.

Upgrade verification

After updating, run:

proof-or-stop --version

The expected result is Proof-or-Stop 0.3.400.