Skip to content

Provide sandbox-writable toolchain caches and classify environment denials #43

Closed

Description

@DanielNetzer

Status (issue sync, 2026-10-26)

Already on main: resources/gocache.go, the Lab check TMPDIR and GOTMPDIR (verification/run.go).
Remaining scope of this issue: A sandbox preflight and a blocked-by-environment failure class.


Problem

Sandboxed harness runs repeatedly lost verification because of the toolchain environment, not the code:

  • Codex workspace-write runs: go test ./... / go vet ./... exited 1, "sandbox denial accessing ~/Library/Caches/go-build" (Molecules for issues 82 and 84 in the private-history Lab).
  • The latest issue Make Formulas own the supported sequential Atom workflow #5 Molecule's full suite failed only on TestIssueQueueCancellationStopsPipeHoldingDescendant because /bin/ps was denied.
  • Localhost binding was denied for installer HTTPS lifecycle tests.

Harness reports said "blocked, not retried", which is honest but leaves the operator to rerun everything outside the harness.

Proposal

  • Provision Lab-owned, workspace-local toolchain dirs for harness and check runs: GOCACHE, GOMODCACHE, GOTMPDIR, TMPDIR, npm_config_cache (allowlisted per detected component), so caches are writable inside the sandbox and reusable across attempts for the same Molecule.
  • Add a sandbox preflight per adapter that runs inside the same sandbox (write the cache dir, run go env GOCACHE, spawn a child, list processes) and classifies capabilities. Record the result in the ledger.
  • Classify check failures as blocked-by-environment (with the denied resource) distinctly from failed, and surface them in the gate summary.
  • Tests that need process listing or sockets declare it, so they can be skipped with an explicit reason inside restricted sandboxes rather than failing.

Acceptance

  • Fake harness tests confirm the env vars are set to workspace-local paths and are recorded.
  • A denied cache write is reported as blocked-by-environment with the resource, not as a test failure.
  • The ps-dependent test reports an explicit environment skip inside a sandbox fixture and still runs in CI.
  • No sandbox is weakened; no automatic retry outside the sandbox.

Execution boundary

Implement through a separately reviewed Forgecell Molecule. Freeze current public repository inputs before execution. Preserve local evidence, exact Formula approval, reviewed ticket scopes, independent review and passing exact-head CI. Deterministic fake-harness tests only; no real credentials, provider APIs or model calls in tests. No release or deployment is authorized.

Activity

  1. added
    bugSomething isn't working
    Next improvementCapabilities, composition, evidence and usability after the reviewed-PR MVP.
    on Oct 10, 2026
  2. removed
    post-v1Not needed for v1; parked until v1 ships
    on Nov 6, 2026
  3. DanielNetzer commented on Nov 7, 2026

    @DanielNetzer
    OwnerAuthor

    Split: the part that blocks Codex today (a writable Go build cache inside Codex's workspace-write sandbox) is now its own slice, linked above. This Issue keeps the sandbox preflight, the blocked-by-environment failure class and the declared environment skips.

  4. DanielNetzer commented on Nov 7, 2026

    @DanielNetzer
    OwnerAuthor

    The rest of this Issue is split into two slices:

    #401 (Codex's shell_environment_policy dropping the harness GOCACHE) comes first. This Issue closes when #402 and #403 are merged.

  5. DanielNetzer commented on Nov 8, 2026

    @DanielNetzer
    OwnerAuthor

    Done in slices: #396 (Lab-owned harness Go cache, PR #399), #401 (pass it through Codex's shell_environment_policy, PR #404), #402 (environment-blocked outcome, PR #405) and #403 (Codex sandbox probe and declared ps skip, PR #407). Local-socket test skips were left out of #403; the probe still reports localhost-bind to the harness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Next improvementCapabilities, composition, evidence and usability after the reviewed-PR MVP.bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions