| 1 | # Live open failures |
| 2 | |
| 3 | The four rounds fix auth framing, config readback and the runtime-home |
| 4 | conflicts reproduced with the pinned providers. Both providers now pass |
| 5 | unauthenticated runtime replays for the specialist and coordinator. The |
| 6 | branch is not live-certified; authenticated behavior remains unobserved. |
| 7 | |
| 8 | ## Causes and confidence |
| 9 | |
| 10 | | Symptom | Cause and evidence | Confidence and result | |
| 11 | | --- | --- | --- | |
| 12 | | Claude open ends with SIGKILL and `runner.invalid` | Claude 2.1.312 `auth status --json` writes one indented JSON document. The production capture loop treated its first line, `{`, as a complete frame. `AppendFrame` rejected it and capture called `Contain`, producing signal 9. See `internal/runner/capture.go:241`, `:318`, and the recorded empty-home output in `internal/runner/testdata/claude-auth-status-2.1.312.json`. | High for the framing defect and kill mechanism. The real authenticated output was not inspected. The production-capture regression reproduced the failure before the fix. | |
| 13 | | Codex coordinator rejects config | Saved `codex-Coordinator/capture.json`, response `equipo:3`, retains `tools.update_plan.enabled=false` and `tools.experimental_request_user_input.enabled=false` in `sessionFlags`, but effective `config.tools` is exactly `{"web_search":null}`. Recursive subset comparison rejected those two absent fields. The proposed `allow_login_shell` and `approvals_reviewer` leads were not the mismatch: the former is an expanded default; the latter matches `user`. | High. The saved response fails on the base and passes with the narrow exception. | |
| 14 | | Codex specialists report containment | The saved specialist captures are null, so they do not identify the failing check. A pinned 0.165.0 app-server in an empty, network-isolated home creates `.tmp`, `goals_1.sqlite`, `installation_id`, `memories_1.sqlite`, `queue_1.sqlite`, `skills/.system`, and `tmp`. The existing runtime-home validator rejects `.tmp` first, and independently forbids `skills`. Replaying the recorded names reproduces containment. | High for the startup-layout conflict; insufficient evidence to assign that exact cause to the authenticated failures. No speculative permission change. Added diagnostics identify lease, probe, or post-preflight runtime-policy failure. | |
| 15 | | Every calibration reports policy rejection | All opens failed, so every saved certification has null usage. `internal/directlive/driver.go:117` pools those empty samples and still invokes calibration at `:131`; `internal/directlive/probes.go:149` calls `DirectReservations`, which rejects absent samples (`internal/runner/provider/direct_certification.go:77`). | High. Consequence of failed opens, not a second provider config failure. Unknown usage remains unknown; calibration is unchanged. | |
| 16 | | Guide reports `forge` for a private-directory failure | `Wizard.Run` retained its last configuration-field phase while creating runner directories and writing bindings. `privateDir` omitted the offending path from policy errors. | High. The phase now names the runner root, and the directory error includes the actual path. | |
| 17 | |
| 18 | The saved evidence was read only from |
| 19 | `~/.local/share/equipo/try/run-2425960409/`. Files under |
| 20 | `~/.local/share/equipo/accounts/` were only listed and statted. No account |
| 21 | file contents were read, copied, printed, or hashed. No existing Equipo |
| 22 | state was changed. No sign-in, live gate, authenticated CLI call, merge, |
| 23 | default-branch push, deployment, or copy-review server was run. |
| 24 | |
| 25 | The coordinator cannot explain the earlier specialist failures by running first: |
| 26 | `runRoles` schedules it last (`internal/directlive/driver.go:54`), and each |
| 27 | exercise opens a fresh lease. Source-home SQLite files are not copied by |
| 28 | `AccountLease.stage`; the runtime guard inspects the staged home, not the |
| 29 | source account directory. These details rule out those two proposed paths, |
| 30 | but do not identify the exact failed authenticated check. |
| 31 | |
| 32 | ## Fix boundaries |
| 33 | |
| 34 | `internal/runner/capture_framing.go:16` selects document framing only for the |
| 35 | exact launcher-generated auth command, Claude 2.1.312, and a matching |
| 36 | manifest hash. It reads at most 1 MiB plus one byte, requires one JSON object, |
| 37 | and rejects duplicate keys or trailing documents. Agent streams keep their |
| 38 | existing line framing. Invalid output gets a fixed `stdout_invalid_json` |
| 39 | reason without echoing output bytes. |
| 40 | |
| 41 | `internal/runner/provider/codex/config_readback.go:9` accepts only the recorded |
| 42 | omission, only for a hashed coordinator manifest at 0.165.0. Both requested |
| 43 | tools must be exactly disabled, and effective tools must be exactly the |
| 44 | recorded `{"web_search":null}` object. The original settings are still |
| 45 | checked against the full command-line layer. Other configured fields, |
| 46 | approvals, config layers, origins, and the MCP server inventory remain checked. |
| 47 | Live certification must still verify the available tools before a release. |
| 48 | The fixture preserves response `equipo:3`; `/home/paulca` was replaced with |
| 49 | `/home/fixture`. It contains no account response or credentials. |
| 50 | |
| 51 | `internal/runner/provider/accounts.go` and `runtime_home.go` now attach fixed |
| 52 | reason codes to containment failures. They never include file contents, |
| 53 | arbitrary filenames, or underlying filesystem errors. Known Codex startup |
| 54 | artifacts get fixed categories, such as `runtime_codex_dot_tmp`. This does not |
| 55 | allow those artifacts or bypass identity, permissions, refresh, or policy |
| 56 | checks. In particular, bundled skills are still rejected. |
| 57 | |
| 58 | `internal/tryequipo/run.go:90` sets the phase to the runner directory. |
| 59 | `internal/tryequipo/state.go:72` adds the actual failing directory to the |
| 60 | existing error. For the reported case it names |
| 61 | `/home/paulca/.local/share/equipo-runner`. Existing reviewed guide wording is |
| 62 | reused; no new app copy or README prose was added. |
| 63 | |
| 64 | ## Reproductions and verification |
| 65 | |
| 66 | Both binary probes used the pinned executables under |
| 67 | `~/.local/share/equipo/try/bin`, with separate fresh empty homes under the |
| 68 | on-disk `$TMPDIR`. SHA-256 checks matched both adapter pins: |
| 69 | Claude `4f4178ce41d83e23341ebfbaecdbcf8ea6bf7baea0690025abe49eeec3a5d01d` |
| 70 | and Codex `c06a67fd8ac76508dc78bd99ce20c9f317b8d568beda59485f3f4134df9962d5`. |
| 71 | Bubblewrap used `--unshare-all --die-with-parent |
| 72 | --new-session`, read-only `/usr` and binary mounts, `/proc`, `/dev`, a private |
| 73 | `/tmp`, and only the new home and workspace as writable mounts. The environment |
| 74 | was cleared, with `HOME` and the provider home set to `/home/runner`. |
| 75 | |
| 76 | - Claude command: `/opt/claude --setting-sources '' auth status --json`, |
| 77 | with updater and nonessential traffic disabled. Exit 1, empty stderr, |
| 78 | indented JSON with `loggedIn:false`. The stdout fixture is byte-for-byte. |
| 79 | - Codex command: `/opt/codex app-server --strict-config --listen stdio:// -c |
| 80 | features.remote_control=false`. Sent `initialize` with experimental API, |
| 81 | `initialized`, then `account/read` with `refreshToken:false`. Account was |
| 82 | null. No thread or turn was started. Only path names and file kinds were |
| 83 | retained in `internal/runner/provider/testdata/codex-empty-home-0.165.0.json`. |
| 84 | This minimal startup probe was not the full specialist policy. |
| 85 | |
| 86 | All Go commands used `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10`, with default Go |
| 87 | caches. Tests were written before implementation: |
| 88 | |
| 89 | ```sh |
| 90 | go test ./internal/runner ./internal/runner/provider/codex ./internal/tryequipo \ |
| 91 | -run 'TestDirectClaudeAuthDocument|TestDirectFrameDiagnosticNoContents|TestCodexLiveConfig|TestPrivateDirectoryFailureNamesPath' -count=1 |
| 92 | go test ./internal/runner/provider -run '^TestAccountContainmentDiagnostics$' -count=1 |
| 93 | go test ./internal/runner/provider -run '^TestAccountRecordedCodexRuntimeRefused$' -count=1 |
| 94 | ``` |
| 95 | |
| 96 | The first command failed on auth framing, opaque frame errors, the saved |
| 97 | Codex config, and the missing directory path. All five diagnostic subtests |
| 98 | in the second command failed before their fixes. The inventory replay in |
| 99 | the third failed to identify the startup directory before the diagnostic |
| 100 | change. All pass after implementation. |
| 101 | |
| 102 | Guard mutations were applied separately and restored immediately. Each |
| 103 | command below failed by assertion, not by a compile error: |
| 104 | |
| 105 | | Temporary break | Command after `go test` | |
| 106 | | --- | --- | |
| 107 | | Accept any nonempty Claude version for document framing | `./internal/runner -run '^TestDirectClaudeAuthDocument/other-version$' -count=1` | |
| 108 | | Remove the exact auth argv comparison | `./internal/runner -run '^TestDirectClaudeAuthDocument/(stream\|extra-arg)$' -count=1` | |
| 109 | | Bypass config validation | `./internal/runner/provider/codex -run '^TestCodexLiveConfigStrict$' -count=1` | |
| 110 | | Bypass runtime entry checks | `./internal/runner/provider -run '^TestAccount(ContainmentDiagnostics\|RecordedCodexRuntimeRefused)$' -count=1` | |
| 111 | | Drop the failing path from the guide error | `./internal/tryequipo -run '^TestPrivateDirectoryFailureNamesPath$' -count=1` | |
| 112 | |
| 113 | After restoring all guards, the targeted suite was run with: |
| 114 | |
| 115 | ```sh |
| 116 | go test ./internal/runner ./internal/runner/provider/... ./internal/tryequipo \ |
| 117 | -run 'TestAccountContainmentDiagnostics|TestAccountRecordedCodexRuntimeRefused|TestDirectClaudeAuthDocument|TestDirectFrameDiagnosticNoContents|TestCodexLiveConfig|TestPrivateDirectoryFailureNamesPath|TestDirectJournalFailureContains|TestCodexRecorded|TestPlanWorkflowProviderPoliciesLauncher|TestCoordinatorOnlyMCPServer|TestAccount' \ |
| 118 | -count=1 |
| 119 | ``` |
| 120 | |
| 121 | The first `make -k ci` completed with two causes of failure: the supplied |
| 122 | brief lacked two reference-inventory entries, and the runner test package |
| 123 | was 14 lines over its existing limit. The inventory issue also failed |
| 124 | `TestDirectDeadReferencesRepository`. All other checks passed. The runner |
| 125 | package took 350.106 seconds against its 330-second local advisory budget; |
| 126 | the budget was not raised. |
| 127 | |
| 128 | The frame diagnostic assertion now shares the existing malformed-frame |
| 129 | case in `TestDirectJournalFailureContains`, preserving all coverage and |
| 130 | bringing the runner tests to exactly 8,800 lines. The reference inventory |
| 131 | includes exact, reasoned entries for the supplied brief and new artifacts. |
| 132 | |
| 133 | The first full rerun of `make -k ci` passed (exit 0): reference inventory, |
| 134 | build, vet, formatting, staticcheck, govulncheck, gitleaks, size budgets, |
| 135 | all tests, adapter checks, namespace checks, migration check, and performance. |
| 136 | The main suite ran 27 packages with no cached results and no failures. |
| 137 | The runner package took 299.643 seconds, within its 330-second limit. |
| 138 | The performance lane passed, including a 101 ms median cold boot against |
| 139 | 500 ms. There were two full gate runs total, with no second rerun needed. |
| 140 | `EQUIPO_LIVE_DIRECT` and `EQUIPO_LIVE_CONFIG` were unset. |
| 141 | |
| 142 | The standalone frame-diagnostic test named in the initial failing command |
| 143 | was consolidated into `TestDirectJournalFailureContains/malformed` for the |
| 144 | size gate. After consolidation, `go test ./internal/runner -run |
| 145 | 'TestDirectClaudeAuthDocument|TestDirectJournalFailureContains' -count=1` |
| 146 | also passed. Temporary guard mutations were all restored before either |
| 147 | full gate. |
| 148 | |
| 149 | ## Next authenticated observation |
| 150 | |
| 151 | Only Paul may authorize and run a new live trial. Retain its |
| 152 | `tuple-completed.json`, `capture.json`, and `certification.json`. The new |
| 153 | Codex error prefix separates these cases: |
| 154 | |
| 155 | - `codex_preflight_lease`: source or runtime identity/credential validation |
| 156 | failed before the probe. The fixed suffix identifies which check. |
| 157 | - `codex_preflight_probe`: process/identity/config readback or post-probe |
| 158 | account validation failed. |
| 159 | - `codex_open_runtime_policy` with `runtime_codex_plugins` or |
| 160 | `runtime_policy_entry`: the CLI created startup files that conflict with |
| 161 | the strict runtime policy. |
| 162 | |
| 163 | If an unexpected entry remains, capture only its path, type, mode, owner, |
| 164 | link count, size, and mtime before the disposable runtime home is removed. |
| 165 | Do not capture credential, SQLite, or skill contents. Any policy adjustment |
| 166 | needs evidence that the particular files cannot introduce tools or settings; |
| 167 | the empty-home observation alone does not establish that. No claim is made |
| 168 | that the next authenticated run will pass. |
| 169 | |
| 170 | ## Round 2 |
| 171 | |
| 172 | The pinned 0.165.0 binary supports `skills.bundled.enabled=false`. Both |
| 173 | specialist and coordinator policies now pass that setting and |
| 174 | `features.memories=false` through their hashed settings, argv and thread |
| 175 | policy. Config readback must retain both values. The runtime validator |
| 176 | still refuses `skills`, including `skills/.system`. |
| 177 | |
| 178 | ### Switch evidence |
| 179 | |
| 180 | The probes used only new credential-free homes under the on-disk |
| 181 | `$TMPDIR`, with `bwrap --unshare-all --die-with-parent --new-session`, an |
| 182 | empty environment, and the verified pinned binary. There was no egress |
| 183 | relay, account-home mount, sign-in, thread, turn or live gate. |
| 184 | |
| 185 | `codex --help` and `codex app-server --help` describe `-c`, `--disable` and |
| 186 | `--strict-config`, but no dedicated bundled-skills option. The recorded |
| 187 | round-one `equipo:3` response has `skills:null` and `memories:null`; its |
| 188 | coordinator feature map already has `memories:false`. |
| 189 | |
| 190 | `codex features list` includes `memories` and |
| 191 | `skip_host_skill_discovery`. A probe with the latter enabled still |
| 192 | installed and listed all five bundled skills. That flag is insufficient. |
| 193 | The pinned binary's config type names include `SkillsConfig`, `bundled` |
| 194 | and `BundledSkillsConfig`, which led to the successful strict-config |
| 195 | probe: |
| 196 | |
| 197 | ```sh |
| 198 | /opt/codex app-server --strict-config --listen stdio:// \ |
| 199 | -c features.remote_control=false \ |
| 200 | -c skills.bundled.enabled=false -c features.memories=false |
| 201 | ``` |
| 202 | |
| 203 | The effective config and session layer both retain the requested values. |
| 204 | `skills/list` with `forceReload:true` returns one workspace with empty |
| 205 | skills and errors arrays. No `skills` directory is created. Direct |
| 206 | responses from `initialize`, `account/read`, `config/read` and |
| 207 | `skills/list` are recorded in |
| 208 | `internal/runner/provider/codex/testdata/disabled-skills-0.165.0.json`. |
| 209 | The account is null. Installation-specific notifications were omitted. |
| 210 | The manifest fallback in D1 is therefore unnecessary. |
| 211 | |
| 212 | ### Runtime state |
| 213 | |
| 214 | For Codex 0.165.0 only, the staged-home validator now permits `.tmp` and |
| 215 | `tmp` directories, `installation_id`, and the three named SQLite files |
| 216 | with their `-shm` and `-wal` siblings. Entries must belong to the runner |
| 217 | uid, with no setuid or setgid bits. State entries must be regular files; |
| 218 | regular files with multiple hard links are refused. Nested scratch |
| 219 | entries retain the policy-name and special-file checks. Other versions, |
| 220 | providers and new top-level names do not gain these allowances. |
| 221 | `AccountLease.stage` is unchanged and copies none of these source-home |
| 222 | artifacts. A regression checks that source scratch and state stay out of |
| 223 | the staged home. |
| 224 | |
| 225 | ### Replay and remaining decision |
| 226 | |
| 227 | `TestCodexEmptyHomeReplay` invokes the production `Launcher.Open` for |
| 228 | `implement` and `coordinate` with the real pinned executable and code |
| 229 | mode helper. Its test transport uses a network-isolated bubblewrap home |
| 230 | and the existing frame-capture fixture. It skips clearly when the pinned |
| 231 | installation is absent. The source is newly created, with an |
| 232 | `auth_mode:apikey` marker and no key or other credential. An empty JSON |
| 233 | object is unsuitable: Codex interprets it as incomplete ChatGPT auth and |
| 234 | returns a protocol error requiring a plan type. |
| 235 | |
| 236 | Both real opens now return `codex_preflight_probe: |
| 237 | provider_identity_mismatch` from the missing account. Since this occurs |
| 238 | before config readback, a second unauthenticated process checks the same |
| 239 | policy through production `readConfig`. Only after every process exits |
| 240 | does the test mark its synthetic lease ready, solely to run |
| 241 | `ValidatePolicy` against the actual startup tree. No real process runs |
| 242 | with that synthetic identity. |
| 243 | |
| 244 | That final check found another artifact not retained by the graceful |
| 245 | round-one probe: `tmp/arg0-linux/codex-arg0*/apply_patch`, `applypatch` |
| 246 | and `codex-linux-sandbox` are symlinks to `/opt/codex`. They remain after |
| 247 | the launcher's cancellation path. The current validator refuses them |
| 248 | with `runtime_special_entry`. D2 says no escaping symlinks; these leave |
| 249 | the runtime home but target the pinned binary inside the namespace. |
| 250 | Permission to allow only those verified links is pending. The replay |
| 251 | still fails its final runtime check, so this round is not complete. |
| 252 | |
| 253 | ### Verification so far |
| 254 | |
| 255 | All Go commands use `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10` and default caches. |
| 256 | Before implementation, this command failed for all twelve allowed state |
| 257 | entries and for the missing disable settings in both roles: |
| 258 | |
| 259 | ```sh |
| 260 | go test ./internal/runner/provider ./internal/runner/provider/codex \ |
| 261 | -run 'TestAccountCodexRuntimeState|TestCodexRuntimeSettings' -count=1 |
| 262 | ``` |
| 263 | |
| 264 | Those tests now pass. The complete provider and Codex packages pass with |
| 265 | the unresolved real replay excluded (11.135 seconds and 20.380 seconds): |
| 266 | |
| 267 | ```sh |
| 268 | go test ./internal/runner/provider ./internal/runner/provider/codex \ |
| 269 | -skip '^TestCodexEmptyHomeReplay$' -count=1 |
| 270 | ``` |
| 271 | |
| 272 | Each guard below was temporarily broken, observed failing by assertion, |
| 273 | and restored before continuing. Commands use `go test`, the package |
| 274 | shown, `-run` with the pattern shown, and `-count=1`. |
| 275 | |
| 276 | | Temporary break | Package and test pattern | |
| 277 | | --- | --- | |
| 278 | | Ignore uid | `./internal/runner/provider -run '^TestAccountCodexRuntimeOwner'` | |
| 279 | | Ignore setuid/setgid | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/(nested-setuid\|setgid)$'` | |
| 280 | | Accept wrong entry kinds | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/(scratch-file\|state-directory)$'` | |
| 281 | | Accept hard links | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/hardlink$'` | |
| 282 | | Remove version restriction | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/other-version$'` | |
| 283 | | Remove provider restriction | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/other-provider$'` | |
| 284 | | Allow an unrecorded database name | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/other-state$'` | |
| 285 | | Accept policy-bearing names | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/(skills\|nested-policy)$'` | |
| 286 | | Accept special entries | `./internal/runner/provider -run '^TestAccountCodexRuntimeStateGuards/(symlink\|fifo)$'` | |
| 287 | | Ignore effective config mismatch | `./internal/runner/provider/codex -run '^TestCodexRuntimeSettings$'` | |
| 288 | | Enable memories in policy | `./internal/runner/provider/codex -run '^TestCodexRuntimeSettings$'` | |
| 289 | | Enable bundled skills | `./internal/runner/provider/codex -run '^TestCodexEmptyHomeReplay/implement$'` | |
| 290 | |
| 291 | The last mutation made the real replay fail specifically because bundled |
| 292 | skills were installed. Size budgets pass unchanged. The reference |
| 293 | inventory includes the two null JS-path fields in the new config fixture. |
| 294 | The expanded targeted checks also passed for the runner and all provider |
| 295 | packages, selecting the account, Codex, workflow-policy and coordinator |
| 296 | MCP tests, with only the unresolved replay excluded. |
| 297 | |
| 298 | After adding the production `TMPDIR` and `LANG` environment values to the |
| 299 | replay transport, the specialist still failed on the leftover symlinks; |
| 300 | the coordinator passed that run. Their survival depends on cancellation |
| 301 | timing. The full `make -k ci` has not yet run in round 2. Nothing has been |
| 302 | committed or pushed for this round. All temporary mutations are restored, |
| 303 | and this session's scratch and processes have been removed. |
| 304 | |
| 305 | ## Round 3 |
| 306 | |
| 307 | E1 resolves round 2's pending decision. Codex 0.165.0 may leave exactly |
| 308 | `tmp/arg0-linux/codex-arg0[A-Za-z0-9]{6}/apply_patch`, `applypatch`, and |
| 309 | `codex-linux-sandbox` as links to `/opt/codex`. This round observed suffixes |
| 310 | `gpkiVb` and `5Tf46c` in the failing specialist and coordinator replays. |
| 311 | The validator uses `Readlink`, never resolves the target, and checks the |
| 312 | link's uid and mode. The containing directories retain the round 2 |
| 313 | metadata guards. The launcher independently verifies the pinned executable |
| 314 | and its namespace mount. Other names, suffix lengths, characters, parents, |
| 315 | targets, owners, providers and versions are refused. Source-home links are |
| 316 | not staged. Both real Codex Opens now reach the missing-account error, and |
| 317 | the resulting runtime trees pass whether cancellation leaves the links or |
| 318 | removes them. |
| 319 | |
| 320 | ### Claude observations and fix |
| 321 | |
| 322 | `TestClaudeEmptyHomeReplay` checks the pinned 2.1.312 binary's SHA-256 and |
| 323 | uses the production specialist and coordinator policy, Open, lease and |
| 324 | no-input preflight probe. The test transport runs bubblewrap without any |
| 325 | network or egress relay. It mounts only fresh test homes, a fresh workspace, |
| 326 | read-only runtime files and generated policy. Its capture decodes JSON; |
| 327 | the existing runner capture tests separately exercise production framing. |
| 328 | The tool-proxy mount is an inert fixture: this is not a tool-call test. |
| 329 | |
| 330 | Real Open stops at unauthenticated auth status, with exit 1 and no signal. |
| 331 | It does not reach the full `-p` dependency probe. The replay therefore also |
| 332 | invokes that exact production probe inside the lease's checking callback, |
| 333 | with stdin closed and no prompt. It first substitutes a completely empty |
| 334 | `CLAUDE_CONFIG_DIR`, then runs against the newly staged credential-free |
| 335 | fixture. The full probe exits successfully in both roles. Only after every |
| 336 | real process exits does a synthetic identity callback enable the final |
| 337 | `ValidatePolicy` check. No provider process uses that synthetic identity. |
| 338 | |
| 339 | The baseline probe created `plugins/store/cc-plugin-agents-md_builtin-*.json` |
| 340 | despite `disableAllHooks=true`, an empty `enabledPlugins` object, and |
| 341 | `--disable-slash-commands`. It also created `.cache`, `.claude`, `.config`, |
| 342 | `.npm`, `dev-mods` and `seed-admin`, which were outside the runtime allowlist. |
| 343 | These are reproduced startup conflicts, not guesses about authenticated |
| 344 | sessions. |
| 345 | |
| 346 | The pinned binary contains the `enabledPlugins` setting and the |
| 347 | `agents-md@builtin` alias. Setting that entry to `false` prevents the plugin |
| 348 | directory in both roles. The launcher now sets it, and the replay asserts |
| 349 | the setting and the absence of plugins, skills, agents, commands, shell |
| 350 | snapshots and session env scripts. `--bare` was considered and rejected: |
| 351 | its embedded help says it disables OAuth reads. `--safe-mode` disables MCP |
| 352 | servers while retaining built-in plugins, so it is also unsuitable. |
| 353 | |
| 354 | Names, kinds and modes from the empty-home probes are recorded in |
| 355 | `internal/runner/provider/testdata/claude-empty-home-before-2.1.312.json` |
| 356 | and `claude-empty-home-disabled-2.1.312.json`. No runtime file contents were |
| 357 | retained. The new 2.1.312 allowances are limited to: |
| 358 | |
| 359 | - The exact cache directories through |
| 360 | `.cache/claude-cli-nodejs/-workspace/mcp-logs-equipo`, and timestamped |
| 361 | JSONL log files there. |
| 362 | - `.npm`, `.npm/_logs`, its recorded timestamped debug-log names, and the |
| 363 | regular `_update-notifier-last-checked` marker. |
| 364 | - The empty directories `.claude`, `.claude/ssh`, `.config`, |
| 365 | `.config/anthropic`, `dev-mods` and `seed-admin`. No files or further |
| 366 | directories under these paths are allowed. |
| 367 | |
| 368 | Claude entries must belong to the runner uid, have no setuid/setgid bits, |
| 369 | and be directories or regular files with one hard link. Symlinks and other |
| 370 | special files remain refused. The new allowances do not apply to source |
| 371 | homes, other providers or other versions. Policy names are refused at any |
| 372 | depth, including `plugins`, `skills`, `agents`, `commands`, `hooks`, |
| 373 | `settings*.json`, `CLAUDE.md`, MCP config, `shell-snapshots` and `session-env`. |
| 374 | Fixed `runtime_claude_*` categories identify cache, config, npm, mod, seed, |
| 375 | metadata, kind, policy, special-file and unexpected-entry failures without |
| 376 | echoing arbitrary names or contents. The baseline fixture remains refused |
| 377 | at its plugin directory; the disabled-plugin fixture passes. |
| 378 | |
| 379 | ### Minor fixes and verification |
| 380 | |
| 381 | Auth argv now comes from `claude.AuthStatusArgs`, which returns a fresh |
| 382 | slice. The shared framing selector lives beside it in the Claude adapter |
| 383 | and is called by runner capture. It checks both the binding and manifest |
| 384 | provider versions, along with the existing manifest hash and exact argv. |
| 385 | The manifest-version test covers a wrong version and an absent version. |
| 386 | The Codex readback comment now identifies the live coordinator tool |
| 387 | inventory as the real guard for the two flags missing from typed config. |
| 388 | |
| 389 | All Go commands use `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10` and default Go |
| 390 | caches. New tests were run before their implementation: |
| 391 | |
| 392 | ```sh |
| 393 | go test ./internal/runner ./internal/runner/provider/codex \ |
| 394 | -run 'TestDirectClaudeAuthDocument|TestCodexEmptyHomeReplay' -count=1 -v |
| 395 | go test ./internal/runner/provider -run '^TestAccountCodexRuntimeLinks$' -count=1 |
| 396 | go test ./internal/runner/provider/claude -run '^TestClaudeEmptyHomeReplay$' -count=1 -v |
| 397 | go test ./internal/runner/provider -run '^TestAccountClaude' -count=1 |
| 398 | ``` |
| 399 | |
| 400 | The first run failed on missing/wrong manifest versions and both Codex |
| 401 | runtime trees. The link test rejected the three authorized links. The |
| 402 | corrected Claude replay reached the full no-input probe and failed runtime |
| 403 | validation; adding the plugin-setting assertion also failed before its |
| 404 | implementation. Claude inventory and refusal tests failed before their |
| 405 | runtime changes. The manifest-version cases now live in |
| 406 | `TestClaudeAuthManifestVersion`, keeping the runner's existing 8,800-line |
| 407 | test ceiling without removing coverage or raising budgets. |
| 408 | |
| 409 | Each new guard was temporarily broken and restored. Every row below failed |
| 410 | by assertion. Two initial mutation attempts had unused-variable compile |
| 411 | errors; those were corrected and rerun before counting the guard as tested. |
| 412 | Commands use `go test`, the package and `-run` pattern shown, and `-count=1`. |
| 413 | |
| 414 | | Temporary break | Package and test pattern | |
| 415 | | --- | --- | |
| 416 | | Ignore the Codex link path pattern | `./internal/runner/provider -run '^TestAccountCodexRuntimeLinks$'` | |
| 417 | | Accept any nonempty link target | `./internal/runner/provider -run '^TestAccountCodexRuntimeLinks$'` | |
| 418 | | Ignore link uid | `./internal/runner/provider -run '^TestAccountCodexLinkOwner$'` | |
| 419 | | Ignore the link's provider version | `./internal/runner/provider -run '^TestAccountCodexLinkScope/version$'` | |
| 420 | | Ignore the link's provider | `./internal/runner/provider -run '^TestAccountCodexLinkScope/provider$'` | |
| 421 | | Accept unrecorded Claude paths | `./internal/runner/provider -run '^TestAccountClaudeRuntimeGuards$'` | |
| 422 | | Ignore the Claude version pin | `./internal/runner/provider -run '^TestAccountClaudeRuntimeGuards/.cache/version$'` | |
| 423 | | Apply Claude allowances to other providers | `./internal/runner/provider -run '^TestAccountClaudeRuntimeGuards/.cache/provider$'` | |
| 424 | | Skip Claude metadata checks | `./internal/runner/provider -run '^TestAccountClaudeRuntimeGuards$'` | |
| 425 | | Accept the wrong Claude entry kind | `./internal/runner/provider -run '^TestAccountClaudeRuntimeGuards/.cache/file$'` | |
| 426 | | Skip policy-name checks | `./internal/runner/provider -run '^TestAccountClaudeRuntimeGuards$'` | |
| 427 | | Ignore the auth manifest version | `./internal/runner/provider/claude -run '^TestClaudeAuthManifestVersion$'` | |
| 428 | | Remove the built-in plugin disable setting | `./internal/runner/provider/claude -run '^TestClaudeEmptyHomeReplay/Engineering$'` | |
| 429 | |
| 430 | The complete provider, Claude and Codex suites passed before the final |
| 431 | consolidated targeted run. With all mutations restored, that run is: |
| 432 | |
| 433 | ```sh |
| 434 | go test ./internal/runner ./internal/runner/provider/... ./internal/tryequipo \ |
| 435 | -run 'TestAccount|TestCodex|TestClaude|TestDirectClaudeAuthDocument|TestDirectJournalFailureContains|TestPlanWorkflowProviderPoliciesLauncher|TestCoordinatorOnlyMCPServer|TestPrivateDirectoryFailureNamesPath' \ |
| 436 | -count=1 |
| 437 | ``` |
| 438 | |
| 439 | Size budgets and the exact reference inventory pass without raising any |
| 440 | limits. Full CI and final cleanup results follow below. |
| 441 | |
| 442 | The first full `make -k ci` finished with two failing inventory tests: |
| 443 | `TestMergedPlanPolicyInventory` and `TestPlanWorkflowReleasePolicyInventory`. |
| 444 | All 18 pending constructor hashes were stale after the changed Claude and |
| 445 | Codex settings. `internal/release/manifest.json` now contains the hashes |
| 446 | reported by those tests. Every status remains `uncertified`; no certificate, |
| 447 | live evidence or execution authority was added. Both tests and |
| 448 | `TestPlanWorkflowReleaseRejectsOldCertificate` pass after that update. |
| 449 | |
| 450 | All other first-run gates passed. The main suite ran 25 packages without |
| 451 | cached results; only the two inventory packages failed. Local advisory time |
| 452 | limits were exceeded by the runner (375.642 seconds against 330), provider |
| 453 | (16.352 against 15), Claude (47.680 against 45) and Codex (39.659 against 35). |
| 454 | No limit was raised. The performance lane passed with a 116 ms median cold |
| 455 | boot against 500 ms. The first full rerun follows the inventory correction. |
| 456 | |
| 457 | The first full rerun of `make -k ci` passed, exit 0. There were two full |
| 458 | gate runs in this round; no second rerun was needed. All 27 test packages |
| 459 | ran without cached results or failures. The adapter, namespace, migration |
| 460 | and performance lanes also passed. Median cold boot was 132 ms against |
| 461 | 500 ms. |
| 462 | |
| 463 | The successful local gate still reported advisory timing overruns: |
| 464 | application integration 341.948 seconds against 300, runner 524.230 against |
| 465 | 330, provider 17.414 against 15, Claude 54.636 against 45, and Codex 41.347 |
| 466 | against 35. These timing limits are enforced when the CI environment is |
| 467 | set; this local success does not establish that those limits will pass |
| 468 | there. No budget was relaxed and no additional full suite was run. |
| 469 | |
| 470 | There are no pending controller decisions for this round. Account-home |
| 471 | contents and existing Equipo state were untouched. No sign-in, |
| 472 | authenticated model call, live gate, merge, default-branch push, deployment |
| 473 | or copy-review server was run. Both live-test environment flags were |
| 474 | unset. Test processes have exited; session scratch is removed at handoff. |
| 475 | |
| 476 | ## Round 4 |
| 477 | |
| 478 | Specialists now disable Codex goals, plugins, remote plugins and tool |
| 479 | suggestions, using the same feature flags as the coordinator. Both real |
| 480 | 0.165.0 empty-home replays pass the production `config/read` comparison |
| 481 | under `--strict-config`. Tests also change each effective flag to true |
| 482 | and require refusal. The specialist live inventory rejects goal, plugin |
| 483 | and suggestion tools, including functions inside the `functions` |
| 484 | namespace. This assertion is tested with synthetic catalog frames; no |
| 485 | live gate or authenticated turn was run. |
| 486 | |
| 487 | Neither real replay leaves `.tmp/plugins.sha` or `.tmp/plugins` in its |
| 488 | staged home. That observation is limited to network-isolated startup; |
| 489 | it cannot prove what an authenticated startup would attempt. The runtime |
| 490 | validator now refuses `.tmp/plugins*` outright. Known paths have fixed |
| 491 | categories: `runtime_codex_plugins`, `runtime_codex_dot_tmp`, |
| 492 | `runtime_codex_tmp`, `runtime_codex_arg0`, `runtime_codex_skills`, |
| 493 | `runtime_codex_installation_id`, `runtime_codex_goals`, |
| 494 | `runtime_codex_memories` and `runtime_codex_queue`. Unknown names and file |
| 495 | contents never appear in these diagnostics. The earlier references to the |
| 496 | category for `.tmp` have been corrected. |
| 497 | |
| 498 | For Claude 2.1.312, only these three root-level policy-limit files are |
| 499 | newly accepted: `policy-limits.json`, `policy-limits.json.signature.json` |
| 500 | and `policy-limits.json.signature-iat.json`. They must be regular files |
| 501 | with the runner uid, no setuid/setgid bits and one hard link. |
| 502 | `remote-settings.json` remains refused, with |
| 503 | `runtime_claude_remote_settings`. Tests cover wrong kinds, links, mode, |
| 504 | provider and version, plus source-home exclusion and a second BeginTurn. |
| 505 | |
| 506 | Claude settings disable both `agents-md@builtin` and |
| 507 | `plugin-authoring@builtin`, and set `autoMemoryEnabled` and |
| 508 | `autoDreamEnabled` false. Both role replays assert the constructed settings |
| 509 | and read back the actual settings mount before starting the pinned CLI. |
| 510 | The production no-input startup probe still requires an empty plugin |
| 511 | inventory. Claude does not provide the Codex effective-config RPC here; |
| 512 | the settings-file readback is not a claim of such an RPC. Separate policy |
| 513 | refusal tests reject attempts to enable each new setting. |
| 514 | |
| 515 | ### Bash state fallback and binary evidence |
| 516 | |
| 517 | The pinned Claude executable was inspected directly, without executing it |
| 518 | against an account home. Its embedded source has no compatible setting or |
| 519 | environment switch that disables both shell snapshots and session env |
| 520 | files. `CLAUDE_CODE_DONT_INHERIT_ENV` changes the snapshot subprocess |
| 521 | environment; it does not suppress the files. The snapshot function's |
| 522 | `Kv()` check refuses program starts in diskless sessions, so it is not a |
| 523 | switch for this Bash-capable launcher. The brief's fallback applies. |
| 524 | |
| 525 | The embedded snapshot constructor, `ikn`, chooses `bash`, `zsh` or `sh`, |
| 526 | then builds `snapshot-${shell}-${Date.now()}-${random}.sh`. Random text is |
| 527 | `Math.random().toString(36).substring(2,8)`, at most six lowercase base-36 |
| 528 | characters, possibly empty for zero. Its optional session suffix calls |
| 529 | `k_n`, whose guard `d_n()` is hardcoded false in this binary. The accepted |
| 530 | pattern therefore has a 13-digit millisecond timestamp, zero to six |
| 531 | base-36 characters and no session suffix. Other shells, uppercase text, |
| 532 | long random text, suffixes and nested directories are refused. |
| 533 | |
| 534 | The embedded `YNt` constructor writes a lowercased hook name and index. |
| 535 | Its reader's exact `vG` pattern is |
| 536 | `^(setup|sessionstart|cwdchanged|filechanged)-hook-(\d+)\.sh$`. |
| 537 | These regular files are accepted only directly under |
| 538 | `session-env/<uuid>/`. The UUID directory and both root directories must |
| 539 | be directories. Unrecognized names, extra depth, special files, hard |
| 540 | links, foreign owners and unsafe modes remain refused. |
| 541 | |
| 542 | This exception relies on the staged home being denied to native file |
| 543 | operations and Bash. The comment in `runtime_claude.go` cites the deny |
| 544 | construction at `claude/launcher.go:139-149`; existing launch-policy tests |
| 545 | check those paths. Synthetic provider-written state survives EndTurn and |
| 546 | passes the next BeginTurn. The unauthenticated replay does not exercise |
| 547 | an authenticated Bash call, so the filename evidence is the pinned |
| 548 | binary and the second-turn evidence is the account-lease regression. |
| 549 | |
| 550 | The provider version strings now have shared constants, with the adapter |
| 551 | `Version` constants referring to them. This avoids an import cycle |
| 552 | between account validation and its adapters. Codex arg0 shim paths accept |
| 553 | only the already-authorized symlinks; regular files and directories at |
| 554 | those paths are refused. Seventeen changed constructor hashes were |
| 555 | refreshed in the release manifest. All 18 policies remain `uncertified`; |
| 556 | the Codex coordinator's hash did not change. |
| 557 | |
| 558 | ### Verification |
| 559 | |
| 560 | All Go commands use `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10`, default Go caches |
| 561 | and on-disk `$TMPDIR`. New assertions were added before implementation: |
| 562 | |
| 563 | ```sh |
| 564 | go test ./internal/runner/provider ./internal/runner/provider/codex \ |
| 565 | ./internal/runner/provider/claude ./internal/directlive \ |
| 566 | -run 'TestAccountClaudeAuthenticatedState|TestAccountStartupRefusals|TestAccountCodexRuntimeLinks|TestCodexRuntimeSettings|TestClaudeEmptyHomeReplay|TestSpecialistNoGoalOrPluginTools' \ |
| 567 | -count=1 |
| 568 | ``` |
| 569 | |
| 570 | The first command had a missing test brace in the provider package; that |
| 571 | was corrected and the provider subset rerun before implementation. The |
| 572 | assertions failed for missing specialist flags, missing Claude settings, |
| 573 | exposed goal/plugin tools, accepted regular arg0 shims, rejected startup |
| 574 | files on a second turn and missing fixed refusal categories. An initial |
| 575 | hardlink fixture linked the credential itself, causing EndTurn to refuse |
| 576 | it before the runtime check; the fixture now links a separate test file. |
| 577 | |
| 578 | After implementation, one old recording expected a skills refusal, but |
| 579 | its curated-plugin cache is now refused first. Its assertion now names |
| 580 | that observed failure. The two policy-inventory tests identified the 17 |
| 581 | changed hashes before the manifest update. The targeted run then passed: |
| 582 | |
| 583 | ```sh |
| 584 | go test ./internal/runner/provider ./internal/runner/provider/codex \ |
| 585 | ./internal/runner/provider/claude ./internal/directlive ./internal/release \ |
| 586 | -run 'TestAccount|TestCodexRuntime|TestCodexEmptyHomeReplay|TestClaudeEmptyHomeReplay|TestClaudeLaunchPolicy|TestClaudePolicyRefusals|TestSpecialist|TestMergedPlanPolicyInventory|TestPlanWorkflowReleasePolicyInventory|TestPlanWorkflowReleaseRejectsOldCertificate' \ |
| 587 | -count=1 |
| 588 | ``` |
| 589 | |
| 590 | Every mutation below failed by assertion and was restored immediately. |
| 591 | Commands are `go test <package> -run '<pattern>' -count=1`. |
| 592 | |
| 593 | | Temporary break | Package | Pattern | |
| 594 | | --- | --- | --- | |
| 595 | | Enable each of goals, plugins, remote_plugin and tool_suggest separately | `./internal/runner/provider/codex` | `^TestCodexRuntimeSettings/implement$` | |
| 596 | | Accept effective config without comparison | `./internal/runner/provider/codex` | `^TestCodexRuntimeSettings/implement$` | |
| 597 | | Enable plugin-authoring, memory or dreaming separately | `./internal/runner/provider/claude` | `^TestClaudeLaunchPolicy/Engineering$` | |
| 598 | | Accept goal/plugin/suggestion tools | `./internal/directlive` | `^TestSpecialistNoGoalOrPluginTools$` | |
| 599 | | Permit the curated plugin cache | `./internal/runner/provider` | `^TestAccountStartupRefusals/codex/.tmp/plugins.sha$` | |
| 600 | | Accept regular arg0 files or directories | `./internal/runner/provider` | `^TestAccountCodexRuntimeLinks/(regular\|directory)$` | |
| 601 | | Accept remote settings | `./internal/runner/provider` | `^TestAccountStartupRefusals/claude/remote-settings.json$` | |
| 602 | | Ignore Claude version | `./internal/runner/provider` | `^TestAccountClaudeAuthenticatedState/policy-limits.json/version$` | |
| 603 | | Apply Claude allowances to other providers | `./internal/runner/provider` | `^TestAccountClaudeAuthenticatedState/policy-limits.json/provider$` | |
| 604 | | Ignore uid | `./internal/runner/provider` | `^TestAccountCodexRuntimeOwner$` | |
| 605 | | Ignore setuid/setgid | `./internal/runner/provider` | `^TestAccountClaudeAuthenticatedState/policy-limits.json/(setuid\|setgid)$` | |
| 606 | | Ignore hardlink count | `./internal/runner/provider` | `^TestAccountClaudeAuthenticatedState/policy-limits.json/hardlink$` | |
| 607 | | Permit symlinks and FIFOs | `./internal/runner/provider` | `^TestAccountClaudeAuthenticatedState/policy-limits.json/(link\|fifo)$` | |
| 608 | | Ignore file kind | `./internal/runner/provider` | `^TestAccountClaudeAuthenticatedState/policy-limits.json/directory$` | |
| 609 | | Ignore snapshot filename pattern | `./internal/runner/provider` | `^TestAccountStartupRefusals/claude/shell-snapshots/evil.sh$` | |
| 610 | | Ignore session-env filename pattern | `./internal/runner/provider` | `^TestAccountStartupRefusals/claude/session-env/12345678-1234-4123-8123-123456789abc/evil.sh$` | |
| 611 | | Drop fixed Codex categories | `./internal/runner/provider` | `^TestAccountStartupRefusals/codex$` | |
| 612 | |
| 613 | With all 22 mutations restored, the targeted command above passed again. |
| 614 | The exact reference inventory and size budgets passed without raising any |
| 615 | limits. One full `make -k ci` then passed, exit 0; no rerun was needed. |
| 616 | All 27 main-suite test packages ran without cached results or failures. |
| 617 | Build, vet, formatting, staticcheck, govulncheck, gitleaks, adapter, |
| 618 | namespace, migration and performance checks passed. Median cold boot was |
| 619 | 103 ms against the 500 ms limit. |
| 620 | |
| 621 | The local gate reported two advisory timing overruns: provider tests took |
| 622 | 20.195 seconds against 15, and Codex tests took 37.638 seconds against 35. |
| 623 | These limits become failures in the CI environment, so this local result |
| 624 | does not establish that CI timing will pass. No budget was changed. |
| 625 | The runner took 326.395 seconds, within its 330-second limit. |
| 626 | |
| 627 | Account-home contents and existing Equipo state were untouched. No |
| 628 | sign-in, authenticated provider call, live gate, merge, default-branch |
| 629 | push, deployment or copy-review server was run. Both live-test flags |
| 630 | were unset for the full gate. Test subprocesses exited and session |
| 631 | scratch was removed before commit and branch push. |
| 632 | |