Commit Graph
12 Commits
Author SHA1 Message Date
Tianyi Cui d710259263 Merge master into fix/tui-color-scheme-v2 2026-07-21 23:21:44 +08:00
Turtle dd57d3009d test(sandbox): decouple the probe-timeout test from the racy default budget
The earlier fix only widened the vitest timeout, but the real race is the
patient probe reading the 1s launcher under the 5000ms *default* probe budget:
under a full parallel run spawnSync blocks the worker and fork/exec latency can
push the launcher's wall-clock past 5000ms, so the patient probe wrongly reads
unusable and the assertion fails. Give the patient probe a generous explicit
15000ms budget (still far below its 1s launcher runtime margin) so only the
250ms impatient probe races the launcher; keep a 30s vitest timeout above the
patient budget.
2026-07-21 10:07:03 +08:00
Turtle a205ba4c29 test(sandbox): give the probe-timeout test headroom over vitest's default
`bounds the default probes` runs a real launcher that sleeps 1s under the
5000ms default probe budget, all wrapped in vitest's 5000ms default test
timeout. The blocking spawnSync races that wrapper and tips over under the
load spike of a full parallel run — a pre-existing, load-sensitive flake
(noted as unrelated in this PR's original description). Give the test an
explicit 20s timeout so its bounded subprocess work never races the default.
2026-07-21 09:42:12 +08:00
Tianyi Cui 36e99e737b test(sandbox): pack invariant service peer 2026-07-19 22:24:32 +08:00
Tianyi Cui 40065dd4fc Merge remote-tracking branch 'origin/master' into codex/simp-prune-sandbox-surface 2026-07-15 13:27:16 +08:00
imccyu 31f4441fd4 pkg: update vendor dep 2026-07-15 11:28:45 +08:00
Tianyi Cui e8092dd65a Merge branch 'codex/simp-prune-bash-surface' into codex/simp-prune-sandbox-surface
# Conflicts:
#	docs/config-catalog.md
#	packages/bash/bash-sandbox/src/index.ts
#	packages/sandbox/sandbox-local/README.md
#	packages/sandbox/sandbox-local/src/index.ts
2026-07-14 19:09:35 +08:00
Tianyi Cui b2025337b5 refactor: hide sandbox implementation helpers 2026-07-14 03:47:32 +08:00
Tianyi Cui 148046b9c8 docs: rebalance prose cleanup and add trimming skill 2026-07-13 23:27:00 +08:00
Tianyi Cui 75838e10b5 docs: trim generated prose 2026-07-12 03:36:43 +08:00
Tianyi Cui b29a8eca71 fix(review): reconcile sandbox and approval contracts 2026-07-11 21:37:38 +08:00
kingwl 7b8c3a9b40 feat(sandbox): the confinement seam and the per-platform native runner chains
ctx.sandbox (dsh-sandbox): confine(argv, policy) returns the argv to spawn
instead — wrapped so the process and its children run confined — plus the
enforcement completeness and the backend denial/runner-failure dialects;
no usable backend throws the fail-closed SANDBOX_UNAVAILABLE. Policy rides
per call. dsh-sandbox-local selects by platform and caches the verdict:
multi-candidate chains probe FUNCTIONALLY in preference order (Linux:
bwrap → the registry-installed node-addon-landlock-run launcher), a sole
candidate is selected unprobed (darwin: sandbox-exec/Seatbelt) and fails
closed at execution via runnerFailureSignatures; win32 is a reserved empty
chain. Profile parity is honest per backend (documented temp-area and ABI
differences; enforcement full|partial is a structured result fact).

CI: the sandbox-e2e matrix proves real-kernel confinement per rung (bwrap,
Landlock per architecture through the registry-installed launcher,
Seatbelt), failing on a silent all-skip; the packed-install rehearsal
installs the launcher family from the registry and asserts the binary
executable apart from kernel enforcement.
2026-07-10 15:43:02 +08:00