oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Offline Go for Engineering
2
3Paul approved this containment change on 2026-11-13. Engineering needs to run
4targeted tests and repository gates before Equipo publishes its candidate.
5
6Claude and Codex Engineering launches mount the runner's configured Go tree at
7`/opt/go` and module cache at `/opt/go-mod`, both read-only. They use the same
8sources as Checks. A missing module-cache directory omits that mount, including
9for non-Go projects; an existing invalid or symlinked source is refused.
10`EQUIPO_GO_MODULE_CACHE` remains an optional override. Review keeps its existing policy; Pi Review has no shell,
11and changing its tools would extend this work beyond adding read-only trees.
12
13The shared Go environment sets `GOPROXY=off`, `GOSUMDB=off`,
14`GOTOOLCHAIN=local`, `GOFLAGS=` and `CGO_ENABLED=0`. `GOROOT` and `GOMODCACHE`
15name those mounts. `GOCACHE` and `GOTMPDIR` are directories under the attempt's
16private `/tmp`, backed by the runner's scratch directory and removed with the
17attempt. Claude uses `/tmp/claude-${uid}/go-build` and `go-tmp`, under its
18`CLAUDE_CODE_TMPDIR=/tmp` temp root. Codex uses `/tmp/go-build` and `/tmp/go-tmp`.
19`GOENV` and `GOWORK` are off, as is telemetry. Provider launches receive no
20`XDG_CONFIG_HOME`; Git's global config is `/dev/null` and system config is
21disabled. `PATH` is `/opt/go/bin:/usr/bin:/bin:/opt`, including the pinned
22bubblewrap helper. Repository Makefiles that override the toolchain version need
23`GOTOOLCHAIN=local` on the make command line.
24
25## Bounds and pins
26
27This adds the same two readable trees Checks already mount. Engineering's
28workspace remains writable. The provider shell policies still deny credential
29homes, provider credentials, the forge credential, runner state and tool
30sockets, and allow writes only in the workspace and private temporary space.
31The outer namespace still has no host network. Provider processes retain
32only their existing provider relay; Claude and Codex shell commands retain
33their own network isolation. No sandbox setting or permission callback is
34relaxed. Native file tools still obey their existing path restrictions.
35
36Engineering hashes the Go root once for the launch's account lease. Paths,
37modes and file bytes enter the policy's file-digest list. Validation, adapter
38policy rebuilds, source attestation and containment reuse that digest and the
39same retained directory descriptor. The lease closes it on cleanup; containment
40owns a duplicate until its mount plan closes. Replacing the source path does
41not substitute a different tree. Symlinks inside the Go root and special files
42are refused. The configured root must be canonical: a symlinked distro Go root
43is refused by the provider policy, so configure its resolved directory.
44
45The module cache is pinned by path, opened without following symlinks, owned by
46the runner user and bound read-only through a retained descriptor using
47`--ro-bind-fd`. Trees cannot overlap scratch, workspace or protected paths, or
48contain the runner's home. The module cache is never content-hashed. Checks
49keep their previous path pins and containment traversal, with no content scan
50of either tree. On this box, hashing the pinned Go 1.26.11 root took 1.137 seconds;
51hashing the 14 GB module cache previously took 90.096 seconds.
52
53Agents cannot write the mounted trees. Host processes running as the runner
54user are already trusted; they could replace the runner binary itself. They
55can also update the live source trees. No snapshot or dedicated quiescent cache
56is required. Adding modules leaves the policy hash unchanged. The adapter
57compares its rebuilt policy and manifest hashes with the supplied policy;
58source validation compares the Go root's recorded digest with the lease's pin.
59No certificate is compared against a new module-cache content digest.
60
61Engineering can read every cached module, including private modules from the
62owner's other projects. Paul accepts this for v1 on a single owner's runner.
63Per-project caches remain later work for multi-person teams.
64
65## Shell evidence and limits
66
67The offline build test invokes the real pinned Codex sandbox with filesystem
68and network permissions generated by `codex.PolicyInputs`. Claude 2.1.312 has
69no offline command or exported API for invoking its bundled sandbox builder.
70Its test therefore reproduces the namespace setup, consumes generated
71filesystem settings, and grants only the working directory and its own temp
72directory. It does not grant all of `/tmp`. In the pinned executable, byte
73239371446 selects `CLAUDE_CODE_TMPDIR`, byte 239373000 derives `claude-${uid}`,
74bytes 244230927 and 244231106 resolve temp paths, and byte 246036346 adds the
75working directory and those paths to the write grants. These probes make no
76provider calls and do not replace provider release certification.
77
78Both the shell probe and a Go-built probe fail to read the CLI's token through
79process files. Each has a direct control that can read the synthetic token's
80variable; neither prints its value. Claude's `failIfUnavailable`, fresh PID
81namespace and token scrubbing remain required. Weaker nested sandbox settings
82are not enabled. The historical Bash failure still lacks a raw tool response.
83
84The real Codex sandbox, using generated Engineering permissions, refuses writes
85to `/workspace/.git/config`. Claude's pinned shell builder protects `.git/config`
86and hooks (bytes 245813355 and 245845913). Its internal Git calls also neutralize
87executable config features: status arguments clear `core.fsmonitor` near byte
88239543350, and the Git helper at byte 240094865 disables hooks, fsmonitor,
89askpass and external protocols. Equipo's native file permission callback can
90allow a workspace config write; the shell test does not prove native-tool
91behavior. No route from that write to execution beside a real CLI token was
92established. A generic unsandboxed Git invocation would be vulnerable, but that
93is not evidence that either pinned CLI uses such an invocation. No additional
94Git configuration restriction is added in this branch.
95
96An unversioned cache miss reports `module lookup disabled by GOPROXY=off`.
97For an explicitly required missing version, Go first tries to create a cache
98lock. It prints “downloading” and then fails with `read-only file system`;
99that progress line does not mean it fetched anything. Both cases are tested.
100The implementation does not wrap Go or rewrite its diagnostics.
101
102Pi's current policy is different: the connectors spec, section 2.1, explicitly
103allows its Bash commands to read its provider key and use the provider-only
104relay. A read-only toolchain mount cannot provide the requested token and
105network isolation there. Pi toolchain access awaits Paul's decision on whether
106to preserve that existing exception or first provide an isolated Pi shell.
107
108No wire protocol or database schema changes are needed. Older binaries reject
109these directory file-digest entries rather than silently accepting the new
110policy. Roll back by installing the previous versioned release and using its
111matching certificates; Engineering then loses these Go mounts. No data needs
112downgrading. Existing certifications are not regenerated by these offline tests.
113