Repository navigation
#159: hosted-macOS gates for cua's headless live checks (sandbox-live, sandbox-denials, parity-browser) - #167
Conversation
…sts, probe-secrets); fingerprints compare relative to their roots, captures replay relocated
…skips hidden files), the runner's macOS recorded, undeclared fingerprint differences named
… (M0's pairs stay the mini's: macOS 27 vs 26); the fingerprint creates a fresh home's state/
…s26 20261013.0424.1) recorded from this branch's unchanged sandbox code; roots match inside JSON values
… Log entries; the gate names an image change when a baseline judgement fails
… harness; relocation once per occurrence; public output allowlisted - ci-kit.yml sandbox-live paths: add the hosted baseline, src/mcp, src/cua-api, src/cli.mjs and bin/cua.mjs. - compareFingerprints: the user-home root is config-cua's grandparent (a target the harness passes), never fingerprint.c's `home` target, which is the child's own HOME; a kernel whose HOME moved no longer compares equal. - relocateCapture: one alternation pass, escaped spelling first, each occurrence replaced once by its own spelling (a destination under the root is not moved twice); a root whose two spellings coincide is refused when the destination's differ. M0's captures relocate exactly as before. - hosted-gate.sh: raw reports stay in the scratch root; the artifact holds only hosted-public.mjs's allowlisted forms (fingerprints without input, image.json, port-vs-capture booleans and counts, own-sandbox labels/passes/codes, probe-secrets and doctor statuses, nothing of install's); the log names differing environment variables, never their values. The four baseline files are converted to the reduced form (each still judges equal to the original). - M4's four mini judgements, recomputed: ok.
…gets; env and cwd relative to the run's roots, unknown values withheld; the baseline converted); producers' stderr stays in the scratch root; a failed publication fails its step Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
…scripts/repl-parity/hosted/): a harness Chrome for Testing with cua's extension, the runner as parity device hosted-macos over loopback sshd; the cells and services denials judged one-sided against M1's declared set, the api and docs-profiles lanes diffed vendor against cua; public lines only, refuses off a GitHub-hosted macOS runner
…s as live; a run or diff fails when either its producer or its report says so, and a run with no complete passing report fails; preferences denials counted on node's raw events, before the reduction classes them; a step's stray stderr withheld; the scratch root checked before anything uses it. Path filters narrowed to what each gate can catch; mini-rules, CLAUDE.md and ci-kit.yml's header name the two gates
…at each runs, its filter, the spike's and the gates' hosted runs, parity-browser's two intermittent causes, what a hosted pass does not show); What stays on the mini updated; tech debt: the waitfor race seen hosted, the drag assertion, start-up stderr
…cy parity cells are fixed: 3 of 6 hosted runs went red on them, and a flaky PR gate is worse than none
…prepare, so a pull request's merge commit (on no GitHub ref) can be checked out; the denial judge fails on any record that does not parse (counted as malformed records, never printed), the stream's banner and blank lines aside, and log stream is stopped with SIGINT and read only once it has exited (30 s, then killed and the step fails); parity-browser's paths take what its lanes import (scripts/browser-parity, test/browser-parity, the pause gate, the server both hosts run under and its runtime, the pinned runtime), sandbox-denials' the inputs of the sandbox profile and the kernel child's spawn
…one made from the job's checkout (and the probe that proves it on a commit on no ref), the malformed-record check and the SIGINT stop, both filter lists; runs 39163456859 (both GREEN) and 39163467915 (probe, GREEN)
|
ci-kit review (CI-opt): the wiring fits, and the slot use is fine. Ready to merge on green. Wiring. Every field is used as
Hosted macOS slots. GitHub caps a personal account at 5 concurrent macOS jobs. A sandbox PR now holds 4 of them: test, plugin, sandbox-live, and sandbox-denials (the last for ~21–25 min). A parity-browser dispatch makes 5. A second sandbox PR at the same time queues rather than fails. That is acceptable: no other SSFSKIM repo uses Notes, none blocking:
|
Closes #159
This moves cua's headless macOS live checks off the Mac mini (MAWS's shared CI runner) onto GitHub's hosted macOS runner, so a pull request that changes the sandbox is proven with no mini time. The full account is in
docs/evidence/2026-10-18-hosted-macos-gate/README.md.What changes
There are three new ci-kit gates on lane
hosted-macos, configured in.github/ci-kit.yml.sandbox-live(scripts/sandbox-probe/hosted-gate.sh, about 1.5 min) runs on pull requests. Its trigger paths are:src/sandbox,src/runtime,src/secrets,src/repl-host,src/services,src/mcpandsrc/cua-api;src/cli.mjs,bin/cua.mjsandbin/cua-codex-compat;runtime/;On every run it does a fresh
cua installof the pinned runtime into a scratch home, then:sandbox-denials(about 21 min) runs on pull requests that touch the sandbox profile or the kernel's launch. It runs the cells and services suites undersudo log stream, and judges the Sandbox denials one-sided against M1's declared set. A preferences denial, an undeclared kind or a malformed record fails the gate.parity-browser(about 9 min) runs only on a ci ref or a dispatch, for now. It runs parity's browser lanes (api, docs-profiles), vendor against cua, on a harness Chrome for Testing with cua's extension in a fresh profile. The runner reaches itself as the parity devicehosted-macosover a loopback sshd. It stays off pull requests because 3 of its first 6 runs went red on two racy parity cells, not on the change; addingpris a one-line change once those cells are fixed.Harness changes:
compareFingerprintsreads env and cwd relative to each side's harness-given roots.oracle.mjs port-vs-capture --relocateis new.state/.scripts/sandbox-probe/hosted-public.mjsallowlists what the logs and artifacts publish.scripts/repl-parity/devices.mjsdeclareshosted-macos.What stays on the mini is written down in
scripts/mini-rules.mjs's header and inCLAUDE.md: only what needs the owner, a TCC grant, branded Chrome or the owner's profile, or the mini's own state. The M0 fingerprint pairs also stay there, because the mini runs macOS 27 and the hosted image runs macOS 26.6.2, and the two answerfile-linkdifferently under the same profile. That was measured: the same cua code differs on six system paths only.Validation Evidence
The claims below are proven on hosted macOS: image macos26 20261013.0424.1, macOS 26.6.2, Node 24.21.0.
sandbox-liveis green and not flakysandbox-livecatches a policy regression~/.config/cuafrom the deny list turned it RED in 6 steps (the four baseline judgements, plus own-sandbox on both hosts), before (39152820629) and after (39156850149) the review fixes.sandbox-denialsis greensandbox-denialspassed (18m23s) on the synthetic merge commit.parity-browserpasses but is intermittentwaitforrace (2) and cua'sdragcell (1), with causes intech-debt-tracker.md; so it runs by hand only.node --test "test/sandbox-probe/*.test.mjs" test/repl-parity/hosted.test.mjs test/accept-scripts-load.test.mjs test/package-contents.test.mjs: all pass. The fullnpm testlocally on Node 26: 2867 pass, and 2 fail intest/remote-client.test.mjs, which fail the same way on main (Node 26 timing). Thetestgate on this PR runs Node 24.compare.mjs, are all still ok.Unresolved Review Findings
scripts/repl-parity/hosted/hosted.sh). If the script fails before its first step, or in its exit trap,mktemp/mkdir/rmdiagnostics reach the log unfiltered. Left because the only thing exposed is the runner's temp path, which is already public. Logged intech-debt-tracker.md.Residue
parity-browsera pull-request gate.waitforcell's two-deadline race in the scenario (api/browser-playwrightlocator/waitfor, celllocator-contract-diagnostics-no-matches).api/browser-cuaapi/dragfailure on a rerun.prto the gate'son:.tech-debt-tracker.md. They touch parity's corpus, which the mini's runs share, so they were left out of this ticket.macos-latestmoves. When the hosted image moves (for example to macOS 27),sandbox-live's baseline judgement fails, and its log names both images. Someone re-recordsdocs/evidence/2026-10-18-hosted-macos-gate/baseline/from a run of main's code; the README says how. A scheduled check could catch the move before a PR does.test/remote-client.test.mjsfails on Node 26. Two resume-budget timing tests fail locally on Node 26, on main too, and pass in CI's Node 24. Worth a look before the repo moves to a newer Node.