Skip to content

Let Triage read the machine through an opt-in read-only sandbox - #1717

Merged
JacobStephens2 merged 5 commits into
issue-1323from
issue-1711
Nov 4, 2026
Merged

JacobStephens2 merged 5 commits into
issue-1323from
issue-1711

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

triage --recommend-only
  default -> ordinary Harness; worktree-only prompt
  --read-machine -> Bubblewrap: host read-only, worktree writable
                 -> private Harness home; native completion follows it

Closes #1711

Test seams

  • The thirdshift triage CLI, with a local Harness stand-in and real Bubblewrap: filesystem access, prompt scope, recommendation, failure diagnostics and cleanup.
  • The same CLI with an environment-forwarding Bubblewrap stand-in: Muse/OpenCode recover their final recommendation from native records in the private home.

Evidence

  • Before: the real-sandbox regression failed with unexpected argument after triage: --read-machine.
    After: cargo test --test triage_run --test issue_1711_retained_home -- --test-threads=3 passes all 17 Triage tests and both retained-home regressions. Real Bubblewrap coverage checks host reads, denied outside writes through direct paths, symlinks and host sockets, writable worktree/session state, unchanged credentials, and startup failures without fallback.
  • Before: native Muse/OpenCode completion recovery missed the recommendation under the private sandbox home.
    After: both retained-home regressions pass after forwarding that home to native completion recovery.
  • Before: merging origin/issue-1323 conflicted in the shared investigation and hand-written Triage descriptions.
    After: merge commit ea126d01 preserves machine-read confinement and forwardable questionnaires. Its real-sandbox regression files both an ordinary issue and a needs-info issue, verifying the questionnaire in the issue body and readable Run notification. The documented manual and prompt generators were run.
  • cargo check --all-targets, cargo fmt --check and all 13 prompt tests pass. All 61 site checks pass locally (61.56s).
  • The full Rust suite in CI passed on merge head ea126d010b24662b3ae7c47d23b66d42aa0356df: 3,653 passed, 77 skipped. cargo nextest run executed in 1,147.415s; compilation took about 62s, and the CI step took 1,211s including compilation.
  • Local RUST_TEST_THREADS=3 NEXTEST_TEST_THREADS=3 /usr/bin/time -p scripts/affected-tests origin/issue-1323 ran for 1,420.10s, including the site checks and cached compilation. All 1,622 Rust unit tests passed; integration tests progressed without an assertion failure. The overlapping local run was stopped once CI passed on the exact merge head, following docs/testing.md's reuse policy. Full-suite evidence comes from that CI run.
  • All CI and Release checks passed or were intentionally skipped, including Console browser tests, Clippy and both Linux musl builds.

Merge Danger

Door: two-way

Blast Radius: Triage

The opt-in requires Bubblewrap and working Linux user namespaces. A startup failure fails the Command without fallback. Default Triage keeps its existing launch. The private home and copied file-based login are removed with the throwaway worktree; the network remains available.

Unaddressed findings

Standards

None.

Spec

None. The native-completion finding was reproduced, fixed and covered by retained tests.

Security

None.

Security review outcome

No unaddressed introduced findings.

Review coverage

Standards: 0 findings. Spec: 1, fixed. Both reviewers read all 22 changed files, including generated outputs; no changed file was left unread and no generated output was excluded.

The review fixed point is issue-1323 on origin, pinned at 8711c01639b33bbf3943578b7834f9b0ca7964fb. The local branch in another worktree was behind this GitHub base. Initial and follow-up reports and the original finding counts are retained in .thirdshift-review-fmCRtL/ beside the Session evidence.

Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh

A read-only mount still lets the session connect to a host service, which can then write outside the worktree. The sandbox now loads a seccomp filter that returns EAFNOSUPPORT for AF_UNIX and io_uring_setup, on both the startup probe and the session. TCP stays available.
Combine factory-owned Triage filing and readiness with opt-in machine reads through the read-only sandbox. Regenerate prompt documentation and the user manual, and exercise sandboxed filing in the real Bubblewrap regression.
Preserve opt-in read-only machine access alongside forwardable Triage questionnaires. Keep questionnaire publication and notification in the shared investigation path, regenerate the manual and prompt site, and cover sandboxed filing with a questionnaire in the real Bubblewrap regression.

Validation so far: cargo check --all-targets, cargo fmt --check, 13 prompt-generation tests, 17 Triage tests, 2 retained-home regressions and all 61 site checks pass. The required scripts/affected-tests origin/issue-1323 run is continuing through the full Rust suite.
@JacobStephens2
JacobStephens2 merged commit bc3406b into issue-1323 Nov 4, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1711 branch November 4, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant