Repository navigation
Own sandbox M2: cua's compat executable for the macOS vendor host; CodexCLI.app leaves the darwin pin (#115) - #158
Merged
Merged
Conversation
…child's sandbox call carries TMPDIR and CODEX_HOME as buildLaunch set them; m2-mini.sh env-probe runs it per mode on the mini
…box/codex-compat.mjs): the recovered sandbox template only, role by script basename, the session's compat settings located from TMPDIR and CODEX_HOME, and the recorded app-server answers; not yet wired
…ds what appears under the session temp and what the run's own helper holds open there; m2-mini.sh helper-tmp runs it on the mini
… unused CodexCLI.app under three conditions
…xecutable (CODEX_CLI_PATH, CUA_COMPAT_NODE, the session's compat settings written with the run directory and removed with it), the vendor-host launcher preflight, bin/ trusted; CodexCLI.app leaves the darwin pin with the release id kept; doctor's sandbox.launcher
…ode); helpers are the run's by their session temp, not CODEX_CLI_PATH; experiment.mjs runs slot-less through the launch's own launcher and judges the cell against the launch's session temp; own-sandbox --host vendor, accept-native items 12 and 13 (the compat route); m2-mini.sh headless, parity and accept
…nch's real session temp under a fixture home (no symlinked writable root); the compat executable's path is resolved at use, not at load; compat-route cancels the experiment cooperatively with a bounded teardown and keeps its evidence unless the teardown is proven
…ly once its pid is verified gone; SIGKILL after a bounded wait only for a pid whose ownership is re-proven; compat-route's teardown needs every helper verified gone
…dor host keeps top-level bindings across cells) and its report is the last text that parses as JSON
… and default, kernel and worker sandbox calls carry TMPDIR and CODEX_HOME exactly as buildLaunch set them; under disabled node_repl never calls the launcher
… approved helper writes and holds open nothing under the session temp across six read-only calls and a screenshot; no prompt
…n cua's host 76/76, doctor ok, the compat's tests 26/26 on the vendor's Node 24.21.0, process.execve aborts there (SIGABRT, exit 134); own-sandbox on the vendor host fails: its second cell's const redeclaration draws the vendor's warning text, which the harness parses as the report
… 479 and cua 479 complete, diff ok with no undeclared difference; Chrome pid 36513, 1 tab before and after
…ts log path is the m1 sitting log)
…tting at 6de47ae (items 11, 12, 13 PASS), the vendor-host own-sandbox rerun 86/86, and the M2 README
…se 07:15:54Z to 07:19:05Z, no MAWS run then; items 1-3 and 6-10 compared with main and M1)
…e prepared parity clone, as mini-rules' ACCEPT_REMOTE does (prepare refuses elsewhere)
…' into feat/115-own-sandbox-m2
…ever a literal account path
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…is carried into the teardown as unclassified, never signalled, and keeps compat-route's teardown unproven; ps -E environment values are read whole, spaces included (a cua home under Application Support)
…ss ownership witness
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.
Part of #115: M2 of the own-sandbox spec (
docs/doperpowers/specs/2026-10-17-own-sandbox-design.md). On macOS the vendor host (node_repl, which still serves computer sessions until #117) now launches its kernel and trusted worker throughbin/cua-codex-compat, cua's compat executable, under cua's own seatbelt profiles. The native helper'sapp-serverpolicy read is answered from M0's audited capture. CodexCLI.app leaves the darwin pin, and no process namedcodexruns on macOS.What changed
bin/cua-codex-compatandsrc/sandbox/codex-compat.mjs:sandboxaccepts exactly node_repl's recovered template and refuses everything else (exit 1, with a sentence).$CUA_HOME/state/compat/<sessionId>.{json,node}, located by TMPDIR and CODEX_HOME. It refuses on a mismatch, or on a missing or malformed file.execves/usr/bin/sandbox-exec.src/sandbox/app-server.mjsandapp-server-responses.json: answersinitialize,configRequirements/readandconfig/read. Any other method gets-32601. It ignores notifications and exits on EOF.src/sandbox/compat-settings.mjs: writes and reads the settings files. One computation happens inbuildLaunch; the files are 0600 in a 0700 directory, under the deniedstate/, and are removed with the run directory and at idle stop.src/runtime/launch.mjs: for the vendor host,CODEX_CLI_PATHis the compat andCUA_COMPAT_NODEis set. A preflight refuses a launch whoseCODEX_CLI_PATHis not an executable file.bin/joins the trusted paths.sandbox.launcherrow. Doctor and install verification no longer check CodexCLI.app, including in a tree where it was deleted by hand.kernel-exit-statusparity allowance is retired (both hosts' kernels are Node);own-sandbox --host vendorand accept-native items 12 and 13;m2-mini.sh.Validation Evidence
lockf /tmp/macbook-e2e.lock:HOME=$(mktemp -d) npm testgives 2705 pass, 0 fail, 169 skipped.npm run test:modspasses.claude plugin validate .passes, with the known CLAUDE.md warning.docs/evidence/2026-10-17-own-sandbox/m2/. The code under test is 249a2a9; its src/, bin/, extension/ and package.json equal the head's. Every run is gated under the mini rules.sandboxcalls carry TMPDIR and CODEX_HOME exactly asbuildLaunchset them. Under disabled, node_repl never calls the launcher.sessionTmpstaysrun/<id>/tmp.process.execveaborts (exit 134) instead of throwing; this is recorded as a deviation and still fails closed.diff --expectedis ok, with 0 undeclared differences. Run inside a CI-opt runner hold.test/repl-parity/coverage.test.mjs:14,test/repl-parity/inventory.test.mjs:298) and their cascade.m2-mini.shthat was new in M2 is fixed in fada7ee.Unresolved Review Findings
scripts/native-baseline/prepare.mjs:100-103(envValues()):ps -Ecan't separate an embeddedNAME=from the next environment entry, so a foreign helper whose TMPDIR is literally<our session temp> OTHER=valuewould match the ownership witness. Left as is: only a same-uid process could construct that value, and such a process can already signal ours. Logged intech-debt-tracker.mdwith its fix:KERN_PROCARGS2, or a second witness.PR review
reviewer-high on the whole diff confirmed the product side against real sandbox-exec. Two harness P2s (an unreadable ownership counted as proven teardown; TMPDIR matching split on spaces) were fixed in 664d085.
Residue