oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

File too large to show in full — download it above (showing a truncated preview below).

1# Plan 2b controller report
2
3## Task 1: Direct provider contract and historical compatibility
4
5Status: DONE. Work stayed on `plan-2b` in `/home/paulca/amadan.net/oficina/equipo-plan-2b`.
6
7### Built
8
9Declared the exact Selection, Binding, Identity, Mount, Policy, Launch, Session, Turn, Answer, Event, Exit, Process, ProcessHost and Launcher contracts from the brief. Declared Task 7's Frame, Capture and CaptureFactory signatures exactly as supplied. Provider types are independent declarations with only standard-library imports. The package documents that Open sends no prompt, Events attaches before StartTurn, constructors require ProcessHost and CaptureFactory, and adapters decode captured frames rather than raw process stdout.
10
11Added direct contract version/provider validation, observed-session correlation against selection and binding, and turn-event correlation. Session IDs, attempt keys, turn IDs and admission IDs remain separate fields. These checks confer no execution authority.
12
13Extended isolation tuples, connection reports and the release manifest with LauncherVersion, BwrapVersion and PolicyVersion. Direct tuple identity includes all six values: provider, provider version, launcher revision, bubblewrap version, policy schema and effective policy hash. Existing full-struct comparisons retain every new identity field. ContainmentProof has an optional Version field, with zero preserving historical unversioned proofs.
14
15Historical Paseo, trial and unconfined JSON remains readable. ValidForDirectLaunch rejects historical tuples, mixed identities, tainted snapshots, incomplete tuples, unsupported provider names and invalid hashes. This is a structural check; actual dispatch also needs release certification. Core schema version remains 7. Scope, Handle, Usage, TokenUsage and action classifications are unchanged. No runtime cutover or certified tuple was fabricated.
16
17### Files
18
19- `internal/runner/provider/types.go`: exact contracts and correlation checks.
20- `internal/runner/provider/errors.go`: typed internal error codes.
21- `internal/runner/provider/types_test.go`: contract signatures, version/provider refusals and identity tests.
22- `internal/runner/provider/budget_test.go`: TestMain copied from the existing runner/paseo budget pattern.
23- `internal/equipo/team/git_evidence.go`: additive tuple fields, historical validation and direct validity check.
24- `internal/equipo/team/direct_history_test.go`: fixed historical JSON fixtures, tuple identity, wire and manifest tests.
25- `internal/runnerproto/types.go`: DirectVersion and report fields.
26- `internal/runnerproto/containment.go`: additive proof version.
27- `internal/release/manifest.go`: additive direct release metadata.
28- `docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md`: this task's evidence.
29
30Full local report: `/home/paulca/amadan.net/oficina/equipo-plan-2b/.superpowers/sdd/2026-11-03-equipo-plan-2b-direct/task-1-report.md`. The repository ignores `.superpowers/`; the local report is saved there, while the controller report is committed.
31
32### Interpretations
33
341. Version 2 is additive: `provider.Version = 2`, exposed as `runnerproto.DirectVersion`. Existing `runnerproto.Version = 1` remains for Paseo and enrolment. Inspection found explicit version-1 requests and validations throughout the current runtime and instance. Changing that constant alone would break the runtime before Task 9. Future direct producers and consumers must use DirectVersion; the current instance does not yet accept direct requests.
352. Unsupported versions in the contract test means protocol versions. Task 1 does not pin production provider, bubblewrap or policy versions. Values in test fixtures are examples, not release certification.
363. `IsolationSnapshot.Valid()` remains the historical evidence reader. `ValidForDirectLaunch()` is a separate structural prerequisite, so retaining readable trial/unconfined history does not grant direct eligibility. Actual verified-tuple matching and removal of active legacy exception paths remain later tasks.
374. The brief lists containment.go and manifest.go without giving new containment-proof internals or release pins. Added only optional proof versioning and the named direct version fields. Task 2 defines namespace exit proofs; later release work sets real pins after certification.
385. Session.Validate and Event.ValidateIdentity provide the identity checks required by the tests without adding fields to the prescribed interfaces. ValidateIdentity applies to turn-bound events; adapters must validate session-level events through their session path. Contract validation and correlation are separate from authorization and account/policy preflight.
39
40### RED
41
42Tests and the budget TestMain were written before implementation. Command, from the repository root:
43
44```sh
45CGO_ENABLED=0 go test ./internal/runner/provider ./internal/equipo/team -run 'TestDirect|TestHistoricalIsolation' -count=1
46```
47
48Exit 1. Output excerpts:
49
50```text
51internal/runner/provider/types_test.go:15:13: undefined: ValidateContract
52internal/runner/provider/types_test.go:26:12: undefined: Launch
53FAIL amadan.net/oficina/equipo/internal/runner/provider [build failed]
54internal/equipo/team/direct_history_test.go:15:76: unknown field LauncherVersion in struct literal of type team.IsolationTuple
55internal/equipo/team/direct_history_test.go:29:11: got.ValidForDirectLaunch undefined
56FAIL amadan.net/oficina/equipo/internal/equipo/team [build failed]
57```
58
59### GREEN
60
61Repeated the exact RED command after implementation, after strengthening the fixtures and identity assertions, and after all mutations were restored. Every green run exited 0. Final output:
62
63```text
64ok amadan.net/oficina/equipo/internal/runner/provider 0.002s
65ok amadan.net/oficina/equipo/internal/equipo/team 0.004s
66```
67
68Targeted compatibility command:
69
70```sh
71CGO_ENABLED=0 go test ./internal/runner ./internal/runner/paseo ./internal/equipo/team -run '^(TestRunnerServiceLifecycleWiring|TestRunnerServiceVersions|TestRunnerJournalCrashBoundaries|TestPaseoAdapterContract|TestTrialEvidenceAndPublication|TestEvidenceObservedIsolation)$' -count=1
72```
73
74Exit 0:
75
76```text
77ok amadan.net/oficina/equipo/internal/runner 0.988s
78ok amadan.net/oficina/equipo/internal/runner/paseo 0.004s
79ok amadan.net/oficina/equipo/internal/equipo/team 0.785s
80```
81
82`git diff --check` exited 0. `gofmt -l` on all nine Go files returned no paths. Dependency inspection used:
83
84```sh
85CGO_ENABLED=0 go list -f '{{join .Imports "\n"}}' ./internal/runner/provider
86```
87
88Output: `context`, `encoding/json`, `io`, `time`. No runner, runnerproto or Paseo import, and no aliases to Paseo types.
89
90### Mutations
91
9236 distinct mutations compiled, failed the named test with assertions, and passed after restoration. Each mutation was applied alone to the implementation, then restored from its exact pre-mutation contents in a finally block. The same targeted command was run for the mutation and its restoration. No compiler failure was counted as proof. The history-ineligible mutation uses `_ = v` to remain compilable.
93
94One initial mutation survived: removing the selection-provider comparison was still covered by the binding-provider comparison when only the observed session changed. Added assertions that change the selection independently of the binding. The repeated mutation then failed as required. That initial run and its restoration both exited 0; it was not counted among the 36 proved mutations.
95
961. `version` in `internal/runner/provider/types.go`.
97
98 Change: `if version != Version {` to `if false {`.
99
100 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectContractRejectsUnknownVersion$ -count=1`.
101
102 RED exit 1; assertion excerpt:
103
104 ```text
105 --- FAIL: TestDirectContractRejectsUnknownVersion (0.00s)
106 types_test.go:21: version -1 accepted: <nil>
107 ```
108
109 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
110
1112. `provider` in `internal/runner/provider/types.go`.
112
113 Change: `if name != "claude" && name != "codex" {` to `if false {`.
114
115 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectContractRejectsUnknownVersion$ -count=1`.
116
117 RED exit 1; assertion excerpt:
118
119 ```text
120 --- FAIL: TestDirectContractRejectsUnknownVersion (0.00s)
121 types_test.go:26: provider "" accepted: <nil>
122 ```
123
124 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
125
1263. `session-required` in `internal/runner/provider/types.go`.
127
128 Change: `s.ID == "" || (l.ResumeSessionID != "" && s.ID != l.ResumeSessionID)` to `(l.ResumeSessionID != "" && s.ID != l.ResumeSessionID)`.
129
130 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
131
132 RED exit 1; assertion excerpt:
133
134 ```text
135 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
136 types_test.go:70: empty new session accepted
137 ```
138
139 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
140
1414. `resume-identity` in `internal/runner/provider/types.go`.
142
143 Change: `s.ID == "" || (l.ResumeSessionID != "" && s.ID != l.ResumeSessionID)` to `s.ID == ""`.
144
145 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
146
147 RED exit 1; assertion excerpt:
148
149 ```text
150 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
151 types_test.go:51: changed session identity accepted
152 ```
153
154 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
155
1565. `identity-required` in `internal/runner/provider/types.go`.
157
158 Change: `pair[0] == "" || pair[0] != pair[1]` to `pair[0] != pair[1]`.
159
160 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
161
162 RED exit 1; assertion excerpt:
163
164 ```text
165 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
166 types_test.go:73: empty matching launch identities accepted
167 ```
168
169 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
170
1716. `identity-match` in `internal/runner/provider/types.go`.
172
173 Change: `pair[0] == "" || pair[0] != pair[1]` to `pair[0] == ""`.
174
175 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
176
177 RED exit 1; assertion excerpt:
178
179 ```text
180 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
181 types_test.go:51: changed session identity accepted
182 ```
183
184 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
185
1867. `identity-l.AttemptKey` in `internal/runner/provider/types.go`.
187
188 Change: `\t\t{s.AttemptKey, l.AttemptKey},\n` to `(delete this row)`.
189
190 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
191
192 RED exit 1; assertion excerpt:
193
194 ```text
195 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
196 types_test.go:47: missing session identity accepted
197 ```
198
199 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.001s`.
200
2018. `identity-l.Selection.Provider` in `internal/runner/provider/types.go`.
202
203 Change: `\t\t{s.Provider, l.Selection.Provider},\n` to `(delete this row)`.
204
205 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
206
207 RED exit 1; assertion excerpt:
208
209 ```text
210 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
211 types_test.go:59: changed selection Provider accepted
212 ```
213
214 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
215
2169. `identity-l.Selection.AccountID` in `internal/runner/provider/types.go`.
217
218 Change: `\t\t{s.AccountID, l.Selection.AccountID},\n` to `(delete this row)`.
219
220 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
221
222 RED exit 1; assertion excerpt:
223
224 ```text
225 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
226 types_test.go:59: changed selection AccountID accepted
227 ```
228
229 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.001s`.
230
23110. `identity-l.Selection.Model` in `internal/runner/provider/types.go`.
232
233 Change: `\t\t{s.Model, l.Selection.Model},\n` to `(delete this row)`.
234
235 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
236
237 RED exit 1; assertion excerpt:
238
239 ```text
240 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
241 types_test.go:47: missing session identity accepted
242 ```
243
244 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
245
24611. `identity-l.Selection.Family` in `internal/runner/provider/types.go`.
247
248 Change: `\t\t{s.Family, l.Selection.Family},\n` to `(delete this row)`.
249
250 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
251
252 RED exit 1; assertion excerpt:
253
254 ```text
255 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
256 types_test.go:47: missing session identity accepted
257 ```
258
259 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
260
26112. `identity-l.Binding.Provider` in `internal/runner/provider/types.go`.
262
263 Change: `\t\t{s.Provider, l.Binding.Provider},\n` to `(delete this row)`.
264
265 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
266
267 RED exit 1; assertion excerpt:
268
269 ```text
270 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
271 types_test.go:66: changed binding Provider accepted
272 ```
273
274 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
275
27613. `identity-l.Binding.AccountID` in `internal/runner/provider/types.go`.
277
278 Change: `\t\t{s.AccountID, l.Binding.AccountID},\n` to `(delete this row)`.
279
280 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
281
282 RED exit 1; assertion excerpt:
283
284 ```text
285 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
286 types_test.go:66: changed binding AccountID accepted
287 ```
288
289 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
290
29114. `event-e.SessionID == ""` in `internal/runner/provider/types.go`.
292
293 Change: `e.SessionID == "" || e.SessionID != s.ID || e.TurnID == "" || e.TurnID != t.ID` to `e.SessionID != s.ID || e.TurnID == "" || e.TurnID != t.ID`.
294
295 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
296
297 RED exit 1; assertion excerpt:
298
299 ```text
300 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
301 types_test.go:83: empty matching session identities accepted
302 ```
303
304 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
305
30615. `event-e.SessionID != s.ID` in `internal/runner/provider/types.go`.
307
308 Change: `e.SessionID == "" || e.SessionID != s.ID || e.TurnID == "" || e.TurnID != t.ID` to `e.SessionID == "" || e.TurnID == "" || e.TurnID != t.ID`.
309
310 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
311
312 RED exit 1; assertion excerpt:
313
314 ```text
315 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
316 types_test.go:100: mismatched event accepted
317 ```
318
319 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
320
32116. `event-e.TurnID == ""` in `internal/runner/provider/types.go`.
322
323 Change: `e.SessionID == "" || e.SessionID != s.ID || e.TurnID == "" || e.TurnID != t.ID` to `e.SessionID == "" || e.SessionID != s.ID || e.TurnID != t.ID`.
324
325 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
326
327 RED exit 1; assertion excerpt:
328
329 ```text
330 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
331 types_test.go:86: empty matching turn identities accepted
332 ```
333
334 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
335
33617. `event-e.TurnID != t.ID` in `internal/runner/provider/types.go`.
337
338 Change: `e.SessionID == "" || e.SessionID != s.ID || e.TurnID == "" || e.TurnID != t.ID` to `e.SessionID == "" || e.SessionID != s.ID || e.TurnID == ""`.
339
340 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestDirectIdentitySeparatesSessionAndAttempt$ -count=1`.
341
342 RED exit 1; assertion excerpt:
343
344 ```text
345 --- FAIL: TestDirectIdentitySeparatesSessionAndAttempt (0.00s)
346 types_test.go:100: mismatched event accepted
347 ```
348
349 Restored exit 0: `ok amadan.net/oficina/equipo/internal/runner/provider 0.002s`.
350
35118. `history-readable` in `internal/equipo/team/git_evidence.go`.
352
353 Change: `return v.Provider != "" && v.ProviderVersion != "" && v.PaseoVersion != "" && lowerHex(v.IsolationConfigHash, 64)` to `return false`.
354
355 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestHistoricalIsolationRemainsReadable$ -count=1`.
356
357 RED exit 1; assertion excerpt:
358
359 ```text
360 --- FAIL: TestHistoricalIsolationRemainsReadable (0.00s)
361 direct_history_test.go:42: history lost or rejected: {"status":"confined","runner_tainted":false,"acknowledgement_ids":null,"observed_tuples":[{"provider":"codex","provider_version":"0.165.0","paseo_version":"0.14.0","isolation_config_hash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]}
362 ```
363
364 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
365
36619. `history-excludes-LauncherVersion` in `internal/equipo/team/git_evidence.go`.
367
368 Change: `v.LauncherVersion == "" && v.BwrapVersion == "" && v.PolicyVersion == ""` to `v.BwrapVersion == "" && v.PolicyVersion == ""`.
369
370 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestHistoricalIsolationRemainsReadable$ -count=1`.
371
372 RED exit 1; assertion excerpt:
373
374 ```text
375 --- FAIL: TestHistoricalIsolationRemainsReadable (0.00s)
376 direct_history_test.go:62: partial direct identity accepted as history: LauncherVersion
377 ```
378
379 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
380
38120. `history-excludes-BwrapVersion` in `internal/equipo/team/git_evidence.go`.
382
383 Change: `v.LauncherVersion == "" && v.BwrapVersion == "" && v.PolicyVersion == ""` to `v.LauncherVersion == "" && v.PolicyVersion == ""`.
384
385 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestHistoricalIsolationRemainsReadable$ -count=1`.
386
387 RED exit 1; assertion excerpt:
388
389 ```text
390 --- FAIL: TestHistoricalIsolationRemainsReadable (0.00s)
391 direct_history_test.go:62: partial direct identity accepted as history: BwrapVersion
392 ```
393
394 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
395
39621. `history-excludes-PolicyVersion` in `internal/equipo/team/git_evidence.go`.
397
398 Change: `v.LauncherVersion == "" && v.BwrapVersion == "" && v.PolicyVersion == ""` to `v.LauncherVersion == "" && v.BwrapVersion == ""`.
399
400 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestHistoricalIsolationRemainsReadable$ -count=1`.
401
402 RED exit 1; assertion excerpt:
403
404 ```text
405 --- FAIL: TestHistoricalIsolationRemainsReadable (0.00s)
406 direct_history_test.go:62: partial direct identity accepted as history: PolicyVersion
407 ```
408
409 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
410
41122. `snapshot-valid` in `internal/equipo/team/git_evidence.go`.
412
413 Change: `if !p.valid() || p.RunnerTainted {` to `if p.RunnerTainted {`.
414
415 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
416
417 RED exit 1; assertion excerpt:
418
419 ```text
420 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
421 direct_history_test.go:120: unsafe direct snapshot accepted: {Trial:<nil> Status:confined RunnerTainted:false AcknowledgementIDs:[] ObservedTuples:[]}
422 ```
423
424 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
425
42623. `snapshot-untainted` in `internal/equipo/team/git_evidence.go`.
427
428 Change: `if !p.valid() || p.RunnerTainted {` to `if !p.valid() {`.
429
430 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
431
432 RED exit 1; assertion excerpt:
433
434 ```text
435 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
436 direct_history_test.go:120: unsafe direct snapshot accepted: {Trial:<nil> Status:unconfined RunnerTainted:true AcknowledgementIDs:[ack] ObservedTuples:[{Provider:codex ProviderVersion:0.165.0 PaseoVersion: LauncherVersion:revision BwrapVersion:0.11.0 PolicyVersion:1 IsolationConfigHash:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}]}
437 ```
438
439 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
440
44124. `history-ineligible` in `internal/equipo/team/git_evidence.go`.
442
443 Change: `if !v.direct() {` to `_ = v\n\t\tif false {`.
444
445 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestHistoricalIsolationRemainsReadable$ -count=1`.
446
447 RED exit 1; assertion excerpt:
448
449 ```text
450 --- FAIL: TestHistoricalIsolationRemainsReadable (0.00s)
451 direct_history_test.go:53: historical evidence granted direct eligibility
452 ```
453
454 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
455
45625. `direct-provider` in `internal/equipo/team/git_evidence.go`.
457
458 Change: `(v.Provider == "claude" || v.Provider == "codex") &&` to `true &&`.
459
460 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
461
462 RED exit 1; assertion excerpt:
463
464 ```text
465 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
466 direct_history_test.go:82: incomplete tuple accepted
467 ```
468
469 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.004s`.
470
47126. `direct-ProviderVersion` in `internal/equipo/team/git_evidence.go`.
472
473 Change: `v.ProviderVersion != "" && v.PaseoVersion == "" &&` to `true && v.PaseoVersion == "" &&`.
474
475 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
476
477 RED exit 1; assertion excerpt:
478
479 ```text
480 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
481 direct_history_test.go:82: incomplete tuple accepted
482 ```
483
484 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
485
48627. `direct-LauncherVersion` in `internal/equipo/team/git_evidence.go`.
487
488 Change: `v.LauncherVersion != "" &&` to `true &&`.
489
490 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
491
492 RED exit 1; assertion excerpt:
493
494 ```text
495 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
496 direct_history_test.go:82: incomplete tuple accepted
497 ```
498
499 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.010s`.
500
50128. `direct-BwrapVersion` in `internal/equipo/team/git_evidence.go`.
502
503 Change: `v.BwrapVersion != "" &&` to `true &&`.
504
505 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
506
507 RED exit 1; assertion excerpt:
508
509 ```text
510 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
511 direct_history_test.go:82: incomplete tuple accepted
512 ```
513
514 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.013s`.
515
51629. `direct-PolicyVersion` in `internal/equipo/team/git_evidence.go`.
517
518 Change: `v.PolicyVersion != "" &&` to `true &&`.
519
520 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
521
522 RED exit 1; assertion excerpt:
523
524 ```text
525 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
526 direct_history_test.go:82: incomplete tuple accepted
527 ```
528
529 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
530
53130. `direct-no-paseo` in `internal/equipo/team/git_evidence.go`.
532
533 Change: `v.PaseoVersion == "" &&` to `true &&`.
534
535 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
536
537 RED exit 1; assertion excerpt:
538
539 ```text
540 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
541 direct_history_test.go:120: unsafe direct snapshot accepted: {Trial:<nil> Status:confined RunnerTainted:false AcknowledgementIDs:[] ObservedTuples:[{Provider:codex ProviderVersion:0.165.0 PaseoVersion:0.14.0 LauncherVersion:revision BwrapVersion:0.11.0 PolicyVersion:1 IsolationConfigHash:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}]}
542 ```
543
544 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
545
54631. `direct-hash` in `internal/equipo/team/git_evidence.go`.
547
548 Change: `\t\tlowerHex(v.IsolationConfigHash, 64)\n` to `\t\ttrue\n`.
549
550 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
551
552 RED exit 1; assertion excerpt:
553
554 ```text
555 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
556 direct_history_test.go:82: incomplete tuple accepted
557 ```
558
559 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
560
56132. `tuple-identity-LauncherVersion` in `internal/equipo/team/git_evidence.go`.
562
563 Change: `if !slices.Contains(have.ObservedTuples, v) {` to `found := false\n for _, candidate := range have.ObservedTuples {\n candidate.LauncherVersion = ""\n v.LauncherVersion = ""\n if candidate == v { found = true }\n }\n if !found {`.
564
565 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
566
567 RED exit 1; assertion excerpt:
568
569 ```text
570 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
571 direct_history_test.go:95: tuple identity change ignored
572 ```
573
574 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
575
57633. `tuple-identity-BwrapVersion` in `internal/equipo/team/git_evidence.go`.
577
578 Change: `if !slices.Contains(have.ObservedTuples, v) {` to `found := false\n for _, candidate := range have.ObservedTuples {\n candidate.BwrapVersion = ""\n v.BwrapVersion = ""\n if candidate == v { found = true }\n }\n if !found {`.
579
580 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
581
582 RED exit 1; assertion excerpt:
583
584 ```text
585 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
586 direct_history_test.go:95: tuple identity change ignored
587 ```
588
589 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.003s`.
590
59134. `tuple-identity-PolicyVersion` in `internal/equipo/team/git_evidence.go`.
592
593 Change: `if !slices.Contains(have.ObservedTuples, v) {` to `found := false\n for _, candidate := range have.ObservedTuples {\n candidate.PolicyVersion = ""\n v.PolicyVersion = ""\n if candidate == v { found = true }\n }\n if !found {`.
594
595 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
596
597 RED exit 1; assertion excerpt:
598
599 ```text
600 --- FAIL: TestDirectIsolationTupleIdentity (0.00s)
601 direct_history_test.go:95: tuple identity change ignored
602 ```
603
604 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.003s`.
605
60635. `wire-version` in `internal/runnerproto/types.go`.
607
608 Change: `DirectVersion = provider.Version` to `DirectVersion = provider.Version + 1`.
609
610 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectWireAndManifest$ -count=1`.
611
612 RED exit 1; assertion excerpt:
613
614 ```text
615 --- FAIL: TestDirectWireAndManifest (0.00s)
616 direct_history_test.go:127: direct or historical wire version changed
617 ```
618
619 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.003s`.
620
62136. `snapshot-tuple-validation` in `internal/equipo/team/git_evidence.go`.
622
623 Change: `if !v.valid() {` to `_ = v` followed by `if false {`.
624
625 Command for RED and restoration: `CGO_ENABLED=0 go test ./internal/equipo/team -run ^TestDirectIsolationTupleIdentity$ -count=1`.
626
627 RED exit 1: `--- FAIL: TestDirectIsolationTupleIdentity`; assertion: `incomplete tuple accepted`.
628
629 Restored exit 0: `ok amadan.net/oficina/equipo/internal/equipo/team 0.002s`.
630
631### User-facing strings
632
633No UI strings, README prose or copy.go entries were added. New internal diagnostic codes are `provider_version_unsupported`, `provider_unsupported` and `provider_identity_mismatch`. They have no new user-facing route in this task. If later surfaced, map them to individually pending copy.go entries for review. No copy-review skill, server, model prompt or helper agent was used.
634
635### Concerns and limits
636
637No unresolved Task 1 failure. Direct runtime wiring, provider adapters, namespace proof enforcement, policy/account preflight, durable capture implementation and release certification remain later tasks. The old runtime and historical readers remain in place by design. No full suite or make ci was run, as instructed; only the named targeted tests ran. No provider login, enrolment, credential home or live provider run occurred.
638
639All mutation source changes were restored. The task's scratch evidence directory is removed after saving these reports. No server or background process was left running. No push, merge or deployment was performed.
640
641## Task 2: Owned bubblewrap PID namespaces
642
643Status: DONE_WITH_CONCERNS. Implementation and local capability gates pass. The controller must push `plan-2b` and inspect the Amadan worker result; this run did not push, select a remote worker or claim remote CI evidence.
644
645### What changed
646
647`containment.Manager` implements `provider.ProcessHost` and the requested New, Start, Stop and Recover APIs. Each launch gets a random local ID, a durable pre-fork intent, then a durable init identity before the helper receives its release byte. Records and exit proofs are written with file and directory fsync under the private scratch root. The runner holds the exact init pidfd, signals that descriptor and waits for its kernel exit before publishing proof. The bubblewrap launcher is also reaped. Scratch paths are tied to the durable ID; recovery removes only that attempt after proven exit or a changed boot. Wait is acknowledged after live cleanup finishes, without a later duplicate deletion. CLI exit, an empty process group and an empty cgroup are never containment proof.
648
649The lifecycle goroutine locks its OS thread before starting bubblewrap and keeps it alive until reaping. Bubblewrap uses explicit user, PID, IPC, UTS, cgroup and network isolation, `--die-with-parent`, `--new-session`, `--as-pid-1`, and dropped capabilities. The Go helper stays PID 1, reaps orphans and starts the harness as a child. Parent death, caller-thread exit, detached children and a successful cgroup move are covered by real Linux tests. Only test-owned processes are signalled.
650
651The parent uses bubblewrap status FD 3 to learn the helper's host PID. FD 4 is the release barrier; FD 5 carries helper readiness and the final harness outcome. Namespace identity, start ticks and PID-1 topology are checked before release. The helper marks itself nondumpable before starting the harness, preventing the harness from reopening its protocol descriptors through `/proc/1/fd`. It marks all nonstandard descriptors close-on-exec. Stdin, stdout and stderr belong to the Process caller, so buffered output remains readable after Wait. No provider process or credential home was created in this run; all harnesses were local test commands.
652
653Mount sources use `openat2` without symlink or magic-link resolution and bubblewrap FD bind arguments. A live rename/symlink replacement test proves the pinned workspace remains the source. Workspace/state overlap, broad homes, unapproved targets, writable runtime imports, imported sockets and unsafe environment entries are rejected. The namespace receives fresh proc/dev, an empty run/sys, a private on-disk tmp, a private runtime home, and explicit read-only runtime files. Host loopback and inherited host sockets are unavailable. Nested user namespaces remain available for provider sandboxes.
654
655Recovery matches a complete durable record and reacquires only that exact PID/start/namespace identity. It rejects non-init processes, mismatched records, stale start ticks, missing handshakes and missing/corrupt/unverified exit proofs. A new boot proves absence with unknown outcome (`Code=-1`, `Signal=0`). An incomplete same-boot intent or a vanished PID without a saved exit remains blocked; there is no broad same-user process scan.
656
657### Files
658
659- `internal/runner/containment/linux.go`: Manager, lifecycle, startup protocol, owned Process and PID-1 helper.
660- `internal/runner/containment/mounts.go`: pinned sources, mounts, private homes and environment allowlist.
661- `internal/runner/containment/recovery.go`: durable records/proofs, exact identity and recovery.
662- `internal/runner/containment/{linux,mounts,recovery,budget}_test.go`: Linux tests, fixtures and budget TestMain.
663- `cmd/equipo-runner/{main,namespace}.go`: internal command dispatch to the shared helper implementation.
664- `internal/runnerproto/containment.go`: additive NamespaceExit and NamespaceContainmentProof wire types, without a containment import.
665- `Makefile`: exact `bubblewrap 0.11.0` prerequisite, required `runner-namespace-test`, and inclusion in `ci`.
666- `.amadan/ci.d/36-runner-namespaces`: executable delegate to `make runner-namespace-test`.
667- `internal/equipotest/foundation_test.go`: require the new target in both CI routes.
668- This controller section and the requested task report.
669
670### Interpretations and integration notes
671
6721. The controller's explicit no-push instruction supersedes the brief's push/remote-worker wording. Local worker-capability proof is complete; the Amadan result belongs to the controller's subsequent push.
6732. The brief explicitly requests full `make ci` on a capable runner. The first full gate passed. Final review then found a crash-cleanup gap: randomly named scratch could not be recovered from the durable ID. After adding failing tests and fixing that production behavior, the targeted gate and three new mutations passed. The full gate passed again after that fix. A final run explicitly exported `CGO_ENABLED=0` for every Make recipe after noticing that the generic test/tool recipes otherwise inherit the host default of 1. All targeted tests and the Make build target already used 0. These repeats addressed a production change and the build-environment requirement.
6743. `Config.ScratchRoot` must already be an absolute, symlink-free directory with mode 0700. New grants no execution authority. An optional staged `Binding.Home` must be a mode-0700 direct child of `ScratchRoot/homes`; otherwise each attempt gets an empty private home. These fixture directories contained no credentials. Adapters and Task 4 remain responsible for producing the reviewed manifest and staged account content; this task records `Policy.Hash` as ManifestHash.
6754. `/etc` uses a temporary overlay, masks `/etc/claude-code` and `/etc/codex`, then remounts all three read-only. This permits controlled replacement paths even when the host has no `/etc/codex`. The local namespace suite exercises this capability too. `/usr` is the explicit read-only system runtime tree, consistent with the nesting evidence.
6765. The command wrapper lives in `cmd/equipo-runner/namespace.go`; the reusable implementation is `containment.NamespaceMain`, so tests execute the same helper code. Task 3 should extend this helper, retain its nondumpable state, and add only the explicit relay socket capability. General socket imports remain rejected. Task 9 can use the same Manager.
6776. The helper is bubblewrap's child, not the runner's direct child. Production waits on the init pidfd's readable exit state, then reaps bubblewrap. The capability test separately exercises `waitid(P_PIDFD, WEXITED|WNOWAIT)` on a direct test-owned child. The host user can still read the nondumpable helper's namespace identity in this user-namespace layout, so recovery requires the kernel namespace check; no permission-error fallback was retained.
6787. `.amadan/ci` and `.amadan/ci.d/35-runner-adapter-test` already delegate to Make targets and needed no changes. Existing node/npm prerequisite and adapter commands remain unchanged.
6798. A namespace-member fixture must enumerate the tasks of each owned process, since Go may fork on a non-main thread. Tests enumerate only descendants of the exact init they started. The orphan-reaping fixture waits for PID-file content, avoiding an empty-file creation race. Neither test scans unrelated host processes.
680
681### Local capability evidence
682
683Host: DOCS-T1. User: paulca, UID 1001. Go: go1.26.10 linux/amd64. `/usr/bin/bwrap --version` returned exactly `bubblewrap 0.11.0`.
684
685Read-only observations:
686
687```sh
688id
689/usr/bin/bwrap --version
690cat /proc/self/cgroup
691ls -ld /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service
692cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.subtree_control
693```
694
695```text
696uid=1001(paulca) gid=1001(paulca)
697bubblewrap 0.11.0
6980::/user.slice/user-1001.slice/user@1001.service/app.slice/paseo.service
699drwxr-xr-x ... paulca paulca ... user@1001.service
700cpu memory pids
701```
702
703`TestNamespacePidfdCapability` successfully opened a pidfd, sent SIGKILL through it and called `waitid(P_PIDFD, WEXITED|WNOWAIT)` on a sleep process the test started. All launch tests ran real user/PID/network namespaces. `TestNamespaceNestedUserNamespace` also ran a second bubblewrap inside the first namespace.
704
705`TestNamespaceCgroupMoveKeepsMembership` created its own parent and two leaf cgroups under the delegated user service, moved an owned harness PID into both leaves through `cgroup.procs`, verified `/proc/<pid>/cgroup` after each write, and compared its PID namespace before/after. It then killed namespace init and observed that exact harness pidfd exit. The test removed its cgroups. This is a successful move, separate from `TestNamespaceHidesHostControl` denying an in-namespace cgroup write. Missing delegation or syscall capability causes a clear test failure; no test skips.
706
707Required job/step: `.amadan/ci.d/36-runner-namespaces`, delegating to `make runner-namespace-test`. Local runner: DOCS-T1. Remote Amadan job and runner: not yet observed; controller action required after push. Every Linux launch test needs userns and pidfd support; the move test additionally needs the writable delegated subtree.
708
709### RED evidence
710
711All commands ran from `/home/paulca/amadan.net/oficina/equipo-plan-2b` on `plan-2b`, with default Go caches and on-disk TMPDIR. The initial test-only implementation failed before Manager or the helper existed:
712
713```sh
714CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
715```
716
717```text
718# amadan.net/oficina/equipo/internal/runner/containment [amadan.net/oficina/equipo/internal/runner/containment.test]
719internal/runner/containment/linux_test.go:23:30: undefined: Manager
720internal/runner/containment/linux_test.go:31:12: undefined: New
721internal/runner/containment/linux_test.go:31:16: undefined: Config
722internal/runner/containment/linux_test.go:35:29: undefined: Manager
723internal/runner/containment/linux_test.go:44:29: undefined: Manager
724internal/runner/containment/linux_test.go:44:57: undefined: Record
725internal/runner/containment/linux_test.go:47:8: undefined: Record
726internal/runner/containment/linux_test.go:138:7: undefined: New
727internal/runner/containment/linux_test.go:138:11: undefined: Config
728internal/runner/containment/budget_test.go:10:63: undefined: NamespaceMain
729internal/runner/containment/linux_test.go:138:11: too many errors
730FAIL amadan.net/oficina/equipo/internal/runner/containment [build failed]
731FAIL
732```
733
734Additional red command (exit 1):
735
736```sh
737CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace(RecoveryCleansScratch|ScratchIdentity)$' -count=1
738```
739
740```text
741--- FAIL: TestNamespaceRecoveryCleansScratch (0.13s)
742 --- FAIL: TestNamespaceRecoveryCleansScratch/saved-exit (0.06s)
743 recovery_test.go:241: recovery left owned scratch: <nil>
744 --- FAIL: TestNamespaceRecoveryCleansScratch/new-boot (0.07s)
745 recovery_test.go:241: recovery left owned scratch: <nil>
746--- FAIL: TestNamespaceScratchIdentity (0.06s)
747 recovery_test.go:250: scratch not bound to durable ID: stat /home/paulca/t/e2b/TestNamespaceScratchIdentity2348921627/001/state/attempt-f53aceebc32ab1e29f126e8cf49ba187/tmp: no such file or directory
748FAIL
749rastrillo-budget/v1 ran 188ms
750FAIL amadan.net/oficina/equipo/internal/runner/containment 0.190s
751FAIL
752```
753
754Additional red command (exit 1):
755
756```sh
757CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace(Startup|Intent|Stop|ExitStatus|Socket|Nested|RecoverySaved)' -count=1
758```
759
760```text
761--- FAIL: TestNamespaceStartupFailure (0.02s)
762 linux_test.go:391: missing readiness accepted
763--- FAIL: TestNamespaceExitStatus (0.05s)
764 linux_test.go:447: numeric exit fabricated signal: {Code:-1 Signal:9 ObservedAt:2026-11-03 09:45:40.096810068 +0000 UTC}
765--- FAIL: TestNamespaceRecoverySavedExit (0.05s)
766 recovery_test.go:116: durable exit recovery: {Record:{ID:f88b63fd621d06c2f2bea8900b79c8ff AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532762] ManifestHash:fixture-policy HostPID:4033652 StartTicks:855685293} Exit:{Code:-1 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:false} namespace_identity_unproven
767FAIL
768rastrillo-budget/v1 ran 242ms
769FAIL amadan.net/oficina/equipo/internal/runner/containment 0.244s
770FAIL
771```
772
773Additional red command (exit 1):
774
775```sh
776CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace(RecoveryRejects|PinnedMount|RejectsBroad)' -count=1
777```
778
779```text
780--- FAIL: TestNamespaceRecoveryRejectsNonInit (0.05s)
781 recovery_test.go:130: host process accepted as namespace init
782FAIL
783rastrillo-budget/v1 ran 96ms
784FAIL amadan.net/oficina/equipo/internal/runner/containment 0.098s
785FAIL
786```
787
788Additional red command (exit 1):
789
790```sh
791CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceHelperProtocolPrivate$' -count=1
792```
793
794```text
795--- FAIL: TestNamespaceHelperProtocolPrivate (0.06s)
796 linux_test.go:509: helper pipe exposed: {Code:1 Signal:0 ObservedAt:2026-11-03 09:50:23.095916577 +0000 UTC} <nil>
797FAIL
798rastrillo-budget/v1 ran 58ms
799FAIL amadan.net/oficina/equipo/internal/runner/containment 0.060s
800FAIL
801```
802
803Additional red command (exit 1):
804
805```sh
806CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceMountEscape/.*environment' -count=1
807```
808
809```text
810--- FAIL: TestNamespaceMountEscape (0.09s)
811 --- FAIL: TestNamespaceMountEscape/home_environment_traversal (0.04s)
812 recovery_test.go:88: unsafe mount/environment accepted
813 --- FAIL: TestNamespaceMountEscape/tmp_environment_traversal (0.04s)
814 recovery_test.go:88: unsafe mount/environment accepted
815FAIL
816rastrillo-budget/v1 ran 86ms
817FAIL amadan.net/oficina/equipo/internal/runner/containment 0.088s
818FAIL
819```
820
821Additional red command (exit 1):
822
823```sh
824CGO_ENABLED=0 go test ./internal/equipotest -run '^TestCIGateSteps$' -count=1
825```
826
827```text
828--- FAIL: TestCIGateSteps (0.01s)
829 foundation_test.go:185: make ci targets = [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test runner-namespace-test staticcheck test vet], want [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test staticcheck test vet]
830 foundation_test.go:221: CI step targets = [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test runner-namespace-test staticcheck test vet], want [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test staticcheck test vet]
831FAIL
832rastrillo-budget/v1 ran 15ms
833FAIL amadan.net/oficina/equipo/internal/equipotest 0.062s
834FAIL
835```
836
837The crash-cleanup regression exposed an attempt directory name that was absent from the durable identity. Binding the directory name to the ID made recovery cleanup possible. A follow-up failure caught a duplicate deferred deletion after Wait; live cleanup now finishes before acknowledgment and does not run twice. The startup regression exposed a typed-nil Process on error; Start now returns a nil interface and waits for failed-start cleanup. Exit tests exposed the incorrect inference that numeric exit 137 means SIGKILL; a private helper outcome frame now preserves the distinction. The protocol test exposed same-UID reopening of `/proc/1/fd/5`; the helper now becomes nondumpable before starting the harness. Environment path checks now reject traversal as well as enforcing their namespace roots.
838
839### GREEN evidence
840
841The final targeted namespace command runs 26 top-level namespace tests, plus their subtests, without skips:
842
843```sh
844CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 -v
845```
846
847```text
848=== RUN TestNamespaceKillsDetachedChildren
849--- PASS: TestNamespaceKillsDetachedChildren (0.07s)
850=== RUN TestNamespaceCgroupMoveKeepsMembership
851--- PASS: TestNamespaceCgroupMoveKeepsMembership (0.12s)
852=== RUN TestNamespaceHidesHostControl
853--- PASS: TestNamespaceHidesHostControl (0.07s)
854=== RUN TestNamespacePidfdCapability
855--- PASS: TestNamespacePidfdCapability (0.00s)
856=== RUN TestNamespaceParentDeath
857--- PASS: TestNamespaceParentDeath (0.05s)
858=== RUN TestNamespaceStartingThreadExit
859--- PASS: TestNamespaceStartingThreadExit (0.10s)
860=== RUN TestNamespaceStartupFailure
861--- PASS: TestNamespaceStartupFailure (0.02s)
862=== RUN TestNamespaceIntentBeforeFork
863--- PASS: TestNamespaceIntentBeforeFork (0.04s)
864=== RUN TestNamespaceStopWaitsForExit
865--- PASS: TestNamespaceStopWaitsForExit (0.07s)
866=== RUN TestNamespaceExitStatus
867--- PASS: TestNamespaceExitStatus (0.12s)
868=== RUN TestNamespaceSocketImport
869--- PASS: TestNamespaceSocketImport (0.00s)
870=== RUN TestNamespaceNestedUserNamespace
871--- PASS: TestNamespaceNestedUserNamespace (0.07s)
872=== RUN TestNamespaceHelperProtocolPrivate
873--- PASS: TestNamespaceHelperProtocolPrivate (0.07s)
874=== RUN TestNamespaceHelperBarrier
875--- PASS: TestNamespaceHelperBarrier (0.04s)
876=== RUN TestNamespaceReapsOrphans
877--- PASS: TestNamespaceReapsOrphans (0.11s)
878=== RUN TestNamespaceCancellation
879--- PASS: TestNamespaceCancellation (0.06s)
880=== RUN TestNamespacePinnedMountSwap
881--- PASS: TestNamespacePinnedMountSwap (0.04s)
882=== RUN TestNamespaceRejectsBroadWorkspace
883--- PASS: TestNamespaceRejectsBroadWorkspace (0.00s)
884=== RUN TestNamespaceRecoveryIdentity
885=== RUN TestNamespaceRecoveryIdentity/reused_pid
886=== RUN TestNamespaceRecoveryIdentity/changed_manifest
887=== RUN TestNamespaceRecoveryIdentity/changed_namespace
888=== RUN TestNamespaceRecoveryIdentity/missing_handshake
889=== RUN TestNamespaceRecoveryIdentity/unavailable_proof
890--- PASS: TestNamespaceRecoveryIdentity (0.06s)
891 --- PASS: TestNamespaceRecoveryIdentity/reused_pid (0.00s)
892 --- PASS: TestNamespaceRecoveryIdentity/changed_manifest (0.00s)
893 --- PASS: TestNamespaceRecoveryIdentity/changed_namespace (0.00s)
894 --- PASS: TestNamespaceRecoveryIdentity/missing_handshake (0.00s)
895 --- PASS: TestNamespaceRecoveryIdentity/unavailable_proof (0.00s)
896=== RUN TestNamespaceMountEscape
897=== RUN TestNamespaceMountEscape/traversal
898=== RUN TestNamespaceMountEscape/outside_private_home
899=== RUN TestNamespaceMountEscape/broad_home
900=== RUN TestNamespaceMountEscape/protected_state
901=== RUN TestNamespaceMountEscape/parent_of_protected_state
902=== RUN TestNamespaceMountEscape/host_runtime
903=== RUN TestNamespaceMountEscape/host_cgroup
904=== RUN TestNamespaceMountEscape/writable_runtime
905=== RUN TestNamespaceMountEscape/reserved_target
906=== RUN TestNamespaceMountEscape/home_environment_traversal
907=== RUN TestNamespaceMountEscape/tmp_environment_traversal
908=== RUN TestNamespaceMountEscape/environment
909=== RUN TestNamespaceMountEscape/symlink_swap
910--- PASS: TestNamespaceMountEscape (0.00s)
911 --- PASS: TestNamespaceMountEscape/traversal (0.00s)
912 --- PASS: TestNamespaceMountEscape/outside_private_home (0.00s)
913 --- PASS: TestNamespaceMountEscape/broad_home (0.00s)
914 --- PASS: TestNamespaceMountEscape/protected_state (0.00s)
915 --- PASS: TestNamespaceMountEscape/parent_of_protected_state (0.00s)
916 --- PASS: TestNamespaceMountEscape/host_runtime (0.00s)
917 --- PASS: TestNamespaceMountEscape/host_cgroup (0.00s)
918 --- PASS: TestNamespaceMountEscape/writable_runtime (0.00s)
919 --- PASS: TestNamespaceMountEscape/reserved_target (0.00s)
920 --- PASS: TestNamespaceMountEscape/home_environment_traversal (0.00s)
921 --- PASS: TestNamespaceMountEscape/tmp_environment_traversal (0.00s)
922 --- PASS: TestNamespaceMountEscape/environment (0.00s)
923 --- PASS: TestNamespaceMountEscape/symlink_swap (0.00s)
924=== RUN TestNamespaceRecoverySavedExit
925--- PASS: TestNamespaceRecoverySavedExit (0.06s)
926=== RUN TestNamespaceRecoveryRejectsNonInit
927--- PASS: TestNamespaceRecoveryRejectsNonInit (0.09s)
928=== RUN TestNamespaceRecoveryStaleDurableTicks
929--- PASS: TestNamespaceRecoveryStaleDurableTicks (0.10s)
930=== RUN TestNamespaceRecoveryUnavailableProof
931=== RUN TestNamespaceRecoveryUnavailableProof/missing
932=== RUN TestNamespaceRecoveryUnavailableProof/corrupt
933=== RUN TestNamespaceRecoveryUnavailableProof/record
934=== RUN TestNamespaceRecoveryUnavailableProof/unverified
935=== RUN TestNamespaceRecoveryUnavailableProof/timestamp
936--- PASS: TestNamespaceRecoveryUnavailableProof (0.36s)
937 --- PASS: TestNamespaceRecoveryUnavailableProof/missing (0.06s)
938 --- PASS: TestNamespaceRecoveryUnavailableProof/corrupt (0.06s)
939 --- PASS: TestNamespaceRecoveryUnavailableProof/record (0.08s)
940 --- PASS: TestNamespaceRecoveryUnavailableProof/unverified (0.09s)
941 --- PASS: TestNamespaceRecoveryUnavailableProof/timestamp (0.07s)
942=== RUN TestNamespaceRecoveryCleansScratch
943=== RUN TestNamespaceRecoveryCleansScratch/saved-exit
944=== RUN TestNamespaceRecoveryCleansScratch/new-boot
945--- PASS: TestNamespaceRecoveryCleansScratch (0.12s)
946 --- PASS: TestNamespaceRecoveryCleansScratch/saved-exit (0.05s)
947 --- PASS: TestNamespaceRecoveryCleansScratch/new-boot (0.06s)
948=== RUN TestNamespaceScratchIdentity
949--- PASS: TestNamespaceScratchIdentity (0.06s)
950PASS
951rastrillo-budget/v1 ran 1.911s
952ok amadan.net/oficina/equipo/internal/runner/containment 1.913s
953```
954
955Command (exit 0):
956
957```sh
958make runner-namespace-test
959```
960
961```text
962CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
963ok amadan.net/oficina/equipo/internal/runner/containment 1.877s
964```
965
966Command (exit 0):
967
968```sh
969CGO_ENABLED=0 go test ./internal/equipotest -run '^TestCIGateSteps$' -count=1
970```
971
972```text
973ok amadan.net/oficina/equipo/internal/equipotest 0.054s
974```
975
976Final full required gate (exit 0):
977
978```sh
979CGO_ENABLED=0 make ci
980```
981
982Complete gate output:
983
984```text
985CGO_ENABLED=0 go build ./...
986go vet ./...
987go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf ./...
988go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
989=== Symbol Results ===
990
991No vulnerabilities found.
992
993Your code is affected by 0 vulnerabilities.
994This scan also found 0 vulnerabilities in packages you import and 1
995vulnerability in modules you require, but your code doesn't appear to call these
996vulnerabilities.
997Use '-show verbose' for more details.
99810:19AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
99910:19AM INF 112 commits scanned.
100010:19AM INF scanned ~4078895 bytes (4.08 MB) in 432ms
100110:19AM INF no leaks found
1002go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
1003budget size: 17 directories within budget
1004go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./...
1005
1006receipt: test step 3m12.543s against a 60s target (the gate's other steps are not in this figure)
1007receipt: 13 packages ran, 0 cached, 4 without tests, 0 failed
1008receipt: slow package 3m11.715s amadan.net/oficina/equipo/internal/equipotest
1009receipt: slow package 2m52.086s amadan.net/oficina/equipo/internal/runner
1010receipt: slow package 27.207s amadan.net/oficina/equipo/internal/equipo/team
1011receipt: slow package 11.475s amadan.net/oficina/equipo/internal/runner/checks
1012receipt: slow package 5.978s amadan.net/oficina/equipo/internal/runner/forge
1013receipt: slow test 22.56s amadan.net/oficina/equipo/internal/equipotest TestRunnerEndToEnd
1014receipt: slow test 21.89s amadan.net/oficina/equipo/internal/runner TestRunnerBugWorkflow
1015receipt: slow test 17.08s amadan.net/oficina/equipo/internal/runner TestAccountFailoverStops
1016receipt: slow test 16.6s amadan.net/oficina/equipo/internal/runner TestDeterministicAttemptErrorsFailWithReason
1017receipt: slow test 9.1s amadan.net/oficina/equipo/internal/runner TestRunnerBugWorkflowRejectedTools
1018command -v node
1019/usr/local/bin/node
1020command -v npm
1021/usr/local/bin/npm
1022npm ci --prefix runner/paseo --ignore-scripts --no-audit --no-fund --registry=https://registry.npmjs.org
1023npm warn deprecated uuid@9.0.1: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
1024
1025added 294 packages in 3s
1026node --test runner/paseo/bridge.test.mjs
1027✔ structured events (8.965317ms)
1028✔ permission IDs (1.53576ms)
1029✔ MCP at creation (0.844928ms)
1030✔ workspace identity (0.499186ms)
1031✔ unknown version (0.205111ms)
1032✔ read isolation required (0.146903ms)
1033✔ provider option schema (0.35596ms)
1034✔ cancelAgent export (116.570388ms)
1035✔ daemon credentials (0.521848ms)
1036✔ subscription ready before prompt (0.406694ms)
1037✔ SDK serializes the pinned creation and permission contracts (13.053433ms)
1038✔ pinned provider schemas reject unsupported profile passthrough (4.858525ms)
1039✔ creation requires durable daemon receipts (0.246738ms)
1040✔ timeline gaps and disconnects revoke readiness (0.394763ms)
1041✔ recovery cursor and live overlap (0.961494ms)
1042✔ agent and MCP credentials cannot be injected (0.197747ms)
1043✔ unknown structured events and session changes stop dispatch (0.256416ms)
1044✔ pending permission recovery keeps original identity (0.228023ms)
1045✔ bounded bridge frames and redacted diagnostics (7.770892ms)
1046✔ locked dependency versions (1.817192ms)
1047✔ workspace isolation mode (0.141763ms)
1048✔ project registration (0.22666ms)
1049✔ terminal cleanup uses exact workspace IDs and unknown lists fail closed (0.292152ms)
1050✔ runner obtains the pinned creation policy before recording creation (0.149368ms)
1051✔ recovery looks up preassigned IDs without creating resources (0.384814ms)
1052✔ creation sends preassigned resource IDs (0.194972ms)
1053✔ definitive create failures are only tagged before effects (0.43126ms)
1054✔ creation absence requires a complete lookup (0.364998ms)
1055✔ definitive policy failures retain their specific wire codes (0.18843ms)
1056✔ trial routes the chosen credential home using supported agent env (0.12935ms)
1057✔ trial starts an empty live timeline and refuses recovered completion (0.183911ms)
1058ℹ tests 31
1059ℹ suites 0
1060ℹ pass 31
1061ℹ fail 0
1062ℹ cancelled 0
1063ℹ skipped 0
1064ℹ todo 0
1065ℹ duration_ms 303.153669
1066CGO_ENABLED=0 go test ./internal/runner/paseo -run 'TestPaseo|TestSubscriptionReady' -count=1
1067ok amadan.net/oficina/equipo/internal/runner/paseo 0.376s
1068CGO_ENABLED=0 go test ./internal/runner/checks -run '^TestCheckSandbox' -count=1
1069ok amadan.net/oficina/equipo/internal/runner/checks 5.771s
1070CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
1071ok amadan.net/oficina/equipo/internal/runner/containment 1.472s
1072CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
1073ok amadan.net/oficina/equipo/internal/equipo 0.090s
1074go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
1075perf: GET /: median 120µs, worst 139µs, budget 150ms
1076perf: GET /auth/callback: median 50µs, worst 53µs, budget 150ms
1077perf: GET /auth/verify: median 54µs, worst 60µs, budget 150ms
1078perf: GET /connections: median 3.371ms, worst 3.617ms, budget 150ms
1079perf: GET /conversation: median 3.75ms, worst 4.602ms, budget 150ms
1080perf: GET /journey: median 3.624ms, worst 3.893ms, budget 150ms
1081perf: GET /needs-you: median 3.5ms, worst 3.863ms, budget 150ms
1082perf: GET /people: median 2.41ms, worst 2.689ms, budget 150ms
1083perf: GET /projects: median 2.815ms, worst 3.327ms, budget 150ms
1084perf: GET /projects/new: median 2.594ms, worst 2.81ms, budget 150ms
1085perf: GET /projects/{id}: median 3.631ms, worst 3.922ms, budget 150ms
1086perf: GET /projects/{id}/edit: median 2.68ms, worst 2.826ms, budget 150ms
1087perf: GET /runners/enrol: median 8.794ms, worst 9.904ms, budget 150ms
1088perf: GET /settings: median 2.611ms, worst 2.785ms, budget 150ms
1089perf: GET /settings/recovery: median 8.358ms, worst 9.729ms, budget 150ms
1090perf: GET /settings/recovery/release: median 8.197ms, worst 8.643ms, budget 150ms
1091perf: GET /signin: median 194µs, worst 239µs, budget 150ms
1092perf: GET /specialists/{key}: median 4.219ms, worst 5.692ms, budget 150ms
1093perf: GET /tasks/new: median 2.745ms, worst 3.457ms, budget 150ms
1094perf: GET /tasks/{id}: median 3.592ms, worst 3.671ms, budget 150ms
1095perf: GET /tasks/{id}/merge: median 3.29ms, worst 4.034ms, budget 150ms
1096perf: GET /tasks/{id}/questions/{question}: median 3.567ms, worst 3.712ms, budget 150ms
1097perf: GET /work: median 2.558ms, worst 2.714ms, budget 150ms
1098perf: cold boot: median 59ms of [57.991055ms 58.592532ms 59.697522ms], budget 500ms
1099
1100receipt: test step 8.484s against a 60s target (the gate's other steps are not in this figure)
1101receipt: 1 packages ran, 0 cached, 16 without tests, 0 failed
1102receipt: slow package 4.556s amadan.net/oficina/equipo/internal/equipotest
1103receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/checks
1104receipt: slow package 0s amadan.net/oficina/equipo/internal/equipo/team
1105receipt: slow package 0s amadan.net/oficina/equipo/internal/equipo/teamcontract
1106receipt: slow package 0s amadan.net/oficina/equipo/internal/equipo
1107receipt: slow test 4.35s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
1108receipt: slow test 200ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
1109```
1110
1111Additional verification: `make fmt-check`, `git diff --check`, and `CGO_ENABLED=0 go vet ./internal/runner/containment ./cmd/equipo-runner ./internal/runnerproto` passed. The real command binary was built and its private helper entry refused to run outside PID 1:
1112
1113```text
1114CGO_ENABLED=0 go build -o "$TMPDIR/task2-evidence/equipo-runner" ./cmd/equipo-runner
1115"$TMPDIR/task2-evidence/equipo-runner" __namespace /usr/bin/true
1116exit 125 (expected 125 outside PID 1)
1117```
1118
1119### Guard mutations
1120
112140 distinct guard mutations compiled and made the named tests fail. Each mutation was applied alone and restored from the saved original in a `finally` block. No mutation is retained. The complete restored namespace gate and CI-alignment test above passed after the last mutation. The following are the exact mutation diffs, commands and red outputs; each listed command exited 1.
1122
1123#### 1. pid-isolation
1124
1125```diff
1126--- internal/runner/containment/linux.go
1127+++ internal/runner/containment/linux.go
1128@@ -204,7 +204,7 @@
1129 result <- startResult{err: e}
1130 return
1131 }
1132- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1133+ args := []string{"--unshare-user", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1134 args = append(args, mounts.args...)
1135 args = append(args, "--", "/equipo-namespace", "__namespace")
1136 args = append(args, argv...)
1137```
1138
1139```sh
1140CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceKillsDetachedChildren$ -count=1 -timeout=20s
1141```
1142
1143```text
1144--- FAIL: TestNamespaceKillsDetachedChildren (0.01s)
1145 linux_test.go:182: namespace capability/start failed (userns, pidfd required): namespace_startup_failed: bwrap: Specifying --as-pid-1 requires --unshare-pid
1146FAIL
1147rastrillo-budget/v1 ran 13ms
1148FAIL amadan.net/oficina/equipo/internal/runner/containment 0.015s
1149FAIL
1150```
1151
1152#### 2. helper-pid-one
1153
1154```diff
1155--- internal/runner/containment/linux.go
1156+++ internal/runner/containment/linux.go
1157@@ -204,7 +204,7 @@
1158 result <- startResult{err: e}
1159 return
1160 }
1161- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1162+ args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--cap-drop", "ALL", "--json-status-fd", "3"}
1163 args = append(args, mounts.args...)
1164 args = append(args, "--", "/equipo-namespace", "__namespace")
1165 args = append(args, argv...)
1166```
1167
1168```sh
1169CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceKillsDetachedChildren$ -count=1 -timeout=20s
1170```
1171
1172```text
1173--- FAIL: TestNamespaceKillsDetachedChildren (0.02s)
1174 linux_test.go:182: namespace capability/start failed (userns, pidfd required): namespace_startup_failed:
1175FAIL
1176rastrillo-budget/v1 ran 20ms
1177FAIL amadan.net/oficina/equipo/internal/runner/containment 0.022s
1178FAIL
1179```
1180
1181#### 3. network-isolation
1182
1183```diff
1184--- internal/runner/containment/linux.go
1185+++ internal/runner/containment/linux.go
1186@@ -204,7 +204,7 @@
1187 result <- startResult{err: e}
1188 return
1189 }
1190- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1191+ args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1192 args = append(args, mounts.args...)
1193 args = append(args, "--", "/equipo-namespace", "__namespace")
1194 args = append(args, argv...)
1195```
1196
1197```sh
1198CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHidesHostControl$ -count=1 -timeout=20s
1199```
1200
1201```text
1202--- FAIL: TestNamespaceHidesHostControl (0.06s)
1203 linux_test.go:320: isolation: {Code:1 Signal:0 ObservedAt:2026-11-03 09:56:16.808517203 +0000 UTC} <nil> Traceback (most recent call last):
1204 File "<string>", line 10, in <module>
1205 s=socket.socket(); assert s.connect_ex(('127.0.0.1',40593))!=0
1206 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1207 AssertionError
1208FAIL
1209rastrillo-budget/v1 ran 59ms
1210FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s
1211FAIL
1212```
1213
1214#### 4. host-bus
1215
1216```diff
1217--- internal/runner/containment/mounts.go
1218+++ internal/runner/containment/mounts.go
1219@@ -108,7 +108,7 @@
1220 return nil, err
1221 }
1222 p.args = append(p.args, "--overlay-src", "/etc", "--tmp-overlay", "/etc")
1223- p.args = append(p.args, "--symlink", "usr/bin", "/bin", "--symlink", "usr/lib", "/lib", "--symlink", "usr/lib64", "/lib64", "--proc", "/proc", "--dev", "/dev", "--dir", "/run", "--dir", "/sys", "--dir", "/home/runner", "--tmpfs", "/etc/claude-code", "--tmpfs", "/etc/codex")
1224+ p.args = append(p.args, "--symlink", "usr/bin", "/bin", "--symlink", "usr/lib", "/lib", "--symlink", "usr/lib64", "/lib64", "--proc", "/proc", "--dev", "/dev", "--ro-bind", "/run", "/run", "--dir", "/sys", "--dir", "/home/runner", "--tmpfs", "/etc/claude-code", "--tmpfs", "/etc/codex")
1225 if err = p.bind(l.Workspace, "/workspace", false, true); err != nil {
1226 return nil, err
1227 }
1228```
1229
1230```sh
1231CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHidesHostControl$ -count=1 -timeout=20s
1232```
1233
1234```text
1235--- FAIL: TestNamespaceHidesHostControl (0.06s)
1236 linux_test.go:320: isolation: {Code:1 Signal:0 ObservedAt:2026-11-03 09:56:17.137968151 +0000 UTC} <nil> Traceback (most recent call last):
1237 File "<string>", line 3, in <module>
1238 assert all(not os.path.exists(p) for p in paths), paths
1239 ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1240 AssertionError: ['/sys/fs/cgroup', '/run/user/1001/bus', '/run/user/1001/systemd/private', '/home/paulca', '/proc/1/root/home/paulca', '/etc/claude-code/managed-settings.json', '/etc/codex/config.toml']
1241FAIL
1242rastrillo-budget/v1 ran 59ms
1243FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s
1244FAIL
1245```
1246
1247#### 5. host-cgroup
1248
1249```diff
1250--- internal/runner/containment/mounts.go
1251+++ internal/runner/containment/mounts.go
1252@@ -108,7 +108,7 @@
1253 return nil, err
1254 }
1255 p.args = append(p.args, "--overlay-src", "/etc", "--tmp-overlay", "/etc")
1256- p.args = append(p.args, "--symlink", "usr/bin", "/bin", "--symlink", "usr/lib", "/lib", "--symlink", "usr/lib64", "/lib64", "--proc", "/proc", "--dev", "/dev", "--dir", "/run", "--dir", "/sys", "--dir", "/home/runner", "--tmpfs", "/etc/claude-code", "--tmpfs", "/etc/codex")
1257+ p.args = append(p.args, "--symlink", "usr/bin", "/bin", "--symlink", "usr/lib", "/lib", "--symlink", "usr/lib64", "/lib64", "--proc", "/proc", "--dev", "/dev", "--dir", "/run", "--ro-bind", "/sys", "/sys", "--dir", "/home/runner", "--tmpfs", "/etc/claude-code", "--tmpfs", "/etc/codex")
1258 if err = p.bind(l.Workspace, "/workspace", false, true); err != nil {
1259 return nil, err
1260 }
1261```
1262
1263```sh
1264CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHidesHostControl$ -count=1 -timeout=20s
1265```
1266
1267```text
1268--- FAIL: TestNamespaceHidesHostControl (0.06s)
1269 linux_test.go:320: isolation: {Code:1 Signal:0 ObservedAt:2026-11-03 09:56:17.46310184 +0000 UTC} <nil> Traceback (most recent call last):
1270 File "<string>", line 3, in <module>
1271 assert all(not os.path.exists(p) for p in paths), paths
1272 ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1273 AssertionError: ['/sys/fs/cgroup', '/run/user/1001/bus', '/run/user/1001/systemd/private', '/home/paulca', '/proc/1/root/home/paulca', '/etc/claude-code/managed-settings.json', '/etc/codex/config.toml']
1274FAIL
1275rastrillo-budget/v1 ran 60ms
1276FAIL amadan.net/oficina/equipo/internal/runner/containment 0.062s
1277FAIL
1278```
1279
1280#### 6. pid-reuse
1281
1282```diff
1283--- internal/runner/containment/recovery.go
1284+++ internal/runner/containment/recovery.go
1285@@ -57,7 +57,7 @@
1286 if e != nil {
1287 return -1, e
1288 }
1289- ticks, ns, e := identity(r.HostPID)
1290+ ticks, ns, e := identity(r.HostPID); _ = ticks
1291 // Once released, the helper is nondumpable, so namespace readlink is
1292 // denied even to its host parent. Start ticks and NSpid remain readable.
1293 // Recover has already matched the durable handshake record; PID namespace
1294@@ -66,7 +66,7 @@
1295 ns = r.NamespaceID
1296 e = nil
1297 }
1298- if e != nil || ticks != r.StartTicks || ns != r.NamespaceID {
1299+ if e != nil || ns != r.NamespaceID {
1300 unix.Close(fd)
1301 return -1, errIdentity
1302 }
1303```
1304
1305```sh
1306CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryStaleDurableTicks$ -count=1 -timeout=20s
1307```
1308
1309```text
1310--- FAIL: TestNamespaceRecoveryStaleDurableTicks (0.10s)
1311 recovery_test.go:162: reused PID accepted
1312FAIL
1313rastrillo-budget/v1 ran 97ms
1314FAIL amadan.net/oficina/equipo/internal/runner/containment 0.099s
1315FAIL
1316```
1317
1318#### 7. durable-identity-match
1319
1320```diff
1321--- internal/runner/containment/recovery.go
1322+++ internal/runner/containment/recovery.go
1323@@ -172,7 +172,7 @@
1324 }
1325 stored, readErr := os.ReadFile(filepath.Join(m.cfg.ScratchRoot, r.ID+".json"))
1326 var durable Record
1327- if readErr != nil || json.Unmarshal(stored, &durable) != nil || durable != r {
1328+ if readErr != nil || json.Unmarshal(stored, &durable) != nil || false {
1329 return proof, errIdentity
1330 }
1331 fd, e := exactPID(r)
1332```
1333
1334```sh
1335CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryIdentity/changed_manifest$ -count=1 -timeout=20s
1336```
1337
1338```text
1339--- FAIL: TestNamespaceRecoveryIdentity (0.06s)
1340 --- FAIL: TestNamespaceRecoveryIdentity/changed_manifest (0.02s)
1341 recovery_test.go:36: uncertain identity accepted: {Record:{ID:a0242603aec81d90ce7907ecfa55bec7 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532756] ManifestHash:fixture-policy-changed HostPID:4137163 StartTicks:855761858} Exit:{Code:-1 Signal:9 ObservedAt:2026-11-03 09:58:25.847797305 +0000 UTC} Verified:true} <nil>
1342 recovery_test.go:47: owned unrelated control died: no such process
1343FAIL
1344rastrillo-budget/v1 ran 59ms
1345FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s
1346FAIL
1347```
1348
1349#### 8. host-process-as-init
1350
1351```diff
1352--- internal/runner/containment/recovery.go
1353+++ internal/runner/containment/recovery.go
1354@@ -80,7 +80,8 @@
1355 init = len(fields) > 2 && fields[len(fields)-1] == "1"
1356 }
1357 }
1358- if hostErr != nil || statusErr != nil || ns == hostNS || !init {
1359+ _ = hostNS; _ = init
1360+ if hostErr != nil || statusErr != nil || false {
1361 unix.Close(fd)
1362 return -1, errIdentity
1363 }
1364```
1365
1366```sh
1367CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryRejectsNonInit$ -count=1 -timeout=20s
1368```
1369
1370```text
1371--- FAIL: TestNamespaceRecoveryRejectsNonInit (0.07s)
1372 recovery_test.go:138: host process accepted as namespace init
1373FAIL
1374rastrillo-budget/v1 ran 70ms
1375FAIL amadan.net/oficina/equipo/internal/runner/containment 0.072s
1376FAIL
1377```
1378
1379#### 9. new-boot
1380
1381```diff
1382--- internal/runner/containment/recovery.go
1383+++ internal/runner/containment/recovery.go
1384@@ -159,7 +159,7 @@
1385 if e != nil {
1386 return proof, e
1387 }
1388- if boot != r.BootID {
1389+ if false && boot != r.BootID {
1390 proof.Verified = true
1391 proof.Exit.ObservedAt = time.Now().UTC()
1392 return proof, nil
1393```
1394
1395```sh
1396CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryIdentity$ -count=1 -timeout=20s
1397```
1398
1399```text
1400--- FAIL: TestNamespaceRecoveryIdentity (0.04s)
1401 recovery_test.go:40: changed boot fabricated outcome: {Record:{ID:f392789dff42e4f75124bd42a5cf93a7 AttemptKey:attempt-fixture BootID:different-boot NamespaceID:pid:[4026532756] ManifestHash:fixture-policy HostPID:4117397 StartTicks:855749121} Exit:{Code:-1 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:false} namespace_identity_unproven
1402FAIL
1403rastrillo-budget/v1 ran 41ms
1404FAIL amadan.net/oficina/equipo/internal/runner/containment 0.042s
1405FAIL
1406```
1407
1408#### 10. early-stop-proof
1409
1410```diff
1411--- internal/runner/containment/linux.go
1412+++ internal/runner/containment/linux.go
1413@@ -363,7 +363,7 @@
1414 if p == nil {
1415 return Proof{}, errIdentity
1416 }
1417- if e := p.kill(); e != nil {
1418+ if true { return Proof{Record:p.record,Verified:true},nil }; if e := p.kill(); e != nil {
1419 return Proof{Record: p.record}, e
1420 }
1421 select {
1422```
1423
1424```sh
1425CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceStopWaitsForExit$ -count=1 -timeout=20s
1426```
1427
1428```text
1429--- FAIL: TestNamespaceStopWaitsForExit (0.04s)
1430 linux_test.go:463: stop acknowledged before exact init exit
1431FAIL
1432rastrillo-budget/v1 ran 40ms
1433FAIL amadan.net/oficina/equipo/internal/runner/containment 0.041s
1434FAIL
1435```
1436
1437#### 11. missing-intent
1438
1439```diff
1440--- internal/runner/containment/linux.go
1441+++ internal/runner/containment/linux.go
1442@@ -128,7 +128,7 @@
1443 return nil, e
1444 }
1445 r := Record{ID: id, AttemptKey: l.AttemptKey, BootID: boot, ManifestHash: l.Policy.Hash}
1446- if e = m.persist(r); e != nil {
1447+ if e = error(nil); e != nil {
1448 mounts.close()
1449 return nil, e
1450 }
1451```
1452
1453```sh
1454CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceIntentBeforeFork$ -count=1 -timeout=20s
1455```
1456
1457```text
1458--- FAIL: TestNamespaceIntentBeforeFork (0.02s)
1459 linux_test.go:448: no durable intent before fork: "" open /home/paulca/t/e2b/TestNamespaceIntentBeforeFork420064207/001/workspace/intent-observed: no such file or directory
1460FAIL
1461rastrillo-budget/v1 ran 20ms
1462FAIL amadan.net/oficina/equipo/internal/runner/containment 0.022s
1463FAIL
1464```
1465
1466#### 12. missing-identity-journal
1467
1468```diff
1469--- internal/runner/containment/linux.go
1470+++ internal/runner/containment/linux.go
1471@@ -292,7 +292,7 @@
1472 }
1473 p := &process{record: s.record, stdin: inputW, stdout: outputR, stderr: errorR, done: make(chan struct{}), fd: s.fd}
1474 // Identity is durable before the helper can fork the harness or read input.
1475- if e = m.persist(s.record); e == nil {
1476+ if e = error(nil); e == nil {
1477 _, e = releaseW.Write([]byte{1})
1478 }
1479 releaseW.Close()
1480```
1481
1482```sh
1483CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceKillsDetachedChildren$ -count=1 -timeout=20s
1484```
1485
1486```text
1487--- FAIL: TestNamespaceKillsDetachedChildren (0.04s)
1488 linux_test.go:187: incomplete durable identity: {ID:97ebba5bb41c66e6369b494b310d3e8f AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID: ManifestHash:fixture-policy HostPID:0 StartTicks:0}
1489FAIL
1490rastrillo-budget/v1 ran 45ms
1491FAIL amadan.net/oficina/equipo/internal/runner/containment 0.046s
1492FAIL
1493```
1494
1495#### 13. helper-barrier
1496
1497```diff
1498--- internal/runner/containment/linux.go
1499+++ internal/runner/containment/linux.go
1500@@ -394,7 +394,8 @@
1501 return 125
1502 }
1503 var token [1]byte
1504- if _, e = io.ReadFull(release, token[:]); e != nil || token[0] != 1 {
1505+ if false {
1506+ _ = token
1507 return 125
1508 }
1509 release.Close()
1510```
1511
1512```sh
1513CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHelperBarrier$ -count=1 -timeout=20s
1514```
1515
1516```text
1517--- FAIL: TestNamespaceHelperBarrier (0.04s)
1518 linux_test.go:576: harness started before release
1519FAIL
1520rastrillo-budget/v1 ran 36ms
1521FAIL amadan.net/oficina/equipo/internal/runner/containment 0.038s
1522FAIL
1523```
1524
1525#### 14. helper-protocol-private
1526
1527```diff
1528--- internal/runner/containment/linux.go
1529+++ internal/runner/containment/linux.go
1530@@ -400,7 +400,7 @@
1531 release.Close()
1532 // The harness shares our UID. Disallow /proc/1/fd reopening and ptrace so
1533 // it cannot forge outcome frames or reach future helper-owned relay FDs.
1534- if e = unix.Prctl(unix.PR_SET_DUMPABLE, 0, 0, 0, 0); e != nil {
1535+ if e = error(nil); e != nil {
1536 return 125
1537 }
1538 // No mount descriptors, journal handles or startup pipes reach the harness.
1539```
1540
1541```sh
1542CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHelperProtocolPrivate$ -count=1 -timeout=20s
1543```
1544
1545```text
1546--- FAIL: TestNamespaceHelperProtocolPrivate (0.06s)
1547 linux_test.go:527: helper pipe exposed: {Code:1 Signal:0 ObservedAt:2026-11-03 09:56:19.995892399 +0000 UTC} <nil>
1548FAIL
1549rastrillo-budget/v1 ran 61ms
1550FAIL amadan.net/oficina/equipo/internal/runner/containment 0.063s
1551FAIL
1552```
1553
1554#### 15. pinned-mount-swap
1555
1556```diff
1557--- internal/runner/containment/mounts.go
1558+++ internal/runner/containment/mounts.go
1559@@ -78,7 +78,8 @@
1560 flag = "--ro-bind-fd"
1561 }
1562 // FDs 3, 4 and 5 are status, release and readiness, respectively.
1563- p.args = append(p.args, flag, strconv.Itoa(6+len(p.files)), target)
1564+ _ = flag; _ = strconv.Itoa
1565+ p.args = append(p.args,"--bind",source,target)
1566 p.files = append(p.files, f)
1567 return nil
1568 }
1569```
1570
1571```sh
1572CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespacePinnedMountSwap$ -count=1 -timeout=20s
1573```
1574
1575```text
1576--- FAIL: TestNamespacePinnedMountSwap (0.04s)
1577 mounts_test.go:63: mutable path replaced pinned source: "protected" {Code:0 Signal:0 ObservedAt:2026-11-03 09:56:20.310200347 +0000 UTC} <nil>
1578FAIL
1579rastrillo-budget/v1 ran 42ms
1580FAIL amadan.net/oficina/equipo/internal/runner/containment 0.044s
1581FAIL
1582```
1583
1584#### 16. path-traversal
1585
1586```diff
1587--- internal/runner/containment/mounts.go
1588+++ internal/runner/containment/mounts.go
1589@@ -27,7 +27,7 @@
1590 }
1591 }
1592 func cleanAbsolute(path string) bool {
1593- return filepath.IsAbs(path) && filepath.Clean(path) == path && path != "/"
1594+ return filepath.IsAbs(path) && true && path != "/"
1595 }
1596 func within(path, root string) bool { return path == root || strings.HasPrefix(path, root+"/") }
1597 func overlaps(a, b string) bool { return within(a, b) || within(b, a) }
1598```
1599
1600```sh
1601CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/traversal$ -count=1 -timeout=20s
1602```
1603
1604```text
1605--- FAIL: TestNamespaceMountEscape (0.13s)
1606 --- FAIL: TestNamespaceMountEscape/traversal (0.05s)
1607 recovery_test.go:88: unsafe mount/environment accepted
1608 --- FAIL: TestNamespaceMountEscape/home_environment_traversal (0.04s)
1609 recovery_test.go:88: unsafe mount/environment accepted
1610 --- FAIL: TestNamespaceMountEscape/tmp_environment_traversal (0.04s)
1611 recovery_test.go:88: unsafe mount/environment accepted
1612FAIL
1613rastrillo-budget/v1 ran 126ms
1614FAIL amadan.net/oficina/equipo/internal/runner/containment 0.128s
1615FAIL
1616```
1617
1618#### 17. outside-home
1619
1620```diff
1621--- internal/runner/containment/mounts.go
1622+++ internal/runner/containment/mounts.go
1623@@ -115,8 +115,8 @@
1624 runtimeHome := filepath.Join(dir, "home")
1625 if l.Binding.Home != "" {
1626 runtimeHome = l.Binding.Home
1627- homes := filepath.Join(m.cfg.ScratchRoot, "homes")
1628- if !cleanAbsolute(runtimeHome) || filepath.Dir(runtimeHome) != homes || overlaps(runtimeHome, l.Workspace) {
1629+ homes := filepath.Join(m.cfg.ScratchRoot, "homes"); _ = homes
1630+ if !cleanAbsolute(runtimeHome) || false || overlaps(runtimeHome, l.Workspace) {
1631 return nil, errMount
1632 }
1633 info, e := os.Stat(runtimeHome)
1634```
1635
1636```sh
1637CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/outside_private_home$ -count=1 -timeout=20s
1638```
1639
1640```text
1641--- FAIL: TestNamespaceMountEscape (0.06s)
1642 --- FAIL: TestNamespaceMountEscape/outside_private_home (0.06s)
1643 recovery_test.go:95: unsafe mount/environment accepted
1644FAIL
1645rastrillo-budget/v1 ran 65ms
1646FAIL amadan.net/oficina/equipo/internal/runner/containment 0.067s
1647FAIL
1648```
1649
1650#### 18. protected-state-overlap
1651
1652```diff
1653--- internal/runner/containment/mounts.go
1654+++ internal/runner/containment/mounts.go
1655@@ -89,7 +89,7 @@
1656 p.close()
1657 }
1658 }()
1659- if !cleanAbsolute(l.Workspace) || overlaps(l.Workspace, m.cfg.ScratchRoot) {
1660+ if !cleanAbsolute(l.Workspace) || false {
1661 return nil, errMount
1662 }
1663 for _, root := range []string{"/proc", "/sys", "/run", "/dev", "/etc", "/usr"} {
1664```
1665
1666```sh
1667CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/protected_state$ -count=1 -timeout=20s
1668```
1669
1670```text
1671--- FAIL: TestNamespaceMountEscape (0.08s)
1672 --- FAIL: TestNamespaceMountEscape/protected_state (0.04s)
1673 recovery_test.go:88: unsafe mount/environment accepted
1674 --- FAIL: TestNamespaceMountEscape/parent_of_protected_state (0.04s)
1675 recovery_test.go:88: unsafe mount/environment accepted
1676FAIL
1677rastrillo-budget/v1 ran 77ms
1678FAIL amadan.net/oficina/equipo/internal/runner/containment 0.079s
1679FAIL
1680```
1681
1682#### 19. writable-runtime-request
1683
1684```diff
1685--- internal/runner/containment/mounts.go
1686+++ internal/runner/containment/mounts.go
1687@@ -136,7 +136,7 @@
1688 targets := map[string]bool{}
1689 for _, mount := range l.Policy.Mounts {
1690 target := mount.Target
1691- if !mount.ReadOnly || !cleanAbsolute(target) || targets[target] {
1692+ if !cleanAbsolute(target) || targets[target] {
1693 return nil, errMount
1694 }
1695 if !(strings.HasPrefix(target, "/opt/") || strings.HasPrefix(target, "/config/") || strings.HasPrefix(target, "/etc/claude-code/") || strings.HasPrefix(target, "/etc/codex/")) {
1696```
1697
1698```sh
1699CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/writable_runtime$ -count=1 -timeout=20s
1700```
1701
1702```text
1703--- FAIL: TestNamespaceMountEscape (0.04s)
1704 --- FAIL: TestNamespaceMountEscape/writable_runtime (0.04s)
1705 recovery_test.go:88: unsafe mount/environment accepted
1706FAIL
1707rastrillo-budget/v1 ran 41ms
1708FAIL amadan.net/oficina/equipo/internal/runner/containment 0.043s
1709FAIL
1710```
1711
1712#### 20. reserved-mount-target
1713
1714```diff
1715--- internal/runner/containment/mounts.go
1716+++ internal/runner/containment/mounts.go
1717@@ -139,7 +139,7 @@
1718 if !mount.ReadOnly || !cleanAbsolute(target) || targets[target] {
1719 return nil, errMount
1720 }
1721- if !(strings.HasPrefix(target, "/opt/") || strings.HasPrefix(target, "/config/") || strings.HasPrefix(target, "/etc/claude-code/") || strings.HasPrefix(target, "/etc/codex/")) {
1722+ if false {
1723 return nil, errMount
1724 }
1725 for _, existing := range l.Policy.Mounts {
1726```
1727
1728```sh
1729CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/reserved_target$ -count=1 -timeout=20s
1730```
1731
1732```text
1733--- FAIL: TestNamespaceMountEscape (0.04s)
1734 --- FAIL: TestNamespaceMountEscape/reserved_target (0.04s)
1735 recovery_test.go:88: unsafe mount/environment accepted
1736FAIL
1737rastrillo-budget/v1 ran 43ms
1738FAIL amadan.net/oficina/equipo/internal/runner/containment 0.045s
1739FAIL
1740```
1741
1742#### 21. environment-allowlist
1743
1744```diff
1745--- internal/runner/containment/mounts.go
1746+++ internal/runner/containment/mounts.go
1747@@ -160,14 +160,15 @@
1748 }
1749 p.args = append(p.args, "--clearenv", "--setenv", "PATH", "/usr/bin:/bin:/opt", "--setenv", "HOME", "/home/runner", "--setenv", "TMPDIR", "/tmp", "--setenv", "LANG", "C.UTF-8")
1750 allowed := map[string]bool{"LANG": true, "LC_ALL": true, "TERM": true, "CODEX_HOME": true, "CLAUDE_CONFIG_DIR": true, "CLAUDE_SECURESTORAGE_CONFIG_DIR": true, "CLAUDE_TMPDIR": true, "CLAUDE_CODE_DISABLE_AUTO_UPDATE": true}
1751- keys := make([]string, 0, len(l.Policy.Env))
1752+ _ = allowed
1753+ keys := make([]string, 0, len(l.Policy.Env))
1754 for k := range l.Policy.Env {
1755 keys = append(keys, k)
1756 }
1757 sort.Strings(keys)
1758 for _, k := range keys {
1759 v := l.Policy.Env[k]
1760- if !allowed[k] || strings.ContainsRune(v, 0) {
1761+ if strings.ContainsRune(v, 0) {
1762 return nil, errMount
1763 }
1764 if (k == "CODEX_HOME" || k == "CLAUDE_CONFIG_DIR" || k == "CLAUDE_SECURESTORAGE_CONFIG_DIR") && (!cleanAbsolute(v) || !within(v, "/home/runner")) {
1765```
1766
1767```sh
1768CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/environment$ -count=1 -timeout=20s
1769```
1770
1771```text
1772--- FAIL: TestNamespaceMountEscape (0.04s)
1773 --- FAIL: TestNamespaceMountEscape/environment (0.04s)
1774 recovery_test.go:88: unsafe mount/environment accepted
1775FAIL
1776rastrillo-budget/v1 ran 42ms
1777FAIL amadan.net/oficina/equipo/internal/runner/containment 0.044s
1778FAIL
1779```
1780
1781#### 22. environment-home-traversal
1782
1783```diff
1784--- internal/runner/containment/mounts.go
1785+++ internal/runner/containment/mounts.go
1786@@ -170,7 +170,7 @@
1787 if !allowed[k] || strings.ContainsRune(v, 0) {
1788 return nil, errMount
1789 }
1790- if (k == "CODEX_HOME" || k == "CLAUDE_CONFIG_DIR" || k == "CLAUDE_SECURESTORAGE_CONFIG_DIR") && (!cleanAbsolute(v) || !within(v, "/home/runner")) {
1791+ if (k == "CODEX_HOME" || k == "CLAUDE_CONFIG_DIR" || k == "CLAUDE_SECURESTORAGE_CONFIG_DIR") && (!within(v,"/home/runner")) {
1792 return nil, errMount
1793 }
1794 if k == "CLAUDE_TMPDIR" && (!cleanAbsolute(v) || !within(v, "/tmp")) {
1795```
1796
1797```sh
1798CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/home_environment_traversal$ -count=1 -timeout=20s
1799```
1800
1801```text
1802--- FAIL: TestNamespaceMountEscape (0.04s)
1803 --- FAIL: TestNamespaceMountEscape/home_environment_traversal (0.04s)
1804 recovery_test.go:88: unsafe mount/environment accepted
1805FAIL
1806rastrillo-budget/v1 ran 43ms
1807FAIL amadan.net/oficina/equipo/internal/runner/containment 0.045s
1808FAIL
1809```
1810
1811#### 23. environment-tmp-traversal
1812
1813```diff
1814--- internal/runner/containment/mounts.go
1815+++ internal/runner/containment/mounts.go
1816@@ -173,7 +173,7 @@
1817 if (k == "CODEX_HOME" || k == "CLAUDE_CONFIG_DIR" || k == "CLAUDE_SECURESTORAGE_CONFIG_DIR") && (!cleanAbsolute(v) || !within(v, "/home/runner")) {
1818 return nil, errMount
1819 }
1820- if k == "CLAUDE_TMPDIR" && (!cleanAbsolute(v) || !within(v, "/tmp")) {
1821+ if k == "CLAUDE_TMPDIR" && (!within(v,"/tmp")) {
1822 return nil, errMount
1823 }
1824 p.args = append(p.args, "--setenv", k, v)
1825```
1826
1827```sh
1828CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceMountEscape/tmp_environment_traversal$ -count=1 -timeout=20s
1829```
1830
1831```text
1832--- FAIL: TestNamespaceMountEscape (0.04s)
1833 --- FAIL: TestNamespaceMountEscape/tmp_environment_traversal (0.04s)
1834 recovery_test.go:88: unsafe mount/environment accepted
1835FAIL
1836rastrillo-budget/v1 ran 44ms
1837FAIL amadan.net/oficina/equipo/internal/runner/containment 0.046s
1838FAIL
1839```
1840
1841#### 24. socket-import
1842
1843```diff
1844--- internal/runner/containment/mounts.go
1845+++ internal/runner/containment/mounts.go
1846@@ -63,7 +63,7 @@
1847 if e != nil {
1848 return e
1849 }
1850- if d.Type()&(os.ModeSocket|os.ModeNamedPipe|os.ModeDevice) != 0 {
1851+ if false {
1852 return errMount
1853 }
1854 return nil
1855```
1856
1857```sh
1858CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceSocketImport$ -count=1 -timeout=20s
1859```
1860
1861```text
1862--- FAIL: TestNamespaceSocketImport (0.04s)
1863 linux_test.go:501: host socket imported
1864FAIL
1865rastrillo-budget/v1 ran 42ms
1866FAIL amadan.net/oficina/equipo/internal/runner/containment 0.044s
1867FAIL
1868```
1869
1870#### 25. nested-userns
1871
1872```diff
1873--- internal/runner/containment/linux.go
1874+++ internal/runner/containment/linux.go
1875@@ -204,7 +204,7 @@
1876 result <- startResult{err: e}
1877 return
1878 }
1879- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1880+ args := []string{"--unshare-user", "--disable-userns", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
1881 args = append(args, mounts.args...)
1882 args = append(args, "--", "/equipo-namespace", "__namespace")
1883 args = append(args, argv...)
1884```
1885
1886```sh
1887CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceNestedUserNamespace$ -count=1 -timeout=20s
1888```
1889
1890```text
1891--- FAIL: TestNamespaceNestedUserNamespace (0.07s)
1892 linux_test.go:510: nested sandbox unavailable: {Code:1 Signal:0 ObservedAt:2026-11-03 09:56:23.512872421 +0000 UTC} <nil> bwrap: Creating new namespace failed: nesting depth or /proc/sys/user/max_*_namespaces exceeded (ENOSPC)
1893 Traceback (most recent call last):
1894 File "<string>", line 1, in <module>
1895 import subprocess; subprocess.run(['/usr/bin/bwrap','--unshare-user','--ro-bind','/','/','--','/usr/bin/true'],check=True)
1896 ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1897 File "/usr/lib/python3.13/subprocess.py", line 577, in run
1898 raise CalledProcessError(retcode, process.args,
1899 output=stdout, stderr=stderr)
1900 subprocess.CalledProcessError: Command '['/usr/bin/bwrap', '--unshare-user', '--ro-bind', '/', '/', '--', '/usr/bin/true']' returned non-zero exit status 1.
1901FAIL
1902rastrillo-budget/v1 ran 75ms
1903FAIL amadan.net/oficina/equipo/internal/runner/containment 0.077s
1904FAIL
1905```
1906
1907#### 26. caller-thread-lifetime
1908
1909```diff
1910--- internal/runner/containment/linux.go
1911+++ internal/runner/containment/linux.go
1912@@ -215,7 +215,7 @@
1913 cmd.Stdout = outputW
1914 cmd.Stderr = errorW
1915 cmd.SysProcAttr = &syscall.SysProcAttr{Pdeathsig: syscall.SIGKILL}
1916- if e = cmd.Start(); e != nil {
1917+ startedOnThread:=make(chan error,1); go func(){runtime.LockOSThread(); startedOnThread<-cmd.Start()}(); if e = <-startedOnThread; e != nil {
1918 result <- startResult{err: e}
1919 return
1920 }
1921```
1922
1923```sh
1924CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceStartingThreadExit$ -count=1 -timeout=20s
1925```
1926
1927```text
1928--- FAIL: TestNamespaceStartingThreadExit (0.02s)
1929 linux_test.go:405: start failed
1930FAIL
1931rastrillo-budget/v1 ran 16ms
1932FAIL amadan.net/oficina/equipo/internal/runner/containment 0.018s
1933FAIL
1934```
1935
1936#### 27. context-cancellation
1937
1938```diff
1939--- internal/runner/containment/linux.go
1940+++ internal/runner/containment/linux.go
1941@@ -314,7 +314,7 @@
1942 go func() {
1943 select {
1944 case <-ctx.Done():
1945- p.kill()
1946+ // mutation
1947 case <-lifecycleDone:
1948 }
1949 }()
1950```
1951
1952```sh
1953CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceCancellation$ -count=1 -timeout=20s
1954```
1955
1956```text
1957--- FAIL: TestNamespaceCancellation (2.04s)
1958 linux_test.go:633: context deadline exceeded
1959FAIL
1960rastrillo-budget/v1 ran 2.042s
1961FAIL amadan.net/oficina/equipo/internal/runner/containment 2.044s
1962FAIL
1963```
1964
1965#### 28. ci-required-target
1966
1967```diff
1968--- Makefile
1969+++ Makefile
1970@@ -156,7 +156,7 @@
1971 # fails the build the moment models.go and migrations/ disagree,
1972 # instead of at boot on whatever machine notices next. If the app
1973 # declares manifest resources, also add: rastrillo generate --check
1974-ci: build vet fmt-check staticcheck govulncheck gitleaks budget test runner-adapter-test runner-namespace-test migration-check perf
1975+ci: build vet fmt-check staticcheck govulncheck gitleaks budget test runner-adapter-test migration-check perf
1976
1977 .PHONY: copy-release-check release-runner runner-prerequisites
1978 copy-release-check:
1979```
1980
1981```sh
1982CGO_ENABLED=0 go test ./internal/equipotest -run ^TestCIGateSteps$ -count=1 -timeout=20s
1983```
1984
1985```text
1986--- FAIL: TestCIGateSteps (0.01s)
1987 foundation_test.go:185: make ci targets = [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test staticcheck test vet], want [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test runner-namespace-test staticcheck test vet]
1988FAIL
1989rastrillo-budget/v1 ran 12ms
1990FAIL amadan.net/oficina/equipo/internal/equipotest 0.061s
1991FAIL
1992```
1993
1994#### 29. ci-delegation
1995
1996```diff
1997--- .amadan/ci.d/36-runner-namespaces
1998+++ .amadan/ci.d/36-runner-namespaces
1999@@ -1,2 +1,2 @@
2000 #!/bin/sh
2001-exec make runner-namespace-test
2002+exec make runner-adapter-test
2003```
2004
2005```sh
2006CGO_ENABLED=0 go test ./internal/equipotest -run ^TestCIGateSteps$ -count=1 -timeout=20s
2007```
2008
2009```text
2010--- FAIL: TestCIGateSteps (0.01s)
2011 foundation_test.go:221: CI step targets = [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test runner-adapter-test staticcheck test vet], want [budget build fmt-check gitleaks govulncheck migration-check perf runner-adapter-test runner-namespace-test staticcheck test vet]
2012FAIL
2013rastrillo-budget/v1 ran 13ms
2014FAIL amadan.net/oficina/equipo/internal/equipotest 0.061s
2015FAIL
2016```
2017
2018#### 30. parent-death
2019
2020```diff
2021--- internal/runner/containment/linux.go
2022+++ internal/runner/containment/linux.go
2023@@ -204,7 +204,7 @@
2024 result <- startResult{err: e}
2025 return
2026 }
2027- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
2028+ args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
2029 args = append(args, mounts.args...)
2030 args = append(args, "--", "/equipo-namespace", "__namespace")
2031 args = append(args, argv...)
2032@@ -214,7 +214,7 @@
2033 cmd.Stdin = inputR
2034 cmd.Stdout = outputW
2035 cmd.Stderr = errorW
2036- cmd.SysProcAttr = &syscall.SysProcAttr{Pdeathsig: syscall.SIGKILL}
2037+ cmd.SysProcAttr = &syscall.SysProcAttr{Pdeathsig: 0}
2038 if e = cmd.Start(); e != nil {
2039 result <- startResult{err: e}
2040 return
2041```
2042
2043```sh
2044CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceParentDeath$ -count=1 -timeout=20s
2045```
2046
2047```text
2048--- FAIL: TestNamespaceParentDeath (5.06s)
2049 linux_test.go:388: exact process has not exited: poll=0,<nil>
2050FAIL
2051rastrillo-budget/v1 ran 5.064s
2052FAIL amadan.net/oficina/equipo/internal/runner/containment 5.066s
2053FAIL
2054```
2055
2056#### 31. capabilities
2057
2058```diff
2059--- internal/runner/containment/linux.go
2060+++ internal/runner/containment/linux.go
2061@@ -204,7 +204,7 @@
2062 result <- startResult{err: e}
2063 return
2064 }
2065- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
2066+ args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-add", "ALL", "--json-status-fd", "3"}
2067 args = append(args, mounts.args...)
2068 args = append(args, "--", "/equipo-namespace", "__namespace")
2069 args = append(args, argv...)
2070```
2071
2072```sh
2073CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHidesHostControl$ -count=1 -timeout=20s
2074```
2075
2076```text
2077--- FAIL: TestNamespaceHidesHostControl (0.06s)
2078 linux_test.go:320: isolation: {Code:1 Signal:0 ObservedAt:2026-11-03 09:57:28.680147135 +0000 UTC} <nil> Traceback (most recent call last):
2079 File "<string>", line 7, in <module>
2080 assert int([l for l in open('/proc/self/status') if l.startswith('CapEff:')][0].split()[1],16)==0
2081 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2082 AssertionError
2083FAIL
2084rastrillo-budget/v1 ran 59ms
2085FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s
2086FAIL
2087```
2088
2089#### 32. helper-exec
2090
2091```diff
2092--- internal/runner/containment/linux.go
2093+++ internal/runner/containment/linux.go
2094@@ -408,7 +408,8 @@
2095 if e = unix.CloseRange(3, ^uint(0), unix.CLOSE_RANGE_CLOEXEC); e != nil {
2096 return 125
2097 }
2098- cmd := exec.Command(argv[0], argv[1:]...)
2099+ _ = syscall.Exec(argv[0],argv,os.Environ())
2100+ cmd := exec.Command(argv[0], argv[1:]...)
2101 cmd.Env = os.Environ()
2102 cmd.Stdin = os.Stdin
2103 cmd.Stdout = os.Stdout
2104```
2105
2106```sh
2107CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceHidesHostControl$ -count=1 -timeout=20s
2108```
2109
2110```text
2111--- FAIL: TestNamespaceHidesHostControl (0.06s)
2112 linux_test.go:320: isolation: {Code:-1 Signal:0 ObservedAt:2026-11-03 09:57:28.997468124 +0000 UTC} <nil> Traceback (most recent call last):
2113 File "<string>", line 6, in <module>
2114 assert os.getppid()==1
2115 ^^^^^^^^^^^^^^^
2116 AssertionError
2117FAIL
2118rastrillo-budget/v1 ran 58ms
2119FAIL amadan.net/oficina/equipo/internal/runner/containment 0.060s
2120FAIL
2121```
2122
2123#### 33. orphan-reaper
2124
2125```diff
2126--- internal/runner/containment/linux.go
2127+++ internal/runner/containment/linux.go
2128@@ -418,7 +418,7 @@
2129 }
2130 for {
2131 var status unix.WaitStatus
2132- pid, e := unix.Wait4(-1, &status, 0, nil)
2133+ pid, e := unix.Wait4(cmd.Process.Pid, &status, 0, nil)
2134 if e == unix.EINTR {
2135 continue
2136 }
2137```
2138
2139```sh
2140CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceReapsOrphans$ -count=1 -timeout=20s
2141```
2142
2143```text
2144--- FAIL: TestNamespaceReapsOrphans (1.12s)
2145 linux_test.go:611: orphan not reaped: {Code:1 Signal:0 ObservedAt:2026-11-03 09:57:30.379589918 +0000 UTC} <nil>
2146FAIL
2147rastrillo-budget/v1 ran 1.123s
2148FAIL amadan.net/oficina/equipo/internal/runner/containment 1.124s
2149FAIL
2150```
2151
2152#### 34. missing-exit-proof
2153
2154```diff
2155--- internal/runner/containment/recovery.go
2156+++ internal/runner/containment/recovery.go
2157@@ -176,9 +176,7 @@
2158 return proof, errIdentity
2159 }
2160 fd, e := exactPID(r)
2161- if e != nil {
2162- return proof, errIdentity
2163- }
2164+ if e != nil {proof.Verified=true;return proof,nil}
2165 defer unix.Close(fd)
2166 if e = unix.PidfdSendSignal(fd, unix.SIGKILL, nil, 0); e != nil && e != unix.ESRCH {
2167 return proof, e
2168```
2169
2170```sh
2171CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryUnavailableProof/missing$ -count=1 -timeout=20s
2172```
2173
2174```text
2175--- FAIL: TestNamespaceRecoveryUnavailableProof (0.07s)
2176 --- FAIL: TestNamespaceRecoveryUnavailableProof/missing (0.07s)
2177 recovery_test.go:207: unavailable proof accepted: {Record:{ID:369fcb474959338628b2a032a0239739 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532756] ManifestHash:fixture-policy HostPID:28648 StartTicks:855796599} Exit:{Code:-1 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:true} <nil>
2178FAIL
2179rastrillo-budget/v1 ran 68ms
2180FAIL amadan.net/oficina/equipo/internal/runner/containment 0.070s
2181FAIL
2182```
2183
2184#### 35. saved-proof-record
2185
2186```diff
2187--- internal/runner/containment/recovery.go
2188+++ internal/runner/containment/recovery.go
2189@@ -162,7 +162,7 @@
2190 saved, readErr := os.ReadFile(filepath.Join(m.cfg.ScratchRoot, r.ID+".exit.json"))
2191 if readErr == nil {
2192 var prior Proof
2193- if json.Unmarshal(saved, &prior) != nil || !prior.Verified || prior.Record != r || prior.Exit.ObservedAt.IsZero() {
2194+ if json.Unmarshal(saved, &prior) != nil || !prior.Verified || false || prior.Exit.ObservedAt.IsZero() {
2195 return proof, errIdentity
2196 }
2197 return prior, nil
2198```
2199
2200```sh
2201CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryUnavailableProof/record$ -count=1 -timeout=20s
2202```
2203
2204```text
2205--- FAIL: TestNamespaceRecoveryUnavailableProof (0.09s)
2206 --- FAIL: TestNamespaceRecoveryUnavailableProof/record (0.09s)
2207 recovery_test.go:207: unavailable proof accepted: {Record:{ID:544287cb133e57ee8eeba3cf9dde3609 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532756] ManifestHash:fixture-policy-changed HostPID:28794 StartTicks:855796630} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 10:04:13.581739442 +0000 UTC} Verified:true} <nil>
2208FAIL
2209rastrillo-budget/v1 ran 91ms
2210FAIL amadan.net/oficina/equipo/internal/runner/containment 0.093s
2211FAIL
2212```
2213
2214#### 36. saved-proof-verified
2215
2216```diff
2217--- internal/runner/containment/recovery.go
2218+++ internal/runner/containment/recovery.go
2219@@ -162,7 +162,7 @@
2220 saved, readErr := os.ReadFile(filepath.Join(m.cfg.ScratchRoot, r.ID+".exit.json"))
2221 if readErr == nil {
2222 var prior Proof
2223- if json.Unmarshal(saved, &prior) != nil || !prior.Verified || prior.Record != r || prior.Exit.ObservedAt.IsZero() {
2224+ if json.Unmarshal(saved, &prior) != nil || prior.Record != r || prior.Exit.ObservedAt.IsZero() {
2225 return proof, errIdentity
2226 }
2227 return prior, nil
2228```
2229
2230```sh
2231CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryUnavailableProof/unverified$ -count=1 -timeout=20s
2232```
2233
2234```text
2235--- FAIL: TestNamespaceRecoveryUnavailableProof (0.08s)
2236 --- FAIL: TestNamespaceRecoveryUnavailableProof/unverified (0.08s)
2237 recovery_test.go:207: unavailable proof accepted: {Record:{ID:d066fc984cd29c3614bdab6900298251 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532756] ManifestHash:fixture-policy HostPID:28943 StartTicks:855796663} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 10:04:13.908239355 +0000 UTC} Verified:false} <nil>
2238FAIL
2239rastrillo-budget/v1 ran 81ms
2240FAIL amadan.net/oficina/equipo/internal/runner/containment 0.082s
2241FAIL
2242```
2243
2244#### 37. saved-proof-timestamp
2245
2246```diff
2247--- internal/runner/containment/recovery.go
2248+++ internal/runner/containment/recovery.go
2249@@ -162,7 +162,7 @@
2250 saved, readErr := os.ReadFile(filepath.Join(m.cfg.ScratchRoot, r.ID+".exit.json"))
2251 if readErr == nil {
2252 var prior Proof
2253- if json.Unmarshal(saved, &prior) != nil || !prior.Verified || prior.Record != r || prior.Exit.ObservedAt.IsZero() {
2254+ if json.Unmarshal(saved, &prior) != nil || !prior.Verified || prior.Record != r || false {
2255 return proof, errIdentity
2256 }
2257 return prior, nil
2258```
2259
2260```sh
2261CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryUnavailableProof/timestamp$ -count=1 -timeout=20s
2262```
2263
2264```text
2265--- FAIL: TestNamespaceRecoveryUnavailableProof (0.09s)
2266 --- FAIL: TestNamespaceRecoveryUnavailableProof/timestamp (0.09s)
2267 recovery_test.go:207: unavailable proof accepted: {Record:{ID:ca585ad93eb5985eb3b497ff7ad1a2c3 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532756] ManifestHash:fixture-policy HostPID:29083 StartTicks:855796695} Exit:{Code:0 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:true} <nil>
2268FAIL
2269rastrillo-budget/v1 ran 86ms
2270FAIL amadan.net/oficina/equipo/internal/runner/containment 0.087s
2271FAIL
2272```
2273
2274#### 38. scratch-identity
2275
2276```diff
2277--- internal/runner/containment/linux.go
2278+++ internal/runner/containment/linux.go
2279@@ -103,7 +103,7 @@
2280 return nil, e
2281 }
2282 id := hex.EncodeToString(random[:])
2283- dir := filepath.Join(m.cfg.ScratchRoot, "attempt-"+id)
2284+ dir := filepath.Join(m.cfg.ScratchRoot, "attempt-unbound-"+id)
2285 e := os.Mkdir(dir, 0700)
2286 if e != nil {
2287 return nil, e
2288```
2289
2290```sh
2291CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceScratchIdentity$ -count=1 -timeout=20s
2292```
2293
2294```text
2295--- FAIL: TestNamespaceScratchIdentity (0.06s)
2296 recovery_test.go:253: scratch not bound to durable ID: stat /home/paulca/t/e2b/TestNamespaceScratchIdentity886275472/001/state/attempt-763177bb8fd50b41613e8f03dcd4a072/tmp: no such file or directory
2297FAIL
2298rastrillo-budget/v1 ran 64ms
2299FAIL amadan.net/oficina/equipo/internal/runner/containment 0.065s
2300FAIL
2301```
2302
2303#### 39. recover-scratch
2304
2305```diff
2306--- internal/runner/containment/recovery.go
2307+++ internal/runner/containment/recovery.go
2308@@ -198,7 +198,7 @@
2309 // Scratch has the durable launch ID, so recovery can remove only this attempt
2310 // after proving its namespace gone. Unknown same-boot identities keep it.
2311 func (m *Manager) finishRecovery(proof Proof) (Proof, error) {
2312- if err := os.RemoveAll(filepath.Join(m.cfg.ScratchRoot, "attempt-"+proof.Record.ID)); err != nil {
2313+ if err := error(nil); err != nil {
2314 proof.Verified = false
2315 return proof, err
2316 }
2317```
2318
2319```sh
2320CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryCleansScratch$ -count=1 -timeout=20s
2321```
2322
2323```text
2324--- FAIL: TestNamespaceRecoveryCleansScratch (0.14s)
2325 --- FAIL: TestNamespaceRecoveryCleansScratch/saved-exit (0.07s)
2326 recovery_test.go:231: open /home/paulca/t/e2b/TestNamespaceRecoveryCleansScratchsaved-exit2381641995/001/state/attempt-845fcb06c50f2c04ee16205f0b4c04bd/leftover: no such file or directory
2327 --- FAIL: TestNamespaceRecoveryCleansScratch/new-boot (0.07s)
2328 recovery_test.go:231: open /home/paulca/t/e2b/TestNamespaceRecoveryCleansScratchnew-boot1938237438/001/state/attempt-4f8085b1db96f9efac2208629c939bf0/leftover: no such file or directory
2329FAIL
2330rastrillo-budget/v1 ran 142ms
2331FAIL amadan.net/oficina/equipo/internal/runner/containment 0.143s
2332FAIL
2333```
2334
2335#### 40. unproven-scratch
2336
2337```diff
2338--- internal/runner/containment/recovery.go
2339+++ internal/runner/containment/recovery.go
2340@@ -143,7 +143,8 @@
2341 // Recover never enumerates host processes. An absent same-boot PID without a
2342 // durable exit proof remains uncertain; a new boot proves absence, not outcome.
2343 func (m *Manager) Recover(ctx context.Context, r Record) (Proof, error) {
2344- proof := Proof{Record: r, Exit: provider.Exit{Code: -1}}
2345+ defer os.RemoveAll(filepath.Join(m.cfg.ScratchRoot,"attempt-"+r.ID))
2346+ proof := Proof{Record: r, Exit: provider.Exit{Code: -1}}
2347 if len(r.ID) != 32 || strings.ContainsAny(r.ID, "/.\\") || r.AttemptKey == "" || r.BootID == "" || r.ManifestHash == "" {
2348 return proof, errIdentity
2349 }
2350```
2351
2352```sh
2353CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceRecoveryIdentity/reused_pid$ -count=1 -timeout=20s
2354```
2355
2356```text
2357--- FAIL: TestNamespaceRecoveryIdentity (0.06s)
2358 --- FAIL: TestNamespaceRecoveryIdentity/reused_pid (0.00s)
2359 recovery_test.go:42: unproven recovery removed scratch: stat /home/paulca/t/e2b/TestNamespaceRecoveryIdentity926612942/001/state/attempt-7f9d15402e810a584d666df62a4b37ff: no such file or directory
2360FAIL
2361rastrillo-budget/v1 ran 56ms
2362FAIL amadan.net/oficina/equipo/internal/runner/containment 0.057s
2363FAIL
2364```
2365
2366Four exploratory mutation attempts were not counted: removing the ticks check first failed compilation because `ticks` became unused; the corrected mutation added `_ = ticks`. Removing the durable-record comparison twice survived a namespace-mismatch case because the independent kernel namespace check still rejected it; the final test changes a nonempty manifest hash to isolate the durable-record guard. The outside-home mutation first survived because the fixture also violated the home mode requirement; setting that fixture to 0700 isolated the location guard. All four originals were restored, and the corrected mutations above compiled and failed their named tests.
2367
2368### User-facing strings
2369
2370No UI strings, README prose or copy.go entries were added. Internal error codes are `namespace_mount_rejected`, `namespace_identity_unproven`, `namespace_startup_failed` and `namespace_bubblewrap_version`. The internal startup error may include a bounded bubblewrap diagnostic (4096 bytes). If later exposed in the app, map these codes to individually pending copy.go entries for review. Test-only diagnostics include `namespace capability missing`, `namespace capability/start failed (userns, pidfd required)`, and `capability missing` messages for delegated cgroups, pidfd_open, pidfd_send_signal and waitid. No copy-review skill or server was used, as instructed.
2371
2372### Concerns and remaining work
2373
2374The remote worker proof is pending the controller's push. Local capability is proven; a remote worker without userns, pidfd, overlay mounts or writable delegated test cgroups will fail the required namespace job. Worker labels alone are not evidence.
2375
2376Recovery intentionally blocks same-boot reuse if launch identity or durable exit evidence is unavailable. It does not infer a successful provider outcome from containment. Account-content hashing, provider preflight, the in-namespace relay, check execution, capture integration and provider certification remain later tasks. This task does not make a provider run or claim the release is certified.
2377
2378No push, merge, deployment, sign-in, enrolment, credential import, model prompt or subagent was performed. All test processes and cgroups were cleaned up. After saving these reports, the task-owned evidence directory under TMPDIR is removed. Go caches are unchanged. No server or background process is left running by this task. The requested report remains under `.superpowers` (already ignored); the full controller section is committed.
2379
2380
2381## Task 2 fix round 1: Exit proof and scratch cleanup
2382
2383Date: 2026-11-03. Base: `5c1de26` on `plan-2b`. Author: `codex <codex~paul@keymail.dev>`.
2384Commit subject: `fix: keep namespace exit proof independent of scratch cleanup`.
2385Status: DONE_WITH_CONCERNS. Both requested fixes pass the covering gates. One existing test helper returned EINTR on a verification run; the unchanged rerun passed. Remote CI remains for the controller.
2386
2387### Changes and files
2388
2389`internal/runner/containment/linux.go` now uses the same cleanup operation as recovery. It joins any cleanup error with the process error without changing the saved namespace-exit proof.
2390
2391`internal/runner/containment/recovery.go` restores owner directory access before removing scratch. The walk skips symlinks, including a symlink at the attempt root. Only directories receive mode 0700; file permissions and external symlink targets stay untouched. Cleanup errors carry the `namespace_scratch_cleanup` prefix and retain their underlying error. A failed cleanup can be retried without losing Verified or changing the outcome.
2392
2393Same-boot recovery distinguishes an absent recorded init from an unproven identity. ESRCH, a vanished proc entry, differing start ticks or namespace, and an observed pidfd exit establish that the recorded init is gone. Recovery checks the saved launch record before making this inference, saves a verified exit with `Code=-1`, `Signal=0` and an observation time, and signals no replacement process. Other lookup errors, malformed records, non-init identities and mismatched saved records still fail closed. IDs and namespace names are checked for their expected format before the absent-identity path.
2394
2395`internal/runner/containment/recovery_test.go` adds real namespace tests for 0555, 0500 and 0000 scratch directories under both tmp and the private home, with natural exit and Stop. Recovery tests cover a read-only tree, an external symlink, repeated cleanup failures and successful retry. The crash test kills a separate test runner, observes its init exit, requires pidfd_open to return ESRCH, and verifies that no exit file exists before recovery. Reuse tests use an unrelated test-owned sleep process and check that it survives both ticks and namespace mismatches. The tests also require inferred exit proofs to survive a second Recover unchanged.
2396
2397`internal/runner/containment/{linux,recovery}_test.go` now obtains the host home through `os.UserHomeDir()`. No test in this package hard-codes the operator's home.
2398
2399This section is appended to the task report and `docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md`. The task report remains in the already ignored `.superpowers` directory; the identical controller section is committed with the four Go files.
2400
2401### Interpretations
2402
2403The round-1 dispatch supersedes the original brief's commit subject, full CI and push instructions. Only containment tests and `make runner-namespace-test` ran. The original report's statement that missing same-boot exit evidence always blocks recovery is superseded by this fix.
2404
2405The old missing-exit rejection is replaced by the actual runner-crash test. The old stale durable ticks test now requires a verified unknown outcome while the test-owned process at that PID stays alive. Submitted records that differ from the saved record still fail. The unrelated-process reuse fixture synthesizes the durable PID collision, avoiding host PID exhaustion or any scan of unrelated processes.
2406
2407Unknown outcome remains the existing `provider.Exit` convention: Code -1 and Signal 0. A cleanup failure does not change proof. Journal persistence errors retain the existing failure behavior. Cleanup runs after namespace teardown; the threat model still trusts other processes running as the host account.
2408
2409The malformed-record preservation test passed against the original implementation before production changes. Explicit format checks are necessary once absent identities can be verified; mutations below prove that omitting those checks would accept malformed records.
2410
2411### RED evidence
2412
2413All commands ran in `/home/paulca/amadan.net/oficina/equipo-plan-2b`, on `plan-2b`, with CGO disabled, default Go caches and the existing on-disk TMPDIR. Tests for both review issues were written before production changes.
2414
2415```sh
2416CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
2417```
2418
2419Exit 1, compiled successfully. Output excerpts:
2420
2421```text
2422--- FAIL: TestNamespaceRecoveryStaleDurableTicks (0.07s)
2423 recovery_test.go:176: absent recorded identity not recovered: ... Verified:false} namespace_identity_unproven
2424--- FAIL: TestNamespaceReadOnlyScratch (0.36s)
2425 --- FAIL: TestNamespaceReadOnlyScratch/0555/stop=false (0.06s)
2426 recovery_test.go:304: read-only scratch invalidated exit: ... Verified:false} unlinkat .../tmp/cache/nested/file: permission denied
2427 --- FAIL: TestNamespaceReadOnlyScratch/0500/stop=true (0.06s)
2428 recovery_test.go:304: read-only scratch invalidated exit: ... Verified:false} unlinkat .../tmp/cache/nested/file: permission denied
2429 --- FAIL: TestNamespaceReadOnlyScratch/0000/stop=false (0.06s)
2430 recovery_test.go:304: read-only scratch invalidated exit: ... Verified:false} openfdat .../tmp: permission denied
2431--- FAIL: TestNamespaceRecoveryReadOnlyScratch (0.06s)
2432 recovery_test.go:353: read-only recovery invalidated exit: ... Verified:false} openfdat .../cache/nested/link: permission denied
2433--- FAIL: TestNamespaceCleanupFailureKeepsProof (0.06s)
2434 recovery_test.go:389: cleanup failure changed proof: ... Verified:false} unlinkat ...: permission denied
2435--- FAIL: TestNamespaceRecoveryCrashBeforeExit (0.05s)
2436 recovery_test.go:446: absent init not recovered with unknown outcome: ... Verified:false} namespace_identity_unproven
2437--- FAIL: TestNamespaceRecoveryReusedPID (0.17s)
2438 --- FAIL: TestNamespaceRecoveryReusedPID/ticks (0.08s)
2439 recovery_test.go:476: absent init not recovered with unknown outcome: ... Verified:false} namespace_identity_unproven
2440 --- FAIL: TestNamespaceRecoveryReusedPID/namespace (0.09s)
2441 recovery_test.go:476: absent init not recovered with unknown outcome: ... Verified:false} namespace_identity_unproven
2442FAIL
2443rastrillo-budget/v1 ran 2.447s
2444FAIL amadan.net/oficina/equipo/internal/runner/containment 2.449s
2445```
2446
2447All six read-only combinations failed. Red test cleanup restored the fixture directory permissions and removed its scratch.
2448
2449Preservation check before implementation:
2450
2451```sh
2452CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryMalformedRecord$' -count=1
2453```
2454
2455```text
2456ok amadan.net/oficina/equipo/internal/runner/containment 0.143s
2457```
2458
2459### GREEN evidence
2460
2461After implementation, before mutations:
2462
2463```sh
2464CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
2465```
2466
2467```text
2468ok amadan.net/oficina/equipo/internal/runner/containment 2.607s
2469```
2470
2471After restoring all mutations, one run of that same command exited 1:
2472
2473```text
2474--- FAIL: TestNamespaceStartingThreadExit (0.09s)
2475 linux_test.go:415: owned unrelated control exited: -1 interrupted system call
2476FAIL
2477rastrillo-budget/v1 ran 2.032s
2478FAIL amadan.net/oficina/equipo/internal/runner/containment 2.034s
2479```
2480
2481The existing `alive` test helper treats an interrupted zero-time poll as a failure. No process exit was reported by poll in this failure. The helper was left unchanged in this focused fix. Both requested gates then passed without changing production or test code:
2482
2483```sh
2484CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
2485make runner-namespace-test
2486```
2487
2488```text
2489ok amadan.net/oficina/equipo/internal/runner/containment 2.078s
2490CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
2491ok amadan.net/oficina/equipo/internal/runner/containment 2.047s
2492```
2493
2494These are real Linux namespace tests, including the delegated cgroup capability test; no skips were introduced. `git diff --check` passed and all changed Go files were formatted with gofmt.
2495
2496### Guard mutations
2497
2498Each mutation was applied alone and restored in a finally block. All 12 compiled and exited 1 with the named test failing. No mutation survived and no mutation is retained. Commands and complete output follow (the first mutation output repeats the same permission failure for six modes/exit paths).
2499
2500#### 1. owner-permissions
2501
2502```diff
2503--- internal/runner/containment/recovery.go
2504+++ internal/runner/containment/recovery.go
2505@@ -234,7 +234,7 @@
2506 return err
2507 }
2508 if d.IsDir() {
2509- return os.Chmod(path, 0700)
2510+ return nil
2511 }
2512 return nil
2513 })
2514```
2515
2516```sh
2517CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceReadOnlyScratch$' -count=1
2518```
2519
2520```text
2521--- FAIL: TestNamespaceReadOnlyScratch (0.32s)
2522 --- FAIL: TestNamespaceReadOnlyScratch/0555/stop=false (0.06s)
2523 recovery_test.go:304: read-only scratch invalidated exit: {Record:{ID:1cda917d4180a745b940c7ba53c748af AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533069] ManifestHash:fixture-policy HostPID:616268 StartTicks:856354757} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 11:37:14.847461332 +0000 UTC} Verified:true} namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0555stop=false2958658476/001/state/attempt-1cda917d4180a745b940c7ba53c748af/tmp/cache/nested/file: permission denied
2524 linux_test.go:58: cleanup: namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0555stop=false2958658476/001/state/attempt-1cda917d4180a745b940c7ba53c748af/tmp/cache/nested/file: permission denied
2525 --- FAIL: TestNamespaceReadOnlyScratch/0555/stop=true (0.05s)
2526 recovery_test.go:304: read-only scratch invalidated exit: {Record:{ID:2a0a5c723b7938b622f27977b41db5a5 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533132] ManifestHash:fixture-policy HostPID:616277 StartTicks:856354762} Exit:{Code:-1 Signal:9 ObservedAt:2026-11-03 11:37:14.899798178 +0000 UTC} Verified:true} namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0555stop=true1276642074/001/state/attempt-2a0a5c723b7938b622f27977b41db5a5/tmp/cache/nested/file: permission denied
2527 linux_test.go:58: cleanup: namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0555stop=true1276642074/001/state/attempt-2a0a5c723b7938b622f27977b41db5a5/tmp/cache/nested/file: permission denied
2528 --- FAIL: TestNamespaceReadOnlyScratch/0500/stop=false (0.05s)
2529 recovery_test.go:304: read-only scratch invalidated exit: {Record:{ID:e201f34bc599079ab24e2f942b957914 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533071] ManifestHash:fixture-policy HostPID:616286 StartTicks:856354767} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 11:37:14.950980826 +0000 UTC} Verified:true} namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0500stop=false3032694844/001/state/attempt-e201f34bc599079ab24e2f942b957914/tmp/cache/nested/file: permission denied
2530 linux_test.go:58: cleanup: namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0500stop=false3032694844/001/state/attempt-e201f34bc599079ab24e2f942b957914/tmp/cache/nested/file: permission denied
2531 --- FAIL: TestNamespaceReadOnlyScratch/0500/stop=true (0.05s)
2532 recovery_test.go:304: read-only scratch invalidated exit: {Record:{ID:e00521312aba890077d12f7afc5b6041 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533132] ManifestHash:fixture-policy HostPID:616295 StartTicks:856354772} Exit:{Code:-1 Signal:9 ObservedAt:2026-11-03 11:37:15.00379682 +0000 UTC} Verified:true} namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0500stop=true1117198659/001/state/attempt-e00521312aba890077d12f7afc5b6041/tmp/cache/nested/file: permission denied
2533 linux_test.go:58: cleanup: namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0500stop=true1117198659/001/state/attempt-e00521312aba890077d12f7afc5b6041/tmp/cache/nested/file: permission denied
2534 --- FAIL: TestNamespaceReadOnlyScratch/0000/stop=false (0.05s)
2535 recovery_test.go:304: read-only scratch invalidated exit: {Record:{ID:992239942fcd9036abb27926e6a555b1 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533135] ManifestHash:fixture-policy HostPID:616305 StartTicks:856354778} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 11:37:15.058119002 +0000 UTC} Verified:true} namespace_scratch_cleanup: open /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0000stop=false1418144697/001/state/attempt-992239942fcd9036abb27926e6a555b1/home: permission denied
2536 linux_test.go:58: cleanup: namespace_scratch_cleanup: open /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0000stop=false1418144697/001/state/attempt-992239942fcd9036abb27926e6a555b1/home: permission denied
2537 --- FAIL: TestNamespaceReadOnlyScratch/0000/stop=true (0.05s)
2538 recovery_test.go:304: read-only scratch invalidated exit: {Record:{ID:80ad49f0dcd9af2bcba593188f4f74f4 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533132] ManifestHash:fixture-policy HostPID:616314 StartTicks:856354783} Exit:{Code:-1 Signal:9 ObservedAt:2026-11-03 11:37:15.110908426 +0000 UTC} Verified:true} namespace_scratch_cleanup: open /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0000stop=true2609492772/001/state/attempt-80ad49f0dcd9af2bcba593188f4f74f4/home: permission denied
2539 linux_test.go:58: cleanup: namespace_scratch_cleanup: open /home/paulca/t/e2b/TestNamespaceReadOnlyScratch0000stop=true2609492772/001/state/attempt-80ad49f0dcd9af2bcba593188f4f74f4/home: permission denied
2540FAIL
2541rastrillo-budget/v1 ran 319ms
2542FAIL amadan.net/oficina/equipo/internal/runner/containment 0.321s
2543FAIL
2544```
2545
2546#### 2. proof-independent
2547
2548```diff
2549--- internal/runner/containment/recovery.go
2550+++ internal/runner/containment/recovery.go
2551@@ -220,7 +220,8 @@
2552
2553 // Scratch has the durable launch ID. Cleanup cannot undo an observed exit.
2554 func (m *Manager) finishRecovery(proof Proof) (Proof, error) {
2555- return proof, removeScratch(filepath.Join(m.cfg.ScratchRoot, "attempt-"+proof.Record.ID))
2556+ err := removeScratch(filepath.Join(m.cfg.ScratchRoot, "attempt-"+proof.Record.ID))
2557+ if err != nil { proof.Verified = false }; return proof, err
2558 }
2559
2560 func removeScratch(dir string) error {
2561```
2562
2563```sh
2564CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceCleanupFailureKeepsProof$' -count=1
2565```
2566
2567```text
2568--- FAIL: TestNamespaceCleanupFailureKeepsProof (0.06s)
2569 recovery_test.go:389: cleanup failure changed proof: {Record:{ID:f93c9f0a656cce7ca2f7213268c3bd80 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533069] ManifestHash:fixture-policy HostPID:616433 StartTicks:856354816} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 11:37:15.441338634 +0000 UTC} Verified:false} namespace_scratch_cleanup: unlinkat /home/paulca/t/e2b/TestNamespaceCleanupFailureKeepsProof4160287334/001/state/attempt-f93c9f0a656cce7ca2f7213268c3bd80: permission denied
2570FAIL
2571rastrillo-budget/v1 ran 55ms
2572FAIL amadan.net/oficina/equipo/internal/runner/containment 0.057s
2573FAIL
2574```
2575
2576#### 3. cleanup-error
2577
2578```diff
2579--- internal/runner/containment/recovery.go
2580+++ internal/runner/containment/recovery.go
2581@@ -220,7 +220,7 @@
2582
2583 // Scratch has the durable launch ID. Cleanup cannot undo an observed exit.
2584 func (m *Manager) finishRecovery(proof Proof) (Proof, error) {
2585- return proof, removeScratch(filepath.Join(m.cfg.ScratchRoot, "attempt-"+proof.Record.ID))
2586+ _ = removeScratch(filepath.Join(m.cfg.ScratchRoot, "attempt-"+proof.Record.ID)); return proof, nil
2587 }
2588
2589 func removeScratch(dir string) error {
2590```
2591
2592```sh
2593CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceCleanupFailureKeepsProof$' -count=1
2594```
2595
2596```text
2597--- FAIL: TestNamespaceCleanupFailureKeepsProof (0.05s)
2598 recovery_test.go:389: cleanup failure changed proof: {Record:{ID:de2d4fb06b0fc7b3bb413d95ff3eae08 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532943] ManifestHash:fixture-policy HostPID:616640 StartTicks:856354851} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 11:37:15.78345124 +0000 UTC} Verified:true} <nil>
2599FAIL
2600rastrillo-budget/v1 ran 46ms
2601FAIL amadan.net/oficina/equipo/internal/runner/containment 0.048s
2602FAIL
2603```
2604
2605#### 4. symlink-target
2606
2607```diff
2608--- internal/runner/containment/recovery.go
2609+++ internal/runner/containment/recovery.go
2610@@ -233,7 +233,8 @@
2611 if err != nil {
2612 return err
2613 }
2614- if d.IsDir() {
2615+ info, statErr := os.Stat(path)
2616+ if statErr == nil && info.IsDir() {
2617 return os.Chmod(path, 0700)
2618 }
2619 return nil
2620```
2621
2622```sh
2623CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryReadOnlyScratch$' -count=1
2624```
2625
2626```text
2627--- FAIL: TestNamespaceRecoveryReadOnlyScratch (0.05s)
2628 recovery_test.go:360: symlink target permissions changed: &{002 4096 2147484096 {99995670 63929302636 0x80d840} {66306 30540801 2 16832 1001 1001 0 0 4096 4096 8 {1793705836 99995670} {1793705836 99995670} {1793705836 99995670} [0 0 0]}} <nil>
2629FAIL
2630rastrillo-budget/v1 ran 47ms
2631FAIL amadan.net/oficina/equipo/internal/runner/containment 0.049s
2632FAIL
2633```
2634
2635#### 5. gone-init
2636
2637```diff
2638--- internal/runner/containment/recovery.go
2639+++ internal/runner/containment/recovery.go
2640@@ -57,7 +57,7 @@
2641 func exactPID(r Record) (int, error) {
2642 fd, e := unix.PidfdOpen(r.HostPID, 0)
2643 if e == unix.ESRCH {
2644- return -1, errNamespaceExited
2645+ return -1, errIdentity
2646 }
2647 if e != nil {
2648 return -1, e
2649```
2650
2651```sh
2652CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryCrashBeforeExit$' -count=1
2653```
2654
2655```text
2656--- FAIL: TestNamespaceRecoveryCrashBeforeExit (0.05s)
2657 recovery_test.go:446: absent init not recovered with unknown outcome: {Record:{ID:6fed6488dc6566b2219008dc106f8316 AttemptKey:parent-death BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532942] ManifestHash:parent-policy HostPID:616894 StartTicks:856354913} Exit:{Code:-1 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:false} namespace_identity_unproven
2658FAIL
2659rastrillo-budget/v1 ran 48ms
2660FAIL amadan.net/oficina/equipo/internal/runner/containment 0.050s
2661FAIL
2662```
2663
2664#### 6. ticks-mismatch
2665
2666```diff
2667--- internal/runner/containment/recovery.go
2668+++ internal/runner/containment/recovery.go
2669@@ -62,8 +62,8 @@
2670 if e != nil {
2671 return -1, e
2672 }
2673- ticks, ns, e := identity(r.HostPID)
2674- if errors.Is(e, os.ErrNotExist) || (e == nil && (ticks != r.StartTicks || ns != r.NamespaceID)) {
2675+ ticks, ns, e := identity(r.HostPID); _ = ticks
2676+ if errors.Is(e, os.ErrNotExist) || (e == nil && (false || ns != r.NamespaceID)) {
2677 unix.Close(fd)
2678 return -1, errNamespaceExited
2679 }
2680```
2681
2682```sh
2683CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryStaleDurableTicks$' -count=1
2684```
2685
2686```text
2687--- FAIL: TestNamespaceRecoveryStaleDurableTicks (0.07s)
2688 recovery_test.go:176: absent recorded identity not recovered: {Record:{ID:5ce4122cf3d1ac00af8e0e5e248ccc4e AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532944] ManifestHash:fixture-policy HostPID:617022 StartTicks:856354944} Exit:{Code:-1 Signal:9 ObservedAt:2026-11-03 11:37:16.708993771 +0000 UTC} Verified:true} <nil>
2689FAIL
2690rastrillo-budget/v1 ran 69ms
2691FAIL amadan.net/oficina/equipo/internal/runner/containment 0.070s
2692FAIL
2693```
2694
2695#### 7. namespace-mismatch
2696
2697```diff
2698--- internal/runner/containment/recovery.go
2699+++ internal/runner/containment/recovery.go
2700@@ -63,7 +63,7 @@
2701 return -1, e
2702 }
2703 ticks, ns, e := identity(r.HostPID)
2704- if errors.Is(e, os.ErrNotExist) || (e == nil && (ticks != r.StartTicks || ns != r.NamespaceID)) {
2705+ if errors.Is(e, os.ErrNotExist) || (e == nil && (ticks != r.StartTicks || false)) {
2706 unix.Close(fd)
2707 return -1, errNamespaceExited
2708 }
2709```
2710
2711```sh
2712CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryReusedPID/namespace$' -count=1
2713```
2714
2715```text
2716--- FAIL: TestNamespaceRecoveryReusedPID (0.06s)
2717 --- FAIL: TestNamespaceRecoveryReusedPID/namespace (0.06s)
2718 recovery_test.go:476: absent init not recovered with unknown outcome: {Record:{ID:0c773f6c11bb26406ac753ad3fea1827 AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[1] ManifestHash:fixture-policy HostPID:617176 StartTicks:856354978} Exit:{Code:-1 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:false} namespace_identity_unproven
2719FAIL
2720rastrillo-budget/v1 ran 57ms
2721FAIL amadan.net/oficina/equipo/internal/runner/containment 0.059s
2722FAIL
2723```
2724
2725#### 8. unknown-outcome
2726
2727```diff
2728--- internal/runner/containment/recovery.go
2729+++ internal/runner/containment/recovery.go
2730@@ -191,6 +191,7 @@
2731 }
2732 fd, e := exactPID(r)
2733 if errors.Is(e, errNamespaceExited) {
2734+ proof.Exit.Code = 0
2735 proof.Verified = true
2736 proof.Exit.ObservedAt = time.Now().UTC()
2737 if e = durableJSON(m.cfg.ScratchRoot, r.ID+".exit.json", proof); e != nil {
2738```
2739
2740```sh
2741CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryCrashBeforeExit$' -count=1
2742```
2743
2744```text
2745--- FAIL: TestNamespaceRecoveryCrashBeforeExit (0.06s)
2746 recovery_test.go:446: absent init not recovered with unknown outcome: {Record:{ID:abffcd565878741acef85b591bd5db30 AttemptKey:parent-death BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026532944] ManifestHash:parent-policy HostPID:617307 StartTicks:856355006} Exit:{Code:0 Signal:0 ObservedAt:2026-11-03 11:37:17.340388664 +0000 UTC} Verified:true} <nil>
2747FAIL
2748rastrillo-budget/v1 ran 57ms
2749FAIL amadan.net/oficina/equipo/internal/runner/containment 0.059s
2750FAIL
2751```
2752
2753#### 9. durable-exit
2754
2755```diff
2756--- internal/runner/containment/recovery.go
2757+++ internal/runner/containment/recovery.go
2758@@ -193,7 +193,7 @@
2759 if errors.Is(e, errNamespaceExited) {
2760 proof.Verified = true
2761 proof.Exit.ObservedAt = time.Now().UTC()
2762- if e = durableJSON(m.cfg.ScratchRoot, r.ID+".exit.json", proof); e != nil {
2763+ if e = error(nil); e != nil {
2764 proof.Verified = false
2765 return proof, e
2766 }
2767```
2768
2769```sh
2770CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryCrashBeforeExit$' -count=1
2771```
2772
2773```text
2774--- FAIL: TestNamespaceRecoveryCrashBeforeExit (0.05s)
2775 recovery_test.go:446: recovery proof not durable: {Record:{ID:253199739898d5f68e5434a4145f0116 AttemptKey:parent-death BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533069] ManifestHash:parent-policy HostPID:617460 StartTicks:856355038} Exit:{Code:-1 Signal:0 ObservedAt:2026-11-03 11:37:17.660847264 +0000 UTC} Verified:true} <nil>
2776FAIL
2777rastrillo-budget/v1 ran 52ms
2778FAIL amadan.net/oficina/equipo/internal/runner/containment 0.053s
2779FAIL
2780```
2781
2782#### 10. saved-record-match
2783
2784```diff
2785--- internal/runner/containment/recovery.go
2786+++ internal/runner/containment/recovery.go
2787@@ -186,7 +186,7 @@
2788 }
2789 stored, readErr := os.ReadFile(filepath.Join(m.cfg.ScratchRoot, r.ID+".json"))
2790 var durable Record
2791- if readErr != nil || json.Unmarshal(stored, &durable) != nil || durable != r {
2792+ if readErr != nil || json.Unmarshal(stored, &durable) != nil || false {
2793 return proof, errIdentity
2794 }
2795 fd, e := exactPID(r)
2796```
2797
2798```sh
2799CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryIdentity/reused_pid$' -count=1
2800```
2801
2802```text
2803--- FAIL: TestNamespaceRecoveryIdentity (0.07s)
2804 --- FAIL: TestNamespaceRecoveryIdentity/reused_pid (0.01s)
2805 recovery_test.go:42: uncertain identity accepted: {Record:{ID:2506f4816eb36e89dc8e53f3f870a80f AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533069] ManifestHash:fixture-policy HostPID:617587 StartTicks:856355070} Exit:{Code:-1 Signal:0 ObservedAt:2026-11-03 11:37:17.965976171 +0000 UTC} Verified:true} <nil>
2806 recovery_test.go:64: recover exact identity: {Record:{ID:2506f4816eb36e89dc8e53f3f870a80f AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533069] ManifestHash:fixture-policy HostPID:617587 StartTicks:856355069} Exit:{Code:-1 Signal:0 ObservedAt:0001-01-01 00:00:00 +0000 UTC} Verified:false} namespace_identity_unproven
2807FAIL
2808rastrillo-budget/v1 ran 69ms
2809FAIL amadan.net/oficina/equipo/internal/runner/containment 0.071s
2810FAIL
2811```
2812
2813#### 11. malformed-id
2814
2815```diff
2816--- internal/runner/containment/recovery.go
2817+++ internal/runner/containment/recovery.go
2818@@ -156,8 +156,8 @@
2819 // absent, the kernel has finished killing its namespace. Its outcome is unknown.
2820 func (m *Manager) Recover(ctx context.Context, r Record) (Proof, error) {
2821 proof := Proof{Record: r, Exit: provider.Exit{Code: -1}}
2822- _, idErr := hex.DecodeString(r.ID)
2823- if len(r.ID) != 32 || idErr != nil || strings.ContainsAny(r.ID, "/.\\") || r.AttemptKey == "" || r.BootID == "" || r.ManifestHash == "" {
2824+ _, idErr := hex.DecodeString(r.ID); _ = idErr
2825+ if len(r.ID) != 32 || false || strings.ContainsAny(r.ID, "/.\\") || r.AttemptKey == "" || r.BootID == "" || r.ManifestHash == "" {
2826 return proof, errIdentity
2827 }
2828 boot, e := bootID()
2829```
2830
2831```sh
2832CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryMalformedRecord/id$' -count=1
2833```
2834
2835```text
2836--- FAIL: TestNamespaceRecoveryMalformedRecord (0.08s)
2837 --- FAIL: TestNamespaceRecoveryMalformedRecord/id (0.08s)
2838 recovery_test.go:518: malformed record accepted: {Record:{ID:zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:pid:[4026533069] ManifestHash:fixture-policy HostPID:617712 StartTicks:856355102} Exit:{Code:-1 Signal:0 ObservedAt:2026-11-03 11:37:18.320341693 +0000 UTC} Verified:true} <nil>
2839FAIL
2840rastrillo-budget/v1 ran 83ms
2841FAIL amadan.net/oficina/equipo/internal/runner/containment 0.084s
2842FAIL
2843```
2844
2845#### 12. malformed-namespace
2846
2847```diff
2848--- internal/runner/containment/recovery.go
2849+++ internal/runner/containment/recovery.go
2850@@ -170,7 +170,8 @@
2851 return m.finishRecovery(proof)
2852 }
2853 nsID, nsErr := strconv.ParseUint(strings.TrimSuffix(strings.TrimPrefix(r.NamespaceID, "pid:["), "]"), 10, 64)
2854- if r.HostPID <= 0 || r.StartTicks == 0 || nsErr != nil || nsID == 0 || r.NamespaceID != fmt.Sprintf("pid:[%d]", nsID) {
2855+ _ = nsID; _ = nsErr
2856+ if r.HostPID <= 0 || r.StartTicks == 0 || r.NamespaceID == "" {
2857 return proof, errIdentity
2858 }
2859 saved, readErr := os.ReadFile(filepath.Join(m.cfg.ScratchRoot, r.ID+".exit.json"))
2860```
2861
2862```sh
2863CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryMalformedRecord/namespace$' -count=1
2864```
2865
2866```text
2867--- FAIL: TestNamespaceRecoveryMalformedRecord (0.09s)
2868 --- FAIL: TestNamespaceRecoveryMalformedRecord/namespace (0.09s)
2869 recovery_test.go:518: malformed record accepted: {Record:{ID:4c7eb1621774dd6be136f34847a2976d AttemptKey:attempt-fixture BootID:1edb59fc-5665-4f1e-84f5-3b03b0992119 NamespaceID:invalid ManifestHash:fixture-policy HostPID:617855 StartTicks:856355138} Exit:{Code:-1 Signal:0 ObservedAt:2026-11-03 11:37:18.688079894 +0000 UTC} Verified:true} <nil>
2870FAIL
2871rastrillo-budget/v1 ran 89ms
2872FAIL amadan.net/oficina/equipo/internal/runner/containment 0.090s
2873FAIL
2874```
2875
2876### User-facing strings
2877
2878No UI text, README prose or copy.go entries were added. New internal strings are `namespace_exited` (the private identity result) and `namespace_scratch_cleanup` (the cleanup error prefix, followed by the underlying filesystem error). If mapped into the app later, they need individually pending copy.go entries and review before release. New test diagnostics concern invalidated proof, retained scratch, changed symlink targets, cleanup retry, unreaped init, missing or non-durable inferred proof, and malformed records. No copy-review skill or server was invoked.
2879
2880### Concerns and handback
2881
2882The existing test-helper EINTR failure occurred once and is recorded above; the final covering gates pass. The controller still owns remote CI verification and independent review. No push, merge, deployment, provider prompt, sign-in, enrolment, credential home, agent or subagent was used. No full suite or make ci ran.
2883
2884All test-owned processes and scratch were cleaned up. The mutation evidence directory is removed after transferring its contents into both reports. No server or watcher was started. The branch is ready for controller review.
2885
2886
2887## Task 3: Provider egress without host services
2888
2889Status: DONE.
2890Commit subject: `feat: restrict provider egress outside the host network`.
2891Branch: `plan-2b`. No push, merge or deployment.
2892
2893### What changed
2894
2895Each provider attempt now owns a private Unix CONNECT endpoint and a Go relay inside its private network namespace. The relay binds `127.0.0.1:18080`, dials only `/egress/proxy.sock`, and runs as goroutines in the existing nondumpable PID 1 helper. The helper starts it before the harness and still reaps orphaned children. Production needs no Python or socat.
2896
2897The host endpoint accepts only exact allowed DNS names on port 443. It rejects numeric addresses, aliases, wildcard matches, other methods, framing headers, duplicate headers, conflicting Host values, queued requests and malformed HTTP. Each connection resolves once, rejects the entire answer if any address is nonpublic, and dials the validated numeric address. Loopback, private, LAN, link-local, metadata, Tailscale `100.64.0.0/10`, multicast, documentation and reserved address ranges are denied. IPv6 is restricted to public global unicast and excludes transition and special ranges. TLS bytes pass through unchanged; the local fixture verifies the certificate and completes an HTTPS request through the tunnel.
2898
2899Limits are 8 KiB of request headers, 16 concurrent connections including unfinished headers, a 15-second connect deadline covering resolution and dialing, and 60 seconds of tunnel inactivity. Header intake also has a 15-second deadline. Traffic in either direction renews the idle deadline. The namespace relay has its own 16-connection bound. The host has no TCP proxy listener.
2900
2901The endpoint closes accepted and upstream sockets on cancellation, listener failure and explicit close. The Manager closes it on normal exit, stop and failed startup, and kills the exact init through its existing pidfd when the proxy fails. PID 1 exits if its relay fails. Socket cleanup and proof publication finish before Wait acknowledges exit. The private directory is mode 0700, the socket is mode 0600, and only the pinned socket is mounted read-only. Existing arbitrary socket imports and caller-supplied proxy environment entries remain forbidden.
2902
2903### Interfaces and files
2904
2905- `internal/runner/egress/policy.go`: `Policy{Provider string; Hosts []string}`, exact policy hashing, provider defaults and public-address validation.
2906- `internal/runner/egress/proxy.go`: `Open(context.Context, string, Policy) (*Proxy, error)`, `Proxy.Close() error`, `Proxy.SocketPath() string`, failure notification through `Done()`, strict parsing and bounded tunnels.
2907- `internal/runner/egress/{proxy,budget}_test.go`: owned TLS fixtures, injected resolver and dialer, parser, address, timeout, concurrency, lifecycle and policy tests; repository budget TestMain.
2908- `internal/runner/provider/types.go`: typed `NetworkContract{Provider, AuthHost string}` and `Binding.DedicatedHome`, false by default.
2909- `internal/runner/containment/egress.go`: trusted contract selection, endpoint creation, pinned socket mount, fixed proxy environment and namespace relay.
2910- `internal/runner/containment/egress_test.go`: real namespace host-service controls, endpoint lifetime, mount protection, installed contract, staged-home and failed-startup tests.
2911- `internal/runner/containment/linux.go`: immutable installed contracts, proxy lifecycle and failure handling, relay startup and concurrent child reaping.
2912- `internal/runner/containment/mounts.go`: retained per-attempt proxy ownership alongside the mount plan.
2913- `internal/runner/containment/recovery.go`: additive `Record.EgressHash`, included in the existing durable record and exact-record comparison.
2914- `cmd/equipo-runner/namespace.go`: documents the command wrapper's relay ownership through `containment.NamespaceMain`.
2915- This section in `docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md`; the requested local report under `.superpowers/sdd/2026-11-03-equipo-plan-2b-direct/task-3-report.md`.
2916
2917### Interpretations
2918
29191. The string argument to `egress.Open` is an existing private directory. It creates `proxy.sock` there and refuses to replace an existing socket. Containment creates a separate directory inside each durable attempt directory. Callers must keep paths within Linux's Unix socket path limit; these tests use the short on-disk TMPDIR requested by the controller.
29202. Task 2's reusable helper lives in `containment.NamespaceMain`, with the command wrapper in `cmd/equipo-runner/namespace.go`. The implementation extends that shared helper, keeping tests on the production implementation. The extra containment file keeps the socket import and relay separate from general mount handling.
29213. Provider names follow Task 1: `claude` starts with `api.anthropic.com`; `codex` starts with `chatgpt.com`. `Config.ProviderNetworks` accepts typed installed contracts, copies them at construction and rejects duplicates. No auth host is supplied by default. Only a dedicated, staged home may use an explicit contract auth host. Shared homes exclude it. Task 4 must establish `DedicatedHome` from verified home provenance; Task 11b must certify each actual auth hostname before installing it. Tests use only `refresh.example` and do not create credential homes.
29224. The exact sorted host set and provider are hashed with SHA-256 and saved as `Record.EgressHash`. The caller's existing `ManifestHash` is preserved. Later manifest/preflight work can bind this network hash into its effective-policy evidence; this task does not invent a provider attestation.
29235. Launches with no selected provider retain their disconnected network namespace and receive no proxy. Unknown selected providers fail closed. There is no permission-answer input to the installed network contract, relay address or socket path.
29246. Resolver, dialer and shortened deadline injection are unexported package implementation parameters, used only by local tests. Production `Open` always uses the real public-address validator and fixed limits. The TLS test presents a public DNS answer to that validator, then its private test dialer connects to its owned loopback TLS server. Neither configuration nor model input can select these dependencies.
29257. The shared-network positive controls connect to test-owned loopback TCP and abstract Unix listeners from the test process's host network namespace. The final launch fails both connections. Removing only `--unshare-net` makes both controls reachable from the same launch. No test or mutation contacts a provider or the real Internet.
29268. The task's explicit instructions override generic writing/delegation workflows: no copy-review skill or server, no subagents and no model calls. The report is written directly. `.superpowers/` is already ignored by the repository; the local task report stays there, and the full evidence is committed in the controller report.
2927
2928### RED and GREEN evidence
2929
2930All commands ran from `/home/paulca/amadan.net/oficina/equipo-plan-2b`, with `CGO_ENABLED=0`, the existing on-disk TMPDIR and default Go caches. No full suite, `make ci`, live gate, credential operation or provider prompt ran.
2931
2932Tests were written before implementation. Initial RED:
2933
2934```sh
2935CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1
2936```
2937
2938```text
2939amadan.net/oficina/equipo/internal/runner/egress: no non-test Go files in /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress
2940# amadan.net/oficina/equipo/internal/runner/egress [amadan.net/oficina/equipo/internal/runner/egress.test]
2941internal/runner/egress/proxy_test.go:31:116: undefined: Proxy
2942internal/runner/egress/proxy_test.go:33:7: undefined: defaults
2943internal/runner/egress/proxy_test.go:36:12: undefined: open
2944internal/runner/egress/proxy_test.go:36:49: undefined: Policy
2945internal/runner/egress/proxy_test.go:41:30: undefined: Proxy
2946internal/runner/egress/proxy_test.go:70:5: undefined: defaults
2947internal/runner/egress/proxy_test.go:71:7: undefined: open
2948internal/runner/egress/proxy_test.go:71:44: undefined: Policy
2949internal/runner/egress/proxy_test.go:79:5: undefined: defaults
2950internal/runner/egress/proxy_test.go:89:7: undefined: open
2951internal/runner/egress/proxy_test.go:89:7: too many errors
2952FAIL amadan.net/oficina/equipo/internal/runner/egress [build failed]
2953FAIL amadan.net/oficina/equipo/internal/runner/containment [build failed]
2954FAIL
2955```
2956
2957The first implementation run exposed a fixture setup error: the TLS client had trusted roots but no ServerName. The fixture now supplies `127.0.0.1`, verifies the owned certificate, and retains end-to-end TLS. No production check was weakened.
2958
2959```sh
2960CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1
2961```
2962
2963```text
29642026/11/03 11:49:52 http: TLS handshake error from 127.0.0.1:52548: EOF
2965--- FAIL: TestEgressAllowsOnlyProviderTLS (0.00s)
2966 proxy_test.go:144: tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config
2967FAIL
2968rastrillo-budget/v1 ran 3.198s
2969FAIL amadan.net/oficina/equipo/internal/runner/egress 3.214s
2970ok amadan.net/oficina/equipo/internal/runner/containment 1.315s
2971FAIL
2972```
2973
2974The corrected fixture and initial implementation passed the exact brief command:
2975
2976```sh
2977CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1
2978```
2979
2980```text
2981ok amadan.net/oficina/equipo/internal/runner/egress 3.201s
2982ok amadan.net/oficina/equipo/internal/runner/containment 0.864s
2983```
2984
2985A later failing test showed that setting the dedicated-home flag without a staged home could qualify for refresh. The guard was added after this RED:
2986
2987```sh
2988CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgressActiveTunnelClose|TestEgressPolicyFrozen|TestEgressHeaderTimeout|TestEgressInstalledContract|TestEgressRefreshRequiresStagedHome' -count=1
2989```
2990
2991```text
2992ok amadan.net/oficina/equipo/internal/runner/egress 0.087s
2993--- FAIL: TestEgressRefreshRequiresStagedHome (0.06s)
2994 egress_test.go:220: unstaged home qualified for refresh
2995FAIL
2996rastrillo-budget/v1 ran 68ms
2997FAIL amadan.net/oficina/equipo/internal/runner/containment 0.071s
2998FAIL
2999```
3000
3001GREEN after requiring a staged home and strengthening read-only socket checks:
3002
3003```sh
3004CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1
3005```
3006
3007```text
3008ok amadan.net/oficina/equipo/internal/runner/egress 3.263s
3009ok amadan.net/oficina/equipo/internal/runner/containment 0.550s
3010```
3011
3012Additional lifecycle and parser checks passed before their mutations:
3013
3014```sh
3015CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgressDiesWithAttempt|TestEgressActiveTunnelClose|TestEgressStartupFailureClosesProxy' -count=1
3016```
3017
3018```text
3019ok amadan.net/oficina/equipo/internal/runner/egress 0.004s
3020ok amadan.net/oficina/equipo/internal/runner/containment 0.516s
3021```
3022
3023```sh
3024CGO_ENABLED=0 go test ./internal/runner/egress -run 'TestEgressRejectsSmuggling|TestEgressRejectsHostServices/resolver_error' -count=1
3025```
3026
3027```text
3028ok amadan.net/oficina/equipo/internal/runner/egress 3.005s
3029```
3030
3031Final GREEN after restoring all mutations, including the helper regression checks:
3032
3033```sh
3034CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl|TestNamespaceReapsOrphans|TestNamespaceHelperProtocolPrivate|TestNamespaceHelperBarrier|TestNamespaceExitStatus|TestNamespaceCancellation|TestNamespaceStartupFailure|TestNamespaceSocketImport|TestNamespacePinnedMountSwap|TestNamespaceKillsDetachedChildren|TestNamespaceNestedUserNamespace' -count=1
3035```
3036
3037```text
3038ok amadan.net/oficina/equipo/internal/runner/egress 3.268s
3039ok amadan.net/oficina/equipo/internal/runner/containment 1.236s
3040```
3041
3042```sh
3043CGO_ENABLED=0 go test ./internal/runner/provider ./cmd/equipo-runner -run 'TestDirect|TestToolVerbClosed|TestRunnerServiceVerbs|TestRunnerDiagnosticIsCredentialFree' -count=1
3044```
3045
3046```text
3047ok amadan.net/oficina/equipo/internal/runner/provider 0.007s
3048ok amadan.net/oficina/equipo/cmd/equipo-runner 0.060s
3049```
3050
3051```sh
3052CGO_ENABLED=0 go vet ./internal/runner/egress ./internal/runner/containment ./internal/runner/provider ./cmd/equipo-runner
3053```
3054
3055```text
3056Exit 0, no output.
3057```
3058
3059```sh
3060CGO_ENABLED=0 go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./internal/runner/egress ./internal/runner/containment ./internal/runner/provider ./cmd/equipo-runner
3061```
3062
3063```text
3064Exit 0, no output.
3065```
3066
3067```sh
3068CGO_ENABLED=0 go build -o /home/paulca/t/e2b/t3-evidence/equipo-runner ./cmd/equipo-runner
3069```
3070
3071```text
3072Exit 0, no output.
3073```
3074
3075`git diff --check` and `gofmt -l` on every changed Go file both produced no output. The build artifact was confined to owned on-disk scratch.
3076
3077### Independent guard mutations
3078
3079Each mutation below was applied alone to green production source, compiled, produced the named failing test and was restored in a `finally` block before the next mutation. All 37 exited 1 with a named test failure; none failed to compile. The patch and command identify each mutation. Diff indentation is rendered with spaces for the report. Output excerpts retain failure diagnostics; the network-isolation failure also printed `HOST REACHABLE` for both owned controls.
3080
3081#### 1. network-unsharing
3082
3083```diff
3084--- internal/runner/containment/linux.go
3085+++ internal/runner/containment/linux.go
3086@@ -241,7 +241,7 @@
3087 result <- startResult{err: e}
3088 return
3089 }
3090- args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--unshare-net", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
3091+ args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--unshare-cgroup", "--die-with-parent", "--new-session", "--as-pid-1", "--cap-drop", "ALL", "--json-status-fd", "3"}
3092 args = append(args, mounts.args...)
3093 args = append(args, "--", "/equipo-namespace", "__namespace")
3094 if mounts.proxy != nil {
3095```
3096
3097```sh
3098CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
3099```
3100
3101```text
3102--- FAIL: TestEgressRejectsHostServices (0.17s)
3103FAIL
3104rastrillo-budget/v1 ran 173ms
3105FAIL amadan.net/oficina/equipo/internal/runner/containment 0.192s
3106FAIL
3107```
3108
3109#### 2. exact-host
3110
3111```diff
3112--- internal/runner/egress/proxy.go
3113+++ internal/runner/egress/proxy.go
3114@@ -213,7 +213,7 @@
3115 c.SetDeadline(time.Now().Add(p.deps.connect))
3116 r := bufio.NewReaderSize(c, MaxHeaders+1)
3117 host, e := authority(r)
3118- if e != nil || !p.hosts[host] {
3119+ if e != nil || false {
3120 io.WriteString(c, "HTTP/1.1 403 Forbidden\r\n\r\n")
3121 return
3122 }
3123```
3124
3125```sh
3126CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
3127```
3128
3129```text
3130--- FAIL: TestEgressRejectsHostServices (0.01s)
3131 proxy_test.go:80: denied request reached dialer
3132FAIL
3133rastrillo-budget/v1 ran 13ms
3134FAIL amadan.net/oficina/equipo/internal/runner/egress 0.028s
3135FAIL
3136```
3137
3138#### 3. public-address
3139
3140```diff
3141--- internal/runner/egress/proxy.go
3142+++ internal/runner/egress/proxy.go
3143@@ -226,7 +226,7 @@
3144 }
3145 // Reject the whole answer if any address is unsafe. Never resolve again in Dial.
3146 for _, a := range addresses {
3147- if !publicAddress(a) {
3148+ if false && !publicAddress(a) {
3149 io.WriteString(c, "HTTP/1.1 403 Forbidden\r\n\r\n")
3150 return
3151 }
3152```
3153
3154```sh
3155CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
3156```
3157
3158```text
3159--- FAIL: TestEgressRejectsHostServices (0.01s)
3160 --- FAIL: TestEgressRejectsHostServices/127.0.0.1 (0.00s)
3161 proxy_test.go:88: nonpublic DNS answer reached dialer
3162 --- FAIL: TestEgressRejectsHostServices/10.0.0.1 (0.00s)
3163 proxy_test.go:88: nonpublic DNS answer reached dialer
3164 --- FAIL: TestEgressRejectsHostServices/172.16.0.1 (0.00s)
3165 proxy_test.go:88: nonpublic DNS answer reached dialer
3166 --- FAIL: TestEgressRejectsHostServices/192.168.0.1 (0.00s)
3167 proxy_test.go:88: nonpublic DNS answer reached dialer
3168...
3169FAIL
3170rastrillo-budget/v1 ran 10ms
3171FAIL amadan.net/oficina/equipo/internal/runner/egress 0.019s
3172FAIL
3173```
3174
3175#### 4. validated-dial
3176
3177```diff
3178--- internal/runner/egress/proxy.go
3179+++ internal/runner/egress/proxy.go
3180@@ -231,7 +231,7 @@
3181 return
3182 }
3183 }
3184- upstream, e := p.deps.dial(ctx, "tcp", net.JoinHostPort(addresses[0].Unmap().String(), "443"))
3185+ upstream, e := p.deps.dial(ctx, "tcp", net.JoinHostPort(host, "443"))
3186 if e != nil {
3187 io.WriteString(c, "HTTP/1.1 502 Bad Gateway\r\n\r\n")
3188 return
3189```
3190
3191```sh
3192CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressAllowsOnlyProviderTLS$' -count=1 -timeout=25s
3193```
3194
3195```text
3196--- FAIL: TestEgressAllowsOnlyProviderTLS (0.00s)
3197 proxy_test.go:126: unvalidated dial: tcp fixture.example:443
3198FAIL
3199rastrillo-budget/v1 ran 5ms
3200FAIL amadan.net/oficina/equipo/internal/runner/egress 0.010s
3201FAIL
3202```
3203
3204#### 5. port-443
3205
3206```diff
3207--- internal/runner/egress/proxy.go
3208+++ internal/runner/egress/proxy.go
3209@@ -181,7 +181,7 @@
3210 return "", errPolicy
3211 }
3212 host, port, e := net.SplitHostPort(first[1])
3213- if e != nil || port != "443" || !hostname(host) {
3214+ if e != nil || port == "" || !hostname(host) {
3215 return "", errPolicy
3216 }
3217 seen := map[string]bool{}
3218```
3219
3220```sh
3221CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
3222```
3223
3224```text
3225--- FAIL: TestEgressRejectsHostServices (0.00s)
3226 proxy_test.go:80: denied request reached dialer
3227FAIL
3228rastrillo-budget/v1 ran 2ms
3229FAIL amadan.net/oficina/equipo/internal/runner/egress 0.009s
3230FAIL
3231```
3232
3233#### 6. connect-method
3234
3235```diff
3236--- internal/runner/egress/proxy.go
3237+++ internal/runner/egress/proxy.go
3238@@ -177,7 +177,7 @@
3239 }
3240 lines := strings.Split(string(data), "\r\n")
3241 first := strings.Split(lines[0], " ")
3242- if len(first) != 3 || first[0] != "CONNECT" || (first[2] != "HTTP/1.1" && first[2] != "HTTP/1.0") {
3243+ if len(first) != 3 || false || (first[2] != "HTTP/1.1" && first[2] != "HTTP/1.0") {
3244 return "", errPolicy
3245 }
3246 host, port, e := net.SplitHostPort(first[1])
3247```
3248
3249```sh
3250CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsSmuggling$' -count=1 -timeout=25s
3251```
3252
3253```text
3254--- FAIL: TestEgressRejectsSmuggling (3.00s)
3255 --- FAIL: TestEgressRejectsSmuggling/case037 (0.00s)
3256 proxy_test.go:179: smuggling reached dial: "POST fixture.example:443 HTTP/1.1\r\n\r\n"
3257FAIL
3258rastrillo-budget/v1 ran 3.003s
3259FAIL amadan.net/oficina/equipo/internal/runner/egress 3.009s
3260FAIL
3261```
3262
3263#### 7. http-version
3264
3265```diff
3266--- internal/runner/egress/proxy.go
3267+++ internal/runner/egress/proxy.go
3268@@ -177,7 +177,7 @@
3269 }
3270 lines := strings.Split(string(data), "\r\n")
3271 first := strings.Split(lines[0], " ")
3272- if len(first) != 3 || first[0] != "CONNECT" || (first[2] != "HTTP/1.1" && first[2] != "HTTP/1.0") {
3273+ if len(first) != 3 || first[0] != "CONNECT" || false {
3274 return "", errPolicy
3275 }
3276 host, port, e := net.SplitHostPort(first[1])
3277```
3278
3279```sh
3280CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsSmuggling$' -count=1 -timeout=25s
3281```
3282
3283```text
3284--- FAIL: TestEgressRejectsSmuggling (3.00s)
3285 --- FAIL: TestEgressRejectsSmuggling/case040 (0.00s)
3286 proxy_test.go:179: smuggling reached dial: "CONNECT fixture.example:443 HTTP/2.0\r\n\r\n"
3287FAIL
3288rastrillo-budget/v1 ran 3.002s
3289FAIL amadan.net/oficina/equipo/internal/runner/egress 3.005s
3290FAIL
3291```
3292
3293#### 8. queued-request
3294
3295```diff
3296--- internal/runner/egress/proxy.go
3297+++ internal/runner/egress/proxy.go
3298@@ -172,7 +172,7 @@
3299 break
3300 }
3301 }
3302- if !bytes.HasSuffix(data, []byte("\r\n\r\n")) || r.Buffered() != 0 {
3303+ if !bytes.HasSuffix(data, []byte("\r\n\r\n")) || false {
3304 return "", errPolicy
3305 }
3306 lines := strings.Split(string(data), "\r\n")
3307```
3308
3309```sh
3310CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsSmuggling$' -count=1 -timeout=25s
3311```
3312
3313```text
3314--- FAIL: TestEgressRejectsSmuggling (3.01s)
3315 --- FAIL: TestEgressRejectsSmuggling/case085 (0.00s)
3316 proxy_test.go:179: smuggling reached dial: "CONNECT fixture.example:443 HTTP/1.1\r\nHost: fixture.example:443\r\n\r\nGET / HTTP/1.1\r\n\r\n"
3317FAIL
3318rastrillo-budget/v1 ran 3.006s
3319FAIL amadan.net/oficina/equipo/internal/runner/egress 3.009s
3320FAIL
3321```
3322
3323#### 9. framing-headers
3324
3325```diff
3326--- internal/runner/egress/proxy.go
3327+++ internal/runner/egress/proxy.go
3328@@ -199,7 +199,7 @@
3329 }
3330 case "user-agent", "proxy-connection", "connection":
3331 default:
3332- return "", errPolicy
3333+ continue
3334 }
3335 }
3336 req, e := http.ReadRequest(bufio.NewReader(bytes.NewReader(data)))
3337```
3338
3339```sh
3340CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsSmuggling$' -count=1 -timeout=25s
3341```
3342
3343```text
3344--- FAIL: TestEgressRejectsSmuggling (3.00s)
3345 --- FAIL: TestEgressRejectsSmuggling/case059 (0.00s)
3346 proxy_test.go:179: smuggling reached dial: "CONNECT fixture.example:443 HTTP/1.1\r\nContent-Length: 0\r\n\r\n"
3347 --- FAIL: TestEgressRejectsSmuggling/case168 (0.00s)
3348 proxy_test.go:179: smuggling reached dial: "CONNECT fixture.example:443 HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n"
3349FAIL
3350rastrillo-budget/v1 ran 3.004s
3351FAIL amadan.net/oficina/equipo/internal/runner/egress 3.007s
3352FAIL
3353```
3354
3355#### 10. host-header
3356
3357```diff
3358--- internal/runner/egress/proxy.go
3359+++ internal/runner/egress/proxy.go
3360@@ -194,7 +194,7 @@
3361 seen[key] = true
3362 switch key {
3363 case "host":
3364- if strings.TrimSpace(value) != first[1] {
3365+ if false && strings.TrimSpace(value) != first[1] {
3366 return "", errPolicy
3367 }
3368 case "user-agent", "proxy-connection", "connection":
3369```
3370
3371```sh
3372CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsSmuggling$' -count=1 -timeout=25s
3373```
3374
3375```text
3376--- FAIL: TestEgressRejectsSmuggling (3.00s)
3377 --- FAIL: TestEgressRejectsSmuggling/case065 (0.00s)
3378 proxy_test.go:179: smuggling reached dial: "CONNECT fixture.example:443 HTTP/1.1\r\nHost: other.example:443\r\n\r\n"
3379FAIL
3380rastrillo-budget/v1 ran 3.004s
3381FAIL amadan.net/oficina/equipo/internal/runner/egress 3.008s
3382FAIL
3383```
3384
3385#### 11. header-cap
3386
3387```diff
3388--- internal/runner/egress/proxy.go
3389+++ internal/runner/egress/proxy.go
3390@@ -162,7 +162,7 @@
3391 // destination. Framing headers and queued requests are rejected before dialing.
3392 func authority(r *bufio.Reader) (string, error) {
3393 data := make([]byte, 0, MaxHeaders)
3394- for len(data) < MaxHeaders {
3395+ for len(data) < MaxHeaders*2 {
3396 b, e := r.ReadByte()
3397 if e != nil {
3398 return "", e
3399```
3400
3401```sh
3402CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressLimits/headers$' -count=1 -timeout=25s
3403```
3404
3405```text
3406--- FAIL: TestEgressLimits (0.00s)
3407 --- FAIL: TestEgressLimits/headers (0.00s)
3408 proxy_test.go:231: oversized headers dialled
3409FAIL
3410rastrillo-budget/v1 ran 1ms
3411FAIL amadan.net/oficina/equipo/internal/runner/egress 0.005s
3412FAIL
3413```
3414
3415#### 12. socket-cap
3416
3417```diff
3418--- internal/runner/egress/proxy.go
3419+++ internal/runner/egress/proxy.go
3420@@ -142,7 +142,7 @@
3421 return
3422 }
3423 p.mu.Lock()
3424- if p.closed || len(p.clients) >= MaxTunnels {
3425+ if p.closed || false {
3426 p.mu.Unlock()
3427 c.Close()
3428 continue
3429```
3430
3431```sh
3432CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressLimits/concurrent$' -count=1 -timeout=25s
3433```
3434
3435```text
3436--- FAIL: TestEgressLimits (1.01s)
3437 --- FAIL: TestEgressLimits/concurrent (1.00s)
3438 proxy_test.go:267: extra socket remained open
3439FAIL
3440rastrillo-budget/v1 ran 1.005s
3441FAIL amadan.net/oficina/equipo/internal/runner/egress 1.010s
3442FAIL
3443```
3444
3445#### 13. connect-timeout
3446
3447```diff
3448--- internal/runner/egress/proxy.go
3449+++ internal/runner/egress/proxy.go
3450@@ -217,7 +217,7 @@
3451 io.WriteString(c, "HTTP/1.1 403 Forbidden\r\n\r\n")
3452 return
3453 }
3454- ctx, cancel := context.WithTimeout(p.ctx, p.deps.connect)
3455+ ctx, cancel := context.WithCancel(p.ctx)
3456 defer cancel()
3457 addresses, e := p.deps.lookup(ctx, host)
3458 if e != nil || len(addresses) == 0 {
3459```
3460
3461```sh
3462CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressLimits/connect$' -count=1 -timeout=25s
3463```
3464
3465```text
3466--- FAIL: TestEgressLimits (3.00s)
3467 --- FAIL: TestEgressLimits/connect (3.00s)
3468 proxy_test.go:315: connect timeout missing
3469FAIL
3470rastrillo-budget/v1 ran 3.001s
3471FAIL amadan.net/oficina/equipo/internal/runner/egress 3.011s
3472FAIL
3473```
3474
3475#### 14. header-timeout
3476
3477```diff
3478--- internal/runner/egress/proxy.go
3479+++ internal/runner/egress/proxy.go
3480@@ -210,7 +210,7 @@
3481 return host, nil
3482 }
3483 func (p *Proxy) handle(c net.Conn) {
3484- c.SetDeadline(time.Now().Add(p.deps.connect))
3485+ c.SetDeadline(time.Time{})
3486 r := bufio.NewReaderSize(c, MaxHeaders+1)
3487 host, e := authority(r)
3488 if e != nil || !p.hosts[host] {
3489```
3490
3491```sh
3492CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressHeaderTimeout$' -count=1 -timeout=25s
3493```
3494
3495```text
3496--- FAIL: TestEgressHeaderTimeout (1.00s)
3497 proxy_test.go:469: incomplete header kept socket open
3498FAIL
3499rastrillo-budget/v1 ran 1.001s
3500FAIL amadan.net/oficina/equipo/internal/runner/egress 1.006s
3501FAIL
3502```
3503
3504#### 15. idle-timeout
3505
3506```diff
3507--- internal/runner/egress/proxy.go
3508+++ internal/runner/egress/proxy.go
3509@@ -254,7 +254,7 @@
3510 // Tunnel copies opaque TLS bytes. Traffic in either direction renews the idle
3511 // deadline for both sockets; closing either side releases both copying goroutines.
3512 func Tunnel(a, b net.Conn, idle time.Duration) {
3513- touch := func() { deadline := time.Now().Add(idle); a.SetDeadline(deadline); b.SetDeadline(deadline) }
3514+ touch := func() { deadline := time.Now().Add(time.Hour); a.SetDeadline(deadline); b.SetDeadline(deadline) }
3515 touch()
3516 copyTo := func(dst, src net.Conn) {
3517 buffer := make([]byte, 32*1024)
3518```
3519
3520```sh
3521CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressLimits/idle$' -count=1 -timeout=25s
3522```
3523
3524```text
3525--- FAIL: TestEgressLimits (1.00s)
3526 --- FAIL: TestEgressLimits/idle (1.00s)
3527 proxy_test.go:297: idle tunnel not closed
3528FAIL
3529rastrillo-budget/v1 ran 1.001s
3530FAIL amadan.net/oficina/equipo/internal/runner/egress 1.008s
3531FAIL
3532```
3533
3534#### 16. private-directory
3535
3536```diff
3537--- internal/runner/egress/proxy.go
3538+++ internal/runner/egress/proxy.go
3539@@ -83,7 +83,7 @@
3540 if e = unix.Fstat(fd, &st); e != nil {
3541 return nil, e
3542 }
3543- if st.Mode&0777 != 0700 || st.Uid != uint32(os.Geteuid()) {
3544+ if false || st.Uid != uint32(os.Geteuid()) {
3545 return nil, errPolicy
3546 }
3547 path := filepath.Join(dir, "proxy.sock")
3548```
3549
3550```sh
3551CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPrivateSocket$' -count=1 -timeout=25s
3552```
3553
3554```text
3555--- FAIL: TestEgressPrivateSocket (0.00s)
3556 proxy_test.go:371: nonprivate directory accepted
3557FAIL
3558rastrillo-budget/v1 ran 1ms
3559FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
3560FAIL
3561```
3562
3563#### 17. symlink-directory
3564
3565```diff
3566--- internal/runner/egress/proxy.go
3567+++ internal/runner/egress/proxy.go
3568@@ -74,7 +74,7 @@
3569 if !filepath.IsAbs(dir) || filepath.Clean(dir) != dir {
3570 return nil, errPolicy
3571 }
3572- fd, e := unix.Openat2(unix.AT_FDCWD, dir, &unix.OpenHow{Flags: unix.O_PATH | unix.O_DIRECTORY | unix.O_CLOEXEC, Resolve: unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_NO_MAGICLINKS})
3573+ fd, e := unix.Openat2(unix.AT_FDCWD, dir, &unix.OpenHow{Flags: unix.O_PATH | unix.O_DIRECTORY | unix.O_CLOEXEC, Resolve: 0})
3574 if e != nil {
3575 return nil, e
3576 }
3577```
3578
3579```sh
3580CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPrivateSocket$' -count=1 -timeout=25s
3581```
3582
3583```text
3584--- FAIL: TestEgressPrivateSocket (0.00s)
3585 proxy_test.go:377: symlink directory accepted
3586FAIL
3587rastrillo-budget/v1 ran 1ms
3588FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
3589FAIL
3590```
3591
3592#### 18. private-socket
3593
3594```diff
3595--- internal/runner/egress/proxy.go
3596+++ internal/runner/egress/proxy.go
3597@@ -91,7 +91,7 @@
3598 if e != nil {
3599 return nil, e
3600 }
3601- if e = os.Chmod(path, 0600); e != nil {
3602+ if e = os.Chmod(path, 0666); e != nil {
3603 ln.Close()
3604 return nil, e
3605 }
3606```
3607
3608```sh
3609CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPrivateSocket$' -count=1 -timeout=25s
3610```
3611
3612```text
3613--- FAIL: TestEgressPrivateSocket (0.00s)
3614 proxy_test.go:362: socket mode: &{proxy.sock 0 16777654 {200480172 63929303677 0xb493a0} {66306 45383338 1 49590 1001 1001 0 0 0 4096 0 {1793706877 200480172} {1793706877 200480172} {1793706877 200480172} [0 0 0]}} <nil>
3615FAIL
3616rastrillo-budget/v1 ran 1ms
3617FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
3618FAIL
3619```
3620
3621#### 19. dedicated-refresh
3622
3623```diff
3624--- internal/runner/egress/policy.go
3625+++ internal/runner/egress/policy.go
3626@@ -36,7 +36,7 @@
3627 if !hostname(c.AuthHost) {
3628 return Policy{}, errPolicy
3629 }
3630- if dedicated && c.AuthHost != p.Hosts[0] {
3631+ if c.AuthHost != p.Hosts[0] {
3632 p.Hosts = append(p.Hosts, c.AuthHost)
3633 }
3634 }
3635```
3636
3637```sh
3638CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPolicy$' -count=1 -timeout=25s
3639```
3640
3641```text
3642--- FAIL: TestEgressPolicy (0.00s)
3643 proxy_test.go:332: shared home got refresh
3644FAIL
3645rastrillo-budget/v1 ran 0s
3646FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
3647FAIL
3648```
3649
3650#### 20. policy-provider-hash
3651
3652```diff
3653--- internal/runner/egress/policy.go
3654+++ internal/runner/egress/policy.go
3655@@ -75,7 +75,7 @@
3656 return "", errPolicy
3657 }
3658 }
3659- b, _ := json.Marshal(Policy{Provider: p.Provider, Hosts: hosts})
3660+ b, _ := json.Marshal(Policy{Hosts: hosts})
3661 hash := sha256.Sum256(b)
3662 return hex.EncodeToString(hash[:]), nil
3663 }
3664```
3665
3666```sh
3667CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPolicy$' -count=1 -timeout=25s
3668```
3669
3670```text
3671--- FAIL: TestEgressPolicy (0.00s)
3672 proxy_test.go:349: policy hash does not bind exact host set and provider
3673FAIL
3674rastrillo-budget/v1 ran 0s
3675FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
3676FAIL
3677```
3678
3679#### 21. policy-host-hash
3680
3681```diff
3682--- internal/runner/egress/policy.go
3683+++ internal/runner/egress/policy.go
3684@@ -75,7 +75,7 @@
3685 return "", errPolicy
3686 }
3687 }
3688- b, _ := json.Marshal(Policy{Provider: p.Provider, Hosts: hosts})
3689+ b, _ := json.Marshal(Policy{Provider: p.Provider})
3690 hash := sha256.Sum256(b)
3691 return hex.EncodeToString(hash[:]), nil
3692 }
3693```
3694
3695```sh
3696CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPolicy$' -count=1 -timeout=25s
3697```
3698
3699```text
3700--- FAIL: TestEgressPolicy (0.00s)
3701 proxy_test.go:349: policy hash does not bind exact host set and provider
3702FAIL
3703rastrillo-budget/v1 ran 0s
3704FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
3705FAIL
3706```
3707
3708#### 22. policy-duplicates
3709
3710```diff
3711--- internal/runner/egress/policy.go
3712+++ internal/runner/egress/policy.go
3713@@ -71,7 +71,7 @@
3714 hosts := append([]string(nil), p.Hosts...)
3715 sort.Strings(hosts)
3716 for i, h := range hosts {
3717- if !hostname(h) || (i > 0 && h == hosts[i-1]) {
3718+ if !hostname(h) || (false && i > 0 && h == hosts[i-1]) {
3719 return "", errPolicy
3720 }
3721 }
3722```
3723
3724```sh
3725CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressPolicy$' -count=1 -timeout=25s
3726```
3727
3728```text
3729--- FAIL: TestEgressPolicy (0.00s)
3730 proxy_test.go:341: invalid policy accepted: {Provider:claude Hosts:[fixture.example fixture.example]}
3731FAIL
3732rastrillo-budget/v1 ran 0s
3733FAIL amadan.net/oficina/equipo/internal/runner/egress 0.002s
3734FAIL
3735```
3736
3737#### 23. contract-duplicates
3738
3739```diff
3740--- internal/runner/containment/linux.go
3741+++ internal/runner/containment/linux.go
3742@@ -96,7 +96,7 @@
3743 }
3744 seen := map[string]bool{}
3745 for _, c := range cfg.ProviderNetworks {
3746- if seen[c.Provider] {
3747+ if false && seen[c.Provider] {
3748 return nil, errStartup
3749 }
3750 if _, e := egress.ProviderPolicy(c, true); e != nil {
3751```
3752
3753```sh
3754CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressInstalledContract$' -count=1 -timeout=25s
3755```
3756
3757```text
3758--- FAIL: TestEgressInstalledContract (0.01s)
3759 egress_test.go:204: invalid installed contracts accepted: [{Provider:claude AuthHost:} {Provider:claude AuthHost:refresh.example}]
3760FAIL
3761rastrillo-budget/v1 ran 6ms
3762FAIL amadan.net/oficina/equipo/internal/runner/containment 0.010s
3763FAIL
3764```
3765
3766#### 24. contract-freeze
3767
3768```diff
3769--- internal/runner/containment/linux.go
3770+++ internal/runner/containment/linux.go
3771@@ -104,7 +104,7 @@
3772 }
3773 seen[c.Provider] = true
3774 }
3775- cfg.ProviderNetworks = append([]provider.NetworkContract(nil), cfg.ProviderNetworks...)
3776+ cfg.ProviderNetworks = cfg.ProviderNetworks
3777 return &Manager{cfg: cfg, processes: make(map[string]*process)}, nil
3778 }
3779 func (m *Manager) Start(ctx context.Context, l provider.Launch, argv []string) (provider.Process, error) {
3780```
3781
3782```sh
3783CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressInstalledContract$' -count=1 -timeout=25s
3784```
3785
3786```text
3787--- FAIL: TestEgressInstalledContract (0.01s)
3788 egress_test.go:216: installed contract changed after New
3789FAIL
3790rastrillo-budget/v1 ran 8ms
3791FAIL amadan.net/oficina/equipo/internal/runner/containment 0.011s
3792FAIL
3793```
3794
3795#### 25. staged-home
3796
3797```diff
3798--- internal/runner/containment/egress.go
3799+++ internal/runner/containment/egress.go
3800@@ -17,7 +17,7 @@
3801 if l.Selection.Provider == "" {
3802 return "", nil
3803 }
3804- if l.Binding.DedicatedHome && l.Binding.Home == "" {
3805+ if false && l.Binding.DedicatedHome && l.Binding.Home == "" {
3806 return "", errMount
3807 }
3808 contract := provider.NetworkContract{Provider: l.Selection.Provider}
3809```
3810
3811```sh
3812CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRefreshRequiresStagedHome$' -count=1 -timeout=25s
3813```
3814
3815```text
3816--- FAIL: TestEgressRefreshRequiresStagedHome (0.10s)
3817 egress_test.go:225: unstaged home qualified for refresh
3818FAIL
3819rastrillo-budget/v1 ran 102ms
3820FAIL amadan.net/oficina/equipo/internal/runner/containment 0.106s
3821FAIL
3822```
3823
3824#### 26. socket-readonly
3825
3826```diff
3827--- internal/runner/containment/egress.go
3828+++ internal/runner/containment/egress.go
3829@@ -59,7 +59,7 @@
3830 }
3831 // This is the sole socket import. The parent directory and other host sockets
3832 // remain absent; the retained O_PATH descriptor pins this exact endpoint.
3833- p.args = append(p.args, "--ro-bind-fd", strconv.Itoa(6+len(p.files)), egress.NamespaceSocket)
3834+ p.args = append(p.args, "--bind-fd", strconv.Itoa(6+len(p.files)), egress.NamespaceSocket)
3835 p.files = append(p.files, f)
3836 for _, key := range []string{"HTTPS_PROXY", "HTTP_PROXY", "https_proxy", "http_proxy"} {
3837 p.args = append(p.args, "--setenv", key, egress.ProxyURL)
3838```
3839
3840```sh
3841CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
3842```
3843
3844```text
3845--- FAIL: TestEgressRejectsHostServices (0.14s)
3846FAIL
3847rastrillo-budget/v1 ran 138ms
3848FAIL amadan.net/oficina/equipo/internal/runner/containment 0.142s
3849FAIL
3850```
3851
3852#### 27. durable-host-hash
3853
3854```diff
3855--- internal/runner/containment/linux.go
3856+++ internal/runner/containment/linux.go
3857@@ -140,6 +140,7 @@
3858 return nil, e
3859 }
3860 egressHash, e := m.openEgress(ctx, l, dir, mounts)
3861+ _ = egressHash
3862 if e != nil {
3863 mounts.close()
3864 return nil, e
3865@@ -155,7 +156,7 @@
3866 mounts.close()
3867 return nil, e
3868 }
3869- r := Record{ID: id, AttemptKey: l.AttemptKey, BootID: boot, ManifestHash: l.Policy.Hash, EgressHash: egressHash}
3870+ r := Record{ID: id, AttemptKey: l.AttemptKey, BootID: boot, ManifestHash: l.Policy.Hash, EgressHash: ""}
3871 if e = m.persist(r); e != nil {
3872 mounts.close()
3873 return nil, e
3874```
3875
3876```sh
3877CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressMountPolicy$' -count=1 -timeout=25s
3878```
3879
3880```text
3881--- FAIL: TestEgressMountPolicy (0.11s)
3882 egress_test.go:190: missing exact host-policy hash: "" want "394fd26429f90b51179904566a234b2ab48d63341e623f85f1a80c6d0d9220c5"
3883FAIL
3884rastrillo-budget/v1 ran 110ms
3885FAIL amadan.net/oficina/equipo/internal/runner/containment 0.114s
3886FAIL
3887```
3888
3889#### 28. proxy-failure-stops
3890
3891```diff
3892--- internal/runner/containment/linux.go
3893+++ internal/runner/containment/linux.go
3894@@ -360,7 +360,7 @@
3895 case <-ctx.Done():
3896 p.kill()
3897 case <-proxyDone:
3898- p.kill()
3899+ // mutation: no stop
3900 case <-lifecycleDone:
3901 }
3902 }()
3903```
3904
3905```sh
3906CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressDiesWithAttempt/proxy_failure$' -count=1 -timeout=25s
3907```
3908
3909```text
3910--- FAIL: TestEgressDiesWithAttempt (3.14s)
3911 --- FAIL: TestEgressDiesWithAttempt/proxy_failure (3.14s)
3912 egress_test.go:142: context deadline exceeded
3913FAIL
3914rastrillo-budget/v1 ran 3.137s
3915FAIL amadan.net/oficina/equipo/internal/runner/containment 3.146s
3916FAIL
3917```
3918
3919#### 29. close-on-stop
3920
3921```diff
3922--- internal/runner/containment/linux.go
3923+++ internal/runner/containment/linux.go
3924@@ -196,7 +196,7 @@
3925 }()
3926 defer mounts.close()
3927 if mounts.proxy != nil {
3928- defer mounts.proxy.Close()
3929+ // mutation: no deferred proxy close
3930 }
3931 var files []*os.File
3932 pipe := func() (*os.File, *os.File, error) {
3933@@ -397,7 +397,7 @@
3934 }
3935 }
3936 if p.egress != nil {
3937- p.egress.Close()
3938+ // mutation: no proxy close on stop
3939 }
3940 var cleanupErr error
3941 p.proof, cleanupErr = m.finishRecovery(p.proof)
3942```
3943
3944```sh
3945CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressDiesWithAttempt/stop$' -count=1 -timeout=25s
3946```
3947
3948```text
3949--- FAIL: TestEgressDiesWithAttempt (0.16s)
3950 --- FAIL: TestEgressDiesWithAttempt/stop (0.16s)
3951 egress_test.go:151: proxy outlived attempt
3952FAIL
3953rastrillo-budget/v1 ran 164ms
3954FAIL amadan.net/oficina/equipo/internal/runner/containment 0.170s
3955FAIL
3956```
3957
3958#### 30. duplicate-header
3959
3960```diff
3961--- internal/runner/egress/proxy.go
3962+++ internal/runner/egress/proxy.go
3963@@ -188,7 +188,7 @@
3964 for _, line := range lines[1 : len(lines)-2] {
3965 key, value, ok := strings.Cut(line, ":")
3966 key = strings.ToLower(key)
3967- if !ok || seen[key] {
3968+ if !ok || false {
3969 return "", errPolicy
3970 }
3971 seen[key] = true
3972```
3973
3974```sh
3975CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsSmuggling$' -count=1 -timeout=25s
3976```
3977
3978```text
3979--- FAIL: TestEgressRejectsSmuggling (3.00s)
3980 --- FAIL: TestEgressRejectsSmuggling/case070 (0.00s)
3981 proxy_test.go:182: smuggling reached dial: "CONNECT fixture.example:443 HTTP/1.1\r\nUser-Agent: a\r\nUser-Agent: b\r\n\r\n"
3982FAIL
3983rastrillo-budget/v1 ran 3.002s
3984FAIL amadan.net/oficina/equipo/internal/runner/egress 3.004s
3985FAIL
3986```
3987
3988#### 31. resolver-error
3989
3990```diff
3991--- internal/runner/egress/proxy.go
3992+++ internal/runner/egress/proxy.go
3993@@ -220,7 +220,7 @@
3994 ctx, cancel := context.WithTimeout(p.ctx, p.deps.connect)
3995 defer cancel()
3996 addresses, e := p.deps.lookup(ctx, host)
3997- if e != nil || len(addresses) == 0 {
3998+ if false || len(addresses) == 0 {
3999 io.WriteString(c, "HTTP/1.1 502 Bad Gateway\r\n\r\n")
4000 return
4001 }
4002```
4003
4004```sh
4005CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressRejectsHostServices/resolver_error$' -count=1 -timeout=25s
4006```
4007
4008```text
4009--- FAIL: TestEgressRejectsHostServices (0.00s)
4010 --- FAIL: TestEgressRejectsHostServices/resolver_error (0.00s)
4011 proxy_test.go:106: DNS error dialled
4012FAIL
4013rastrillo-budget/v1 ran 1ms
4014FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
4015FAIL
4016```
4017
4018#### 32. context-closes
4019
4020```diff
4021--- internal/runner/egress/proxy.go
4022+++ internal/runner/egress/proxy.go
4023@@ -105,7 +105,7 @@
4024 go func() {
4025 select {
4026 case <-ctx.Done():
4027- p.shutdown()
4028+ // mutation: ignore cancellation
4029 case <-p.done:
4030 }
4031 }()
4032```
4033
4034```sh
4035CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressDiesWithAttempt$' -count=1 -timeout=25s
4036```
4037
4038```text
4039--- FAIL: TestEgressDiesWithAttempt (1.00s)
4040 proxy_test.go:220: proxy outlived context
4041FAIL
4042rastrillo-budget/v1 ran 1.001s
4043FAIL amadan.net/oficina/equipo/internal/runner/egress 1.003s
4044FAIL
4045```
4046
4047#### 33. listener-failure
4048
4049```diff
4050--- internal/runner/egress/proxy.go
4051+++ internal/runner/egress/proxy.go
4052@@ -135,7 +135,7 @@
4053 func (p *Proxy) active() int { p.mu.Lock(); defer p.mu.Unlock(); return len(p.clients) }
4054 func (p *Proxy) serve() {
4055 defer p.wg.Done()
4056- defer p.shutdown()
4057+ // mutation: no shutdown on listener failure
4058 for {
4059 c, e := p.listener.Accept()
4060 if e != nil {
4061```
4062
4063```sh
4064CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressActiveTunnelClose/listener_failure$' -count=1 -timeout=25s
4065```
4066
4067```text
4068--- FAIL: TestEgressActiveTunnelClose (1.00s)
4069 --- FAIL: TestEgressActiveTunnelClose/listener_failure (1.00s)
4070 proxy_test.go:432: proxy failure not reported
4071FAIL
4072rastrillo-budget/v1 ran 1.001s
4073FAIL amadan.net/oficina/equipo/internal/runner/egress 1.003s
4074FAIL
4075```
4076
4077#### 34. active-socket-close
4078
4079```diff
4080--- internal/runner/egress/proxy.go
4081+++ internal/runner/egress/proxy.go
4082@@ -121,12 +121,7 @@
4083 p.closed = true
4084 p.cancel()
4085 p.listener.Close()
4086- for c := range p.clients {
4087- c.Close()
4088- }
4089- for c := range p.upstreams {
4090- c.Close()
4091- }
4092+ // mutation: retain active sockets
4093 p.mu.Unlock()
4094 close(p.done)
4095 })
4096```
4097
4098```sh
4099CGO_ENABLED=0 go test ./internal/runner/egress -run '^TestEgressActiveTunnelClose/close$' -count=1 -timeout=25s
4100```
4101
4102```text
4103--- FAIL: TestEgressActiveTunnelClose (1.00s)
4104 --- FAIL: TestEgressActiveTunnelClose/close (1.00s)
4105 proxy_test.go:423: proxy close did not interrupt sockets
4106FAIL
4107rastrillo-budget/v1 ran 1.001s
4108FAIL amadan.net/oficina/equipo/internal/runner/egress 1.003s
4109FAIL
4110```
4111
4112#### 35. startup-proxy-close
4113
4114```diff
4115--- internal/runner/containment/linux.go
4116+++ internal/runner/containment/linux.go
4117@@ -196,7 +196,7 @@
4118 }()
4119 defer mounts.close()
4120 if mounts.proxy != nil {
4121- defer mounts.proxy.Close()
4122+ // mutation: no close on failed startup
4123 }
4124 var files []*os.File
4125 pipe := func() (*os.File, *os.File, error) {
4126```
4127
4128```sh
4129CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressStartupFailureClosesProxy$' -count=1 -timeout=25s
4130```
4131
4132```text
4133--- FAIL: TestEgressStartupFailureClosesProxy (0.03s)
4134 egress_test.go:252: startup failure leaked sockets: before=0 after=1
4135FAIL
4136rastrillo-budget/v1 ran 28ms
4137FAIL amadan.net/oficina/equipo/internal/runner/containment 0.030s
4138FAIL
4139```
4140
4141#### 36. fixed-unix-endpoint
4142
4143```diff
4144--- internal/runner/containment/egress.go
4145+++ internal/runner/containment/egress.go
4146@@ -128,7 +128,7 @@
4147 go func() {
4148 defer r.wg.Done()
4149 defer func() { <-slots; r.remove(c) }()
4150- upstream, e := net.DialTimeout("unix", egress.NamespaceSocket, egress.ConnectTimeout)
4151+ upstream, e := net.DialTimeout("unix", "/egress/other.sock", egress.ConnectTimeout)
4152 if e != nil {
4153 r.shutdown()
4154 return
4155```
4156
4157```sh
4158CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
4159```
4160
4161```text
4162--- FAIL: TestEgressRejectsHostServices (0.10s)
4163 egress_test.go:91: isolation/relay: "blocked\nblocked\n" exit={Code:-1 Signal:0 ObservedAt:2026-11-03 11:59:00.793600523 +0000 UTC} err=<nil> stderr=
4164FAIL
4165rastrillo-budget/v1 ran 98ms
4166FAIL amadan.net/oficina/equipo/internal/runner/containment 0.100s
4167FAIL
4168```
4169
4170#### 37. fixed-loopback
4171
4172```diff
4173--- internal/runner/containment/egress.go
4174+++ internal/runner/containment/egress.go
4175@@ -82,7 +82,7 @@
4176 }
4177
4178 func startRelay() (*namespaceRelay, error) {
4179- ln, e := net.Listen("tcp4", egress.RelayAddress)
4180+ ln, e := net.Listen("tcp4", "127.0.0.2:18080")
4181 if e != nil {
4182 return nil, e
4183 }
4184```
4185
4186```sh
4187CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s
4188```
4189
4190```text
4191--- FAIL: TestEgressRejectsHostServices (0.10s)
4192 egress_test.go:91: isolation/relay: "blocked\nblocked\n" exit={Code:1 Signal:0 ObservedAt:2026-11-03 11:59:01.262723234 +0000 UTC} err=<nil> stderr=Traceback (most recent call last):
4193 File "<string>", line 10, in <module>
4194 s=socket.create_connection(('127.0.0.1',18080),1)
4195 File "/usr/lib/python3.13/socket.py", line 864, in create_connection
4196 raise exceptions[0]
4197 File "/usr/lib/python3.13/socket.py", line 849, in create_connection
4198 sock.connect(sa)
4199 ~~~~~~~~~~~~^^^^
4200...
4201FAIL
4202rastrillo-budget/v1 ran 97ms
4203FAIL amadan.net/oficina/equipo/internal/runner/containment 0.099s
4204FAIL
4205```
4206
4207### User-facing strings
4208
4209No UI text, README prose or `copy.go` entries were added. The new internal diagnostic is `egress_policy_rejected`. If the application later displays this condition, it needs an individually pending `copy.go` entry and a copy pass before release. The proxy emits standard protocol status lines: `HTTP/1.1 200 Connection Established`, `HTTP/1.1 403 Forbidden` and `HTTP/1.1 502 Bad Gateway`. Test assertion messages and code comments are developer-facing. No copy-review skill or server was invoked.
4210
4211### Concerns and handback
4212
4213No known failing implementation gate remains. Real provider compatibility, refresh hostnames and complete deployed-policy certification remain Task 11b release work; this run claims local fixture and namespace evidence only. The actual auth-host fields remain empty by default. The strict CONNECT parser permits only Host, User-Agent, Proxy-Connection and Connection headers; Task 11b should verify the pinned provider transports against that grammar without relaxing framing or destination checks. Full CI and controller review remain outside this task's requested gate list.
4214
4215All fixture listeners and processes finished or were stopped. Scratch created for test evidence and the runner build is removed after copying it into both reports. No server, watcher, provider session, credential home or background command is left running. No other worktree was touched. The controller owns review and push.
4216
4217
4218## Task 3 fix round 1: Bind the socket through its verified directory
4219
4220Status: DONE. Base: `e06320a` on `plan-2b`.
4221Commit subject: `fix: bind the egress socket through its verified directory`.
4222
4223### What changed
4224
4225`egress.Open` now binds `/proc/self/fd/<fd>/proxy.sock` using the directory descriptor already checked by `openat2` and `fstat`. Socket address length no longer depends on ScratchRoot. The real Linux launch test confirms that this machine resolves the descriptor path during bind.
4226
4227The proxy uses the same descriptor path for chmod and retains the directory until the listener closes and unlinks the socket. Failed construction closes the descriptor too. This also fixes cleanup after a directory rename: the proxy removes its original socket and leaves a replacement directory untouched.
4228
4229`SocketPath()` still returns the real filesystem path. Containment continues to open that path with its existing symlink-rejecting `pin()` function and passes the retained socket descriptor to bubblewrap with `--ro-bind-fd`. No containment production code or mount rules changed.
4230
4231Files changed:
4232
4233- `internal/runner/egress/proxy.go`: descriptor-relative bind, chmod and cleanup lifetime.
4234- `internal/runner/egress/proxy_test.go`: `TestEgressSocketDirectoryPinned` renames the socket directory, installs a replacement file, and verifies cleanup affects only the original directory.
4235- `internal/runner/containment/egress_test.go`: `TestEgressLongScratchRoot` creates a deep subdirectory under the existing on-disk TMPDIR, asserts a root of at least 70 bytes, starts a full namespace launch, exchanges a CONNECT request and policy-denial response through the relay, checks the real socket path and mode, and verifies cleanup after exit.
4236- `docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md`: this appended section.
4237- `.superpowers/sdd/2026-11-03-equipo-plan-2b-direct/task-3-report.md`: the same appended evidence, retained locally under the repository's existing ignore rule.
4238
4239### Interpretations
4240
4241This fix supersedes original-report interpretation 1, which required callers to keep Unix socket paths short. Descriptor-relative bind works on this machine, so no constructor length rejection or new error string is needed.
4242
4243The full launch uses an owned Python fixture inside the production namespace helper. Its request to `localhost:443` receives the exact `403 Forbidden` response from the host proxy through the namespace relay. It does not resolve, connect to or prompt a provider. The existing TLS fixture and destination-policy tests also pass in the covering command.
4244
4245The task's explicit rules override generic writing and handoff workflows: no copy-review skill/server, delegation, model call or `.claude/HANDOFF.md`. All commands ran in the specified worktree, with default Go caches and `CGO_ENABLED=0` for Go checks. Absolute package paths below select the same packages as the requested covering commands.
4246
4247### RED before implementation
4248
4249Both regression tests were written before changing production code. This command exited 1 with compiled test failures:
4250
4251```sh
4252CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment -run 'TestEgressLongScratchRoot|TestEgressSocketDirectoryPinned' -count=1
4253```
4254
4255```text
4256--- FAIL: TestEgressSocketDirectoryPinned (0.00s)
4257 proxy_test.go:425: socket survived close in verified directory: <nil>
4258 proxy_test.go:428: close touched replacement directory: "" open /home/paulca/t/e2b/e3-1942956935/private/proxy.sock: no such file or directory
4259FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
4260--- FAIL: TestEgressLongScratchRoot (0.00s)
4261 egress_test.go:109: namespace capability/start failed (userns, pidfd required): listen unix /home/paulca/t/e2b/e3-1724877323/s/deepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeep/state/attempt-e4c7c01b4fa5d537e515509ec81955cc/egress/proxy.sock: bind: invalid argument
4262FAIL amadan.net/oficina/equipo/internal/runner/containment 0.004s
4263```
4264
4265### GREEN before mutations
4266
4267The same focused command then exited 0:
4268
4269```text
4270ok amadan.net/oficina/equipo/internal/runner/egress 0.002s
4271ok amadan.net/oficina/equipo/internal/runner/containment 0.060s
4272```
4273
4274The covering command and namespace gate also passed before mutations:
4275
4276```sh
4277CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1
4278make -C /home/paulca/amadan.net/oficina/equipo-plan-2b runner-namespace-test
4279```
4280
4281```text
4282ok amadan.net/oficina/equipo/internal/runner/egress 3.269s
4283ok amadan.net/oficina/equipo/internal/runner/containment 0.456s
4284CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
4285ok amadan.net/oficina/equipo/internal/runner/containment 3.205s
4286```
4287
4288### Independent mutations
4289
4290Each mutation ran alone against the green source and was restored in a Python `finally` block before the next one. All three compiled and exited 1 with the named test failure.
4291
42921. Replace `net.Listen("unix", bindPath)` with `net.Listen("unix", path)`.
4293
4294```sh
4295CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment -run '^TestEgressLongScratchRoot$' -count=1
4296```
4297
4298```text
4299--- FAIL: TestEgressLongScratchRoot (0.00s)
4300 egress_test.go:109: namespace capability/start failed (userns, pidfd required): listen unix /home/paulca/t/e2b/e3-522231684/s/deepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeepdeep/state/attempt-92cfe44ad327dd4bee20cdab87708242/egress/proxy.sock: bind: invalid argument
4301FAIL amadan.net/oficina/equipo/internal/runner/containment 0.004s
4302```
4303
43042. Insert `directory.Close()` immediately before `directory = nil` in `open`, ending the retained descriptor's lifetime before listener cleanup.
4305
4306```sh
4307CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress -run '^TestEgressSocketDirectoryPinned$' -count=1
4308```
4309
4310```text
4311--- FAIL: TestEgressSocketDirectoryPinned (0.00s)
4312 proxy_test.go:425: socket survived close in verified directory: <nil>
4313FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s
4314```
4315
43163. Change `SocketPath()` to return `p.listener.Addr().String()`, exposing the proc alias to containment instead of the real path. The existing mount pin rejects that magic link.
4317
4318```sh
4319CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment -run '^TestEgressLongScratchRoot$' -count=1
4320```
4321
4322```text
4323--- FAIL: TestEgressLongScratchRoot (0.00s)
4324 egress_test.go:109: namespace capability/start failed (userns, pidfd required): namespace_mount_rejected: too many levels of symbolic links
4325FAIL amadan.net/oficina/equipo/internal/runner/containment 0.005s
4326```
4327
4328### Final GREEN after restoration
4329
4330```sh
4331CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1
4332make -C /home/paulca/amadan.net/oficina/equipo-plan-2b runner-namespace-test
4333CGO_ENABLED=0 go vet /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment
4334git -C /home/paulca/amadan.net/oficina/equipo-plan-2b diff --check
4335gofmt -l /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress/proxy.go /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/egress/proxy_test.go /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment/egress_test.go
4336```
4337
4338```text
4339ok amadan.net/oficina/equipo/internal/runner/egress 3.260s
4340ok amadan.net/oficina/equipo/internal/runner/containment 0.440s
4341CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
4342ok amadan.net/oficina/equipo/internal/runner/containment 2.220s
4343```
4344
4345Every command exited 0. Vet, diff checking and formatting produced no output. No full suite or `make ci` ran.
4346
4347### User-facing strings and concerns
4348
4349No new user-facing strings, protocol responses, diagnostics or `copy.go` entries. Only test assertion messages and one implementation comment were added.
4350
4351No new concerns or failing gates. Provider certification remains the existing Task 11b release gate. Tests closed their listeners, stopped their namespace processes and removed their owned TMPDIR trees. No separate scratch, background server or credential home was created. No push, merge, deployment or other worktree access occurred. The controller owns review and push.
4352
4353The final fixture reads the response through EOF so a split TCP read cannot cause a false failure. After that test-only adjustment, `CGO_ENABLED=0 go test /home/paulca/amadan.net/oficina/equipo-plan-2b/internal/runner/containment -run '^TestEgressLongScratchRoot$' -count=1` passed (`ok amadan.net/oficina/equipo/internal/runner/containment 0.061s`), and `git diff --check` remained clean.
4354
4355
4356## Task 4: Bind direct accounts and hash effective launch policy
4357
4358Status: DONE_WITH_CONCERNS.
4359Commit subject: `feat: bind direct accounts and hash effective launch policy`.
4360Branch: `plan-2b`. No push, merge, deployment, provider prompt, sign-in or enrolment.
4361
4362### What changed
4363
4364`provider.OpenAccount` opens only the configured dedicated source home. The lease pins the directory with openat2, holds a directory flock across attempts and refresh, requires private modes and complete expected identity metadata, and stages only the selected provider's login plus identity metadata into a private runtime home. Files are 0600 and directories are 0700. No credential material is put into a workspace, public manifest or journal.
4365
4366`HomeRules` makes refusals explicit. The production default covers the user's `.claude` and `.codex`; the path rule covers every `.paseo/zerosub/homes` tree. Path checks precede login access. Symlink components are refused, directory inode comparisons catch explicit interactive-home aliases and their descendants, and mountinfo root checks catch bind aliases of forbidden trees. Tests inject only owned fake directories. The real defaults receive a path-only test. No real login file was read, copied or statted, and no real interactive credential home was accessed by these tests.
4367
4368Only a live lease can return a binding with dedicated-home authority. The exported boolean is omitted from JSON and is insufficient on its own: `VerifiedDedicatedHome` checks an unexported lease reference, the exact binding and the pinned source. Both containment and its egress boundary reject forged provenance. Configured bindings, connection data and JSON input cannot grant auth-host access. Auth hosts still require Task 3's installed network contract; this task installs none.
4369
4370`Preflight` compares CLI-observed identity with the enrolled binding. `Validate`, `BeginTurn` and `EndTurn` detect source replacement, identity changes and credential generation changes. The private generation includes file identity and timestamps, so atomic replacement with identical bytes still requires preflight. A same-identity generation between turns returns `ErrPreflightRequired`; successful preflight restages and validates that login before another bind/turn. Failed refresh remains unavailable for dispatch without choosing another account. A different identity returns `ErrIdentity`; an unexplained active-turn change returns `ErrContainment`. `CommitRefresh` checks the staged login's observed identity, then atomically writes and fsyncs only the dedicated login under the same lease. It leaves preflight required. Private token digests stay in memory and never enter the public tuple.
4371
4372Claude identity is trust-on-first-use: Paul confirms the CLI-observed account metadata at enrolment, and future observations must match that binding. This is not independent remote attestation.
4373
4374`BuildPolicy` constructs its environment rather than inheriting it. Only the selected provider paths and permitted locale/terminal entries reach Policy.Env. The manifest additionally records containment's fixed PATH, HOME, TMPDIR and proxy variables. Injected API/routing/proxy/socket/parent-agent variables are rejected. Generated JSON settings and MCP artifacts use fixed namespace paths `/config/equipo-settings.json` and `/config/equipo-mcp.json`.
4375
4376The canonical manifest covers exact argv, nonsecret environment, runtime-file contents and mount targets, selected source home and expected identity, denied paths, exact egress hosts, exact tool lists, settings, MCP, start/resume thread policy, turn policy, outer mounts, shared namespace arguments, disabled hooks/plugins, managed-directory masking and explicit omission of per-turn authority overrides. Duplicate JSON keys and secret-bearing settings keys are rejected. Turn policy admits only non-authority effort/summary parameters; supplied authority or unknown fields are rejected. Instruction files have a separate hash and affect the concrete manifest, not the isolation policy. Only validated workspace, scratch and generated runtime-home roles are normalized for certification; the dedicated source home and other runtime/protected inputs stay exact.
4377
4378Runtime-file imports also refuse credential filenames, forbidden interactive sources and inode aliases. An auth.json or hardlink to it cannot become a public file digest. Executables with multiple hardlinks are conservatively refused by this file-import check.
4379
4380`ValidateReadback` requires the exact effective settings/MCP/thread/turn policy, disabled hooks/plugins, no remote control, and only Equipo's generated layer plus any explicitly mounted managed layers. Unsupported/ignored provider settings still need provider-specific normalization and sentinel certification in Tasks 5, 6 and 11b.
4381
4382`AttestLaunch` checks the lease, concrete policy, argv, selection, current runtime-file digests, generated config, environment and mounts. Containment then hashes its actual constructed namespace arguments, pinned regular-file digests and concrete scratch/socket paths. The durable containment record now stores separate `PolicyHash`, concrete `ManifestHash` and `EgressHash`. A runtime source changed between BuildPolicy and mount pinning fails its digest check. The actual host launcher and bubblewrap binaries must appear in the direct policy's RuntimeFiles. The attempt lifetime context contract is documented on `provider.ProcessHost`.
4383
4384`AccountBinding` adds ProviderHome, ExpectedIdentity and PersonID. `DiscoverDirect` reads only these configured bindings, opens a lease and runs a no-prompt identity probe. Duplicate LocalID/model matches and inconsistent person/account associations fail closed. Input model order, LocalID and person association are preserved. Legacy discovery remains available for the later cutover. Release metadata gains typed direct-policy certificates without manufacturing a certification entry.
4385
4386### Files
4387
4388- `internal/runner/provider/accounts.go`, `accounts_test.go`: account leases, explicit refusals, private staging, identity/generation checks and refresh.
4389- `internal/runner/provider/policy.go`, `policy_test.go`: canonical policy/attempt manifests, generated config, readback, launch and pinned-file validation.
4390- `internal/runner/provider/types.go`: expected identity, runtime/source binding fields, unexported provenance, separate hashes and attempt-context documentation.
4391- `internal/runner/config.go`, `config_test.go`: configured direct binding and private runtime-root checks.
4392- `internal/runner/connections.go`, `connections_test.go`: direct configured discovery and association/order checks.
4393- `internal/runner/containment/egress.go`, `egress_test.go`: verified dedicated-home authority and exact network binding.
4394- `internal/runner/containment/linux.go`, `linux_test.go`, `recovery.go`: final constructed namespace hash, pinned-file checks, separate persisted policy hash and regression tests.
4395- `internal/release/manifest.go`: direct policy certificate type and manifest field.
4396- This appended controller report and the requested ignored local task report.
4397
4398### Adapter integration and interpretations
4399
44001. Input Binding.Home is the dedicated credential source. Input Binding.Expected must contain AccountID, HomeID and ProviderVersion, and RuntimeRoot must be the runner's private `<scratch>/homes`. The source must already exist with `equipo-identity.json` and the provider's login file: `.credentials.json` for Claude or `auth.json` for Codex. OpenAccount never creates a dedicated source or signs in. Use `lease.Binding()` afterward: Home is then the private runtime home and CredentialHome retains the exact dedicated source.
44012. BuildPolicy preserves every requested PolicyInputs field and adds Argv, Env, Workspace, Scratch and InstructionFiles. Concrete argv and attempt paths are necessary to attest the constructed launch and cannot be inferred from the original field list. Supply all executable/helper/MCP/managed runtime files, including the actual runner and bubblewrap binaries, as read-only RuntimeFiles. The primary argv executable must be one of those targets. Env permits only LANG, LC_ALL and TERM overrides. BuildPolicy may run during the no-prompt preflight callback; prompt admission remains blocked until that callback succeeds.
44023. The raw ThreadPolicy object must contain the exact canonical start and resume policy parameters. Both are hashed verbatim after JSON canonicalization. TurnPolicy is policy-only, not prompts, thread IDs or general RPC data. It pins the omission of authority overrides. Adapters must use the returned settings and hashes, inspect account/read and config/read(includeLayers:true) for Codex, and normalize actual provider readback into ConfigReadback. Provider-specific native configuration rendering belongs to Tasks 5 and 6; the generic builder stages the attested JSON artifacts at fixed namespace paths.
44034. Keep the lease throughout the session's attempts and refresh. Before each turn/resume, validate identity/generation, inspect effective provider policy and re-attest the launch; use BeginTurn/EndTurn around the active interval. After ErrPreflightRequired, re-run Preflight and bind the validated configuration before the next prompt. To accept a harness login refresh, call CommitRefresh with a no-prompt identity probe, then fresh Preflight. Callback probes run without the lease mutex so they can build policy and launch status checks, while another check or turn cannot start.
44045. Runtime homes are lease-owned and Close removes them. Provider adapters and Task 7 must retain their durable session/capture records and keep the lease for any resume that needs the current private session files. Cross-lease session restoration is not implemented by this account/policy layer.
44056. Masked managed directories remain Task 2's private /etc overlays. An explicitly required managed file must be listed in RuntimeFiles and its readback layer must be `managed:<exact namespace target>`. Unlisted user/project/managed layers are rejected rather than silently overriding operator requirements.
44067. The final containment hash required small edits beyond the brief's principal file list. Without them, Task 3's boolean still granted authority and Task 2's ManifestHash still held only the reusable policy hash. These edits keep existing disconnected/check-launch fixtures working while enforcing the new manifest on dedicated direct launches. Legacy discovery and old launch contracts are not a direct-provider rollout; Task 11a still owns cutover/removal.
44078. The task's explicit rules override generic copy-review, writing delegation and handoff workflows. No copy-review skill/server, subagent, live model call or .claude/HANDOFF.md was used. The local report is ignored under .superpowers; the complete evidence is committed here.
4408
4409### RED evidence
4410
4411All commands below ran from `/home/paulca/amadan.net/oficina/equipo-plan-2b` on branch `plan-2b`, with `CGO_ENABLED=0`, on-disk TMPDIR `/home/paulca/t/e2b` and default Go caches.
4412
4413Initial tests were written before implementation. The first meaningful RED was:
4414
4415```sh
4416CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccountHome|TestAccountUnavailable|TestEffectivePolicy|TestUnexpectedConfig|TestPrivateHome' -count=1
4417```
4418
4419```text
4420undefined: HomeRules
4421unknown field Expected in struct literal of type Binding
4422unknown field RuntimeRoot in struct literal of type Binding
4423undefined: IdentityFile
4424undefined: AccountLease
4425undefined: PolicyInputs
4426FAIL amadan.net/oficina/equipo/internal/runner/provider [build failed]
4427ok amadan.net/oficina/equipo/internal/runner [no tests to run]
4428```
4429
4430An earlier test-file brace typo was corrected before this run; that parser error is not claimed as behavioral evidence. Supplemental tests for refresh, launch attestation and configured discovery similarly failed to compile before their APIs existed. An intermediate configured-discovery failure (`runner.invalid`) exposed missing JSON tags on Identity; the tags were added and both legacy and direct binding tests now pass.
4431
4432The behavioral RED commands were:
4433
4434```sh
4435CGO_ENABLED=0 go test ./internal/runner/containment -run 'TestEgressRejectsForgedDedicatedHome|TestNamespaceConcreteManifestHash' -count=1
4436```
4437
4438```text
4439--- FAIL: TestEgressRejectsForgedDedicatedHome
4440 caller boolean granted dedicated-home authority
4441--- FAIL: TestNamespaceConcreteManifestHash
4442 policy hash substituted for concrete manifest hash
4443```
4444
4445```sh
4446CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestUnexpectedConfigInputs|TestEffectivePolicyPreflightLaunch|TestAccountHomeConfiguredRuntime' -count=1
4447```
4448
4449```text
4450--- FAIL: TestUnexpectedConfigInputs/missing_binary
4451 unsafe policy input accepted
4452--- FAIL: TestUnexpectedConfigInputs/network_number
4453 unsafe policy input accepted
4454--- FAIL: TestEffectivePolicyPreflightLaunch
4455 preflight could not launch status check provider_identity_mismatch
4456```
4457
4458```sh
4459CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestEffectivePolicyHostBinary|TestNamespaceManifestInputs' -count=1
4460```
4461
4462```text
4463p.ValidateRuntimeBinaries undefined
4464m.namespaceManifest undefined
4465FAIL [build failed]
4466```
4467
4468```sh
4469CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestEffectivePolicyManifestBoundary$' -count=1
4470```
4471
4472```text
4473--- FAIL: TestEffectivePolicyManifestBoundary
4474 outer mount policy missing from manifest
4475```
4476
4477```sh
4478CGO_ENABLED=0 go test ./internal/runner/provider -run 'TestAccountHomeRuntimeAliasNoSideEffects|TestAccountHomeFileGuards' -count=1
4479```
4480
4481```text
4482--- FAIL: TestAccountHomeRuntimeAliasNoSideEffects
4483 interactive directory changed <nil>
4484--- FAIL: TestAccountHomeFileGuards/metadata_duplicate
4485 unsafe account input accepted
4486```
4487
4488```sh
4489CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestPrivateHomeRejectsCredentialMount$' -count=1
4490```
4491
4492```text
4493--- FAIL: TestPrivateHomeRejectsCredentialMount
4494 credential source entered public manifest
4495```
4496
4497After guarding the credential path, the same command exposed the inode alias:
4498
4499```text
4500--- FAIL: TestPrivateHomeRejectsCredentialMount
4501 credential inode alias entered public manifest
4502```
4503
4504### GREEN evidence
4505
4506Final exact brief command, after all fixes and restoration of every mutation:
4507
4508```sh
4509CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccountHome|TestAccountUnavailable|TestEffectivePolicy|TestUnexpectedConfig|TestPrivateHome' -count=1
4510```
4511
4512```text
4513ok amadan.net/oficina/equipo/internal/runner/provider 3.560s
4514ok amadan.net/oficina/equipo/internal/runner 0.005s
4515```
4516
4517Related regression command after the account, policy and containment fixes:
4518
4519```sh
4520CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner ./internal/runner/containment ./internal/release -run 'TestAccountHome|TestAccountUnavailable|TestEffectivePolicy|TestUnexpectedConfig|TestPrivateHome|TestDirect|TestConnectionsBindings|TestRunnerConfig|TestEgress|TestNamespaceConcreteManifestHash|TestNamespaceManifestInputs' -count=1
4521```
4522
4523```text
4524ok amadan.net/oficina/equipo/internal/runner/provider 3.674s
4525ok amadan.net/oficina/equipo/internal/runner 0.012s
4526ok amadan.net/oficina/equipo/internal/runner/containment 0.737s
4527? amadan.net/oficina/equipo/internal/release [no test files]
4528```
4529
4530A final schema test was added before supplying the direct certificate's snake_case JSON tags:
4531
4532```sh
4533CGO_ENABLED=0 go test ./internal/runner -run '^TestEffectivePolicyReleaseManifest$' -count=1
4534```
4535
4536RED (exit 1):
4537
4538```text
4539--- FAIL: TestEffectivePolicyReleaseManifest
4540 missing manifest field provider
4541FAIL amadan.net/oficina/equipo/internal/runner 0.003s
4542```
4543
4544GREEN after adding the tags (exit 0):
4545
4546```text
4547ok amadan.net/oficina/equipo/internal/runner 0.003s
4548```
4549
4550`git diff --check` passed. gofmt reported no pending formatting for the new files; all changed Go files were formatted. No full suite, make ci, race suite, network provider test or live gate ran.
4551
4552### Mutation evidence
4553
455460 distinct guards/manifest inputs have a compiled, named failing test. Every mutation was applied alone and restored from the exact saved source before the next mutation. The scratch driver was run as `python3 /home/paulca/t/e2b/task4-mutations/run.py`, with corrected/supplemental cases in `rerun.py`; the two credential-import cases used the same save/mutate/run/restore sequence. Scratch drivers and logs are removed after copying their evidence here.
4555
4556Five initial mutations were not evidence: active classification changed the wrong duplicate branch, readiness was masked by the earlier generation check, the mount fixture also changed argv, and the malformed manifest hit another identity check. Those four initially passed; tests/targets were tightened. The fifth, ignored-settings comparison, left unused locals and did not compile; the corrected mutation explicitly uses `_ = a` and `_ = b`. All five were rerun and produced the named compiled failures below. No compile failure is counted as a successful mutation.
4557
4558#### Mutation 1: home replacement
4559
4560File: `internal/runner/provider/accounts.go`.
4561
4562Replace the body of `func (l *AccountLease) sourceUnchanged() bool` with:
4563
4564```go
4565return true
4566```
4567
4568```sh
4569CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/replacement$ -count=1
4570```
4571
4572Exit 1, compiled failure:
4573
4574```text
4575--- FAIL: TestAccountHomeMutation (0.05s)
4576 --- FAIL: TestAccountHomeMutation/replacement (0.04s)
4577 accounts_test.go:182: replacement accepted: <nil>
4578FAIL
4579rastrillo-budget/v1 ran 45ms
4580FAIL amadan.net/oficina/equipo/internal/runner/provider 0.047s
4581FAIL
4582```
4583
4584#### Mutation 2: directory lock
4585
4586File: `internal/runner/provider/accounts.go`.
4587
4588Replace:
4589
4590```go
4591e = unix.Flock(int(dir.Fd()), unix.LOCK_EX|unix.LOCK_NB)
4592```
4593
4594with:
4595
4596```go
4597e = error(nil)
4598```
4599
4600```sh
4601CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/lock$ -count=1
4602```
4603
4604Exit 1, compiled failure:
4605
4606```text
4607--- FAIL: TestAccountHomeMutation (0.04s)
4608 --- FAIL: TestAccountHomeMutation/lock (0.04s)
4609 accounts_test.go:192: concurrent lease accepted: <nil>
4610FAIL
4611rastrillo-budget/v1 ran 43ms
4612FAIL amadan.net/oficina/equipo/internal/runner/provider 0.045s
4613FAIL
4614```
4615
4616#### Mutation 3: dedicated provenance
4617
4618File: `internal/runner/provider/accounts.go`.
4619
4620Replace the body of `func (b Binding) VerifiedDedicatedHome() bool` with:
4621
4622```go
4623return b.DedicatedHome
4624```
4625
4626```sh
4627CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/dedicated_provenance$ -count=1
4628```
4629
4630Exit 1, compiled failure:
4631
4632```text
4633--- FAIL: TestAccountHomeBinding (0.00s)
4634 --- FAIL: TestAccountHomeBinding/dedicated_provenance (0.00s)
4635 accounts_test.go:57: input boolean granted authority
4636FAIL
4637rastrillo-budget/v1 ran 1ms
4638FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s
4639FAIL
4640```
4641
4642#### Mutation 4: shared inode
4643
4644File: `internal/runner/provider/accounts.go`.
4645
4646Replace the body of `func (r HomeRules) refusedInode(info os.FileInfo) bool` with:
4647
4648```go
4649return false
4650```
4651
4652```sh
4653CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/shared_and_aliases$ -count=1
4654```
4655
4656Exit 1, compiled failure:
4657
4658```text
4659--- FAIL: TestAccountHomeBinding (0.00s)
4660 --- FAIL: TestAccountHomeBinding/shared_and_aliases (0.00s)
4661 accounts_test.go:126: shared inode accepted
4662FAIL
4663rastrillo-budget/v1 ran 1ms
4664FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s
4665FAIL
4666```
4667
4668#### Mutation 5: default path refusals
4669
4670File: `internal/runner/provider/accounts.go`.
4671
4672Replace the body of `func (r HomeRules) RefusesPath(path string) bool` with:
4673
4674```go
4675return false
4676```
4677
4678```sh
4679CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/real_defaults_path_only$ -count=1
4680```
4681
4682Exit 1, compiled failure:
4683
4684```text
4685--- FAIL: TestAccountHomeBinding (0.00s)
4686 --- FAIL: TestAccountHomeBinding/real_defaults_path_only (0.00s)
4687 accounts_test.go:133: default shared home accepted
4688FAIL
4689rastrillo-budget/v1 ran 0s
4690FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s
4691FAIL
4692```
4693
4694#### Mutation 6: credential file mode
4695
4696File: `internal/runner/provider/accounts.go`.
4697
4698Replace:
4699
4700```go
4701 || info.Mode().Perm() != 0600
4702```
4703
4704with:
4705
4706```go
4707// removed
4708```
4709
4710```sh
4711CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/private_modes$ -count=1
4712```
4713
4714Exit 1, compiled failure:
4715
4716```text
4717--- FAIL: TestAccountHomeBinding (0.02s)
4718 --- FAIL: TestAccountHomeBinding/private_modes (0.02s)
4719 accounts_test.go:145: public credentials accepted
4720FAIL
4721rastrillo-budget/v1 ran 22ms
4722FAIL amadan.net/oficina/equipo/internal/runner/provider 0.023s
4723FAIL
4724```
4725
4726#### Mutation 7: identity recheck
4727
4728File: `internal/runner/provider/accounts.go`.
4729
4730Replace:
4731
4732```go
4733 || id != l.source.Expected
4734```
4735
4736with:
4737
4738```go
4739// removed
4740```
4741
4742```sh
4743CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/identity_change$ -count=1
4744```
4745
4746Exit 1, compiled failure:
4747
4748```text
4749--- FAIL: TestAccountHomeMutation (0.04s)
4750 --- FAIL: TestAccountHomeMutation/identity_change (0.04s)
4751 accounts_test.go:222: got provider_preflight_required want provider_identity_mismatch
4752FAIL
4753rastrillo-budget/v1 ran 42ms
4754FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s
4755FAIL
4756```
4757
4758#### Mutation 8: generation recheck
4759
4760File: `internal/runner/provider/accounts.go`.
4761
4762Replace:
4763
4764```go
4765if generation != l.generation {
4766```
4767
4768with:
4769
4770```go
4771if false && generation != l.generation {
4772```
4773
4774```sh
4775CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/successful_refresh$ -count=1
4776```
4777
4778Exit 1, compiled failure:
4779
4780```text
4781--- FAIL: TestAccountHomeMutation (0.05s)
4782 --- FAIL: TestAccountHomeMutation/successful_refresh (0.05s)
4783 accounts_test.go:222: got <nil> want provider_preflight_required
4784FAIL
4785rastrillo-budget/v1 ran 47ms
4786FAIL amadan.net/oficina/equipo/internal/runner/provider 0.049s
4787FAIL
4788```
4789
4790#### Mutation 9: active mutation classification
4791
4792File: `internal/runner/provider/accounts.go`.
4793
4794Replace:
4795
4796```go
4797if generation != l.generation {
4798 l.ready = false
4799 if l.active {
4800```
4801
4802with:
4803
4804```go
4805if generation != l.generation {
4806 l.ready = false
4807 if false && l.active {
4808```
4809
4810```sh
4811CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/active_change$ -count=1
4812```
4813
4814Exit 1, compiled failure:
4815
4816```text
4817--- FAIL: TestAccountHomeMutation (0.04s)
4818 --- FAIL: TestAccountHomeMutation/active_change (0.04s)
4819 accounts_test.go:223: got provider_preflight_required want provider_account_containment
4820FAIL
4821rastrillo-budget/v1 ran 44ms
4822FAIL amadan.net/oficina/equipo/internal/runner/provider 0.045s
4823FAIL
4824```
4825
4826#### Mutation 10: runtime credential recheck
4827
4828File: `internal/runner/provider/accounts.go`.
4829
4830Replace:
4831
4832```go
4833if runtimeErr != nil || sha256.Sum256(runtimeRaw) != l.runtimeGeneration {
4834```
4835
4836with:
4837
4838```go
4839if false && (runtimeErr != nil || sha256.Sum256(runtimeRaw) != l.runtimeGeneration) {
4840```
4841
4842```sh
4843CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeGuards/runtime_active_mutation$ -count=1
4844```
4845
4846Exit 1, compiled failure:
4847
4848```text
4849--- FAIL: TestAccountHomeRuntimeGuards (0.04s)
4850 --- FAIL: TestAccountHomeRuntimeGuards/runtime_active_mutation (0.04s)
4851 accounts_test.go:311: active runtime mutation accepted
4852FAIL
4853rastrillo-budget/v1 ran 43ms
4854FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s
4855FAIL
4856```
4857
4858#### Mutation 11: preflight readiness
4859
4860File: `internal/runner/provider/accounts.go`.
4861
4862Replace:
4863
4864```go
4865if !l.ready {
4866```
4867
4868with:
4869
4870```go
4871if false && !l.ready {
4872```
4873
4874```sh
4875CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountUnavailableDoesNotFailover$ -count=1
4876```
4877
4878Exit 1, compiled failure:
4879
4880```text
4881--- FAIL: TestAccountUnavailableDoesNotFailover (0.18s)
4882 --- FAIL: TestAccountUnavailableDoesNotFailover/provider_account_maintenance (0.06s)
4883 accounts_test.go:170: calls=1 prompts=1
4884 --- FAIL: TestAccountUnavailableDoesNotFailover/provider_identity_mismatch (0.06s)
4885 accounts_test.go:170: calls=1 prompts=1
4886 --- FAIL: TestAccountUnavailableDoesNotFailover/quota (0.06s)
4887 accounts_test.go:170: calls=1 prompts=1
4888FAIL
4889rastrillo-budget/v1 ran 185ms
4890FAIL amadan.net/oficina/equipo/internal/runner/provider 0.186s
4891FAIL
4892```
4893
4894#### Mutation 12: preflight failure
4895
4896File: `internal/runner/provider/accounts.go`.
4897
4898Replace:
4899
4900```go
4901if probeErr != nil {
4902```
4903
4904with:
4905
4906```go
4907if false && probeErr != nil {
4908```
4909
4910```sh
4911CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/failed_refresh$ -count=1
4912```
4913
4914Exit 1, compiled failure:
4915
4916```text
4917--- FAIL: TestAccountHomeMutation (0.06s)
4918 --- FAIL: TestAccountHomeMutation/failed_refresh (0.06s)
4919 accounts_test.go:236: provider_identity_mismatch
4920FAIL
4921rastrillo-budget/v1 ran 63ms
4922FAIL amadan.net/oficina/equipo/internal/runner/provider 0.064s
4923FAIL
4924```
4925
4926#### Mutation 13: runtime symlink
4927
4928File: `internal/runner/provider/accounts.go`.
4929
4930Replace:
4931
4932```go
4933e == nil && stat.Mode&unix.S_IFMT != unix.S_IFREG
4934```
4935
4936with:
4937
4938```go
4939false && e == nil && stat.Mode&unix.S_IFMT != unix.S_IFREG
4940```
4941
4942```sh
4943CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeGuards/runtime_symlink$ -count=1
4944```
4945
4946Exit 1, compiled failure:
4947
4948```text
4949--- FAIL: TestAccountHomeRuntimeGuards (0.06s)
4950 --- FAIL: TestAccountHomeRuntimeGuards/runtime_symlink (0.06s)
4951 accounts_test.go:291: runtime symlink accepted
4952FAIL
4953rastrillo-budget/v1 ran 64ms
4954FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
4955FAIL
4956```
4957
4958#### Mutation 14: safe environment
4959
4960File: `internal/runner/provider/policy.go`.
4961
4962Replace:
4963
4964```go
4965(k != "LANG" && k != "LC_ALL" && k != "TERM")
4966```
4967
4968with:
4969
4970```go
4971false
4972```
4973
4974```sh
4975CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/ANTHROPIC_API_KEY$ -count=1
4976```
4977
4978Exit 1, compiled failure:
4979
4980```text
4981--- FAIL: TestUnexpectedConfigLayer (0.10s)
4982 --- FAIL: TestUnexpectedConfigLayer/ANTHROPIC_API_KEY (0.04s)
4983 policy_test.go:159: injected environment accepted
4984FAIL
4985rastrillo-budget/v1 ran 104ms
4986FAIL amadan.net/oficina/equipo/internal/runner/provider 0.105s
4987FAIL
4988```
4989
4990#### Mutation 15: readback layers
4991
4992File: `internal/runner/provider/policy.go`.
4993
4994Replace:
4995
4996```go
4997 || !reflect.DeepEqual(actual, layers)
4998```
4999
5000with:
5001
5002```go
5003// removed
5004```
5005
5006```sh
5007CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/user$ -count=1
5008```
5009
5010Exit 1, compiled failure:
5011
5012```text
5013--- FAIL: TestUnexpectedConfigLayer (0.06s)
5014 --- FAIL: TestUnexpectedConfigLayer/user (0.00s)
5015 policy_test.go:145: unexpected config accepted
5016FAIL
5017rastrillo-budget/v1 ran 64ms
5018FAIL amadan.net/oficina/equipo/internal/runner/provider 0.066s
5019FAIL
5020```
5021
5022#### Mutation 16: remote control
5023
5024File: `internal/runner/provider/policy.go`.
5025
5026Replace:
5027
5028```go
5029r.RemoteControl ||
5030```
5031
5032with:
5033
5034```go
5035// removed
5036```
5037
5038```sh
5039CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/remote$ -count=1
5040```
5041
5042Exit 1, compiled failure:
5043
5044```text
5045--- FAIL: TestUnexpectedConfigLayer (0.06s)
5046 --- FAIL: TestUnexpectedConfigLayer/remote (0.00s)
5047 policy_test.go:145: unexpected config accepted
5048FAIL
5049rastrillo-budget/v1 ran 64ms
5050FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
5051FAIL
5052```
5053
5054#### Mutation 17: disabled hooks
5055
5056File: `internal/runner/provider/policy.go`.
5057
5058Replace:
5059
5060```go
5061!r.HooksDisabled ||
5062```
5063
5064with:
5065
5066```go
5067// removed
5068```
5069
5070```sh
5071CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/hooks$ -count=1
5072```
5073
5074Exit 1, compiled failure:
5075
5076```text
5077--- FAIL: TestUnexpectedConfigLayer (0.06s)
5078 --- FAIL: TestUnexpectedConfigLayer/hooks (0.00s)
5079 policy_test.go:145: unexpected config accepted
5080FAIL
5081rastrillo-budget/v1 ran 63ms
5082FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
5083FAIL
5084```
5085
5086#### Mutation 18: disabled plugins
5087
5088File: `internal/runner/provider/policy.go`.
5089
5090Replace:
5091
5092```go
5093!r.PluginsDisabled ||
5094```
5095
5096with:
5097
5098```go
5099// removed
5100```
5101
5102```sh
5103CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/plugins$ -count=1
5104```
5105
5106Exit 1, compiled failure:
5107
5108```text
5109--- FAIL: TestUnexpectedConfigLayer (0.06s)
5110 --- FAIL: TestUnexpectedConfigLayer/plugins (0.00s)
5111 policy_test.go:145: unexpected config accepted
5112FAIL
5113rastrillo-budget/v1 ran 64ms
5114FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
5115FAIL
5116```
5117
5118#### Mutation 19: ignored settings
5119
5120File: `internal/runner/provider/policy.go`.
5121
5122Replace:
5123
5124```go
5125if e != nil || !bytes.Equal(a, b) {
5126```
5127
5128with:
5129
5130```go
5131_ = a
5132 _ = b
5133 if e != nil {
5134```
5135
5136```sh
5137CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/ignored$ -count=1
5138```
5139
5140Exit 1, compiled failure:
5141
5142```text
5143--- FAIL: TestUnexpectedConfigLayer (0.06s)
5144 --- FAIL: TestUnexpectedConfigLayer/ignored (0.00s)
5145 policy_test.go:146: unexpected config accepted
5146FAIL
5147rastrillo-budget/v1 ran 64ms
5148FAIL amadan.net/oficina/equipo/internal/runner/provider 0.066s
5149FAIL
5150```
5151
5152#### Mutation 20: per-turn overrides
5153
5154File: `internal/runner/provider/policy.go`.
5155
5156Replace the body of `func validTurnPolicy(raw json.RawMessage) bool` with:
5157
5158```go
5159return true
5160```
5161
5162```sh
5163CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer$ -count=1
5164```
5165
5166Exit 1, compiled failure:
5167
5168```text
5169--- FAIL: TestUnexpectedConfigLayer (0.22s)
5170 policy_test.go:167: turn override sandboxPolicy accepted
5171FAIL
5172rastrillo-budget/v1 ran 224ms
5173FAIL amadan.net/oficina/equipo/internal/runner/provider 0.225s
5174FAIL
5175```
5176
5177#### Mutation 21: unverified policy binding
5178
5179File: `internal/runner/provider/policy.go`.
5180
5181Replace:
5182
5183```go
5184if !b.VerifiedDedicatedHome() {
5185```
5186
5187with:
5188
5189```go
5190if b.provenance == nil { return Policy{}, nil }; if !b.VerifiedDedicatedHome() {
5191```
5192
5193```sh
5194CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer$ -count=1
5195```
5196
5197Exit 1, compiled failure:
5198
5199```text
5200--- FAIL: TestUnexpectedConfigLayer (0.20s)
5201 policy_test.go:173: unverified binding accepted
5202FAIL
5203rastrillo-budget/v1 ran 202ms
5204FAIL amadan.net/oficina/equipo/internal/runner/provider 0.204s
5205FAIL
5206```
5207
5208#### Mutation 22: hash binary
5209
5210File: `internal/runner/provider/policy.go`.
5211
5212Replace:
5213
5214```go
5215raw, manifestHash, e := hashJSON(m)
5216```
5217
5218with:
5219
5220```go
5221m.Files=nil
5222 raw, manifestHash, e := hashJSON(m)
5223```
5224
5225```sh
5226CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/binary$ -count=1
5227```
5228
5229Exit 1, compiled failure:
5230
5231```text
5232--- FAIL: TestEffectivePolicyHash (0.08s)
5233 --- FAIL: TestEffectivePolicyHash/binary (0.08s)
5234 policy_test.go:76: manifest change not hashed
5235FAIL
5236rastrillo-budget/v1 ran 83ms
5237FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s
5238FAIL
5239```
5240
5241#### Mutation 23: hash settings
5242
5243File: `internal/runner/provider/policy.go`.
5244
5245Replace:
5246
5247```go
5248raw, manifestHash, e := hashJSON(m)
5249```
5250
5251with:
5252
5253```go
5254m.Settings=nil
5255 raw, manifestHash, e := hashJSON(m)
5256```
5257
5258```sh
5259CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/settings$ -count=1
5260```
5261
5262Exit 1, compiled failure:
5263
5264```text
5265--- FAIL: TestEffectivePolicyHash (0.08s)
5266 --- FAIL: TestEffectivePolicyHash/settings (0.08s)
5267 policy_test.go:76: manifest change not hashed
5268FAIL
5269rastrillo-budget/v1 ran 82ms
5270FAIL amadan.net/oficina/equipo/internal/runner/provider 0.083s
5271FAIL
5272```
5273
5274#### Mutation 24: hash routing
5275
5276File: `internal/runner/provider/policy.go`.
5277
5278Replace:
5279
5280```go
5281raw, manifestHash, e := hashJSON(m)
5282```
5283
5284with:
5285
5286```go
5287m.EgressHosts=nil
5288 raw, manifestHash, e := hashJSON(m)
5289```
5290
5291```sh
5292CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/routing$ -count=1
5293```
5294
5295Exit 1, compiled failure:
5296
5297```text
5298--- FAIL: TestEffectivePolicyHash (0.08s)
5299 --- FAIL: TestEffectivePolicyHash/routing (0.08s)
5300 policy_test.go:76: manifest change not hashed
5301FAIL
5302rastrillo-budget/v1 ran 83ms
5303FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s
5304FAIL
5305```
5306
5307#### Mutation 25: hash tools
5308
5309File: `internal/runner/provider/policy.go`.
5310
5311Replace:
5312
5313```go
5314raw, manifestHash, e := hashJSON(m)
5315```
5316
5317with:
5318
5319```go
5320m.Tools=nil
5321 raw, manifestHash, e := hashJSON(m)
5322```
5323
5324```sh
5325CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/tools$ -count=1
5326```
5327
5328Exit 1, compiled failure:
5329
5330```text
5331--- FAIL: TestEffectivePolicyHash (0.08s)
5332 --- FAIL: TestEffectivePolicyHash/tools (0.08s)
5333 policy_test.go:76: manifest change not hashed
5334FAIL
5335rastrillo-budget/v1 ran 82ms
5336FAIL amadan.net/oficina/equipo/internal/runner/provider 0.084s
5337FAIL
5338```
5339
5340#### Mutation 26: hash mcp
5341
5342File: `internal/runner/provider/policy.go`.
5343
5344Replace:
5345
5346```go
5347raw, manifestHash, e := hashJSON(m)
5348```
5349
5350with:
5351
5352```go
5353m.MCP=nil
5354 raw, manifestHash, e := hashJSON(m)
5355```
5356
5357```sh
5358CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/mcp$ -count=1
5359```
5360
5361Exit 1, compiled failure:
5362
5363```text
5364--- FAIL: TestEffectivePolicyHash (0.09s)
5365 --- FAIL: TestEffectivePolicyHash/mcp (0.09s)
5366 policy_test.go:76: manifest change not hashed
5367FAIL
5368rastrillo-budget/v1 ran 87ms
5369FAIL amadan.net/oficina/equipo/internal/runner/provider 0.089s
5370FAIL
5371```
5372
5373#### Mutation 27: hash managed
5374
5375File: `internal/runner/provider/policy.go`.
5376
5377Replace:
5378
5379```go
5380raw, manifestHash, e := hashJSON(m)
5381```
5382
5383with:
5384
5385```go
5386m.Files=nil
5387 raw, manifestHash, e := hashJSON(m)
5388```
5389
5390```sh
5391CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/managed$ -count=1
5392```
5393
5394Exit 1, compiled failure:
5395
5396```text
5397--- FAIL: TestEffectivePolicyHash (0.08s)
5398 --- FAIL: TestEffectivePolicyHash/managed (0.08s)
5399 policy_test.go:76: manifest change not hashed
5400FAIL
5401rastrillo-budget/v1 ran 83ms
5402FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s
5403FAIL
5404```
5405
5406#### Mutation 28: hash env
5407
5408File: `internal/runner/provider/policy.go`.
5409
5410Replace:
5411
5412```go
5413raw, manifestHash, e := hashJSON(m)
5414```
5415
5416with:
5417
5418```go
5419m.Env=nil
5420 raw, manifestHash, e := hashJSON(m)
5421```
5422
5423```sh
5424CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/env$ -count=1
5425```
5426
5427Exit 1, compiled failure:
5428
5429```text
5430--- FAIL: TestEffectivePolicyHash (0.08s)
5431 --- FAIL: TestEffectivePolicyHash/env (0.08s)
5432 policy_test.go:76: manifest change not hashed
5433FAIL
5434rastrillo-budget/v1 ran 85ms
5435FAIL amadan.net/oficina/equipo/internal/runner/provider 0.086s
5436FAIL
5437```
5438
5439#### Mutation 29: hash mount
5440
5441File: `internal/runner/provider/policy.go`.
5442
5443Replace:
5444
5445```go
5446raw, manifestHash, e := hashJSON(m)
5447```
5448
5449with:
5450
5451```go
5452m.Files=nil
5453 raw, manifestHash, e := hashJSON(m)
5454```
5455
5456```sh
5457CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/mount$ -count=1
5458```
5459
5460Exit 1, compiled failure:
5461
5462```text
5463--- FAIL: TestEffectivePolicyHash (0.08s)
5464 --- FAIL: TestEffectivePolicyHash/mount (0.08s)
5465 policy_test.go:77: manifest change not hashed
5466FAIL
5467rastrillo-budget/v1 ran 85ms
5468FAIL amadan.net/oficina/equipo/internal/runner/provider 0.087s
5469FAIL
5470```
5471
5472#### Mutation 30: hash thread-start
5473
5474File: `internal/runner/provider/policy.go`.
5475
5476Replace:
5477
5478```go
5479raw, manifestHash, e := hashJSON(m)
5480```
5481
5482with:
5483
5484```go
5485m.ThreadPolicy=nil
5486 raw, manifestHash, e := hashJSON(m)
5487```
5488
5489```sh
5490CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/thread-start$ -count=1
5491```
5492
5493Exit 1, compiled failure:
5494
5495```text
5496--- FAIL: TestEffectivePolicyHash (0.08s)
5497 --- FAIL: TestEffectivePolicyHash/thread-start (0.08s)
5498 policy_test.go:76: manifest change not hashed
5499FAIL
5500rastrillo-budget/v1 ran 83ms
5501FAIL amadan.net/oficina/equipo/internal/runner/provider 0.084s
5502FAIL
5503```
5504
5505#### Mutation 31: hash thread-resume
5506
5507File: `internal/runner/provider/policy.go`.
5508
5509Replace:
5510
5511```go
5512raw, manifestHash, e := hashJSON(m)
5513```
5514
5515with:
5516
5517```go
5518m.ThreadPolicy=nil
5519 raw, manifestHash, e := hashJSON(m)
5520```
5521
5522```sh
5523CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/thread-resume$ -count=1
5524```
5525
5526Exit 1, compiled failure:
5527
5528```text
5529--- FAIL: TestEffectivePolicyHash (0.08s)
5530 --- FAIL: TestEffectivePolicyHash/thread-resume (0.08s)
5531 policy_test.go:76: manifest change not hashed
5532FAIL
5533rastrillo-budget/v1 ran 82ms
5534FAIL amadan.net/oficina/equipo/internal/runner/provider 0.083s
5535FAIL
5536```
5537
5538#### Mutation 32: hash turn
5539
5540File: `internal/runner/provider/policy.go`.
5541
5542Replace:
5543
5544```go
5545raw, manifestHash, e := hashJSON(m)
5546```
5547
5548with:
5549
5550```go
5551m.TurnPolicy=nil
5552 raw, manifestHash, e := hashJSON(m)
5553```
5554
5555```sh
5556CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/turn$ -count=1
5557```
5558
5559Exit 1, compiled failure:
5560
5561```text
5562--- FAIL: TestEffectivePolicyHash (0.08s)
5563 --- FAIL: TestEffectivePolicyHash/turn (0.08s)
5564 policy_test.go:76: manifest change not hashed
5565FAIL
5566rastrillo-budget/v1 ran 83ms
5567FAIL amadan.net/oficina/equipo/internal/runner/provider 0.084s
5568FAIL
5569```
5570
5571#### Mutation 33: hash provider-version
5572
5573File: `internal/runner/provider/policy.go`.
5574
5575Replace:
5576
5577```go
5578raw, manifestHash, e := hashJSON(m)
5579```
5580
5581with:
5582
5583```go
5584m.ProviderVersion=""
5585 raw, manifestHash, e := hashJSON(m)
5586```
5587
5588```sh
5589CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/provider-version$ -count=1
5590```
5591
5592Exit 1, compiled failure:
5593
5594```text
5595--- FAIL: TestEffectivePolicyHash (0.08s)
5596 --- FAIL: TestEffectivePolicyHash/provider-version (0.08s)
5597 policy_test.go:76: manifest change not hashed
5598FAIL
5599rastrillo-budget/v1 ran 83ms
5600FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s
5601FAIL
5602```
5603
5604#### Mutation 34: hash launcher-version
5605
5606File: `internal/runner/provider/policy.go`.
5607
5608Replace:
5609
5610```go
5611raw, manifestHash, e := hashJSON(m)
5612```
5613
5614with:
5615
5616```go
5617m.LauncherVersion=""
5618 raw, manifestHash, e := hashJSON(m)
5619```
5620
5621```sh
5622CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/launcher-version$ -count=1
5623```
5624
5625Exit 1, compiled failure:
5626
5627```text
5628--- FAIL: TestEffectivePolicyHash (0.08s)
5629 --- FAIL: TestEffectivePolicyHash/launcher-version (0.08s)
5630 policy_test.go:76: manifest change not hashed
5631FAIL
5632rastrillo-budget/v1 ran 83ms
5633FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s
5634FAIL
5635```
5636
5637#### Mutation 35: hash bwrap-version
5638
5639File: `internal/runner/provider/policy.go`.
5640
5641Replace:
5642
5643```go
5644raw, manifestHash, e := hashJSON(m)
5645```
5646
5647with:
5648
5649```go
5650m.BwrapVersion=""
5651 raw, manifestHash, e := hashJSON(m)
5652```
5653
5654```sh
5655CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/bwrap-version$ -count=1
5656```
5657
5658Exit 1, compiled failure:
5659
5660```text
5661--- FAIL: TestEffectivePolicyHash (0.08s)
5662 --- FAIL: TestEffectivePolicyHash/bwrap-version (0.08s)
5663 policy_test.go:76: manifest change not hashed
5664FAIL
5665rastrillo-budget/v1 ran 83ms
5666FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s
5667FAIL
5668```
5669
5670#### Mutation 36: hash argv
5671
5672File: `internal/runner/provider/policy.go`.
5673
5674Replace:
5675
5676```go
5677raw, manifestHash, e := hashJSON(m)
5678```
5679
5680with:
5681
5682```go
5683m.Argv=nil
5684 raw, manifestHash, e := hashJSON(m)
5685```
5686
5687```sh
5688CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/argv$ -count=1
5689```
5690
5691Exit 1, compiled failure:
5692
5693```text
5694--- FAIL: TestEffectivePolicyHash (0.09s)
5695 --- FAIL: TestEffectivePolicyHash/argv (0.09s)
5696 policy_test.go:76: manifest change not hashed
5697FAIL
5698rastrillo-budget/v1 ran 86ms
5699FAIL amadan.net/oficina/equipo/internal/runner/provider 0.088s
5700FAIL
5701```
5702
5703#### Mutation 37: hash denied
5704
5705File: `internal/runner/provider/policy.go`.
5706
5707Replace:
5708
5709```go
5710raw, manifestHash, e := hashJSON(m)
5711```
5712
5713with:
5714
5715```go
5716m.DeniedPaths=nil
5717 raw, manifestHash, e := hashJSON(m)
5718```
5719
5720```sh
5721CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/denied$ -count=1
5722```
5723
5724Exit 1, compiled failure:
5725
5726```text
5727--- FAIL: TestEffectivePolicyHash (0.09s)
5728 --- FAIL: TestEffectivePolicyHash/denied (0.09s)
5729 policy_test.go:76: manifest change not hashed
5730FAIL
5731rastrillo-budget/v1 ran 88ms
5732FAIL amadan.net/oficina/equipo/internal/runner/provider 0.090s
5733FAIL
5734```
5735
5736#### Mutation 38: workspace role
5737
5738File: `internal/runner/provider/policy.go`.
5739
5740Replace:
5741
5742```go
5743m.Workspace = "$WORKSPACE"
5744```
5745
5746with:
5747
5748```go
5749m.Workspace = m.Workspace
5750```
5751
5752```sh
5753CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/canonical_and_concrete$ -count=1
5754```
5755
5756Exit 1, compiled failure:
5757
5758```text
5759--- FAIL: TestEffectivePolicyHash (0.11s)
5760 --- FAIL: TestEffectivePolicyHash/canonical_and_concrete (0.11s)
5761 policy_test.go:92: workspace role or concrete hash wrong
5762FAIL
5763rastrillo-budget/v1 ran 110ms
5764FAIL amadan.net/oficina/equipo/internal/runner/provider 0.112s
5765FAIL
5766```
5767
5768#### Mutation 39: instruction digest
5769
5770File: `internal/runner/provider/policy.go`.
5771
5772Replace:
5773
5774```go
5775_, instructionHash, _ := hashJSON(instructions)
5776```
5777
5778with:
5779
5780```go
5781instructionHash := "constant"
5782```
5783
5784```sh
5785CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/instructions_separate$ -count=1
5786```
5787
5788Exit 1, compiled failure:
5789
5790```text
5791--- FAIL: TestEffectivePolicyHash (0.09s)
5792 --- FAIL: TestEffectivePolicyHash/instructions_separate (0.09s)
5793 policy_test.go:116: instructions not separately hashed
5794FAIL
5795rastrillo-budget/v1 ran 89ms
5796FAIL amadan.net/oficina/equipo/internal/runner/provider 0.090s
5797FAIL
5798```
5799
5800#### Mutation 40: launch arguments
5801
5802File: `internal/runner/provider/policy.go`.
5803
5804Replace:
5805
5806```go
5807 || !reflect.DeepEqual(m.Argv, argv)
5808```
5809
5810with:
5811
5812```go
5813// removed
5814```
5815
5816```sh
5817CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/argv$ -count=1
5818```
5819
5820Exit 1, compiled failure:
5821
5822```text
5823--- FAIL: TestEffectivePolicyLaunchAttestation (0.07s)
5824 --- FAIL: TestEffectivePolicyLaunchAttestation/argv (0.00s)
5825 policy_test.go:209: changed launch accepted
5826FAIL
5827rastrillo-budget/v1 ran 68ms
5828FAIL amadan.net/oficina/equipo/internal/runner/provider 0.070s
5829FAIL
5830```
5831
5832#### Mutation 41: launch env
5833
5834File: `internal/runner/provider/policy.go`.
5835
5836Replace:
5837
5838```go
5839if !reflect.DeepEqual(expectedEnv, p.Env) {
5840```
5841
5842with:
5843
5844```go
5845if false && !reflect.DeepEqual(expectedEnv, p.Env) {
5846```
5847
5848```sh
5849CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/env$ -count=1
5850```
5851
5852Exit 1, compiled failure:
5853
5854```text
5855--- FAIL: TestEffectivePolicyLaunchAttestation (0.07s)
5856 --- FAIL: TestEffectivePolicyLaunchAttestation/env (0.00s)
5857 policy_test.go:209: changed launch accepted
5858FAIL
5859rastrillo-budget/v1 ran 66ms
5860FAIL amadan.net/oficina/equipo/internal/runner/provider 0.068s
5861FAIL
5862```
5863
5864#### Mutation 42: launch mounts
5865
5866File: `internal/runner/provider/policy.go`.
5867
5868Replace:
5869
5870```go
5871if !reflect.DeepEqual(expectedMounts, p.Mounts) {
5872```
5873
5874with:
5875
5876```go
5877if false && !reflect.DeepEqual(expectedMounts, p.Mounts) {
5878```
5879
5880```sh
5881CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/mount$ -count=1
5882```
5883
5884Exit 1, compiled failure:
5885
5886```text
5887--- FAIL: TestEffectivePolicyLaunchAttestation (0.07s)
5888 --- FAIL: TestEffectivePolicyLaunchAttestation/mount (0.00s)
5889 policy_test.go:209: changed launch accepted
5890FAIL
5891rastrillo-budget/v1 ran 67ms
5892FAIL amadan.net/oficina/equipo/internal/runner/provider 0.069s
5893FAIL
5894```
5895
5896#### Mutation 43: manifest integrity
5897
5898File: `internal/runner/provider/policy.go`.
5899
5900Replace:
5901
5902```go
5903if digest(p.Manifest) != p.ManifestHash {
5904```
5905
5906with:
5907
5908```go
5909if false && digest(p.Manifest) != p.ManifestHash {
5910```
5911
5912```sh
5913CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/manifesthash$ -count=1
5914```
5915
5916Exit 1, compiled failure:
5917
5918```text
5919--- FAIL: TestEffectivePolicyLaunchAttestation (0.06s)
5920 --- FAIL: TestEffectivePolicyLaunchAttestation/manifesthash (0.00s)
5921 policy_test.go:212: changed launch accepted
5922FAIL
5923rastrillo-budget/v1 ran 63ms
5924FAIL amadan.net/oficina/equipo/internal/runner/provider 0.064s
5925FAIL
5926```
5927
5928#### Mutation 44: policy hash integrity
5929
5930File: `internal/runner/provider/policy.go`.
5931
5932Replace:
5933
5934```go
5935if policyHash != p.Hash {
5936```
5937
5938with:
5939
5940```go
5941if false && policyHash != p.Hash {
5942```
5943
5944```sh
5945CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/policyhash$ -count=1
5946```
5947
5948Exit 1, compiled failure:
5949
5950```text
5951--- FAIL: TestEffectivePolicyLaunchAttestation (0.06s)
5952 --- FAIL: TestEffectivePolicyLaunchAttestation/policyhash (0.00s)
5953 policy_test.go:209: changed launch accepted
5954FAIL
5955rastrillo-budget/v1 ran 62ms
5956FAIL amadan.net/oficina/equipo/internal/runner/provider 0.064s
5957FAIL
5958```
5959
5960#### Mutation 45: network binding
5961
5962File: `internal/runner/provider/policy.go`.
5963
5964Replace the body of `func (p Policy) ValidateNetwork(name string, hosts []string) error` with:
5965
5966```go
5967return nil
5968```
5969
5970```sh
5971CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation$ -count=1
5972```
5973
5974Exit 1, compiled failure:
5975
5976```text
5977--- FAIL: TestEffectivePolicyLaunchAttestation (0.06s)
5978 policy_test.go:214: egress drift accepted
5979FAIL
5980rastrillo-budget/v1 ran 63ms
5981FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
5982FAIL
5983```
5984
5985#### Mutation 46: host binary inclusion
5986
5987File: `internal/runner/provider/policy.go`.
5988
5989Replace the body of `func (p Policy) ValidateRuntimeBinaries(paths ...string) error` with:
5990
5991```go
5992return nil
5993```
5994
5995```sh
5996CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHostBinary$ -count=1
5997```
5998
5999Exit 1, compiled failure:
6000
6001```text
6002--- FAIL: TestEffectivePolicyHostBinary (0.06s)
6003 policy_test.go:272: unhashed host binary accepted
6004FAIL
6005rastrillo-budget/v1 ran 63ms
6006FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
6007FAIL
6008```
6009
6010#### Mutation 47: pinned digest
6011
6012File: `internal/runner/provider/policy.go`.
6013
6014Replace the body of `func (p Policy) ValidateFileDigest(path, hash string) error` with:
6015
6016```go
6017return nil
6018```
6019
6020```sh
6021CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyManifestBoundary$ -count=1
6022```
6023
6024Exit 1, compiled failure:
6025
6026```text
6027--- FAIL: TestEffectivePolicyManifestBoundary (0.06s)
6028 policy_test.go:285: changed pinned file digest accepted
6029FAIL
6030rastrillo-budget/v1 ran 63ms
6031FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s
6032FAIL
6033```
6034
6035#### Mutation 48: duplicate binding
6036
6037File: `internal/runner/connections.go`.
6038
6039Replace:
6040
6041```go
6042 || seen[key]
6043```
6044
6045with:
6046
6047```go
6048// removed
6049```
6050
6051```sh
6052CGO_ENABLED=0 go test ./internal/runner -run ^TestAccountHomeConfiguredDiscovery$ -count=1
6053```
6054
6055Exit 1, compiled failure:
6056
6057```text
6058--- FAIL: TestAccountHomeConfiguredDiscovery (0.00s)
6059 connections_test.go:133: second matching binding accepted
6060FAIL
6061rastrillo-budget/v1 ran 2ms
6062FAIL amadan.net/oficina/equipo/internal/runner 0.004s
6063FAIL
6064```
6065
6066#### Mutation 49: runtime config path
6067
6068File: `internal/runner/config.go`.
6069
6070Replace the body of `func (c Config) DirectBinding(b AccountBinding) (provider.Binding, error)` with:
6071
6072```go
6073return provider.Binding{Home:b.ProviderHome,Expected:b.ExpectedIdentity},nil
6074```
6075
6076```sh
6077CGO_ENABLED=0 go test ./internal/runner -run ^TestAccountHomeConfiguredRuntime$ -count=1
6078```
6079
6080Exit 1, compiled failure:
6081
6082```text
6083--- FAIL: TestAccountHomeConfiguredRuntime (0.00s)
6084 config_test.go:146: unsafe runtime root accepted: /
6085FAIL
6086rastrillo-budget/v1 ran 0s
6087FAIL amadan.net/oficina/equipo/internal/runner 0.002s
6088FAIL
6089```
6090
6091#### Mutation 50: egress provenance
6092
6093File: `internal/runner/containment/egress.go`.
6094
6095Replace:
6096
6097```go
6098if l.Binding.DedicatedHome && !l.Binding.VerifiedDedicatedHome() {
6099```
6100
6101with:
6102
6103```go
6104if false && l.Binding.DedicatedHome && !l.Binding.VerifiedDedicatedHome() {
6105```
6106
6107```sh
6108CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestEgressRejectsForgedDedicatedHome$ -count=1
6109```
6110
6111Exit 1, compiled failure:
6112
6113```text
6114--- FAIL: TestEgressRejectsForgedDedicatedHome (0.00s)
6115 egress_test.go:329: egress accepted forged provenance
6116FAIL
6117rastrillo-budget/v1 ran 2ms
6118FAIL amadan.net/oficina/equipo/internal/runner/containment 0.003s
6119FAIL
6120```
6121
6122#### Mutation 51: persist concrete hash
6123
6124File: `internal/runner/containment/linux.go`.
6125
6126Replace:
6127
6128```go
6129ManifestHash: manifestHash,
6130```
6131
6132with:
6133
6134```go
6135ManifestHash: l.Policy.Hash,
6136```
6137
6138```sh
6139CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceConcreteManifestHash$ -count=1
6140```
6141
6142Exit 1, compiled failure:
6143
6144```text
6145--- FAIL: TestNamespaceConcreteManifestHash (0.05s)
6146 linux_test.go:647: policy hash substituted for concrete manifest hash
6147FAIL
6148rastrillo-budget/v1 ran 47ms
6149FAIL amadan.net/oficina/equipo/internal/runner/containment 0.048s
6150FAIL
6151```
6152
6153#### Mutation 52: directory mode
6154
6155File: `internal/runner/provider/accounts.go`.
6156
6157Replace the body of `func privateDirectory(f *os.File) bool` with:
6158
6159```go
6160return true
6161```
6162
6163```sh
6164CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeFileGuards/directory_mode$ -count=1
6165```
6166
6167Exit 1, compiled failure:
6168
6169```text
6170--- FAIL: TestAccountHomeFileGuards (0.02s)
6171 --- FAIL: TestAccountHomeFileGuards/directory_mode (0.02s)
6172 accounts_test.go:380: unsafe account input accepted
6173FAIL
6174rastrillo-budget/v1 ran 23ms
6175FAIL amadan.net/oficina/equipo/internal/runner/provider 0.024s
6176FAIL
6177```
6178
6179#### Mutation 53: credential hardlink
6180
6181File: `internal/runner/provider/accounts.go`.
6182
6183Replace:
6184
6185```go
6186 || st.Nlink != 1
6187```
6188
6189with:
6190
6191```go
6192// removed
6193```
6194
6195```sh
6196CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeFileGuards/credential_hardlink$ -count=1
6197```
6198
6199Exit 1, compiled failure:
6200
6201```text
6202--- FAIL: TestAccountHomeFileGuards (0.02s)
6203 --- FAIL: TestAccountHomeFileGuards/credential_hardlink (0.02s)
6204 accounts_test.go:380: unsafe account input accepted
6205FAIL
6206rastrillo-budget/v1 ran 23ms
6207FAIL amadan.net/oficina/equipo/internal/runner/provider 0.025s
6208FAIL
6209```
6210
6211#### Mutation 54: duplicate metadata
6212
6213File: `internal/runner/provider/accounts.go`.
6214
6215Replace:
6216
6217```go
6218metadata, e = canonical(metadata)
6219```
6220
6221with:
6222
6223```go
6224metadata, e = metadata,nil
6225```
6226
6227```sh
6228CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeFileGuards/metadata_duplicate$ -count=1
6229```
6230
6231Exit 1, compiled failure:
6232
6233```text
6234--- FAIL: TestAccountHomeFileGuards (0.02s)
6235 --- FAIL: TestAccountHomeFileGuards/metadata_duplicate (0.02s)
6236 accounts_test.go:380: unsafe account input accepted
6237FAIL
6238rastrillo-budget/v1 ran 22ms
6239FAIL amadan.net/oficina/equipo/internal/runner/provider 0.024s
6240FAIL
6241```
6242
6243#### Mutation 55: controlled generation
6244
6245File: `internal/runner/provider/accounts.go`.
6246
6247Replace:
6248
6249```go
6250digest := sha256.Sum256(bytes.Join([][]byte{metadata, raw, state}, nil))
6251```
6252
6253with:
6254
6255```go
6256_ = state
6257 digest := sha256.Sum256(bytes.Join([][]byte{metadata, raw}, nil))
6258```
6259
6260```sh
6261CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeGuards/same_bytes_new_generation$ -count=1
6262```
6263
6264Exit 1, compiled failure:
6265
6266```text
6267--- FAIL: TestAccountHomeRuntimeGuards (0.04s)
6268 --- FAIL: TestAccountHomeRuntimeGuards/same_bytes_new_generation (0.04s)
6269 accounts_test.go:302: atomic generation not detected
6270FAIL
6271rastrillo-budget/v1 ran 43ms
6272FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s
6273FAIL
6274```
6275
6276#### Mutation 56: observed identity
6277
6278File: `internal/runner/provider/accounts.go`.
6279
6280Replace:
6281
6282```go
6283if id != l.source.Expected {
6284```
6285
6286with:
6287
6288```go
6289if false && id != l.source.Expected {
6290```
6291
6292```sh
6293CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomePreflightGuards/observed_identity$ -count=1
6294```
6295
6296Exit 1, compiled failure:
6297
6298```text
6299--- FAIL: TestAccountHomePreflightGuards (0.04s)
6300 --- FAIL: TestAccountHomePreflightGuards/observed_identity (0.04s)
6301 accounts_test.go:393: wrong CLI identity accepted <nil>
6302FAIL
6303rastrillo-budget/v1 ran 43ms
6304FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s
6305FAIL
6306```
6307
6308#### Mutation 57: probe stable generation
6309
6310File: `internal/runner/provider/accounts.go`.
6311
6312Replace:
6313
6314```go
6315if before != after {
6316```
6317
6318with:
6319
6320```go
6321if false && before != after {
6322```
6323
6324```sh
6325CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomePreflightGuards/generation_during_probe$ -count=1
6326```
6327
6328Exit 1, compiled failure:
6329
6330```text
6331--- FAIL: TestAccountHomePreflightGuards (0.04s)
6332 --- FAIL: TestAccountHomePreflightGuards/generation_during_probe (0.04s)
6333 accounts_test.go:403: unstable probe accepted <nil>
6334FAIL
6335rastrillo-budget/v1 ran 43ms
6336FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s
6337FAIL
6338```
6339
6340#### Mutation 58: runtime no side effects
6341
6342File: `internal/runner/provider/accounts.go`.
6343
6344Replace:
6345
6346```go
6347root, e := makePrivateRoot(b.RuntimeRoot)
6348```
6349
6350with:
6351
6352```go
6353_ = os.MkdirAll(b.RuntimeRoot,0700)
6354 root, e := makePrivateRoot(b.RuntimeRoot)
6355```
6356
6357```sh
6358CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeAliasNoSideEffects$ -count=1
6359```
6360
6361Exit 1, compiled failure:
6362
6363```text
6364--- FAIL: TestAccountHomeRuntimeAliasNoSideEffects (0.00s)
6365 accounts_test.go:356: interactive directory changed <nil>
6366FAIL
6367rastrillo-budget/v1 ran 1ms
6368FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s
6369FAIL
6370```
6371
6372#### Mutation 59: credential source import
6373
6374File: `internal/runner/provider/policy.go`.
6375
6376Replace:
6377
6378```go
6379if credentialSource(m.Source, b) {
6380```
6381
6382with:
6383
6384```go
6385if false && credentialSource(m.Source, b) {
6386```
6387
6388```sh
6389CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestPrivateHomeRejectsCredentialMount$ -count=1
6390```
6391
6392Exit 1, compiled failure:
6393
6394```text
6395--- FAIL: TestPrivateHomeRejectsCredentialMount (0.07s)
6396 policy_test.go:302: credential source entered public manifest
6397FAIL
6398rastrillo-budget/v1 ran 67ms
6399FAIL amadan.net/oficina/equipo/internal/runner/provider 0.069s
6400FAIL
6401```
6402
6403#### Mutation 60: credential inode import
6404
6405File: `internal/runner/provider/policy.go`.
6406
6407Replace:
6408
6409```go
6410 || stat.Nlink != 1
6411```
6412
6413with:
6414
6415```go
6416// removed
6417```
6418
6419```sh
6420CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestPrivateHomeRejectsCredentialMount$ -count=1
6421```
6422
6423Exit 1, compiled failure:
6424
6425```text
6426--- FAIL: TestPrivateHomeRejectsCredentialMount (0.07s)
6427 policy_test.go:310: credential inode alias entered public manifest
6428FAIL
6429rastrillo-budget/v1 ran 69ms
6430FAIL amadan.net/oficina/equipo/internal/runner/provider 0.071s
6431FAIL
6432```
6433
6434### User-facing strings
6435
6436No UI or prose runtime strings were added, and copy.go is unchanged. New internal error codes are `provider_account_busy`, `provider_account_maintenance`, `provider_preflight_required`, `provider_account_containment` and `provider_policy_rejected`. Existing `provider_identity_mismatch` is reused. If later adapters expose these states to people, their copy.go entries need individual pending markers and the release copy pass. Tests and this controller report contain explanatory text only.
6437
6438### Concerns and remaining integration
6439
6440- No real dedicated homes exist yet. Enrolment must create them and record Paul-confirmed expected identity. No production credential provenance or live refresh was certified here.
6441- Tasks 5 and 6 must use the lease admission/readback checks for every turn and resume, include their exact binary/helper/tool/MCP/RPC inputs and render native provider configuration. Task 7 owns durable capture and any cross-lease session restoration. Task 11a owns removal of legacy discovery and launch paths.
6442- Full sandbox/sentinel certification and an installed, certified provider auth hostname remain Task 11b release gates. DirectPolicies remains empty in the embedded release manifest.
6443- Refusal tests cover injected fake paths, symlink aliases and inode identity. No privileged host bind mount was created. The production mountinfo alias rule is exercised without touching real shared credential homes.
6444
6445All source changes are restored after mutations. Tests use owned temporary files only. No server, watcher, background provider, model process or review agent remains. No README, other worktree, default branch or production configuration was changed.
6446
6447
6448## Task 4 fix round 1: refreshed logins and direct launch attestation
6449
6450Status: DONE. All seven findings and the neutral-path cleanup are addressed.
6451Commit subject: `fix: preserve refreshed logins and attest every direct launch` (61 characters).
6452Branch: `plan-2b`. Work stayed in `/home/paulca/amadan.net/oficina/equipo-plan-2b`.
6453
6454### What changed
6455
6456A harness login update now returns `ErrRefreshPending`. Preflight refuses to restage while that update is pending, including when the caller has not called Validate first. The runtime login stays intact until CommitRefresh verifies the observed identity and atomically commits it to the dedicated source. A successful commit accepts that runtime generation but still requires a fresh preflight before another turn. Tests cover refresh both between turns and during an active turn, failed maintenance, and a changed observed identity.
6457
6458Containment is sticky for the lease. Active source-generation changes, replaced directories, unsafe source/runtime login files, and changed identity stop admission. Restoring the original files does not clear containment. This also applies when Preflight detects source or identity tampering directly. Contained leases lose dedicated-home provenance and cannot begin another turn. Runtime identity metadata is checked as well as source metadata; actual provider identity still comes from the adapter's no-prompt probe during CommitRefresh and Preflight.
6459
6460Manager.Start requires a manifest for every nonempty Selection.Provider before it creates attempt state or forks. AttestLaunch independently rejects legacy attestation for a selected provider. Provider-less check jobs retain their existing legacy manifest path.
6461
6462Generated settings and MCP files now live in a separate, pinned, lease-owned config directory. Only their read-only file mounts reach the namespace at the fixed config paths. The writable runtime home no longer contains them. The manifest includes the concrete config directory and normalizes its lease-owned role in the reusable policy hash. Close removes this directory. Runtime/managed/instruction sources inside the writable workspace or supplied scratch are rejected to prevent another writable alias.
6463
6464BuildPolicy retains a private copy of the manifest on the lease. BeginTurn checks its generated and managed/runtime source contents again. Adapters can call AccountLease.ValidatePolicy before a resume; Policy.ValidateSources also exposes the file check and is used by AttestLaunch. Config directory replacement or loss of private permissions is rejected. The existing pinned-file digest check remains the final check after mount descriptors are retained.
6465
6466DefaultHomeRules resolves the effective UID through os/user.LookupId, which works with CGO_ENABLED=0. It fails closed if the lookup fails or has no absolute home. HOME no longer selects the default refusal paths. Inherited CODEX_HOME and CLAUDE_CONFIG_DIR paths and their resolved aliases are also refused. loadDirectBindings uses these same rules and rejects conflicting LocalID/PersonID ownership indexed by ProviderHome, Expected.HomeID and provider/account identity. Existing model ordering is preserved.
6467
6468The egress fixtures now create fake leases and complete BuildPolicy manifests with the actual bwrap and runner binaries. TestNamespaceDirectPolicy reaches a running namespace and verifies config cannot be written there. TestNamespaceDirectPolicySwapBeforePin swaps the settings file through an unexported test hook immediately after attestation; Start rejects the pinned digest. Admission tests separately exercise changed binaries, argv, environment and mounts through Manager.Start. The hard-coded developer home in the ZeroSub path-only test is now `/home/example`.
6469
6470### Files
6471
6472- `internal/runner/provider/accounts.go`, `accounts_test.go`: refresh state, containment latch, trusted home rules, config directory ownership and turn/resume checks.
6473- `internal/runner/provider/policy.go`, `policy_test.go`: config staging, source validation, writable-alias refusal, direct attestation and regression tests.
6474- `internal/runner/connections.go`, `connections_test.go`: unique account/home ownership across configured people and LocalIDs.
6475- `internal/runner/containment/linux.go`, `linux_test.go`, `egress_test.go`: mandatory direct manifests, deterministic attestation-to-pin test hook, running direct namespace and converted egress fixtures.
6476- This appended controller section and the appended local task report. `mounts.go` was mutated for verification and restored byte-for-byte; it has no final change.
6477
6478### Interpretations
6479
6480The binding controller ruling takes precedence over the original active-turn runtime mutation expectation: a regular runtime login update with matching enrolled metadata is provisionally refresh-pending even during a turn. CommitRefresh must then observe the same provider identity, and Preflight must succeed before another turn or resume. A changed observed identity latches containment. No token is parsed as an independent identity attestation.
6481
6482The original brief explicitly permits a new source credential generation with the same identity between turns after fresh preflight. That behavior remains. A source generation change during an active turn, a source directory/file replacement that violates the pinned/private file rules, or an identity change is contained. Source login files that cannot be safely read are also contained.
6483
6484Account identity uniqueness is scoped by provider and AccountID, since provider IDs are separate namespaces. ProviderHome and Equipo HomeID uniqueness apply across all configured bindings. Multiple models for the same LocalID/person/account remain valid.
6485
6486The task's explicit instructions override generic writing-pipeline delegation, copy-review and handoff workflows. No copy-review skill/server, model call, helper agent or `.claude/HANDOFF.md` was used. All login files used in tests were owned fake fixtures under on-disk test scratch. No real credential home was created or opened, no provider was contacted, and no machine was enrolled.
6487
6488### RED evidence
6489
6490Commands ran from `/home/paulca/amadan.net/oficina/equipo-plan-2b` with on-disk TMPDIR `/home/paulca/t/e2b` and default Go caches. Tests were added before each finding's implementation. The direct-namespace coverage finding added a test-only interleaving hook; its initial RED was the missing hook field. The other findings produced behavioral failures before implementation.
6491
6492```sh
6493CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccountRefreshPending|TestAccountContainmentLatched|TestAccountHomeDefaultsIgnoreEnvironment|TestAccountHomeConfiguredDiscoveryAliases' -count=1
6494```
6495
6496Exit 1:
6497
6498```text
6499--- FAIL: TestAccountRefreshPending (0.28s)
6500 --- FAIL: TestAccountRefreshPending/false (0.14s)
6501 accounts_test.go:451: refresh must be pending: provider_preflight_required
6502 --- FAIL: TestAccountRefreshPending/true (0.14s)
6503 accounts_test.go:451: refresh must be pending: provider_account_containment
6504--- FAIL: TestAccountContainmentLatched (1.06s)
6505 --- FAIL: TestAccountContainmentLatched/source (0.21s)
6506 accounts_test.go:487: containment not latched: <nil>
6507 --- FAIL: TestAccountContainmentLatched/identity (0.20s)
6508 accounts_test.go:487: containment not latched: <nil>
6509 --- FAIL: TestAccountContainmentLatched/runtime-identity (0.21s)
6510 accounts_test.go:482: active tampering not contained: <nil>
6511 accounts_test.go:487: containment not latched: <nil>
6512 --- FAIL: TestAccountContainmentLatched/symlink (0.22s)
6513 accounts_test.go:487: containment not latched: <nil>
6514 --- FAIL: TestAccountContainmentLatched/nonregular (0.22s)
6515 accounts_test.go:487: containment not latched: <nil>
6516--- FAIL: TestAccountHomeDefaultsIgnoreEnvironment (0.00s)
6517 accounts_test.go:497: passwd home accepted with changed HOME
6518FAIL
6519rastrillo-budget/v1 ran 1.344s
6520FAIL amadan.net/oficina/equipo/internal/runner/provider 1.350s
6521--- FAIL: TestAccountHomeConfiguredDiscoveryAliases (0.00s)
6522 --- FAIL: TestAccountHomeConfiguredDiscoveryAliases/home (0.00s)
6523 connections_test.go:154: shared binding authority accepted
6524 --- FAIL: TestAccountHomeConfiguredDiscoveryAliases/home-id (0.00s)
6525 connections_test.go:154: shared binding authority accepted
6526 --- FAIL: TestAccountHomeConfiguredDiscoveryAliases/account (0.00s)
6527 connections_test.go:154: shared binding authority accepted
6528FAIL
6529rastrillo-budget/v1 ran 8ms
6530FAIL amadan.net/oficina/equipo/internal/runner 0.012s
6531FAIL
6532```
6533
6534```sh
6535CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestEffectivePolicyTurnSources|TestPrivateHomeConfigOutsideWritableMounts|TestEffectivePolicyRejectsWritableSource|TestNamespaceProviderRequiresManifest' -count=1
6536```
6537
6538Exit 1:
6539
6540```text
6541--- FAIL: TestEffectivePolicyTurnSources (0.65s)
6542 --- FAIL: TestEffectivePolicyTurnSources/settings (0.21s)
6543 policy_test.go:327: changed policy admitted next turn
6544 --- FAIL: TestEffectivePolicyTurnSources/mcp (0.22s)
6545 policy_test.go:327: changed policy admitted next turn
6546 --- FAIL: TestEffectivePolicyTurnSources/managed (0.22s)
6547 policy_test.go:327: changed policy admitted next turn
6548--- FAIL: TestPrivateHomeConfigOutsideWritableMounts (0.21s)
6549 policy_test.go:334: config source has writable namespace alias
6550--- FAIL: TestEffectivePolicyRejectsWritableSource (0.42s)
6551 --- FAIL: TestEffectivePolicyRejectsWritableSource/workspace (0.21s)
6552 policy_test.go:342: writable managed alias accepted
6553 --- FAIL: TestEffectivePolicyRejectsWritableSource/scratch (0.21s)
6554 policy_test.go:342: writable managed alias accepted
6555FAIL
6556rastrillo-budget/v1 ran 1.28s
6557FAIL amadan.net/oficina/equipo/internal/runner/provider 1.282s
6558--- FAIL: TestNamespaceProviderRequiresManifest (0.11s)
6559 linux_test.go:688: provider launch without manifest forked
6560FAIL
6561rastrillo-budget/v1 ran 111ms
6562FAIL amadan.net/oficina/equipo/internal/runner/containment 0.113s
6563FAIL
6564```
6565
6566```sh
6567CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceDirectPolicy' -count=1
6568```
6569
6570Exit 1:
6571
6572```text
6573# amadan.net/oficina/equipo/internal/runner/containment [amadan.net/oficina/equipo/internal/runner/containment.test]
6574internal/runner/containment/linux_test.go:715:4: m.beforePin undefined (type *Manager has no field or method beforePin)
6575FAIL amadan.net/oficina/equipo/internal/runner/containment [build failed]
6576FAIL
6577```
6578
6579```sh
6580CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestAccountContainmentPreflightLatched$' -count=1
6581```
6582
6583Exit 1:
6584
6585```text
6586--- FAIL: TestAccountContainmentPreflightLatched (0.20s)
6587 --- FAIL: TestAccountContainmentPreflightLatched/source (0.06s)
6588 accounts_test.go:537: preflight containment not latched: <nil>
6589 --- FAIL: TestAccountContainmentPreflightLatched/identity (0.10s)
6590 accounts_test.go:537: preflight containment not latched: <nil>
6591FAIL
6592rastrillo-budget/v1 ran 204ms
6593FAIL amadan.net/oficina/equipo/internal/runner/provider 0.206s
6594FAIL
6595```
6596
6597```sh
6598CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestAccountContainmentSourceFile$' -count=1
6599```
6600
6601Exit 1:
6602
6603```text
6604--- FAIL: TestAccountContainmentSourceFile (0.12s)
6605 --- FAIL: TestAccountContainmentSourceFile/symlink (0.06s)
6606 accounts_test.go:652: unsafe source not contained: provider_account_maintenance
6607 accounts_test.go:655: unsafe source containment not latched: <nil>
6608 --- FAIL: TestAccountContainmentSourceFile/directory (0.06s)
6609 accounts_test.go:652: unsafe source not contained: provider_policy_rejected
6610 accounts_test.go:655: unsafe source containment not latched: <nil>
6611FAIL
6612rastrillo-budget/v1 ran 123ms
6613FAIL amadan.net/oficina/equipo/internal/runner/provider 0.125s
6614FAIL
6615```
6616
6617An earlier test-file import replacement caused a parser error; it was corrected before the recorded direct-test RED. It is not behavioral evidence.
6618
6619### GREEN evidence
6620
6621All implementation and supplemental tests passed before mutation checks. The intermediate commands were:
6622
6623```sh
6624CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccount' -count=1
6625CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestEffectivePolicy|TestPrivateHome|TestNamespaceProviderRequiresManifest' -count=1
6626CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestAccountContainmentPreflightLatched|TestNamespaceDirectPolicy|TestNamespaceProviderRequiresManifest|TestAccountHomeLookupFailClosed|TestAccountRefreshPreflightPreservesLogin|TestEffectivePolicyProviderRequiresManifest' -count=1
6627CGO_ENABLED=0 go test ./internal/runner/provider -run 'TestAccountContainmentSourceFile|TestEffectivePolicyConfigDirectory' -count=1
6628CGO_ENABLED=0 go test ./internal/runner/provider -run 'TestAccountContainmentLatched|TestAccountRefreshFailure' -count=1
6629```
6630
6631Each exited 0. During conversion, the long-scratch egress fixture initially retained its old runtime-home root and failed with namespace_mount_rejected. It now constructs the lease under the final long scratch root; the final covering command includes that test.
6632
6633After restoring all mutations, the required covering command passed:
6634
6635```sh
6636CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner ./internal/runner/containment ./internal/runner/egress -run 'TestAccount|TestEffectivePolicy|TestUnexpectedConfig|TestPrivateHome|TestNamespace|TestEgress' -count=1
6637```
6638
6639Exit 0:
6640
6641```text
6642ok amadan.net/oficina/equipo/internal/runner/provider 8.656s
6643ok amadan.net/oficina/equipo/internal/runner 19.597s
6644ok amadan.net/oficina/equipo/internal/runner/containment 7.646s
6645ok amadan.net/oficina/equipo/internal/runner/egress 3.280s
6646```
6647
6648```sh
6649make runner-namespace-test
6650```
6651
6652Exit 0:
6653
6654```text
6655CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1
6656ok amadan.net/oficina/equipo/internal/runner/containment 5.055s
6657```
6658
6659`gofmt` was appli