oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1# Live open failures
2
3The four rounds fix auth framing, config readback and the runtime-home
4conflicts reproduced with the pinned providers. Both providers now pass
5unauthenticated runtime replays for the specialist and coordinator. The
6branch 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
18The 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
21file contents were read, copied, printed, or hashed. No existing Equipo
22state was changed. No sign-in, live gate, authenticated CLI call, merge,
23default-branch push, deployment, or copy-review server was run.
24
25The coordinator cannot explain the earlier specialist failures by running first:
26`runRoles` schedules it last (`internal/directlive/driver.go:54`), and each
27exercise opens a fresh lease. Source-home SQLite files are not copied by
28`AccountLease.stage`; the runtime guard inspects the staged home, not the
29source account directory. These details rule out those two proposed paths,
30but 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
35exact launcher-generated auth command, Claude 2.1.312, and a matching
36manifest hash. It reads at most 1 MiB plus one byte, requires one JSON object,
37and rejects duplicate keys or trailing documents. Agent streams keep their
38existing line framing. Invalid output gets a fixed `stdout_invalid_json`
39reason without echoing output bytes.
40
41`internal/runner/provider/codex/config_readback.go:9` accepts only the recorded
42omission, only for a hashed coordinator manifest at 0.165.0. Both requested
43tools must be exactly disabled, and effective tools must be exactly the
44recorded `{"web_search":null}` object. The original settings are still
45checked against the full command-line layer. Other configured fields,
46approvals, config layers, origins, and the MCP server inventory remain checked.
47Live certification must still verify the available tools before a release.
48The 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
52reason codes to containment failures. They never include file contents,
53arbitrary filenames, or underlying filesystem errors. Known Codex startup
54artifacts get fixed categories, such as `runtime_codex_dot_tmp`. This does not
55allow those artifacts or bypass identity, permissions, refresh, or policy
56checks. 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
60existing error. For the reported case it names
61`/home/paulca/.local/share/equipo-runner`. Existing reviewed guide wording is
62reused; no new app copy or README prose was added.
63
64## Reproductions and verification
65
66Both binary probes used the pinned executables under
67`~/.local/share/equipo/try/bin`, with separate fresh empty homes under the
68on-disk `$TMPDIR`. SHA-256 checks matched both adapter pins:
69Claude `4f4178ce41d83e23341ebfbaecdbcf8ea6bf7baea0690025abe49eeec3a5d01d`
70and Codex `c06a67fd8ac76508dc78bd99ce20c9f317b8d568beda59485f3f4134df9962d5`.
71Bubblewrap 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
74was 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
86All Go commands used `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10`, with default Go
87caches. Tests were written before implementation:
88
89```sh
90go test ./internal/runner ./internal/runner/provider/codex ./internal/tryequipo \
91 -run 'TestDirectClaudeAuthDocument|TestDirectFrameDiagnosticNoContents|TestCodexLiveConfig|TestPrivateDirectoryFailureNamesPath' -count=1
92go test ./internal/runner/provider -run '^TestAccountContainmentDiagnostics$' -count=1
93go test ./internal/runner/provider -run '^TestAccountRecordedCodexRuntimeRefused$' -count=1
94```
95
96The first command failed on auth framing, opaque frame errors, the saved
97Codex config, and the missing directory path. All five diagnostic subtests
98in the second command failed before their fixes. The inventory replay in
99the third failed to identify the startup directory before the diagnostic
100change. All pass after implementation.
101
102Guard mutations were applied separately and restored immediately. Each
103command 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
113After restoring all guards, the targeted suite was run with:
114
115```sh
116go 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
121The first `make -k ci` completed with two causes of failure: the supplied
122brief lacked two reference-inventory entries, and the runner test package
123was 14 lines over its existing limit. The inventory issue also failed
124`TestDirectDeadReferencesRepository`. All other checks passed. The runner
125package took 350.106 seconds against its 330-second local advisory budget;
126the budget was not raised.
127
128The frame diagnostic assertion now shares the existing malformed-frame
129case in `TestDirectJournalFailureContains`, preserving all coverage and
130bringing the runner tests to exactly 8,800 lines. The reference inventory
131includes exact, reasoned entries for the supplied brief and new artifacts.
132
133The first full rerun of `make -k ci` passed (exit 0): reference inventory,
134build, vet, formatting, staticcheck, govulncheck, gitleaks, size budgets,
135all tests, adapter checks, namespace checks, migration check, and performance.
136The main suite ran 27 packages with no cached results and no failures.
137The runner package took 299.643 seconds, within its 330-second limit.
138The performance lane passed, including a 101 ms median cold boot against
139500 ms. There were two full gate runs total, with no second rerun needed.
140`EQUIPO_LIVE_DIRECT` and `EQUIPO_LIVE_CONFIG` were unset.
141
142The standalone frame-diagnostic test named in the initial failing command
143was consolidated into `TestDirectJournalFailureContains/malformed` for the
144size gate. After consolidation, `go test ./internal/runner -run
145'TestDirectClaudeAuthDocument|TestDirectJournalFailureContains' -count=1`
146also passed. Temporary guard mutations were all restored before either
147full gate.
148
149## Next authenticated observation
150
151Only Paul may authorize and run a new live trial. Retain its
152`tuple-completed.json`, `capture.json`, and `certification.json`. The new
153Codex 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
163If an unexpected entry remains, capture only its path, type, mode, owner,
164link count, size, and mtime before the disposable runtime home is removed.
165Do not capture credential, SQLite, or skill contents. Any policy adjustment
166needs evidence that the particular files cannot introduce tools or settings;
167the empty-home observation alone does not establish that. No claim is made
168that the next authenticated run will pass.
169
170## Round 2
171
172The pinned 0.165.0 binary supports `skills.bundled.enabled=false`. Both
173specialist and coordinator policies now pass that setting and
174`features.memories=false` through their hashed settings, argv and thread
175policy. Config readback must retain both values. The runtime validator
176still refuses `skills`, including `skills/.system`.
177
178### Switch evidence
179
180The probes used only new credential-free homes under the on-disk
181`$TMPDIR`, with `bwrap --unshare-all --die-with-parent --new-session`, an
182empty environment, and the verified pinned binary. There was no egress
183relay, 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
187round-one `equipo:3` response has `skills:null` and `memories:null`; its
188coordinator 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
192installed and listed all five bundled skills. That flag is insufficient.
193The pinned binary's config type names include `SkillsConfig`, `bundled`
194and `BundledSkillsConfig`, which led to the successful strict-config
195probe:
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
203The effective config and session layer both retain the requested values.
204`skills/list` with `forceReload:true` returns one workspace with empty
205skills and errors arrays. No `skills` directory is created. Direct
206responses 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`.
209The account is null. Installation-specific notifications were omitted.
210The manifest fallback in D1 is therefore unnecessary.
211
212### Runtime state
213
214For Codex 0.165.0 only, the staged-home validator now permits `.tmp` and
215`tmp` directories, `installation_id`, and the three named SQLite files
216with their `-shm` and `-wal` siblings. Entries must belong to the runner
217uid, with no setuid or setgid bits. State entries must be regular files;
218regular files with multiple hard links are refused. Nested scratch
219entries retain the policy-name and special-file checks. Other versions,
220providers and new top-level names do not gain these allowances.
221`AccountLease.stage` is unchanged and copies none of these source-home
222artifacts. A regression checks that source scratch and state stay out of
223the 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
229mode helper. Its test transport uses a network-isolated bubblewrap home
230and the existing frame-capture fixture. It skips clearly when the pinned
231installation is absent. The source is newly created, with an
232`auth_mode:apikey` marker and no key or other credential. An empty JSON
233object is unsuitable: Codex interprets it as incomplete ChatGPT auth and
234returns a protocol error requiring a plan type.
235
236Both real opens now return `codex_preflight_probe:
237provider_identity_mismatch` from the missing account. Since this occurs
238before config readback, a second unauthenticated process checks the same
239policy through production `readConfig`. Only after every process exits
240does the test mark its synthetic lease ready, solely to run
241`ValidatePolicy` against the actual startup tree. No real process runs
242with that synthetic identity.
243
244That final check found another artifact not retained by the graceful
245round-one probe: `tmp/arg0-linux/codex-arg0*/apply_patch`, `applypatch`
246and `codex-linux-sandbox` are symlinks to `/opt/codex`. They remain after
247the launcher's cancellation path. The current validator refuses them
248with `runtime_special_entry`. D2 says no escaping symlinks; these leave
249the runtime home but target the pinned binary inside the namespace.
250Permission to allow only those verified links is pending. The replay
251still fails its final runtime check, so this round is not complete.
252
253### Verification so far
254
255All Go commands use `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10` and default caches.
256Before implementation, this command failed for all twelve allowed state
257entries and for the missing disable settings in both roles:
258
259```sh
260go test ./internal/runner/provider ./internal/runner/provider/codex \
261 -run 'TestAccountCodexRuntimeState|TestCodexRuntimeSettings' -count=1
262```
263
264Those tests now pass. The complete provider and Codex packages pass with
265the unresolved real replay excluded (11.135 seconds and 20.380 seconds):
266
267```sh
268go test ./internal/runner/provider ./internal/runner/provider/codex \
269 -skip '^TestCodexEmptyHomeReplay$' -count=1
270```
271
272Each guard below was temporarily broken, observed failing by assertion,
273and restored before continuing. Commands use `go test`, the package
274shown, `-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
291The last mutation made the real replay fail specifically because bundled
292skills were installed. Size budgets pass unchanged. The reference
293inventory includes the two null JS-path fields in the new config fixture.
294The expanded targeted checks also passed for the runner and all provider
295packages, selecting the account, Codex, workflow-policy and coordinator
296MCP tests, with only the unresolved replay excluded.
297
298After adding the production `TMPDIR` and `LANG` environment values to the
299replay transport, the specialist still failed on the leftover symlinks;
300the coordinator passed that run. Their survival depends on cancellation
301timing. The full `make -k ci` has not yet run in round 2. Nothing has been
302committed or pushed for this round. All temporary mutations are restored,
303and this session's scratch and processes have been removed.
304
305## Round 3
306
307E1 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.
311The validator uses `Readlink`, never resolves the target, and checks the
312link's uid and mode. The containing directories retain the round 2
313metadata guards. The launcher independently verifies the pinned executable
314and its namespace mount. Other names, suffix lengths, characters, parents,
315targets, owners, providers and versions are refused. Source-home links are
316not staged. Both real Codex Opens now reach the missing-account error, and
317the resulting runtime trees pass whether cancellation leaves the links or
318removes them.
319
320### Claude observations and fix
321
322`TestClaudeEmptyHomeReplay` checks the pinned 2.1.312 binary's SHA-256 and
323uses the production specialist and coordinator policy, Open, lease and
324no-input preflight probe. The test transport runs bubblewrap without any
325network or egress relay. It mounts only fresh test homes, a fresh workspace,
326read-only runtime files and generated policy. Its capture decodes JSON;
327the existing runner capture tests separately exercise production framing.
328The tool-proxy mount is an inert fixture: this is not a tool-call test.
329
330Real Open stops at unauthenticated auth status, with exit 1 and no signal.
331It does not reach the full `-p` dependency probe. The replay therefore also
332invokes that exact production probe inside the lease's checking callback,
333with stdin closed and no prompt. It first substitutes a completely empty
334`CLAUDE_CONFIG_DIR`, then runs against the newly staged credential-free
335fixture. The full probe exits successfully in both roles. Only after every
336real process exits does a synthetic identity callback enable the final
337`ValidatePolicy` check. No provider process uses that synthetic identity.
338
339The baseline probe created `plugins/store/cc-plugin-agents-md_builtin-*.json`
340despite `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.
343These are reproduced startup conflicts, not guesses about authenticated
344sessions.
345
346The pinned binary contains the `enabledPlugins` setting and the
347`agents-md@builtin` alias. Setting that entry to `false` prevents the plugin
348directory in both roles. The launcher now sets it, and the replay asserts
349the setting and the absence of plugins, skills, agents, commands, shell
350snapshots and session env scripts. `--bare` was considered and rejected:
351its embedded help says it disables OAuth reads. `--safe-mode` disables MCP
352servers while retaining built-in plugins, so it is also unsuitable.
353
354Names, kinds and modes from the empty-home probes are recorded in
355`internal/runner/provider/testdata/claude-empty-home-before-2.1.312.json`
356and `claude-empty-home-disabled-2.1.312.json`. No runtime file contents were
357retained. 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
368Claude entries must belong to the runner uid, have no setuid/setgid bits,
369and be directories or regular files with one hard link. Symlinks and other
370special files remain refused. The new allowances do not apply to source
371homes, other providers or other versions. Policy names are refused at any
372depth, including `plugins`, `skills`, `agents`, `commands`, `hooks`,
373`settings*.json`, `CLAUDE.md`, MCP config, `shell-snapshots` and `session-env`.
374Fixed `runtime_claude_*` categories identify cache, config, npm, mod, seed,
375metadata, kind, policy, special-file and unexpected-entry failures without
376echoing arbitrary names or contents. The baseline fixture remains refused
377at its plugin directory; the disabled-plugin fixture passes.
378
379### Minor fixes and verification
380
381Auth argv now comes from `claude.AuthStatusArgs`, which returns a fresh
382slice. The shared framing selector lives beside it in the Claude adapter
383and is called by runner capture. It checks both the binding and manifest
384provider versions, along with the existing manifest hash and exact argv.
385The manifest-version test covers a wrong version and an absent version.
386The Codex readback comment now identifies the live coordinator tool
387inventory as the real guard for the two flags missing from typed config.
388
389All Go commands use `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10` and default Go
390caches. New tests were run before their implementation:
391
392```sh
393go test ./internal/runner ./internal/runner/provider/codex \
394 -run 'TestDirectClaudeAuthDocument|TestCodexEmptyHomeReplay' -count=1 -v
395go test ./internal/runner/provider -run '^TestAccountCodexRuntimeLinks$' -count=1
396go test ./internal/runner/provider/claude -run '^TestClaudeEmptyHomeReplay$' -count=1 -v
397go test ./internal/runner/provider -run '^TestAccountClaude' -count=1
398```
399
400The first run failed on missing/wrong manifest versions and both Codex
401runtime trees. The link test rejected the three authorized links. The
402corrected Claude replay reached the full no-input probe and failed runtime
403validation; adding the plugin-setting assertion also failed before its
404implementation. Claude inventory and refusal tests failed before their
405runtime changes. The manifest-version cases now live in
406`TestClaudeAuthManifestVersion`, keeping the runner's existing 8,800-line
407test ceiling without removing coverage or raising budgets.
408
409Each new guard was temporarily broken and restored. Every row below failed
410by assertion. Two initial mutation attempts had unused-variable compile
411errors; those were corrected and rerun before counting the guard as tested.
412Commands 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
430The complete provider, Claude and Codex suites passed before the final
431consolidated targeted run. With all mutations restored, that run is:
432
433```sh
434go test ./internal/runner ./internal/runner/provider/... ./internal/tryequipo \
435 -run 'TestAccount|TestCodex|TestClaude|TestDirectClaudeAuthDocument|TestDirectJournalFailureContains|TestPlanWorkflowProviderPoliciesLauncher|TestCoordinatorOnlyMCPServer|TestPrivateDirectoryFailureNamesPath' \
436 -count=1
437```
438
439Size budgets and the exact reference inventory pass without raising any
440limits. Full CI and final cleanup results follow below.
441
442The first full `make -k ci` finished with two failing inventory tests:
443`TestMergedPlanPolicyInventory` and `TestPlanWorkflowReleasePolicyInventory`.
444All 18 pending constructor hashes were stale after the changed Claude and
445Codex settings. `internal/release/manifest.json` now contains the hashes
446reported by those tests. Every status remains `uncertified`; no certificate,
447live evidence or execution authority was added. Both tests and
448`TestPlanWorkflowReleaseRejectsOldCertificate` pass after that update.
449
450All other first-run gates passed. The main suite ran 25 packages without
451cached results; only the two inventory packages failed. Local advisory time
452limits 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).
454No limit was raised. The performance lane passed with a 116 ms median cold
455boot against 500 ms. The first full rerun follows the inventory correction.
456
457The first full rerun of `make -k ci` passed, exit 0. There were two full
458gate runs in this round; no second rerun was needed. All 27 test packages
459ran without cached results or failures. The adapter, namespace, migration
460and performance lanes also passed. Median cold boot was 132 ms against
461500 ms.
462
463The successful local gate still reported advisory timing overruns:
464application integration 341.948 seconds against 300, runner 524.230 against
465330, provider 17.414 against 15, Claude 54.636 against 45, and Codex 41.347
466against 35. These timing limits are enforced when the CI environment is
467set; this local success does not establish that those limits will pass
468there. No budget was relaxed and no additional full suite was run.
469
470There are no pending controller decisions for this round. Account-home
471contents and existing Equipo state were untouched. No sign-in,
472authenticated model call, live gate, merge, default-branch push, deployment
473or copy-review server was run. Both live-test environment flags were
474unset. Test processes have exited; session scratch is removed at handoff.
475
476## Round 4
477
478Specialists now disable Codex goals, plugins, remote plugins and tool
479suggestions, using the same feature flags as the coordinator. Both real
4800.165.0 empty-home replays pass the production `config/read` comparison
481under `--strict-config`. Tests also change each effective flag to true
482and require refusal. The specialist live inventory rejects goal, plugin
483and suggestion tools, including functions inside the `functions`
484namespace. This assertion is tested with synthetic catalog frames; no
485live gate or authenticated turn was run.
486
487Neither real replay leaves `.tmp/plugins.sha` or `.tmp/plugins` in its
488staged home. That observation is limited to network-isolated startup;
489it cannot prove what an authenticated startup would attempt. The runtime
490validator now refuses `.tmp/plugins*` outright. Known paths have fixed
491categories: `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
495contents never appear in these diagnostics. The earlier references to the
496category for `.tmp` have been corrected.
497
498For Claude 2.1.312, only these three root-level policy-limit files are
499newly accepted: `policy-limits.json`, `policy-limits.json.signature.json`
500and `policy-limits.json.signature-iat.json`. They must be regular files
501with 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,
504provider and version, plus source-home exclusion and a second BeginTurn.
505
506Claude 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
509and read back the actual settings mount before starting the pinned CLI.
510The production no-input startup probe still requires an empty plugin
511inventory. Claude does not provide the Codex effective-config RPC here;
512the settings-file readback is not a claim of such an RPC. Separate policy
513refusal tests reject attempts to enable each new setting.
514
515### Bash state fallback and binary evidence
516
517The pinned Claude executable was inspected directly, without executing it
518against an account home. Its embedded source has no compatible setting or
519environment switch that disables both shell snapshots and session env
520files. `CLAUDE_CODE_DONT_INHERIT_ENV` changes the snapshot subprocess
521environment; it does not suppress the files. The snapshot function's
522`Kv()` check refuses program starts in diskless sessions, so it is not a
523switch for this Bash-capable launcher. The brief's fallback applies.
524
525The embedded snapshot constructor, `ikn`, chooses `bash`, `zsh` or `sh`,
526then builds `snapshot-${shell}-${Date.now()}-${random}.sh`. Random text is
527`Math.random().toString(36).substring(2,8)`, at most six lowercase base-36
528characters, possibly empty for zero. Its optional session suffix calls
529`k_n`, whose guard `d_n()` is hardcoded false in this binary. The accepted
530pattern therefore has a 13-digit millisecond timestamp, zero to six
531base-36 characters and no session suffix. Other shells, uppercase text,
532long random text, suffixes and nested directories are refused.
533
534The embedded `YNt` constructor writes a lowercased hook name and index.
535Its reader's exact `vG` pattern is
536`^(setup|sessionstart|cwdchanged|filechanged)-hook-(\d+)\.sh$`.
537These regular files are accepted only directly under
538`session-env/<uuid>/`. The UUID directory and both root directories must
539be directories. Unrecognized names, extra depth, special files, hard
540links, foreign owners and unsafe modes remain refused.
541
542This exception relies on the staged home being denied to native file
543operations and Bash. The comment in `runtime_claude.go` cites the deny
544construction at `claude/launcher.go:139-149`; existing launch-policy tests
545check those paths. Synthetic provider-written state survives EndTurn and
546passes the next BeginTurn. The unauthenticated replay does not exercise
547an authenticated Bash call, so the filename evidence is the pinned
548binary and the second-turn evidence is the account-lease regression.
549
550The provider version strings now have shared constants, with the adapter
551`Version` constants referring to them. This avoids an import cycle
552between account validation and its adapters. Codex arg0 shim paths accept
553only the already-authorized symlinks; regular files and directories at
554those paths are refused. Seventeen changed constructor hashes were
555refreshed in the release manifest. All 18 policies remain `uncertified`;
556the Codex coordinator's hash did not change.
557
558### Verification
559
560All Go commands use `CGO_ENABLED=0 GOTOOLCHAIN=go1.26.10`, default Go caches
561and on-disk `$TMPDIR`. New assertions were added before implementation:
562
563```sh
564go 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
570The first command had a missing test brace in the provider package; that
571was corrected and the provider subset rerun before implementation. The
572assertions failed for missing specialist flags, missing Claude settings,
573exposed goal/plugin tools, accepted regular arg0 shims, rejected startup
574files on a second turn and missing fixed refusal categories. An initial
575hardlink fixture linked the credential itself, causing EndTurn to refuse
576it before the runtime check; the fixture now links a separate test file.
577
578After implementation, one old recording expected a skills refusal, but
579its curated-plugin cache is now refused first. Its assertion now names
580that observed failure. The two policy-inventory tests identified the 17
581changed hashes before the manifest update. The targeted run then passed:
582
583```sh
584go 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
590Every mutation below failed by assertion and was restored immediately.
591Commands 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
613With all 22 mutations restored, the targeted command above passed again.
614The exact reference inventory and size budgets passed without raising any
615limits. One full `make -k ci` then passed, exit 0; no rerun was needed.
616All 27 main-suite test packages ran without cached results or failures.
617Build, vet, formatting, staticcheck, govulncheck, gitleaks, adapter,
618namespace, migration and performance checks passed. Median cold boot was
619103 ms against the 500 ms limit.
620
621The local gate reported two advisory timing overruns: provider tests took
62220.195 seconds against 15, and Codex tests took 37.638 seconds against 35.
623These limits become failures in the CI environment, so this local result
624does not establish that CI timing will pass. No budget was changed.
625The runner took 326.395 seconds, within its 330-second limit.
626
627Account-home contents and existing Equipo state were untouched. No
628sign-in, authenticated provider call, live gate, merge, default-branch
629push, deployment or copy-review server was run. Both live-test flags
630were unset for the full gate. Test subprocesses exited and session
631scratch was removed before commit and branch push.
632