Skip to content

Run repository tests on the host by default; make sandboxed test execution explicit opt-in (#535) - #540

Merged
amirbena merged 4 commits into
mainfrom
feat/535-host-default-repository-tests
Sep 24, 2026
Merged

amirbena merged 4 commits into
mainfrom
feat/535-host-default-repository-tests

Conversation

@amirbena

Copy link
Copy Markdown
Owner

Fixes #535

What

  • Behavior / contracts: An admitted repository test command (declaration source and inspected task definition establish it) now runs on the reviewer's host by default with provenance host, in both Skills. An explicit per-invocation sandbox request (run_repository_tests_in_sandbox or a small closed phrase set, incl. existing denial phrases like sandbox only) makes it sandbox-only with no host fallback. A sandbox that cannot launch the test toolchain is unavailable, never failed. Lint/build/type-check, unclassifiable commands, and generated reproductions keep the sandbox-required contract unchanged. Canonical: runtime-validation.md "Repository test execution backend", trusted-host-execution.md "Repository test sandbox request".
  • Runner: scripts/sandbox/runner.py maps a launcher exec failure (seatbelt 71/execvp(), bwrap execvp, docker 126/127) to unavailable; a started non-zero exit stays failed.
  • Governance / policy: Threat catalog SBOX-014 (default-host repository tests as accepted risk) and SBOX-015 (explicit-sandbox no-fallback); SBOX-013 unchanged. Residual risk: github-pr-review of an untrusted fork runs its tests on the host unless the sandbox is requested.
  • Packaging / portability: No new packaged files; edits to packaged shared policies, review-summary.md, both runbooks (step 8a / active / passive), repository-checkout.md, and skill.yaml comments.
  • Changelog: generated at release from the two lines below — never edit CHANGELOG.md (see docs/RELEASE.md)
  • Release category: Changed
  • Release entry: Repository test commands admitted for runtime validation now run on the reviewer's host by default; an explicit sandbox request makes them sandbox-only with no host fallback, and a sandbox that cannot launch the test toolchain is reported unavailable instead of failed.

Validation

  • Relevant validation was run, or the reason it could not be run is stated.
  • On host: tests/unit 3117 OK, tests/policy 1898 OK (re-run after merging main), tests/repository 8 OK, tests/integration 138 OK; threat-model and traceability validators, Skill metadata validation, packaging, and package-manifest --check pass.
  • New coverage: reference-model scenarios parameterized over both Skills, runner launch-failure mapping (verified against a live sandbox-exec), a separate NL sandbox-request corpus set, and runbook wiring tests.

Review

  • local-code-review initial review on a52b7a1: CHANGES REQUIRED (P1: unchanged "dormant validation" statements contradicted the host default; P2: sandbox-request question guard spanned sentences). Both fixed in 5fd3f62.
  • local-code-review re-review on 5fd3f62: REVIEW CLEAN (P0 0, P1 0, P2 0).

🤖 Generated with Claude Code

amirbena and others added 4 commits September 24, 2026 20:23
…test execution explicit opt-in (#535)

- runtime-validation.md: new "Repository test execution backend" section
  (classification, host default, explicit sandbox, no fallback, not
  executed != failed); pointers from trust model, Safety gate, targeted mode
- trusted-host-execution.md: separate `run_repository_tests_in_sandbox`
  request (structured + closed NL vocabulary, denial phrases count,
  conflicts resolve to sandbox); `host` provenance
- sandbox runner: launcher exec failure (seatbelt 71/execvp, bwrap execvp,
  docker 126/127) maps to `unavailable`, never `failed`
- reference model + scenario tests parameterized over both Skills; NL
  corpus sandbox-request case set; telemetry `host` provenance
- runbooks 8a/active/passive, skill.yaml, capability.yaml, review-summary,
  feature docs; threat catalog SBOX-014 (accepted risk) and SBOX-015

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the sandbox-request question guard (#535)

- runtime-validation.md "Purpose and boundary", local-review.md working-tree
  paragraph, and github repository-checkout.md now except admitted repository
  test commands and point to "Repository test execution backend"
- reference model: the question guard matches one sentence only, so an
  earlier sentence can no longer drop a later explicit sandbox request
- wiring tests pin the carve-outs; #223 local runbook hash re-captured

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amirbena amirbena self-assigned this Sep 24, 2026
@amirbena
amirbena merged commit 703e63b into main Sep 24, 2026
7 checks passed
@amirbena
amirbena deleted the feat/535-host-default-repository-tests branch September 24, 2026 17:38
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.

Run repository tests on the host by default during reviews; make sandboxed test execution explicit opt-in

1 participant