oficina / equipo Public
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 | |
| 5 | Status: DONE. Work stayed on `plan-2b` in `/home/paulca/amadan.net/oficina/equipo-plan-2b`. |
| 6 | |
| 7 | ### Built |
| 8 | |
| 9 | Declared 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 | |
| 11 | Added 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 | |
| 13 | Extended 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 | |
| 15 | Historical 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 | |
| 30 | Full 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 | |
| 34 | 1. 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. |
| 35 | 2. 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. |
| 36 | 3. `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. |
| 37 | 4. 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. |
| 38 | 5. 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 | |
| 42 | Tests and the budget TestMain were written before implementation. Command, from the repository root: |
| 43 | |
| 44 | ```sh |
| 45 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/equipo/team -run 'TestDirect|TestHistoricalIsolation' -count=1 |
| 46 | ``` |
| 47 | |
| 48 | Exit 1. Output excerpts: |
| 49 | |
| 50 | ```text |
| 51 | internal/runner/provider/types_test.go:15:13: undefined: ValidateContract |
| 52 | internal/runner/provider/types_test.go:26:12: undefined: Launch |
| 53 | FAIL amadan.net/oficina/equipo/internal/runner/provider [build failed] |
| 54 | internal/equipo/team/direct_history_test.go:15:76: unknown field LauncherVersion in struct literal of type team.IsolationTuple |
| 55 | internal/equipo/team/direct_history_test.go:29:11: got.ValidForDirectLaunch undefined |
| 56 | FAIL amadan.net/oficina/equipo/internal/equipo/team [build failed] |
| 57 | ``` |
| 58 | |
| 59 | ### GREEN |
| 60 | |
| 61 | Repeated 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 |
| 64 | ok amadan.net/oficina/equipo/internal/runner/provider 0.002s |
| 65 | ok amadan.net/oficina/equipo/internal/equipo/team 0.004s |
| 66 | ``` |
| 67 | |
| 68 | Targeted compatibility command: |
| 69 | |
| 70 | ```sh |
| 71 | CGO_ENABLED=0 go test ./internal/runner ./internal/runner/paseo ./internal/equipo/team -run '^(TestRunnerServiceLifecycleWiring|TestRunnerServiceVersions|TestRunnerJournalCrashBoundaries|TestPaseoAdapterContract|TestTrialEvidenceAndPublication|TestEvidenceObservedIsolation)$' -count=1 |
| 72 | ``` |
| 73 | |
| 74 | Exit 0: |
| 75 | |
| 76 | ```text |
| 77 | ok amadan.net/oficina/equipo/internal/runner 0.988s |
| 78 | ok amadan.net/oficina/equipo/internal/runner/paseo 0.004s |
| 79 | ok 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 |
| 85 | CGO_ENABLED=0 go list -f '{{join .Imports "\n"}}' ./internal/runner/provider |
| 86 | ``` |
| 87 | |
| 88 | Output: `context`, `encoding/json`, `io`, `time`. No runner, runnerproto or Paseo import, and no aliases to Paseo types. |
| 89 | |
| 90 | ### Mutations |
| 91 | |
| 92 | 36 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 | |
| 94 | One 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 | |
| 96 | 1. `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 | |
| 111 | 2. `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 | |
| 126 | 3. `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 | |
| 141 | 4. `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 | |
| 156 | 5. `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 | |
| 171 | 6. `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 | |
| 186 | 7. `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 | |
| 201 | 8. `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 | |
| 216 | 9. `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 | |
| 231 | 10. `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 | |
| 246 | 11. `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 | |
| 261 | 12. `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 | |
| 276 | 13. `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 | |
| 291 | 14. `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 | |
| 306 | 15. `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 | |
| 321 | 16. `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 | |
| 336 | 17. `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 | |
| 351 | 18. `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 | |
| 366 | 19. `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 | |
| 381 | 20. `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 | |
| 396 | 21. `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 | |
| 411 | 22. `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 | |
| 426 | 23. `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 | |
| 441 | 24. `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 | |
| 456 | 25. `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 | |
| 471 | 26. `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 | |
| 486 | 27. `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 | |
| 501 | 28. `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 | |
| 516 | 29. `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 | |
| 531 | 30. `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 | |
| 546 | 31. `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 | |
| 561 | 32. `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 | |
| 576 | 33. `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 | |
| 591 | 34. `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 | |
| 606 | 35. `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 | |
| 621 | 36. `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 | |
| 633 | No 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 | |
| 637 | No 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 | |
| 639 | All 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 | |
| 643 | Status: 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 | |
| 649 | The 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 | |
| 651 | The 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 | |
| 653 | Mount 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 | |
| 655 | Recovery 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 | |
| 672 | 1. 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. |
| 673 | 2. 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. |
| 674 | 3. `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. |
| 675 | 4. `/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. |
| 676 | 5. 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. |
| 677 | 6. 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. |
| 678 | 7. `.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. |
| 679 | 8. 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 | |
| 683 | Host: DOCS-T1. User: paulca, UID 1001. Go: go1.26.10 linux/amd64. `/usr/bin/bwrap --version` returned exactly `bubblewrap 0.11.0`. |
| 684 | |
| 685 | Read-only observations: |
| 686 | |
| 687 | ```sh |
| 688 | id |
| 689 | /usr/bin/bwrap --version |
| 690 | cat /proc/self/cgroup |
| 691 | ls -ld /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service |
| 692 | cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.subtree_control |
| 693 | ``` |
| 694 | |
| 695 | ```text |
| 696 | uid=1001(paulca) gid=1001(paulca) |
| 697 | bubblewrap 0.11.0 |
| 698 | 0::/user.slice/user-1001.slice/user@1001.service/app.slice/paseo.service |
| 699 | drwxr-xr-x ... paulca paulca ... user@1001.service |
| 700 | cpu 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 | |
| 707 | Required 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 | |
| 711 | All 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 |
| 714 | CGO_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] |
| 719 | internal/runner/containment/linux_test.go:23:30: undefined: Manager |
| 720 | internal/runner/containment/linux_test.go:31:12: undefined: New |
| 721 | internal/runner/containment/linux_test.go:31:16: undefined: Config |
| 722 | internal/runner/containment/linux_test.go:35:29: undefined: Manager |
| 723 | internal/runner/containment/linux_test.go:44:29: undefined: Manager |
| 724 | internal/runner/containment/linux_test.go:44:57: undefined: Record |
| 725 | internal/runner/containment/linux_test.go:47:8: undefined: Record |
| 726 | internal/runner/containment/linux_test.go:138:7: undefined: New |
| 727 | internal/runner/containment/linux_test.go:138:11: undefined: Config |
| 728 | internal/runner/containment/budget_test.go:10:63: undefined: NamespaceMain |
| 729 | internal/runner/containment/linux_test.go:138:11: too many errors |
| 730 | FAIL amadan.net/oficina/equipo/internal/runner/containment [build failed] |
| 731 | FAIL |
| 732 | ``` |
| 733 | |
| 734 | Additional red command (exit 1): |
| 735 | |
| 736 | ```sh |
| 737 | CGO_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 |
| 748 | FAIL |
| 749 | rastrillo-budget/v1 ran 188ms |
| 750 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.190s |
| 751 | FAIL |
| 752 | ``` |
| 753 | |
| 754 | Additional red command (exit 1): |
| 755 | |
| 756 | ```sh |
| 757 | CGO_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 |
| 767 | FAIL |
| 768 | rastrillo-budget/v1 ran 242ms |
| 769 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.244s |
| 770 | FAIL |
| 771 | ``` |
| 772 | |
| 773 | Additional red command (exit 1): |
| 774 | |
| 775 | ```sh |
| 776 | CGO_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 |
| 782 | FAIL |
| 783 | rastrillo-budget/v1 ran 96ms |
| 784 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.098s |
| 785 | FAIL |
| 786 | ``` |
| 787 | |
| 788 | Additional red command (exit 1): |
| 789 | |
| 790 | ```sh |
| 791 | CGO_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> |
| 797 | FAIL |
| 798 | rastrillo-budget/v1 ran 58ms |
| 799 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.060s |
| 800 | FAIL |
| 801 | ``` |
| 802 | |
| 803 | Additional red command (exit 1): |
| 804 | |
| 805 | ```sh |
| 806 | CGO_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 |
| 815 | FAIL |
| 816 | rastrillo-budget/v1 ran 86ms |
| 817 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.088s |
| 818 | FAIL |
| 819 | ``` |
| 820 | |
| 821 | Additional red command (exit 1): |
| 822 | |
| 823 | ```sh |
| 824 | CGO_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] |
| 831 | FAIL |
| 832 | rastrillo-budget/v1 ran 15ms |
| 833 | FAIL amadan.net/oficina/equipo/internal/equipotest 0.062s |
| 834 | FAIL |
| 835 | ``` |
| 836 | |
| 837 | The 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 | |
| 841 | The final targeted namespace command runs 26 top-level namespace tests, plus their subtests, without skips: |
| 842 | |
| 843 | ```sh |
| 844 | CGO_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) |
| 950 | PASS |
| 951 | rastrillo-budget/v1 ran 1.911s |
| 952 | ok amadan.net/oficina/equipo/internal/runner/containment 1.913s |
| 953 | ``` |
| 954 | |
| 955 | Command (exit 0): |
| 956 | |
| 957 | ```sh |
| 958 | make runner-namespace-test |
| 959 | ``` |
| 960 | |
| 961 | ```text |
| 962 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 963 | ok amadan.net/oficina/equipo/internal/runner/containment 1.877s |
| 964 | ``` |
| 965 | |
| 966 | Command (exit 0): |
| 967 | |
| 968 | ```sh |
| 969 | CGO_ENABLED=0 go test ./internal/equipotest -run '^TestCIGateSteps$' -count=1 |
| 970 | ``` |
| 971 | |
| 972 | ```text |
| 973 | ok amadan.net/oficina/equipo/internal/equipotest 0.054s |
| 974 | ``` |
| 975 | |
| 976 | Final full required gate (exit 0): |
| 977 | |
| 978 | ```sh |
| 979 | CGO_ENABLED=0 make ci |
| 980 | ``` |
| 981 | |
| 982 | Complete gate output: |
| 983 | |
| 984 | ```text |
| 985 | CGO_ENABLED=0 go build ./... |
| 986 | go vet ./... |
| 987 | go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf ./... |
| 988 | go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... |
| 989 | === Symbol Results === |
| 990 | |
| 991 | No vulnerabilities found. |
| 992 | |
| 993 | Your code is affected by 0 vulnerabilities. |
| 994 | This scan also found 0 vulnerabilities in packages you import and 1 |
| 995 | vulnerability in modules you require, but your code doesn't appear to call these |
| 996 | vulnerabilities. |
| 997 | Use '-show verbose' for more details. |
| 998 | 10:19AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net |
| 999 | 10:19AM INF 112 commits scanned. |
| 1000 | 10:19AM INF scanned ~4078895 bytes (4.08 MB) in 432ms |
| 1001 | 10:19AM INF no leaks found |
| 1002 | go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size |
| 1003 | budget size: 17 directories within budget |
| 1004 | go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./... |
| 1005 | |
| 1006 | receipt: test step 3m12.543s against a 60s target (the gate's other steps are not in this figure) |
| 1007 | receipt: 13 packages ran, 0 cached, 4 without tests, 0 failed |
| 1008 | receipt: slow package 3m11.715s amadan.net/oficina/equipo/internal/equipotest |
| 1009 | receipt: slow package 2m52.086s amadan.net/oficina/equipo/internal/runner |
| 1010 | receipt: slow package 27.207s amadan.net/oficina/equipo/internal/equipo/team |
| 1011 | receipt: slow package 11.475s amadan.net/oficina/equipo/internal/runner/checks |
| 1012 | receipt: slow package 5.978s amadan.net/oficina/equipo/internal/runner/forge |
| 1013 | receipt: slow test 22.56s amadan.net/oficina/equipo/internal/equipotest TestRunnerEndToEnd |
| 1014 | receipt: slow test 21.89s amadan.net/oficina/equipo/internal/runner TestRunnerBugWorkflow |
| 1015 | receipt: slow test 17.08s amadan.net/oficina/equipo/internal/runner TestAccountFailoverStops |
| 1016 | receipt: slow test 16.6s amadan.net/oficina/equipo/internal/runner TestDeterministicAttemptErrorsFailWithReason |
| 1017 | receipt: slow test 9.1s amadan.net/oficina/equipo/internal/runner TestRunnerBugWorkflowRejectedTools |
| 1018 | command -v node |
| 1019 | /usr/local/bin/node |
| 1020 | command -v npm |
| 1021 | /usr/local/bin/npm |
| 1022 | npm ci --prefix runner/paseo --ignore-scripts --no-audit --no-fund --registry=https://registry.npmjs.org |
| 1023 | npm 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 | |
| 1025 | added 294 packages in 3s |
| 1026 | node --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 |
| 1066 | CGO_ENABLED=0 go test ./internal/runner/paseo -run 'TestPaseo|TestSubscriptionReady' -count=1 |
| 1067 | ok amadan.net/oficina/equipo/internal/runner/paseo 0.376s |
| 1068 | CGO_ENABLED=0 go test ./internal/runner/checks -run '^TestCheckSandbox' -count=1 |
| 1069 | ok amadan.net/oficina/equipo/internal/runner/checks 5.771s |
| 1070 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 1071 | ok amadan.net/oficina/equipo/internal/runner/containment 1.472s |
| 1072 | CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1 |
| 1073 | ok amadan.net/oficina/equipo/internal/equipo 0.090s |
| 1074 | go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./... |
| 1075 | perf: GET /: median 120µs, worst 139µs, budget 150ms |
| 1076 | perf: GET /auth/callback: median 50µs, worst 53µs, budget 150ms |
| 1077 | perf: GET /auth/verify: median 54µs, worst 60µs, budget 150ms |
| 1078 | perf: GET /connections: median 3.371ms, worst 3.617ms, budget 150ms |
| 1079 | perf: GET /conversation: median 3.75ms, worst 4.602ms, budget 150ms |
| 1080 | perf: GET /journey: median 3.624ms, worst 3.893ms, budget 150ms |
| 1081 | perf: GET /needs-you: median 3.5ms, worst 3.863ms, budget 150ms |
| 1082 | perf: GET /people: median 2.41ms, worst 2.689ms, budget 150ms |
| 1083 | perf: GET /projects: median 2.815ms, worst 3.327ms, budget 150ms |
| 1084 | perf: GET /projects/new: median 2.594ms, worst 2.81ms, budget 150ms |
| 1085 | perf: GET /projects/{id}: median 3.631ms, worst 3.922ms, budget 150ms |
| 1086 | perf: GET /projects/{id}/edit: median 2.68ms, worst 2.826ms, budget 150ms |
| 1087 | perf: GET /runners/enrol: median 8.794ms, worst 9.904ms, budget 150ms |
| 1088 | perf: GET /settings: median 2.611ms, worst 2.785ms, budget 150ms |
| 1089 | perf: GET /settings/recovery: median 8.358ms, worst 9.729ms, budget 150ms |
| 1090 | perf: GET /settings/recovery/release: median 8.197ms, worst 8.643ms, budget 150ms |
| 1091 | perf: GET /signin: median 194µs, worst 239µs, budget 150ms |
| 1092 | perf: GET /specialists/{key}: median 4.219ms, worst 5.692ms, budget 150ms |
| 1093 | perf: GET /tasks/new: median 2.745ms, worst 3.457ms, budget 150ms |
| 1094 | perf: GET /tasks/{id}: median 3.592ms, worst 3.671ms, budget 150ms |
| 1095 | perf: GET /tasks/{id}/merge: median 3.29ms, worst 4.034ms, budget 150ms |
| 1096 | perf: GET /tasks/{id}/questions/{question}: median 3.567ms, worst 3.712ms, budget 150ms |
| 1097 | perf: GET /work: median 2.558ms, worst 2.714ms, budget 150ms |
| 1098 | perf: cold boot: median 59ms of [57.991055ms 58.592532ms 59.697522ms], budget 500ms |
| 1099 | |
| 1100 | receipt: test step 8.484s against a 60s target (the gate's other steps are not in this figure) |
| 1101 | receipt: 1 packages ran, 0 cached, 16 without tests, 0 failed |
| 1102 | receipt: slow package 4.556s amadan.net/oficina/equipo/internal/equipotest |
| 1103 | receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/checks |
| 1104 | receipt: slow package 0s amadan.net/oficina/equipo/internal/equipo/team |
| 1105 | receipt: slow package 0s amadan.net/oficina/equipo/internal/equipo/teamcontract |
| 1106 | receipt: slow package 0s amadan.net/oficina/equipo/internal/equipo |
| 1107 | receipt: slow test 4.35s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens |
| 1108 | receipt: slow test 200ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot |
| 1109 | ``` |
| 1110 | |
| 1111 | Additional 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 |
| 1114 | CGO_ENABLED=0 go build -o "$TMPDIR/task2-evidence/equipo-runner" ./cmd/equipo-runner |
| 1115 | "$TMPDIR/task2-evidence/equipo-runner" __namespace /usr/bin/true |
| 1116 | exit 125 (expected 125 outside PID 1) |
| 1117 | ``` |
| 1118 | |
| 1119 | ### Guard mutations |
| 1120 | |
| 1121 | 40 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 |
| 1140 | CGO_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 |
| 1146 | FAIL |
| 1147 | rastrillo-budget/v1 ran 13ms |
| 1148 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.015s |
| 1149 | FAIL |
| 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 |
| 1169 | CGO_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: |
| 1175 | FAIL |
| 1176 | rastrillo-budget/v1 ran 20ms |
| 1177 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.022s |
| 1178 | FAIL |
| 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 |
| 1198 | CGO_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 |
| 1208 | FAIL |
| 1209 | rastrillo-budget/v1 ran 59ms |
| 1210 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s |
| 1211 | FAIL |
| 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 |
| 1231 | CGO_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'] |
| 1241 | FAIL |
| 1242 | rastrillo-budget/v1 ran 59ms |
| 1243 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s |
| 1244 | FAIL |
| 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 |
| 1264 | CGO_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'] |
| 1274 | FAIL |
| 1275 | rastrillo-budget/v1 ran 60ms |
| 1276 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.062s |
| 1277 | FAIL |
| 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 |
| 1306 | CGO_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 |
| 1312 | FAIL |
| 1313 | rastrillo-budget/v1 ran 97ms |
| 1314 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.099s |
| 1315 | FAIL |
| 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 |
| 1335 | CGO_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 |
| 1343 | FAIL |
| 1344 | rastrillo-budget/v1 ran 59ms |
| 1345 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s |
| 1346 | FAIL |
| 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 |
| 1367 | CGO_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 |
| 1373 | FAIL |
| 1374 | rastrillo-budget/v1 ran 70ms |
| 1375 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.072s |
| 1376 | FAIL |
| 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 |
| 1396 | CGO_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 |
| 1402 | FAIL |
| 1403 | rastrillo-budget/v1 ran 41ms |
| 1404 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.042s |
| 1405 | FAIL |
| 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 |
| 1425 | CGO_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 |
| 1431 | FAIL |
| 1432 | rastrillo-budget/v1 ran 40ms |
| 1433 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.041s |
| 1434 | FAIL |
| 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 |
| 1454 | CGO_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 |
| 1460 | FAIL |
| 1461 | rastrillo-budget/v1 ran 20ms |
| 1462 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.022s |
| 1463 | FAIL |
| 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 |
| 1483 | CGO_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} |
| 1489 | FAIL |
| 1490 | rastrillo-budget/v1 ran 45ms |
| 1491 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.046s |
| 1492 | FAIL |
| 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 |
| 1513 | CGO_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 |
| 1519 | FAIL |
| 1520 | rastrillo-budget/v1 ran 36ms |
| 1521 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.038s |
| 1522 | FAIL |
| 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 |
| 1542 | CGO_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> |
| 1548 | FAIL |
| 1549 | rastrillo-budget/v1 ran 61ms |
| 1550 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.063s |
| 1551 | FAIL |
| 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 |
| 1572 | CGO_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> |
| 1578 | FAIL |
| 1579 | rastrillo-budget/v1 ran 42ms |
| 1580 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.044s |
| 1581 | FAIL |
| 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 |
| 1601 | CGO_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 |
| 1612 | FAIL |
| 1613 | rastrillo-budget/v1 ran 126ms |
| 1614 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.128s |
| 1615 | FAIL |
| 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 |
| 1637 | CGO_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 |
| 1644 | FAIL |
| 1645 | rastrillo-budget/v1 ran 65ms |
| 1646 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.067s |
| 1647 | FAIL |
| 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 |
| 1667 | CGO_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 |
| 1676 | FAIL |
| 1677 | rastrillo-budget/v1 ran 77ms |
| 1678 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.079s |
| 1679 | FAIL |
| 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 |
| 1699 | CGO_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 |
| 1706 | FAIL |
| 1707 | rastrillo-budget/v1 ran 41ms |
| 1708 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.043s |
| 1709 | FAIL |
| 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 |
| 1729 | CGO_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 |
| 1736 | FAIL |
| 1737 | rastrillo-budget/v1 ran 43ms |
| 1738 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.045s |
| 1739 | FAIL |
| 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 |
| 1768 | CGO_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 |
| 1775 | FAIL |
| 1776 | rastrillo-budget/v1 ran 42ms |
| 1777 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.044s |
| 1778 | FAIL |
| 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 |
| 1798 | CGO_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 |
| 1805 | FAIL |
| 1806 | rastrillo-budget/v1 ran 43ms |
| 1807 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.045s |
| 1808 | FAIL |
| 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 |
| 1828 | CGO_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 |
| 1835 | FAIL |
| 1836 | rastrillo-budget/v1 ran 44ms |
| 1837 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.046s |
| 1838 | FAIL |
| 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 |
| 1858 | CGO_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 |
| 1864 | FAIL |
| 1865 | rastrillo-budget/v1 ran 42ms |
| 1866 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.044s |
| 1867 | FAIL |
| 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 |
| 1887 | CGO_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. |
| 1901 | FAIL |
| 1902 | rastrillo-budget/v1 ran 75ms |
| 1903 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.077s |
| 1904 | FAIL |
| 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 |
| 1924 | CGO_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 |
| 1930 | FAIL |
| 1931 | rastrillo-budget/v1 ran 16ms |
| 1932 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.018s |
| 1933 | FAIL |
| 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 |
| 1953 | CGO_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 |
| 1959 | FAIL |
| 1960 | rastrillo-budget/v1 ran 2.042s |
| 1961 | FAIL amadan.net/oficina/equipo/internal/runner/containment 2.044s |
| 1962 | FAIL |
| 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 |
| 1982 | CGO_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] |
| 1988 | FAIL |
| 1989 | rastrillo-budget/v1 ran 12ms |
| 1990 | FAIL amadan.net/oficina/equipo/internal/equipotest 0.061s |
| 1991 | FAIL |
| 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 |
| 2006 | CGO_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] |
| 2012 | FAIL |
| 2013 | rastrillo-budget/v1 ran 13ms |
| 2014 | FAIL amadan.net/oficina/equipo/internal/equipotest 0.061s |
| 2015 | FAIL |
| 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 |
| 2044 | CGO_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> |
| 2050 | FAIL |
| 2051 | rastrillo-budget/v1 ran 5.064s |
| 2052 | FAIL amadan.net/oficina/equipo/internal/runner/containment 5.066s |
| 2053 | FAIL |
| 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 |
| 2073 | CGO_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 |
| 2083 | FAIL |
| 2084 | rastrillo-budget/v1 ran 59ms |
| 2085 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.061s |
| 2086 | FAIL |
| 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 |
| 2107 | CGO_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 |
| 2117 | FAIL |
| 2118 | rastrillo-budget/v1 ran 58ms |
| 2119 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.060s |
| 2120 | FAIL |
| 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 |
| 2140 | CGO_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> |
| 2146 | FAIL |
| 2147 | rastrillo-budget/v1 ran 1.123s |
| 2148 | FAIL amadan.net/oficina/equipo/internal/runner/containment 1.124s |
| 2149 | FAIL |
| 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 |
| 2171 | CGO_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> |
| 2178 | FAIL |
| 2179 | rastrillo-budget/v1 ran 68ms |
| 2180 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.070s |
| 2181 | FAIL |
| 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 |
| 2201 | CGO_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> |
| 2208 | FAIL |
| 2209 | rastrillo-budget/v1 ran 91ms |
| 2210 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.093s |
| 2211 | FAIL |
| 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 |
| 2231 | CGO_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> |
| 2238 | FAIL |
| 2239 | rastrillo-budget/v1 ran 81ms |
| 2240 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.082s |
| 2241 | FAIL |
| 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 |
| 2261 | CGO_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> |
| 2268 | FAIL |
| 2269 | rastrillo-budget/v1 ran 86ms |
| 2270 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.087s |
| 2271 | FAIL |
| 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 |
| 2291 | CGO_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 |
| 2297 | FAIL |
| 2298 | rastrillo-budget/v1 ran 64ms |
| 2299 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.065s |
| 2300 | FAIL |
| 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 |
| 2320 | CGO_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 |
| 2329 | FAIL |
| 2330 | rastrillo-budget/v1 ran 142ms |
| 2331 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.143s |
| 2332 | FAIL |
| 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 |
| 2353 | CGO_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 |
| 2360 | FAIL |
| 2361 | rastrillo-budget/v1 ran 56ms |
| 2362 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.057s |
| 2363 | FAIL |
| 2364 | ``` |
| 2365 | |
| 2366 | Four 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 | |
| 2370 | No 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 | |
| 2374 | The 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 | |
| 2376 | Recovery 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 | |
| 2378 | No 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 | |
| 2383 | Date: 2026-11-03. Base: `5c1de26` on `plan-2b`. Author: `codex <codex~paul@keymail.dev>`. |
| 2384 | Commit subject: `fix: keep namespace exit proof independent of scratch cleanup`. |
| 2385 | Status: 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 | |
| 2393 | Same-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 | |
| 2399 | This 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 | |
| 2403 | The 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 | |
| 2405 | The 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 | |
| 2407 | Unknown 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 | |
| 2409 | The 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 | |
| 2413 | All 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 |
| 2416 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 2417 | ``` |
| 2418 | |
| 2419 | Exit 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 |
| 2442 | FAIL |
| 2443 | rastrillo-budget/v1 ran 2.447s |
| 2444 | FAIL amadan.net/oficina/equipo/internal/runner/containment 2.449s |
| 2445 | ``` |
| 2446 | |
| 2447 | All six read-only combinations failed. Red test cleanup restored the fixture directory permissions and removed its scratch. |
| 2448 | |
| 2449 | Preservation check before implementation: |
| 2450 | |
| 2451 | ```sh |
| 2452 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceRecoveryMalformedRecord$' -count=1 |
| 2453 | ``` |
| 2454 | |
| 2455 | ```text |
| 2456 | ok amadan.net/oficina/equipo/internal/runner/containment 0.143s |
| 2457 | ``` |
| 2458 | |
| 2459 | ### GREEN evidence |
| 2460 | |
| 2461 | After implementation, before mutations: |
| 2462 | |
| 2463 | ```sh |
| 2464 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 2465 | ``` |
| 2466 | |
| 2467 | ```text |
| 2468 | ok amadan.net/oficina/equipo/internal/runner/containment 2.607s |
| 2469 | ``` |
| 2470 | |
| 2471 | After 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 |
| 2476 | FAIL |
| 2477 | rastrillo-budget/v1 ran 2.032s |
| 2478 | FAIL amadan.net/oficina/equipo/internal/runner/containment 2.034s |
| 2479 | ``` |
| 2480 | |
| 2481 | The 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 |
| 2484 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 2485 | make runner-namespace-test |
| 2486 | ``` |
| 2487 | |
| 2488 | ```text |
| 2489 | ok amadan.net/oficina/equipo/internal/runner/containment 2.078s |
| 2490 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 2491 | ok amadan.net/oficina/equipo/internal/runner/containment 2.047s |
| 2492 | ``` |
| 2493 | |
| 2494 | These 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 | |
| 2498 | Each 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 |
| 2517 | CGO_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 |
| 2540 | FAIL |
| 2541 | rastrillo-budget/v1 ran 319ms |
| 2542 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.321s |
| 2543 | FAIL |
| 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 |
| 2564 | CGO_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 |
| 2570 | FAIL |
| 2571 | rastrillo-budget/v1 ran 55ms |
| 2572 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.057s |
| 2573 | FAIL |
| 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 |
| 2593 | CGO_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> |
| 2599 | FAIL |
| 2600 | rastrillo-budget/v1 ran 46ms |
| 2601 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.048s |
| 2602 | FAIL |
| 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 |
| 2623 | CGO_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> |
| 2629 | FAIL |
| 2630 | rastrillo-budget/v1 ran 47ms |
| 2631 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.049s |
| 2632 | FAIL |
| 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 |
| 2652 | CGO_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 |
| 2658 | FAIL |
| 2659 | rastrillo-budget/v1 ran 48ms |
| 2660 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.050s |
| 2661 | FAIL |
| 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 |
| 2683 | CGO_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> |
| 2689 | FAIL |
| 2690 | rastrillo-budget/v1 ran 69ms |
| 2691 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.070s |
| 2692 | FAIL |
| 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 |
| 2712 | CGO_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 |
| 2719 | FAIL |
| 2720 | rastrillo-budget/v1 ran 57ms |
| 2721 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.059s |
| 2722 | FAIL |
| 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 |
| 2741 | CGO_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> |
| 2747 | FAIL |
| 2748 | rastrillo-budget/v1 ran 57ms |
| 2749 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.059s |
| 2750 | FAIL |
| 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 |
| 2770 | CGO_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> |
| 2776 | FAIL |
| 2777 | rastrillo-budget/v1 ran 52ms |
| 2778 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.053s |
| 2779 | FAIL |
| 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 |
| 2799 | CGO_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 |
| 2807 | FAIL |
| 2808 | rastrillo-budget/v1 ran 69ms |
| 2809 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.071s |
| 2810 | FAIL |
| 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 |
| 2832 | CGO_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> |
| 2839 | FAIL |
| 2840 | rastrillo-budget/v1 ran 83ms |
| 2841 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.084s |
| 2842 | FAIL |
| 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 |
| 2863 | CGO_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> |
| 2870 | FAIL |
| 2871 | rastrillo-budget/v1 ran 89ms |
| 2872 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.090s |
| 2873 | FAIL |
| 2874 | ``` |
| 2875 | |
| 2876 | ### User-facing strings |
| 2877 | |
| 2878 | No 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 | |
| 2882 | The 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 | |
| 2884 | All 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 | |
| 2889 | Status: DONE. |
| 2890 | Commit subject: `feat: restrict provider egress outside the host network`. |
| 2891 | Branch: `plan-2b`. No push, merge or deployment. |
| 2892 | |
| 2893 | ### What changed |
| 2894 | |
| 2895 | Each 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 | |
| 2897 | The 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 | |
| 2899 | Limits 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 | |
| 2901 | The 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 | |
| 2919 | 1. 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. |
| 2920 | 2. 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. |
| 2921 | 3. 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. |
| 2922 | 4. 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. |
| 2923 | 5. 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. |
| 2924 | 6. 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. |
| 2925 | 7. 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. |
| 2926 | 8. 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 | |
| 2930 | All 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 | |
| 2932 | Tests were written before implementation. Initial RED: |
| 2933 | |
| 2934 | ```sh |
| 2935 | CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1 |
| 2936 | ``` |
| 2937 | |
| 2938 | ```text |
| 2939 | amadan.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] |
| 2941 | internal/runner/egress/proxy_test.go:31:116: undefined: Proxy |
| 2942 | internal/runner/egress/proxy_test.go:33:7: undefined: defaults |
| 2943 | internal/runner/egress/proxy_test.go:36:12: undefined: open |
| 2944 | internal/runner/egress/proxy_test.go:36:49: undefined: Policy |
| 2945 | internal/runner/egress/proxy_test.go:41:30: undefined: Proxy |
| 2946 | internal/runner/egress/proxy_test.go:70:5: undefined: defaults |
| 2947 | internal/runner/egress/proxy_test.go:71:7: undefined: open |
| 2948 | internal/runner/egress/proxy_test.go:71:44: undefined: Policy |
| 2949 | internal/runner/egress/proxy_test.go:79:5: undefined: defaults |
| 2950 | internal/runner/egress/proxy_test.go:89:7: undefined: open |
| 2951 | internal/runner/egress/proxy_test.go:89:7: too many errors |
| 2952 | FAIL amadan.net/oficina/equipo/internal/runner/egress [build failed] |
| 2953 | FAIL amadan.net/oficina/equipo/internal/runner/containment [build failed] |
| 2954 | FAIL |
| 2955 | ``` |
| 2956 | |
| 2957 | The 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 |
| 2960 | CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1 |
| 2961 | ``` |
| 2962 | |
| 2963 | ```text |
| 2964 | 2026/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 |
| 2967 | FAIL |
| 2968 | rastrillo-budget/v1 ran 3.198s |
| 2969 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.214s |
| 2970 | ok amadan.net/oficina/equipo/internal/runner/containment 1.315s |
| 2971 | FAIL |
| 2972 | ``` |
| 2973 | |
| 2974 | The corrected fixture and initial implementation passed the exact brief command: |
| 2975 | |
| 2976 | ```sh |
| 2977 | CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1 |
| 2978 | ``` |
| 2979 | |
| 2980 | ```text |
| 2981 | ok amadan.net/oficina/equipo/internal/runner/egress 3.201s |
| 2982 | ok amadan.net/oficina/equipo/internal/runner/containment 0.864s |
| 2983 | ``` |
| 2984 | |
| 2985 | A 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 |
| 2988 | CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgressActiveTunnelClose|TestEgressPolicyFrozen|TestEgressHeaderTimeout|TestEgressInstalledContract|TestEgressRefreshRequiresStagedHome' -count=1 |
| 2989 | ``` |
| 2990 | |
| 2991 | ```text |
| 2992 | ok amadan.net/oficina/equipo/internal/runner/egress 0.087s |
| 2993 | --- FAIL: TestEgressRefreshRequiresStagedHome (0.06s) |
| 2994 | egress_test.go:220: unstaged home qualified for refresh |
| 2995 | FAIL |
| 2996 | rastrillo-budget/v1 ran 68ms |
| 2997 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.071s |
| 2998 | FAIL |
| 2999 | ``` |
| 3000 | |
| 3001 | GREEN after requiring a staged home and strengthening read-only socket checks: |
| 3002 | |
| 3003 | ```sh |
| 3004 | CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgress|TestNamespaceHidesHostControl' -count=1 |
| 3005 | ``` |
| 3006 | |
| 3007 | ```text |
| 3008 | ok amadan.net/oficina/equipo/internal/runner/egress 3.263s |
| 3009 | ok amadan.net/oficina/equipo/internal/runner/containment 0.550s |
| 3010 | ``` |
| 3011 | |
| 3012 | Additional lifecycle and parser checks passed before their mutations: |
| 3013 | |
| 3014 | ```sh |
| 3015 | CGO_ENABLED=0 go test ./internal/runner/egress ./internal/runner/containment -run 'TestEgressDiesWithAttempt|TestEgressActiveTunnelClose|TestEgressStartupFailureClosesProxy' -count=1 |
| 3016 | ``` |
| 3017 | |
| 3018 | ```text |
| 3019 | ok amadan.net/oficina/equipo/internal/runner/egress 0.004s |
| 3020 | ok amadan.net/oficina/equipo/internal/runner/containment 0.516s |
| 3021 | ``` |
| 3022 | |
| 3023 | ```sh |
| 3024 | CGO_ENABLED=0 go test ./internal/runner/egress -run 'TestEgressRejectsSmuggling|TestEgressRejectsHostServices/resolver_error' -count=1 |
| 3025 | ``` |
| 3026 | |
| 3027 | ```text |
| 3028 | ok amadan.net/oficina/equipo/internal/runner/egress 3.005s |
| 3029 | ``` |
| 3030 | |
| 3031 | Final GREEN after restoring all mutations, including the helper regression checks: |
| 3032 | |
| 3033 | ```sh |
| 3034 | CGO_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 |
| 3038 | ok amadan.net/oficina/equipo/internal/runner/egress 3.268s |
| 3039 | ok amadan.net/oficina/equipo/internal/runner/containment 1.236s |
| 3040 | ``` |
| 3041 | |
| 3042 | ```sh |
| 3043 | CGO_ENABLED=0 go test ./internal/runner/provider ./cmd/equipo-runner -run 'TestDirect|TestToolVerbClosed|TestRunnerServiceVerbs|TestRunnerDiagnosticIsCredentialFree' -count=1 |
| 3044 | ``` |
| 3045 | |
| 3046 | ```text |
| 3047 | ok amadan.net/oficina/equipo/internal/runner/provider 0.007s |
| 3048 | ok amadan.net/oficina/equipo/cmd/equipo-runner 0.060s |
| 3049 | ``` |
| 3050 | |
| 3051 | ```sh |
| 3052 | CGO_ENABLED=0 go vet ./internal/runner/egress ./internal/runner/containment ./internal/runner/provider ./cmd/equipo-runner |
| 3053 | ``` |
| 3054 | |
| 3055 | ```text |
| 3056 | Exit 0, no output. |
| 3057 | ``` |
| 3058 | |
| 3059 | ```sh |
| 3060 | CGO_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 |
| 3064 | Exit 0, no output. |
| 3065 | ``` |
| 3066 | |
| 3067 | ```sh |
| 3068 | CGO_ENABLED=0 go build -o /home/paulca/t/e2b/t3-evidence/equipo-runner ./cmd/equipo-runner |
| 3069 | ``` |
| 3070 | |
| 3071 | ```text |
| 3072 | Exit 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 | |
| 3079 | Each 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 |
| 3098 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s |
| 3099 | ``` |
| 3100 | |
| 3101 | ```text |
| 3102 | --- FAIL: TestEgressRejectsHostServices (0.17s) |
| 3103 | FAIL |
| 3104 | rastrillo-budget/v1 ran 173ms |
| 3105 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.192s |
| 3106 | FAIL |
| 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 |
| 3126 | CGO_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 |
| 3132 | FAIL |
| 3133 | rastrillo-budget/v1 ran 13ms |
| 3134 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.028s |
| 3135 | FAIL |
| 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 |
| 3155 | CGO_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 | ... |
| 3169 | FAIL |
| 3170 | rastrillo-budget/v1 ran 10ms |
| 3171 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.019s |
| 3172 | FAIL |
| 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 |
| 3192 | CGO_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 |
| 3198 | FAIL |
| 3199 | rastrillo-budget/v1 ran 5ms |
| 3200 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.010s |
| 3201 | FAIL |
| 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 |
| 3221 | CGO_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 |
| 3227 | FAIL |
| 3228 | rastrillo-budget/v1 ran 2ms |
| 3229 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.009s |
| 3230 | FAIL |
| 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 |
| 3250 | CGO_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" |
| 3257 | FAIL |
| 3258 | rastrillo-budget/v1 ran 3.003s |
| 3259 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.009s |
| 3260 | FAIL |
| 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 |
| 3280 | CGO_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" |
| 3287 | FAIL |
| 3288 | rastrillo-budget/v1 ran 3.002s |
| 3289 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.005s |
| 3290 | FAIL |
| 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 |
| 3310 | CGO_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" |
| 3317 | FAIL |
| 3318 | rastrillo-budget/v1 ran 3.006s |
| 3319 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.009s |
| 3320 | FAIL |
| 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 |
| 3340 | CGO_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" |
| 3349 | FAIL |
| 3350 | rastrillo-budget/v1 ran 3.004s |
| 3351 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.007s |
| 3352 | FAIL |
| 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 |
| 3372 | CGO_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" |
| 3379 | FAIL |
| 3380 | rastrillo-budget/v1 ran 3.004s |
| 3381 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.008s |
| 3382 | FAIL |
| 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 |
| 3402 | CGO_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 |
| 3409 | FAIL |
| 3410 | rastrillo-budget/v1 ran 1ms |
| 3411 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.005s |
| 3412 | FAIL |
| 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 |
| 3432 | CGO_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 |
| 3439 | FAIL |
| 3440 | rastrillo-budget/v1 ran 1.005s |
| 3441 | FAIL amadan.net/oficina/equipo/internal/runner/egress 1.010s |
| 3442 | FAIL |
| 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 |
| 3462 | CGO_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 |
| 3469 | FAIL |
| 3470 | rastrillo-budget/v1 ran 3.001s |
| 3471 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.011s |
| 3472 | FAIL |
| 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 |
| 3492 | CGO_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 |
| 3498 | FAIL |
| 3499 | rastrillo-budget/v1 ran 1.001s |
| 3500 | FAIL amadan.net/oficina/equipo/internal/runner/egress 1.006s |
| 3501 | FAIL |
| 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 |
| 3521 | CGO_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 |
| 3528 | FAIL |
| 3529 | rastrillo-budget/v1 ran 1.001s |
| 3530 | FAIL amadan.net/oficina/equipo/internal/runner/egress 1.008s |
| 3531 | FAIL |
| 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 |
| 3551 | CGO_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 |
| 3557 | FAIL |
| 3558 | rastrillo-budget/v1 ran 1ms |
| 3559 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 3560 | FAIL |
| 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 |
| 3580 | CGO_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 |
| 3586 | FAIL |
| 3587 | rastrillo-budget/v1 ran 1ms |
| 3588 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 3589 | FAIL |
| 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 |
| 3609 | CGO_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> |
| 3615 | FAIL |
| 3616 | rastrillo-budget/v1 ran 1ms |
| 3617 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 3618 | FAIL |
| 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 |
| 3638 | CGO_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 |
| 3644 | FAIL |
| 3645 | rastrillo-budget/v1 ran 0s |
| 3646 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 3647 | FAIL |
| 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 |
| 3667 | CGO_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 |
| 3673 | FAIL |
| 3674 | rastrillo-budget/v1 ran 0s |
| 3675 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 3676 | FAIL |
| 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 |
| 3696 | CGO_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 |
| 3702 | FAIL |
| 3703 | rastrillo-budget/v1 ran 0s |
| 3704 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 3705 | FAIL |
| 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 |
| 3725 | CGO_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]} |
| 3731 | FAIL |
| 3732 | rastrillo-budget/v1 ran 0s |
| 3733 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.002s |
| 3734 | FAIL |
| 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 |
| 3754 | CGO_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}] |
| 3760 | FAIL |
| 3761 | rastrillo-budget/v1 ran 6ms |
| 3762 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.010s |
| 3763 | FAIL |
| 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 |
| 3783 | CGO_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 |
| 3789 | FAIL |
| 3790 | rastrillo-budget/v1 ran 8ms |
| 3791 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.011s |
| 3792 | FAIL |
| 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 |
| 3812 | CGO_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 |
| 3818 | FAIL |
| 3819 | rastrillo-budget/v1 ran 102ms |
| 3820 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.106s |
| 3821 | FAIL |
| 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 |
| 3841 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestEgressRejectsHostServices$' -count=1 -timeout=25s |
| 3842 | ``` |
| 3843 | |
| 3844 | ```text |
| 3845 | --- FAIL: TestEgressRejectsHostServices (0.14s) |
| 3846 | FAIL |
| 3847 | rastrillo-budget/v1 ran 138ms |
| 3848 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.142s |
| 3849 | FAIL |
| 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 |
| 3877 | CGO_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" |
| 3883 | FAIL |
| 3884 | rastrillo-budget/v1 ran 110ms |
| 3885 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.114s |
| 3886 | FAIL |
| 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 |
| 3906 | CGO_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 |
| 3913 | FAIL |
| 3914 | rastrillo-budget/v1 ran 3.137s |
| 3915 | FAIL amadan.net/oficina/equipo/internal/runner/containment 3.146s |
| 3916 | FAIL |
| 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 |
| 3945 | CGO_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 |
| 3952 | FAIL |
| 3953 | rastrillo-budget/v1 ran 164ms |
| 3954 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.170s |
| 3955 | FAIL |
| 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 |
| 3975 | CGO_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" |
| 3982 | FAIL |
| 3983 | rastrillo-budget/v1 ran 3.002s |
| 3984 | FAIL amadan.net/oficina/equipo/internal/runner/egress 3.004s |
| 3985 | FAIL |
| 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 |
| 4005 | CGO_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 |
| 4012 | FAIL |
| 4013 | rastrillo-budget/v1 ran 1ms |
| 4014 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 4015 | FAIL |
| 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 |
| 4035 | CGO_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 |
| 4041 | FAIL |
| 4042 | rastrillo-budget/v1 ran 1.001s |
| 4043 | FAIL amadan.net/oficina/equipo/internal/runner/egress 1.003s |
| 4044 | FAIL |
| 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 |
| 4064 | CGO_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 |
| 4071 | FAIL |
| 4072 | rastrillo-budget/v1 ran 1.001s |
| 4073 | FAIL amadan.net/oficina/equipo/internal/runner/egress 1.003s |
| 4074 | FAIL |
| 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 |
| 4099 | CGO_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 |
| 4106 | FAIL |
| 4107 | rastrillo-budget/v1 ran 1.001s |
| 4108 | FAIL amadan.net/oficina/equipo/internal/runner/egress 1.003s |
| 4109 | FAIL |
| 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 |
| 4129 | CGO_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 |
| 4135 | FAIL |
| 4136 | rastrillo-budget/v1 ran 28ms |
| 4137 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.030s |
| 4138 | FAIL |
| 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 |
| 4158 | CGO_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= |
| 4164 | FAIL |
| 4165 | rastrillo-budget/v1 ran 98ms |
| 4166 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.100s |
| 4167 | FAIL |
| 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 |
| 4187 | CGO_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 | ... |
| 4201 | FAIL |
| 4202 | rastrillo-budget/v1 ran 97ms |
| 4203 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.099s |
| 4204 | FAIL |
| 4205 | ``` |
| 4206 | |
| 4207 | ### User-facing strings |
| 4208 | |
| 4209 | No 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 | |
| 4213 | No 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 | |
| 4215 | All 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 | |
| 4220 | Status: DONE. Base: `e06320a` on `plan-2b`. |
| 4221 | Commit 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 | |
| 4227 | The 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 | |
| 4231 | Files 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 | |
| 4241 | This 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 | |
| 4243 | The 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 | |
| 4245 | The 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 | |
| 4249 | Both regression tests were written before changing production code. This command exited 1 with compiled test failures: |
| 4250 | |
| 4251 | ```sh |
| 4252 | CGO_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 |
| 4259 | FAIL 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 |
| 4262 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.004s |
| 4263 | ``` |
| 4264 | |
| 4265 | ### GREEN before mutations |
| 4266 | |
| 4267 | The same focused command then exited 0: |
| 4268 | |
| 4269 | ```text |
| 4270 | ok amadan.net/oficina/equipo/internal/runner/egress 0.002s |
| 4271 | ok amadan.net/oficina/equipo/internal/runner/containment 0.060s |
| 4272 | ``` |
| 4273 | |
| 4274 | The covering command and namespace gate also passed before mutations: |
| 4275 | |
| 4276 | ```sh |
| 4277 | CGO_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 |
| 4278 | make -C /home/paulca/amadan.net/oficina/equipo-plan-2b runner-namespace-test |
| 4279 | ``` |
| 4280 | |
| 4281 | ```text |
| 4282 | ok amadan.net/oficina/equipo/internal/runner/egress 3.269s |
| 4283 | ok amadan.net/oficina/equipo/internal/runner/containment 0.456s |
| 4284 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 4285 | ok amadan.net/oficina/equipo/internal/runner/containment 3.205s |
| 4286 | ``` |
| 4287 | |
| 4288 | ### Independent mutations |
| 4289 | |
| 4290 | Each 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 | |
| 4292 | 1. Replace `net.Listen("unix", bindPath)` with `net.Listen("unix", path)`. |
| 4293 | |
| 4294 | ```sh |
| 4295 | CGO_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 |
| 4301 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.004s |
| 4302 | ``` |
| 4303 | |
| 4304 | 2. Insert `directory.Close()` immediately before `directory = nil` in `open`, ending the retained descriptor's lifetime before listener cleanup. |
| 4305 | |
| 4306 | ```sh |
| 4307 | CGO_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> |
| 4313 | FAIL amadan.net/oficina/equipo/internal/runner/egress 0.003s |
| 4314 | ``` |
| 4315 | |
| 4316 | 3. 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 |
| 4319 | CGO_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 |
| 4325 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.005s |
| 4326 | ``` |
| 4327 | |
| 4328 | ### Final GREEN after restoration |
| 4329 | |
| 4330 | ```sh |
| 4331 | CGO_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 |
| 4332 | make -C /home/paulca/amadan.net/oficina/equipo-plan-2b runner-namespace-test |
| 4333 | CGO_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 |
| 4334 | git -C /home/paulca/amadan.net/oficina/equipo-plan-2b diff --check |
| 4335 | gofmt -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 |
| 4339 | ok amadan.net/oficina/equipo/internal/runner/egress 3.260s |
| 4340 | ok amadan.net/oficina/equipo/internal/runner/containment 0.440s |
| 4341 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 4342 | ok amadan.net/oficina/equipo/internal/runner/containment 2.220s |
| 4343 | ``` |
| 4344 | |
| 4345 | Every 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 | |
| 4349 | No new user-facing strings, protocol responses, diagnostics or `copy.go` entries. Only test assertion messages and one implementation comment were added. |
| 4350 | |
| 4351 | No 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 | |
| 4353 | The 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 | |
| 4358 | Status: DONE_WITH_CONCERNS. |
| 4359 | Commit subject: `feat: bind direct accounts and hash effective launch policy`. |
| 4360 | Branch: `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 | |
| 4368 | Only 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 | |
| 4372 | Claude 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 | |
| 4376 | The 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 | |
| 4378 | Runtime-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 | |
| 4400 | 1. 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. |
| 4401 | 2. 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. |
| 4402 | 3. 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. |
| 4403 | 4. 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. |
| 4404 | 5. 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. |
| 4405 | 6. 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. |
| 4406 | 7. 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. |
| 4407 | 8. 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 | |
| 4411 | All 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 | |
| 4413 | Initial tests were written before implementation. The first meaningful RED was: |
| 4414 | |
| 4415 | ```sh |
| 4416 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccountHome|TestAccountUnavailable|TestEffectivePolicy|TestUnexpectedConfig|TestPrivateHome' -count=1 |
| 4417 | ``` |
| 4418 | |
| 4419 | ```text |
| 4420 | undefined: HomeRules |
| 4421 | unknown field Expected in struct literal of type Binding |
| 4422 | unknown field RuntimeRoot in struct literal of type Binding |
| 4423 | undefined: IdentityFile |
| 4424 | undefined: AccountLease |
| 4425 | undefined: PolicyInputs |
| 4426 | FAIL amadan.net/oficina/equipo/internal/runner/provider [build failed] |
| 4427 | ok amadan.net/oficina/equipo/internal/runner [no tests to run] |
| 4428 | ``` |
| 4429 | |
| 4430 | An 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 | |
| 4432 | The behavioral RED commands were: |
| 4433 | |
| 4434 | ```sh |
| 4435 | CGO_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 |
| 4446 | CGO_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 |
| 4459 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestEffectivePolicyHostBinary|TestNamespaceManifestInputs' -count=1 |
| 4460 | ``` |
| 4461 | |
| 4462 | ```text |
| 4463 | p.ValidateRuntimeBinaries undefined |
| 4464 | m.namespaceManifest undefined |
| 4465 | FAIL [build failed] |
| 4466 | ``` |
| 4467 | |
| 4468 | ```sh |
| 4469 | CGO_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 |
| 4478 | CGO_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 |
| 4489 | CGO_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 | |
| 4497 | After 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 | |
| 4506 | Final exact brief command, after all fixes and restoration of every mutation: |
| 4507 | |
| 4508 | ```sh |
| 4509 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccountHome|TestAccountUnavailable|TestEffectivePolicy|TestUnexpectedConfig|TestPrivateHome' -count=1 |
| 4510 | ``` |
| 4511 | |
| 4512 | ```text |
| 4513 | ok amadan.net/oficina/equipo/internal/runner/provider 3.560s |
| 4514 | ok amadan.net/oficina/equipo/internal/runner 0.005s |
| 4515 | ``` |
| 4516 | |
| 4517 | Related regression command after the account, policy and containment fixes: |
| 4518 | |
| 4519 | ```sh |
| 4520 | CGO_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 |
| 4524 | ok amadan.net/oficina/equipo/internal/runner/provider 3.674s |
| 4525 | ok amadan.net/oficina/equipo/internal/runner 0.012s |
| 4526 | ok amadan.net/oficina/equipo/internal/runner/containment 0.737s |
| 4527 | ? amadan.net/oficina/equipo/internal/release [no test files] |
| 4528 | ``` |
| 4529 | |
| 4530 | A final schema test was added before supplying the direct certificate's snake_case JSON tags: |
| 4531 | |
| 4532 | ```sh |
| 4533 | CGO_ENABLED=0 go test ./internal/runner -run '^TestEffectivePolicyReleaseManifest$' -count=1 |
| 4534 | ``` |
| 4535 | |
| 4536 | RED (exit 1): |
| 4537 | |
| 4538 | ```text |
| 4539 | --- FAIL: TestEffectivePolicyReleaseManifest |
| 4540 | missing manifest field provider |
| 4541 | FAIL amadan.net/oficina/equipo/internal/runner 0.003s |
| 4542 | ``` |
| 4543 | |
| 4544 | GREEN after adding the tags (exit 0): |
| 4545 | |
| 4546 | ```text |
| 4547 | ok 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 | |
| 4554 | 60 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 | |
| 4556 | Five 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 | |
| 4560 | File: `internal/runner/provider/accounts.go`. |
| 4561 | |
| 4562 | Replace the body of `func (l *AccountLease) sourceUnchanged() bool` with: |
| 4563 | |
| 4564 | ```go |
| 4565 | return true |
| 4566 | ``` |
| 4567 | |
| 4568 | ```sh |
| 4569 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/replacement$ -count=1 |
| 4570 | ``` |
| 4571 | |
| 4572 | Exit 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> |
| 4578 | FAIL |
| 4579 | rastrillo-budget/v1 ran 45ms |
| 4580 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.047s |
| 4581 | FAIL |
| 4582 | ``` |
| 4583 | |
| 4584 | #### Mutation 2: directory lock |
| 4585 | |
| 4586 | File: `internal/runner/provider/accounts.go`. |
| 4587 | |
| 4588 | Replace: |
| 4589 | |
| 4590 | ```go |
| 4591 | e = unix.Flock(int(dir.Fd()), unix.LOCK_EX|unix.LOCK_NB) |
| 4592 | ``` |
| 4593 | |
| 4594 | with: |
| 4595 | |
| 4596 | ```go |
| 4597 | e = error(nil) |
| 4598 | ``` |
| 4599 | |
| 4600 | ```sh |
| 4601 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/lock$ -count=1 |
| 4602 | ``` |
| 4603 | |
| 4604 | Exit 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> |
| 4610 | FAIL |
| 4611 | rastrillo-budget/v1 ran 43ms |
| 4612 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.045s |
| 4613 | FAIL |
| 4614 | ``` |
| 4615 | |
| 4616 | #### Mutation 3: dedicated provenance |
| 4617 | |
| 4618 | File: `internal/runner/provider/accounts.go`. |
| 4619 | |
| 4620 | Replace the body of `func (b Binding) VerifiedDedicatedHome() bool` with: |
| 4621 | |
| 4622 | ```go |
| 4623 | return b.DedicatedHome |
| 4624 | ``` |
| 4625 | |
| 4626 | ```sh |
| 4627 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/dedicated_provenance$ -count=1 |
| 4628 | ``` |
| 4629 | |
| 4630 | Exit 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 |
| 4636 | FAIL |
| 4637 | rastrillo-budget/v1 ran 1ms |
| 4638 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s |
| 4639 | FAIL |
| 4640 | ``` |
| 4641 | |
| 4642 | #### Mutation 4: shared inode |
| 4643 | |
| 4644 | File: `internal/runner/provider/accounts.go`. |
| 4645 | |
| 4646 | Replace the body of `func (r HomeRules) refusedInode(info os.FileInfo) bool` with: |
| 4647 | |
| 4648 | ```go |
| 4649 | return false |
| 4650 | ``` |
| 4651 | |
| 4652 | ```sh |
| 4653 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/shared_and_aliases$ -count=1 |
| 4654 | ``` |
| 4655 | |
| 4656 | Exit 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 |
| 4662 | FAIL |
| 4663 | rastrillo-budget/v1 ran 1ms |
| 4664 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s |
| 4665 | FAIL |
| 4666 | ``` |
| 4667 | |
| 4668 | #### Mutation 5: default path refusals |
| 4669 | |
| 4670 | File: `internal/runner/provider/accounts.go`. |
| 4671 | |
| 4672 | Replace the body of `func (r HomeRules) RefusesPath(path string) bool` with: |
| 4673 | |
| 4674 | ```go |
| 4675 | return false |
| 4676 | ``` |
| 4677 | |
| 4678 | ```sh |
| 4679 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/real_defaults_path_only$ -count=1 |
| 4680 | ``` |
| 4681 | |
| 4682 | Exit 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 |
| 4688 | FAIL |
| 4689 | rastrillo-budget/v1 ran 0s |
| 4690 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s |
| 4691 | FAIL |
| 4692 | ``` |
| 4693 | |
| 4694 | #### Mutation 6: credential file mode |
| 4695 | |
| 4696 | File: `internal/runner/provider/accounts.go`. |
| 4697 | |
| 4698 | Replace: |
| 4699 | |
| 4700 | ```go |
| 4701 | || info.Mode().Perm() != 0600 |
| 4702 | ``` |
| 4703 | |
| 4704 | with: |
| 4705 | |
| 4706 | ```go |
| 4707 | // removed |
| 4708 | ``` |
| 4709 | |
| 4710 | ```sh |
| 4711 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeBinding/private_modes$ -count=1 |
| 4712 | ``` |
| 4713 | |
| 4714 | Exit 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 |
| 4720 | FAIL |
| 4721 | rastrillo-budget/v1 ran 22ms |
| 4722 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.023s |
| 4723 | FAIL |
| 4724 | ``` |
| 4725 | |
| 4726 | #### Mutation 7: identity recheck |
| 4727 | |
| 4728 | File: `internal/runner/provider/accounts.go`. |
| 4729 | |
| 4730 | Replace: |
| 4731 | |
| 4732 | ```go |
| 4733 | || id != l.source.Expected |
| 4734 | ``` |
| 4735 | |
| 4736 | with: |
| 4737 | |
| 4738 | ```go |
| 4739 | // removed |
| 4740 | ``` |
| 4741 | |
| 4742 | ```sh |
| 4743 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/identity_change$ -count=1 |
| 4744 | ``` |
| 4745 | |
| 4746 | Exit 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 |
| 4752 | FAIL |
| 4753 | rastrillo-budget/v1 ran 42ms |
| 4754 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s |
| 4755 | FAIL |
| 4756 | ``` |
| 4757 | |
| 4758 | #### Mutation 8: generation recheck |
| 4759 | |
| 4760 | File: `internal/runner/provider/accounts.go`. |
| 4761 | |
| 4762 | Replace: |
| 4763 | |
| 4764 | ```go |
| 4765 | if generation != l.generation { |
| 4766 | ``` |
| 4767 | |
| 4768 | with: |
| 4769 | |
| 4770 | ```go |
| 4771 | if false && generation != l.generation { |
| 4772 | ``` |
| 4773 | |
| 4774 | ```sh |
| 4775 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/successful_refresh$ -count=1 |
| 4776 | ``` |
| 4777 | |
| 4778 | Exit 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 |
| 4784 | FAIL |
| 4785 | rastrillo-budget/v1 ran 47ms |
| 4786 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.049s |
| 4787 | FAIL |
| 4788 | ``` |
| 4789 | |
| 4790 | #### Mutation 9: active mutation classification |
| 4791 | |
| 4792 | File: `internal/runner/provider/accounts.go`. |
| 4793 | |
| 4794 | Replace: |
| 4795 | |
| 4796 | ```go |
| 4797 | if generation != l.generation { |
| 4798 | l.ready = false |
| 4799 | if l.active { |
| 4800 | ``` |
| 4801 | |
| 4802 | with: |
| 4803 | |
| 4804 | ```go |
| 4805 | if generation != l.generation { |
| 4806 | l.ready = false |
| 4807 | if false && l.active { |
| 4808 | ``` |
| 4809 | |
| 4810 | ```sh |
| 4811 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/active_change$ -count=1 |
| 4812 | ``` |
| 4813 | |
| 4814 | Exit 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 |
| 4820 | FAIL |
| 4821 | rastrillo-budget/v1 ran 44ms |
| 4822 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.045s |
| 4823 | FAIL |
| 4824 | ``` |
| 4825 | |
| 4826 | #### Mutation 10: runtime credential recheck |
| 4827 | |
| 4828 | File: `internal/runner/provider/accounts.go`. |
| 4829 | |
| 4830 | Replace: |
| 4831 | |
| 4832 | ```go |
| 4833 | if runtimeErr != nil || sha256.Sum256(runtimeRaw) != l.runtimeGeneration { |
| 4834 | ``` |
| 4835 | |
| 4836 | with: |
| 4837 | |
| 4838 | ```go |
| 4839 | if false && (runtimeErr != nil || sha256.Sum256(runtimeRaw) != l.runtimeGeneration) { |
| 4840 | ``` |
| 4841 | |
| 4842 | ```sh |
| 4843 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeGuards/runtime_active_mutation$ -count=1 |
| 4844 | ``` |
| 4845 | |
| 4846 | Exit 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 |
| 4852 | FAIL |
| 4853 | rastrillo-budget/v1 ran 43ms |
| 4854 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s |
| 4855 | FAIL |
| 4856 | ``` |
| 4857 | |
| 4858 | #### Mutation 11: preflight readiness |
| 4859 | |
| 4860 | File: `internal/runner/provider/accounts.go`. |
| 4861 | |
| 4862 | Replace: |
| 4863 | |
| 4864 | ```go |
| 4865 | if !l.ready { |
| 4866 | ``` |
| 4867 | |
| 4868 | with: |
| 4869 | |
| 4870 | ```go |
| 4871 | if false && !l.ready { |
| 4872 | ``` |
| 4873 | |
| 4874 | ```sh |
| 4875 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountUnavailableDoesNotFailover$ -count=1 |
| 4876 | ``` |
| 4877 | |
| 4878 | Exit 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 |
| 4888 | FAIL |
| 4889 | rastrillo-budget/v1 ran 185ms |
| 4890 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.186s |
| 4891 | FAIL |
| 4892 | ``` |
| 4893 | |
| 4894 | #### Mutation 12: preflight failure |
| 4895 | |
| 4896 | File: `internal/runner/provider/accounts.go`. |
| 4897 | |
| 4898 | Replace: |
| 4899 | |
| 4900 | ```go |
| 4901 | if probeErr != nil { |
| 4902 | ``` |
| 4903 | |
| 4904 | with: |
| 4905 | |
| 4906 | ```go |
| 4907 | if false && probeErr != nil { |
| 4908 | ``` |
| 4909 | |
| 4910 | ```sh |
| 4911 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeMutation/failed_refresh$ -count=1 |
| 4912 | ``` |
| 4913 | |
| 4914 | Exit 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 |
| 4920 | FAIL |
| 4921 | rastrillo-budget/v1 ran 63ms |
| 4922 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.064s |
| 4923 | FAIL |
| 4924 | ``` |
| 4925 | |
| 4926 | #### Mutation 13: runtime symlink |
| 4927 | |
| 4928 | File: `internal/runner/provider/accounts.go`. |
| 4929 | |
| 4930 | Replace: |
| 4931 | |
| 4932 | ```go |
| 4933 | e == nil && stat.Mode&unix.S_IFMT != unix.S_IFREG |
| 4934 | ``` |
| 4935 | |
| 4936 | with: |
| 4937 | |
| 4938 | ```go |
| 4939 | false && e == nil && stat.Mode&unix.S_IFMT != unix.S_IFREG |
| 4940 | ``` |
| 4941 | |
| 4942 | ```sh |
| 4943 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeGuards/runtime_symlink$ -count=1 |
| 4944 | ``` |
| 4945 | |
| 4946 | Exit 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 |
| 4952 | FAIL |
| 4953 | rastrillo-budget/v1 ran 64ms |
| 4954 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 4955 | FAIL |
| 4956 | ``` |
| 4957 | |
| 4958 | #### Mutation 14: safe environment |
| 4959 | |
| 4960 | File: `internal/runner/provider/policy.go`. |
| 4961 | |
| 4962 | Replace: |
| 4963 | |
| 4964 | ```go |
| 4965 | (k != "LANG" && k != "LC_ALL" && k != "TERM") |
| 4966 | ``` |
| 4967 | |
| 4968 | with: |
| 4969 | |
| 4970 | ```go |
| 4971 | false |
| 4972 | ``` |
| 4973 | |
| 4974 | ```sh |
| 4975 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/ANTHROPIC_API_KEY$ -count=1 |
| 4976 | ``` |
| 4977 | |
| 4978 | Exit 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 |
| 4984 | FAIL |
| 4985 | rastrillo-budget/v1 ran 104ms |
| 4986 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.105s |
| 4987 | FAIL |
| 4988 | ``` |
| 4989 | |
| 4990 | #### Mutation 15: readback layers |
| 4991 | |
| 4992 | File: `internal/runner/provider/policy.go`. |
| 4993 | |
| 4994 | Replace: |
| 4995 | |
| 4996 | ```go |
| 4997 | || !reflect.DeepEqual(actual, layers) |
| 4998 | ``` |
| 4999 | |
| 5000 | with: |
| 5001 | |
| 5002 | ```go |
| 5003 | // removed |
| 5004 | ``` |
| 5005 | |
| 5006 | ```sh |
| 5007 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/user$ -count=1 |
| 5008 | ``` |
| 5009 | |
| 5010 | Exit 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 |
| 5016 | FAIL |
| 5017 | rastrillo-budget/v1 ran 64ms |
| 5018 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.066s |
| 5019 | FAIL |
| 5020 | ``` |
| 5021 | |
| 5022 | #### Mutation 16: remote control |
| 5023 | |
| 5024 | File: `internal/runner/provider/policy.go`. |
| 5025 | |
| 5026 | Replace: |
| 5027 | |
| 5028 | ```go |
| 5029 | r.RemoteControl || |
| 5030 | ``` |
| 5031 | |
| 5032 | with: |
| 5033 | |
| 5034 | ```go |
| 5035 | // removed |
| 5036 | ``` |
| 5037 | |
| 5038 | ```sh |
| 5039 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/remote$ -count=1 |
| 5040 | ``` |
| 5041 | |
| 5042 | Exit 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 |
| 5048 | FAIL |
| 5049 | rastrillo-budget/v1 ran 64ms |
| 5050 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 5051 | FAIL |
| 5052 | ``` |
| 5053 | |
| 5054 | #### Mutation 17: disabled hooks |
| 5055 | |
| 5056 | File: `internal/runner/provider/policy.go`. |
| 5057 | |
| 5058 | Replace: |
| 5059 | |
| 5060 | ```go |
| 5061 | !r.HooksDisabled || |
| 5062 | ``` |
| 5063 | |
| 5064 | with: |
| 5065 | |
| 5066 | ```go |
| 5067 | // removed |
| 5068 | ``` |
| 5069 | |
| 5070 | ```sh |
| 5071 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/hooks$ -count=1 |
| 5072 | ``` |
| 5073 | |
| 5074 | Exit 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 |
| 5080 | FAIL |
| 5081 | rastrillo-budget/v1 ran 63ms |
| 5082 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 5083 | FAIL |
| 5084 | ``` |
| 5085 | |
| 5086 | #### Mutation 18: disabled plugins |
| 5087 | |
| 5088 | File: `internal/runner/provider/policy.go`. |
| 5089 | |
| 5090 | Replace: |
| 5091 | |
| 5092 | ```go |
| 5093 | !r.PluginsDisabled || |
| 5094 | ``` |
| 5095 | |
| 5096 | with: |
| 5097 | |
| 5098 | ```go |
| 5099 | // removed |
| 5100 | ``` |
| 5101 | |
| 5102 | ```sh |
| 5103 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/plugins$ -count=1 |
| 5104 | ``` |
| 5105 | |
| 5106 | Exit 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 |
| 5112 | FAIL |
| 5113 | rastrillo-budget/v1 ran 64ms |
| 5114 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 5115 | FAIL |
| 5116 | ``` |
| 5117 | |
| 5118 | #### Mutation 19: ignored settings |
| 5119 | |
| 5120 | File: `internal/runner/provider/policy.go`. |
| 5121 | |
| 5122 | Replace: |
| 5123 | |
| 5124 | ```go |
| 5125 | if e != nil || !bytes.Equal(a, b) { |
| 5126 | ``` |
| 5127 | |
| 5128 | with: |
| 5129 | |
| 5130 | ```go |
| 5131 | _ = a |
| 5132 | _ = b |
| 5133 | if e != nil { |
| 5134 | ``` |
| 5135 | |
| 5136 | ```sh |
| 5137 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer/ignored$ -count=1 |
| 5138 | ``` |
| 5139 | |
| 5140 | Exit 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 |
| 5146 | FAIL |
| 5147 | rastrillo-budget/v1 ran 64ms |
| 5148 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.066s |
| 5149 | FAIL |
| 5150 | ``` |
| 5151 | |
| 5152 | #### Mutation 20: per-turn overrides |
| 5153 | |
| 5154 | File: `internal/runner/provider/policy.go`. |
| 5155 | |
| 5156 | Replace the body of `func validTurnPolicy(raw json.RawMessage) bool` with: |
| 5157 | |
| 5158 | ```go |
| 5159 | return true |
| 5160 | ``` |
| 5161 | |
| 5162 | ```sh |
| 5163 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer$ -count=1 |
| 5164 | ``` |
| 5165 | |
| 5166 | Exit 1, compiled failure: |
| 5167 | |
| 5168 | ```text |
| 5169 | --- FAIL: TestUnexpectedConfigLayer (0.22s) |
| 5170 | policy_test.go:167: turn override sandboxPolicy accepted |
| 5171 | FAIL |
| 5172 | rastrillo-budget/v1 ran 224ms |
| 5173 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.225s |
| 5174 | FAIL |
| 5175 | ``` |
| 5176 | |
| 5177 | #### Mutation 21: unverified policy binding |
| 5178 | |
| 5179 | File: `internal/runner/provider/policy.go`. |
| 5180 | |
| 5181 | Replace: |
| 5182 | |
| 5183 | ```go |
| 5184 | if !b.VerifiedDedicatedHome() { |
| 5185 | ``` |
| 5186 | |
| 5187 | with: |
| 5188 | |
| 5189 | ```go |
| 5190 | if b.provenance == nil { return Policy{}, nil }; if !b.VerifiedDedicatedHome() { |
| 5191 | ``` |
| 5192 | |
| 5193 | ```sh |
| 5194 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestUnexpectedConfigLayer$ -count=1 |
| 5195 | ``` |
| 5196 | |
| 5197 | Exit 1, compiled failure: |
| 5198 | |
| 5199 | ```text |
| 5200 | --- FAIL: TestUnexpectedConfigLayer (0.20s) |
| 5201 | policy_test.go:173: unverified binding accepted |
| 5202 | FAIL |
| 5203 | rastrillo-budget/v1 ran 202ms |
| 5204 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.204s |
| 5205 | FAIL |
| 5206 | ``` |
| 5207 | |
| 5208 | #### Mutation 22: hash binary |
| 5209 | |
| 5210 | File: `internal/runner/provider/policy.go`. |
| 5211 | |
| 5212 | Replace: |
| 5213 | |
| 5214 | ```go |
| 5215 | raw, manifestHash, e := hashJSON(m) |
| 5216 | ``` |
| 5217 | |
| 5218 | with: |
| 5219 | |
| 5220 | ```go |
| 5221 | m.Files=nil |
| 5222 | raw, manifestHash, e := hashJSON(m) |
| 5223 | ``` |
| 5224 | |
| 5225 | ```sh |
| 5226 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/binary$ -count=1 |
| 5227 | ``` |
| 5228 | |
| 5229 | Exit 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 |
| 5235 | FAIL |
| 5236 | rastrillo-budget/v1 ran 83ms |
| 5237 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s |
| 5238 | FAIL |
| 5239 | ``` |
| 5240 | |
| 5241 | #### Mutation 23: hash settings |
| 5242 | |
| 5243 | File: `internal/runner/provider/policy.go`. |
| 5244 | |
| 5245 | Replace: |
| 5246 | |
| 5247 | ```go |
| 5248 | raw, manifestHash, e := hashJSON(m) |
| 5249 | ``` |
| 5250 | |
| 5251 | with: |
| 5252 | |
| 5253 | ```go |
| 5254 | m.Settings=nil |
| 5255 | raw, manifestHash, e := hashJSON(m) |
| 5256 | ``` |
| 5257 | |
| 5258 | ```sh |
| 5259 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/settings$ -count=1 |
| 5260 | ``` |
| 5261 | |
| 5262 | Exit 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 |
| 5268 | FAIL |
| 5269 | rastrillo-budget/v1 ran 82ms |
| 5270 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.083s |
| 5271 | FAIL |
| 5272 | ``` |
| 5273 | |
| 5274 | #### Mutation 24: hash routing |
| 5275 | |
| 5276 | File: `internal/runner/provider/policy.go`. |
| 5277 | |
| 5278 | Replace: |
| 5279 | |
| 5280 | ```go |
| 5281 | raw, manifestHash, e := hashJSON(m) |
| 5282 | ``` |
| 5283 | |
| 5284 | with: |
| 5285 | |
| 5286 | ```go |
| 5287 | m.EgressHosts=nil |
| 5288 | raw, manifestHash, e := hashJSON(m) |
| 5289 | ``` |
| 5290 | |
| 5291 | ```sh |
| 5292 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/routing$ -count=1 |
| 5293 | ``` |
| 5294 | |
| 5295 | Exit 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 |
| 5301 | FAIL |
| 5302 | rastrillo-budget/v1 ran 83ms |
| 5303 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s |
| 5304 | FAIL |
| 5305 | ``` |
| 5306 | |
| 5307 | #### Mutation 25: hash tools |
| 5308 | |
| 5309 | File: `internal/runner/provider/policy.go`. |
| 5310 | |
| 5311 | Replace: |
| 5312 | |
| 5313 | ```go |
| 5314 | raw, manifestHash, e := hashJSON(m) |
| 5315 | ``` |
| 5316 | |
| 5317 | with: |
| 5318 | |
| 5319 | ```go |
| 5320 | m.Tools=nil |
| 5321 | raw, manifestHash, e := hashJSON(m) |
| 5322 | ``` |
| 5323 | |
| 5324 | ```sh |
| 5325 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/tools$ -count=1 |
| 5326 | ``` |
| 5327 | |
| 5328 | Exit 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 |
| 5334 | FAIL |
| 5335 | rastrillo-budget/v1 ran 82ms |
| 5336 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.084s |
| 5337 | FAIL |
| 5338 | ``` |
| 5339 | |
| 5340 | #### Mutation 26: hash mcp |
| 5341 | |
| 5342 | File: `internal/runner/provider/policy.go`. |
| 5343 | |
| 5344 | Replace: |
| 5345 | |
| 5346 | ```go |
| 5347 | raw, manifestHash, e := hashJSON(m) |
| 5348 | ``` |
| 5349 | |
| 5350 | with: |
| 5351 | |
| 5352 | ```go |
| 5353 | m.MCP=nil |
| 5354 | raw, manifestHash, e := hashJSON(m) |
| 5355 | ``` |
| 5356 | |
| 5357 | ```sh |
| 5358 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/mcp$ -count=1 |
| 5359 | ``` |
| 5360 | |
| 5361 | Exit 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 |
| 5367 | FAIL |
| 5368 | rastrillo-budget/v1 ran 87ms |
| 5369 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.089s |
| 5370 | FAIL |
| 5371 | ``` |
| 5372 | |
| 5373 | #### Mutation 27: hash managed |
| 5374 | |
| 5375 | File: `internal/runner/provider/policy.go`. |
| 5376 | |
| 5377 | Replace: |
| 5378 | |
| 5379 | ```go |
| 5380 | raw, manifestHash, e := hashJSON(m) |
| 5381 | ``` |
| 5382 | |
| 5383 | with: |
| 5384 | |
| 5385 | ```go |
| 5386 | m.Files=nil |
| 5387 | raw, manifestHash, e := hashJSON(m) |
| 5388 | ``` |
| 5389 | |
| 5390 | ```sh |
| 5391 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/managed$ -count=1 |
| 5392 | ``` |
| 5393 | |
| 5394 | Exit 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 |
| 5400 | FAIL |
| 5401 | rastrillo-budget/v1 ran 83ms |
| 5402 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s |
| 5403 | FAIL |
| 5404 | ``` |
| 5405 | |
| 5406 | #### Mutation 28: hash env |
| 5407 | |
| 5408 | File: `internal/runner/provider/policy.go`. |
| 5409 | |
| 5410 | Replace: |
| 5411 | |
| 5412 | ```go |
| 5413 | raw, manifestHash, e := hashJSON(m) |
| 5414 | ``` |
| 5415 | |
| 5416 | with: |
| 5417 | |
| 5418 | ```go |
| 5419 | m.Env=nil |
| 5420 | raw, manifestHash, e := hashJSON(m) |
| 5421 | ``` |
| 5422 | |
| 5423 | ```sh |
| 5424 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/env$ -count=1 |
| 5425 | ``` |
| 5426 | |
| 5427 | Exit 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 |
| 5433 | FAIL |
| 5434 | rastrillo-budget/v1 ran 85ms |
| 5435 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.086s |
| 5436 | FAIL |
| 5437 | ``` |
| 5438 | |
| 5439 | #### Mutation 29: hash mount |
| 5440 | |
| 5441 | File: `internal/runner/provider/policy.go`. |
| 5442 | |
| 5443 | Replace: |
| 5444 | |
| 5445 | ```go |
| 5446 | raw, manifestHash, e := hashJSON(m) |
| 5447 | ``` |
| 5448 | |
| 5449 | with: |
| 5450 | |
| 5451 | ```go |
| 5452 | m.Files=nil |
| 5453 | raw, manifestHash, e := hashJSON(m) |
| 5454 | ``` |
| 5455 | |
| 5456 | ```sh |
| 5457 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/mount$ -count=1 |
| 5458 | ``` |
| 5459 | |
| 5460 | Exit 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 |
| 5466 | FAIL |
| 5467 | rastrillo-budget/v1 ran 85ms |
| 5468 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.087s |
| 5469 | FAIL |
| 5470 | ``` |
| 5471 | |
| 5472 | #### Mutation 30: hash thread-start |
| 5473 | |
| 5474 | File: `internal/runner/provider/policy.go`. |
| 5475 | |
| 5476 | Replace: |
| 5477 | |
| 5478 | ```go |
| 5479 | raw, manifestHash, e := hashJSON(m) |
| 5480 | ``` |
| 5481 | |
| 5482 | with: |
| 5483 | |
| 5484 | ```go |
| 5485 | m.ThreadPolicy=nil |
| 5486 | raw, manifestHash, e := hashJSON(m) |
| 5487 | ``` |
| 5488 | |
| 5489 | ```sh |
| 5490 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/thread-start$ -count=1 |
| 5491 | ``` |
| 5492 | |
| 5493 | Exit 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 |
| 5499 | FAIL |
| 5500 | rastrillo-budget/v1 ran 83ms |
| 5501 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.084s |
| 5502 | FAIL |
| 5503 | ``` |
| 5504 | |
| 5505 | #### Mutation 31: hash thread-resume |
| 5506 | |
| 5507 | File: `internal/runner/provider/policy.go`. |
| 5508 | |
| 5509 | Replace: |
| 5510 | |
| 5511 | ```go |
| 5512 | raw, manifestHash, e := hashJSON(m) |
| 5513 | ``` |
| 5514 | |
| 5515 | with: |
| 5516 | |
| 5517 | ```go |
| 5518 | m.ThreadPolicy=nil |
| 5519 | raw, manifestHash, e := hashJSON(m) |
| 5520 | ``` |
| 5521 | |
| 5522 | ```sh |
| 5523 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/thread-resume$ -count=1 |
| 5524 | ``` |
| 5525 | |
| 5526 | Exit 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 |
| 5532 | FAIL |
| 5533 | rastrillo-budget/v1 ran 82ms |
| 5534 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.083s |
| 5535 | FAIL |
| 5536 | ``` |
| 5537 | |
| 5538 | #### Mutation 32: hash turn |
| 5539 | |
| 5540 | File: `internal/runner/provider/policy.go`. |
| 5541 | |
| 5542 | Replace: |
| 5543 | |
| 5544 | ```go |
| 5545 | raw, manifestHash, e := hashJSON(m) |
| 5546 | ``` |
| 5547 | |
| 5548 | with: |
| 5549 | |
| 5550 | ```go |
| 5551 | m.TurnPolicy=nil |
| 5552 | raw, manifestHash, e := hashJSON(m) |
| 5553 | ``` |
| 5554 | |
| 5555 | ```sh |
| 5556 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/turn$ -count=1 |
| 5557 | ``` |
| 5558 | |
| 5559 | Exit 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 |
| 5565 | FAIL |
| 5566 | rastrillo-budget/v1 ran 83ms |
| 5567 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.084s |
| 5568 | FAIL |
| 5569 | ``` |
| 5570 | |
| 5571 | #### Mutation 33: hash provider-version |
| 5572 | |
| 5573 | File: `internal/runner/provider/policy.go`. |
| 5574 | |
| 5575 | Replace: |
| 5576 | |
| 5577 | ```go |
| 5578 | raw, manifestHash, e := hashJSON(m) |
| 5579 | ``` |
| 5580 | |
| 5581 | with: |
| 5582 | |
| 5583 | ```go |
| 5584 | m.ProviderVersion="" |
| 5585 | raw, manifestHash, e := hashJSON(m) |
| 5586 | ``` |
| 5587 | |
| 5588 | ```sh |
| 5589 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/provider-version$ -count=1 |
| 5590 | ``` |
| 5591 | |
| 5592 | Exit 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 |
| 5598 | FAIL |
| 5599 | rastrillo-budget/v1 ran 83ms |
| 5600 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s |
| 5601 | FAIL |
| 5602 | ``` |
| 5603 | |
| 5604 | #### Mutation 34: hash launcher-version |
| 5605 | |
| 5606 | File: `internal/runner/provider/policy.go`. |
| 5607 | |
| 5608 | Replace: |
| 5609 | |
| 5610 | ```go |
| 5611 | raw, manifestHash, e := hashJSON(m) |
| 5612 | ``` |
| 5613 | |
| 5614 | with: |
| 5615 | |
| 5616 | ```go |
| 5617 | m.LauncherVersion="" |
| 5618 | raw, manifestHash, e := hashJSON(m) |
| 5619 | ``` |
| 5620 | |
| 5621 | ```sh |
| 5622 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/launcher-version$ -count=1 |
| 5623 | ``` |
| 5624 | |
| 5625 | Exit 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 |
| 5631 | FAIL |
| 5632 | rastrillo-budget/v1 ran 83ms |
| 5633 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s |
| 5634 | FAIL |
| 5635 | ``` |
| 5636 | |
| 5637 | #### Mutation 35: hash bwrap-version |
| 5638 | |
| 5639 | File: `internal/runner/provider/policy.go`. |
| 5640 | |
| 5641 | Replace: |
| 5642 | |
| 5643 | ```go |
| 5644 | raw, manifestHash, e := hashJSON(m) |
| 5645 | ``` |
| 5646 | |
| 5647 | with: |
| 5648 | |
| 5649 | ```go |
| 5650 | m.BwrapVersion="" |
| 5651 | raw, manifestHash, e := hashJSON(m) |
| 5652 | ``` |
| 5653 | |
| 5654 | ```sh |
| 5655 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/bwrap-version$ -count=1 |
| 5656 | ``` |
| 5657 | |
| 5658 | Exit 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 |
| 5664 | FAIL |
| 5665 | rastrillo-budget/v1 ran 83ms |
| 5666 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.085s |
| 5667 | FAIL |
| 5668 | ``` |
| 5669 | |
| 5670 | #### Mutation 36: hash argv |
| 5671 | |
| 5672 | File: `internal/runner/provider/policy.go`. |
| 5673 | |
| 5674 | Replace: |
| 5675 | |
| 5676 | ```go |
| 5677 | raw, manifestHash, e := hashJSON(m) |
| 5678 | ``` |
| 5679 | |
| 5680 | with: |
| 5681 | |
| 5682 | ```go |
| 5683 | m.Argv=nil |
| 5684 | raw, manifestHash, e := hashJSON(m) |
| 5685 | ``` |
| 5686 | |
| 5687 | ```sh |
| 5688 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/argv$ -count=1 |
| 5689 | ``` |
| 5690 | |
| 5691 | Exit 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 |
| 5697 | FAIL |
| 5698 | rastrillo-budget/v1 ran 86ms |
| 5699 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.088s |
| 5700 | FAIL |
| 5701 | ``` |
| 5702 | |
| 5703 | #### Mutation 37: hash denied |
| 5704 | |
| 5705 | File: `internal/runner/provider/policy.go`. |
| 5706 | |
| 5707 | Replace: |
| 5708 | |
| 5709 | ```go |
| 5710 | raw, manifestHash, e := hashJSON(m) |
| 5711 | ``` |
| 5712 | |
| 5713 | with: |
| 5714 | |
| 5715 | ```go |
| 5716 | m.DeniedPaths=nil |
| 5717 | raw, manifestHash, e := hashJSON(m) |
| 5718 | ``` |
| 5719 | |
| 5720 | ```sh |
| 5721 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/denied$ -count=1 |
| 5722 | ``` |
| 5723 | |
| 5724 | Exit 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 |
| 5730 | FAIL |
| 5731 | rastrillo-budget/v1 ran 88ms |
| 5732 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.090s |
| 5733 | FAIL |
| 5734 | ``` |
| 5735 | |
| 5736 | #### Mutation 38: workspace role |
| 5737 | |
| 5738 | File: `internal/runner/provider/policy.go`. |
| 5739 | |
| 5740 | Replace: |
| 5741 | |
| 5742 | ```go |
| 5743 | m.Workspace = "$WORKSPACE" |
| 5744 | ``` |
| 5745 | |
| 5746 | with: |
| 5747 | |
| 5748 | ```go |
| 5749 | m.Workspace = m.Workspace |
| 5750 | ``` |
| 5751 | |
| 5752 | ```sh |
| 5753 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/canonical_and_concrete$ -count=1 |
| 5754 | ``` |
| 5755 | |
| 5756 | Exit 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 |
| 5762 | FAIL |
| 5763 | rastrillo-budget/v1 ran 110ms |
| 5764 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.112s |
| 5765 | FAIL |
| 5766 | ``` |
| 5767 | |
| 5768 | #### Mutation 39: instruction digest |
| 5769 | |
| 5770 | File: `internal/runner/provider/policy.go`. |
| 5771 | |
| 5772 | Replace: |
| 5773 | |
| 5774 | ```go |
| 5775 | _, instructionHash, _ := hashJSON(instructions) |
| 5776 | ``` |
| 5777 | |
| 5778 | with: |
| 5779 | |
| 5780 | ```go |
| 5781 | instructionHash := "constant" |
| 5782 | ``` |
| 5783 | |
| 5784 | ```sh |
| 5785 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHash/instructions_separate$ -count=1 |
| 5786 | ``` |
| 5787 | |
| 5788 | Exit 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 |
| 5794 | FAIL |
| 5795 | rastrillo-budget/v1 ran 89ms |
| 5796 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.090s |
| 5797 | FAIL |
| 5798 | ``` |
| 5799 | |
| 5800 | #### Mutation 40: launch arguments |
| 5801 | |
| 5802 | File: `internal/runner/provider/policy.go`. |
| 5803 | |
| 5804 | Replace: |
| 5805 | |
| 5806 | ```go |
| 5807 | || !reflect.DeepEqual(m.Argv, argv) |
| 5808 | ``` |
| 5809 | |
| 5810 | with: |
| 5811 | |
| 5812 | ```go |
| 5813 | // removed |
| 5814 | ``` |
| 5815 | |
| 5816 | ```sh |
| 5817 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/argv$ -count=1 |
| 5818 | ``` |
| 5819 | |
| 5820 | Exit 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 |
| 5826 | FAIL |
| 5827 | rastrillo-budget/v1 ran 68ms |
| 5828 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.070s |
| 5829 | FAIL |
| 5830 | ``` |
| 5831 | |
| 5832 | #### Mutation 41: launch env |
| 5833 | |
| 5834 | File: `internal/runner/provider/policy.go`. |
| 5835 | |
| 5836 | Replace: |
| 5837 | |
| 5838 | ```go |
| 5839 | if !reflect.DeepEqual(expectedEnv, p.Env) { |
| 5840 | ``` |
| 5841 | |
| 5842 | with: |
| 5843 | |
| 5844 | ```go |
| 5845 | if false && !reflect.DeepEqual(expectedEnv, p.Env) { |
| 5846 | ``` |
| 5847 | |
| 5848 | ```sh |
| 5849 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/env$ -count=1 |
| 5850 | ``` |
| 5851 | |
| 5852 | Exit 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 |
| 5858 | FAIL |
| 5859 | rastrillo-budget/v1 ran 66ms |
| 5860 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.068s |
| 5861 | FAIL |
| 5862 | ``` |
| 5863 | |
| 5864 | #### Mutation 42: launch mounts |
| 5865 | |
| 5866 | File: `internal/runner/provider/policy.go`. |
| 5867 | |
| 5868 | Replace: |
| 5869 | |
| 5870 | ```go |
| 5871 | if !reflect.DeepEqual(expectedMounts, p.Mounts) { |
| 5872 | ``` |
| 5873 | |
| 5874 | with: |
| 5875 | |
| 5876 | ```go |
| 5877 | if false && !reflect.DeepEqual(expectedMounts, p.Mounts) { |
| 5878 | ``` |
| 5879 | |
| 5880 | ```sh |
| 5881 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/mount$ -count=1 |
| 5882 | ``` |
| 5883 | |
| 5884 | Exit 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 |
| 5890 | FAIL |
| 5891 | rastrillo-budget/v1 ran 67ms |
| 5892 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.069s |
| 5893 | FAIL |
| 5894 | ``` |
| 5895 | |
| 5896 | #### Mutation 43: manifest integrity |
| 5897 | |
| 5898 | File: `internal/runner/provider/policy.go`. |
| 5899 | |
| 5900 | Replace: |
| 5901 | |
| 5902 | ```go |
| 5903 | if digest(p.Manifest) != p.ManifestHash { |
| 5904 | ``` |
| 5905 | |
| 5906 | with: |
| 5907 | |
| 5908 | ```go |
| 5909 | if false && digest(p.Manifest) != p.ManifestHash { |
| 5910 | ``` |
| 5911 | |
| 5912 | ```sh |
| 5913 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/manifesthash$ -count=1 |
| 5914 | ``` |
| 5915 | |
| 5916 | Exit 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 |
| 5922 | FAIL |
| 5923 | rastrillo-budget/v1 ran 63ms |
| 5924 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.064s |
| 5925 | FAIL |
| 5926 | ``` |
| 5927 | |
| 5928 | #### Mutation 44: policy hash integrity |
| 5929 | |
| 5930 | File: `internal/runner/provider/policy.go`. |
| 5931 | |
| 5932 | Replace: |
| 5933 | |
| 5934 | ```go |
| 5935 | if policyHash != p.Hash { |
| 5936 | ``` |
| 5937 | |
| 5938 | with: |
| 5939 | |
| 5940 | ```go |
| 5941 | if false && policyHash != p.Hash { |
| 5942 | ``` |
| 5943 | |
| 5944 | ```sh |
| 5945 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation/policyhash$ -count=1 |
| 5946 | ``` |
| 5947 | |
| 5948 | Exit 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 |
| 5954 | FAIL |
| 5955 | rastrillo-budget/v1 ran 62ms |
| 5956 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.064s |
| 5957 | FAIL |
| 5958 | ``` |
| 5959 | |
| 5960 | #### Mutation 45: network binding |
| 5961 | |
| 5962 | File: `internal/runner/provider/policy.go`. |
| 5963 | |
| 5964 | Replace the body of `func (p Policy) ValidateNetwork(name string, hosts []string) error` with: |
| 5965 | |
| 5966 | ```go |
| 5967 | return nil |
| 5968 | ``` |
| 5969 | |
| 5970 | ```sh |
| 5971 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyLaunchAttestation$ -count=1 |
| 5972 | ``` |
| 5973 | |
| 5974 | Exit 1, compiled failure: |
| 5975 | |
| 5976 | ```text |
| 5977 | --- FAIL: TestEffectivePolicyLaunchAttestation (0.06s) |
| 5978 | policy_test.go:214: egress drift accepted |
| 5979 | FAIL |
| 5980 | rastrillo-budget/v1 ran 63ms |
| 5981 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 5982 | FAIL |
| 5983 | ``` |
| 5984 | |
| 5985 | #### Mutation 46: host binary inclusion |
| 5986 | |
| 5987 | File: `internal/runner/provider/policy.go`. |
| 5988 | |
| 5989 | Replace the body of `func (p Policy) ValidateRuntimeBinaries(paths ...string) error` with: |
| 5990 | |
| 5991 | ```go |
| 5992 | return nil |
| 5993 | ``` |
| 5994 | |
| 5995 | ```sh |
| 5996 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyHostBinary$ -count=1 |
| 5997 | ``` |
| 5998 | |
| 5999 | Exit 1, compiled failure: |
| 6000 | |
| 6001 | ```text |
| 6002 | --- FAIL: TestEffectivePolicyHostBinary (0.06s) |
| 6003 | policy_test.go:272: unhashed host binary accepted |
| 6004 | FAIL |
| 6005 | rastrillo-budget/v1 ran 63ms |
| 6006 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 6007 | FAIL |
| 6008 | ``` |
| 6009 | |
| 6010 | #### Mutation 47: pinned digest |
| 6011 | |
| 6012 | File: `internal/runner/provider/policy.go`. |
| 6013 | |
| 6014 | Replace the body of `func (p Policy) ValidateFileDigest(path, hash string) error` with: |
| 6015 | |
| 6016 | ```go |
| 6017 | return nil |
| 6018 | ``` |
| 6019 | |
| 6020 | ```sh |
| 6021 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestEffectivePolicyManifestBoundary$ -count=1 |
| 6022 | ``` |
| 6023 | |
| 6024 | Exit 1, compiled failure: |
| 6025 | |
| 6026 | ```text |
| 6027 | --- FAIL: TestEffectivePolicyManifestBoundary (0.06s) |
| 6028 | policy_test.go:285: changed pinned file digest accepted |
| 6029 | FAIL |
| 6030 | rastrillo-budget/v1 ran 63ms |
| 6031 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.065s |
| 6032 | FAIL |
| 6033 | ``` |
| 6034 | |
| 6035 | #### Mutation 48: duplicate binding |
| 6036 | |
| 6037 | File: `internal/runner/connections.go`. |
| 6038 | |
| 6039 | Replace: |
| 6040 | |
| 6041 | ```go |
| 6042 | || seen[key] |
| 6043 | ``` |
| 6044 | |
| 6045 | with: |
| 6046 | |
| 6047 | ```go |
| 6048 | // removed |
| 6049 | ``` |
| 6050 | |
| 6051 | ```sh |
| 6052 | CGO_ENABLED=0 go test ./internal/runner -run ^TestAccountHomeConfiguredDiscovery$ -count=1 |
| 6053 | ``` |
| 6054 | |
| 6055 | Exit 1, compiled failure: |
| 6056 | |
| 6057 | ```text |
| 6058 | --- FAIL: TestAccountHomeConfiguredDiscovery (0.00s) |
| 6059 | connections_test.go:133: second matching binding accepted |
| 6060 | FAIL |
| 6061 | rastrillo-budget/v1 ran 2ms |
| 6062 | FAIL amadan.net/oficina/equipo/internal/runner 0.004s |
| 6063 | FAIL |
| 6064 | ``` |
| 6065 | |
| 6066 | #### Mutation 49: runtime config path |
| 6067 | |
| 6068 | File: `internal/runner/config.go`. |
| 6069 | |
| 6070 | Replace the body of `func (c Config) DirectBinding(b AccountBinding) (provider.Binding, error)` with: |
| 6071 | |
| 6072 | ```go |
| 6073 | return provider.Binding{Home:b.ProviderHome,Expected:b.ExpectedIdentity},nil |
| 6074 | ``` |
| 6075 | |
| 6076 | ```sh |
| 6077 | CGO_ENABLED=0 go test ./internal/runner -run ^TestAccountHomeConfiguredRuntime$ -count=1 |
| 6078 | ``` |
| 6079 | |
| 6080 | Exit 1, compiled failure: |
| 6081 | |
| 6082 | ```text |
| 6083 | --- FAIL: TestAccountHomeConfiguredRuntime (0.00s) |
| 6084 | config_test.go:146: unsafe runtime root accepted: / |
| 6085 | FAIL |
| 6086 | rastrillo-budget/v1 ran 0s |
| 6087 | FAIL amadan.net/oficina/equipo/internal/runner 0.002s |
| 6088 | FAIL |
| 6089 | ``` |
| 6090 | |
| 6091 | #### Mutation 50: egress provenance |
| 6092 | |
| 6093 | File: `internal/runner/containment/egress.go`. |
| 6094 | |
| 6095 | Replace: |
| 6096 | |
| 6097 | ```go |
| 6098 | if l.Binding.DedicatedHome && !l.Binding.VerifiedDedicatedHome() { |
| 6099 | ``` |
| 6100 | |
| 6101 | with: |
| 6102 | |
| 6103 | ```go |
| 6104 | if false && l.Binding.DedicatedHome && !l.Binding.VerifiedDedicatedHome() { |
| 6105 | ``` |
| 6106 | |
| 6107 | ```sh |
| 6108 | CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestEgressRejectsForgedDedicatedHome$ -count=1 |
| 6109 | ``` |
| 6110 | |
| 6111 | Exit 1, compiled failure: |
| 6112 | |
| 6113 | ```text |
| 6114 | --- FAIL: TestEgressRejectsForgedDedicatedHome (0.00s) |
| 6115 | egress_test.go:329: egress accepted forged provenance |
| 6116 | FAIL |
| 6117 | rastrillo-budget/v1 ran 2ms |
| 6118 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.003s |
| 6119 | FAIL |
| 6120 | ``` |
| 6121 | |
| 6122 | #### Mutation 51: persist concrete hash |
| 6123 | |
| 6124 | File: `internal/runner/containment/linux.go`. |
| 6125 | |
| 6126 | Replace: |
| 6127 | |
| 6128 | ```go |
| 6129 | ManifestHash: manifestHash, |
| 6130 | ``` |
| 6131 | |
| 6132 | with: |
| 6133 | |
| 6134 | ```go |
| 6135 | ManifestHash: l.Policy.Hash, |
| 6136 | ``` |
| 6137 | |
| 6138 | ```sh |
| 6139 | CGO_ENABLED=0 go test ./internal/runner/containment -run ^TestNamespaceConcreteManifestHash$ -count=1 |
| 6140 | ``` |
| 6141 | |
| 6142 | Exit 1, compiled failure: |
| 6143 | |
| 6144 | ```text |
| 6145 | --- FAIL: TestNamespaceConcreteManifestHash (0.05s) |
| 6146 | linux_test.go:647: policy hash substituted for concrete manifest hash |
| 6147 | FAIL |
| 6148 | rastrillo-budget/v1 ran 47ms |
| 6149 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.048s |
| 6150 | FAIL |
| 6151 | ``` |
| 6152 | |
| 6153 | #### Mutation 52: directory mode |
| 6154 | |
| 6155 | File: `internal/runner/provider/accounts.go`. |
| 6156 | |
| 6157 | Replace the body of `func privateDirectory(f *os.File) bool` with: |
| 6158 | |
| 6159 | ```go |
| 6160 | return true |
| 6161 | ``` |
| 6162 | |
| 6163 | ```sh |
| 6164 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeFileGuards/directory_mode$ -count=1 |
| 6165 | ``` |
| 6166 | |
| 6167 | Exit 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 |
| 6173 | FAIL |
| 6174 | rastrillo-budget/v1 ran 23ms |
| 6175 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.024s |
| 6176 | FAIL |
| 6177 | ``` |
| 6178 | |
| 6179 | #### Mutation 53: credential hardlink |
| 6180 | |
| 6181 | File: `internal/runner/provider/accounts.go`. |
| 6182 | |
| 6183 | Replace: |
| 6184 | |
| 6185 | ```go |
| 6186 | || st.Nlink != 1 |
| 6187 | ``` |
| 6188 | |
| 6189 | with: |
| 6190 | |
| 6191 | ```go |
| 6192 | // removed |
| 6193 | ``` |
| 6194 | |
| 6195 | ```sh |
| 6196 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeFileGuards/credential_hardlink$ -count=1 |
| 6197 | ``` |
| 6198 | |
| 6199 | Exit 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 |
| 6205 | FAIL |
| 6206 | rastrillo-budget/v1 ran 23ms |
| 6207 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.025s |
| 6208 | FAIL |
| 6209 | ``` |
| 6210 | |
| 6211 | #### Mutation 54: duplicate metadata |
| 6212 | |
| 6213 | File: `internal/runner/provider/accounts.go`. |
| 6214 | |
| 6215 | Replace: |
| 6216 | |
| 6217 | ```go |
| 6218 | metadata, e = canonical(metadata) |
| 6219 | ``` |
| 6220 | |
| 6221 | with: |
| 6222 | |
| 6223 | ```go |
| 6224 | metadata, e = metadata,nil |
| 6225 | ``` |
| 6226 | |
| 6227 | ```sh |
| 6228 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeFileGuards/metadata_duplicate$ -count=1 |
| 6229 | ``` |
| 6230 | |
| 6231 | Exit 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 |
| 6237 | FAIL |
| 6238 | rastrillo-budget/v1 ran 22ms |
| 6239 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.024s |
| 6240 | FAIL |
| 6241 | ``` |
| 6242 | |
| 6243 | #### Mutation 55: controlled generation |
| 6244 | |
| 6245 | File: `internal/runner/provider/accounts.go`. |
| 6246 | |
| 6247 | Replace: |
| 6248 | |
| 6249 | ```go |
| 6250 | digest := sha256.Sum256(bytes.Join([][]byte{metadata, raw, state}, nil)) |
| 6251 | ``` |
| 6252 | |
| 6253 | with: |
| 6254 | |
| 6255 | ```go |
| 6256 | _ = state |
| 6257 | digest := sha256.Sum256(bytes.Join([][]byte{metadata, raw}, nil)) |
| 6258 | ``` |
| 6259 | |
| 6260 | ```sh |
| 6261 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeGuards/same_bytes_new_generation$ -count=1 |
| 6262 | ``` |
| 6263 | |
| 6264 | Exit 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 |
| 6270 | FAIL |
| 6271 | rastrillo-budget/v1 ran 43ms |
| 6272 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s |
| 6273 | FAIL |
| 6274 | ``` |
| 6275 | |
| 6276 | #### Mutation 56: observed identity |
| 6277 | |
| 6278 | File: `internal/runner/provider/accounts.go`. |
| 6279 | |
| 6280 | Replace: |
| 6281 | |
| 6282 | ```go |
| 6283 | if id != l.source.Expected { |
| 6284 | ``` |
| 6285 | |
| 6286 | with: |
| 6287 | |
| 6288 | ```go |
| 6289 | if false && id != l.source.Expected { |
| 6290 | ``` |
| 6291 | |
| 6292 | ```sh |
| 6293 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomePreflightGuards/observed_identity$ -count=1 |
| 6294 | ``` |
| 6295 | |
| 6296 | Exit 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> |
| 6302 | FAIL |
| 6303 | rastrillo-budget/v1 ran 43ms |
| 6304 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s |
| 6305 | FAIL |
| 6306 | ``` |
| 6307 | |
| 6308 | #### Mutation 57: probe stable generation |
| 6309 | |
| 6310 | File: `internal/runner/provider/accounts.go`. |
| 6311 | |
| 6312 | Replace: |
| 6313 | |
| 6314 | ```go |
| 6315 | if before != after { |
| 6316 | ``` |
| 6317 | |
| 6318 | with: |
| 6319 | |
| 6320 | ```go |
| 6321 | if false && before != after { |
| 6322 | ``` |
| 6323 | |
| 6324 | ```sh |
| 6325 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomePreflightGuards/generation_during_probe$ -count=1 |
| 6326 | ``` |
| 6327 | |
| 6328 | Exit 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> |
| 6334 | FAIL |
| 6335 | rastrillo-budget/v1 ran 43ms |
| 6336 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.044s |
| 6337 | FAIL |
| 6338 | ``` |
| 6339 | |
| 6340 | #### Mutation 58: runtime no side effects |
| 6341 | |
| 6342 | File: `internal/runner/provider/accounts.go`. |
| 6343 | |
| 6344 | Replace: |
| 6345 | |
| 6346 | ```go |
| 6347 | root, e := makePrivateRoot(b.RuntimeRoot) |
| 6348 | ``` |
| 6349 | |
| 6350 | with: |
| 6351 | |
| 6352 | ```go |
| 6353 | _ = os.MkdirAll(b.RuntimeRoot,0700) |
| 6354 | root, e := makePrivateRoot(b.RuntimeRoot) |
| 6355 | ``` |
| 6356 | |
| 6357 | ```sh |
| 6358 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestAccountHomeRuntimeAliasNoSideEffects$ -count=1 |
| 6359 | ``` |
| 6360 | |
| 6361 | Exit 1, compiled failure: |
| 6362 | |
| 6363 | ```text |
| 6364 | --- FAIL: TestAccountHomeRuntimeAliasNoSideEffects (0.00s) |
| 6365 | accounts_test.go:356: interactive directory changed <nil> |
| 6366 | FAIL |
| 6367 | rastrillo-budget/v1 ran 1ms |
| 6368 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.002s |
| 6369 | FAIL |
| 6370 | ``` |
| 6371 | |
| 6372 | #### Mutation 59: credential source import |
| 6373 | |
| 6374 | File: `internal/runner/provider/policy.go`. |
| 6375 | |
| 6376 | Replace: |
| 6377 | |
| 6378 | ```go |
| 6379 | if credentialSource(m.Source, b) { |
| 6380 | ``` |
| 6381 | |
| 6382 | with: |
| 6383 | |
| 6384 | ```go |
| 6385 | if false && credentialSource(m.Source, b) { |
| 6386 | ``` |
| 6387 | |
| 6388 | ```sh |
| 6389 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestPrivateHomeRejectsCredentialMount$ -count=1 |
| 6390 | ``` |
| 6391 | |
| 6392 | Exit 1, compiled failure: |
| 6393 | |
| 6394 | ```text |
| 6395 | --- FAIL: TestPrivateHomeRejectsCredentialMount (0.07s) |
| 6396 | policy_test.go:302: credential source entered public manifest |
| 6397 | FAIL |
| 6398 | rastrillo-budget/v1 ran 67ms |
| 6399 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.069s |
| 6400 | FAIL |
| 6401 | ``` |
| 6402 | |
| 6403 | #### Mutation 60: credential inode import |
| 6404 | |
| 6405 | File: `internal/runner/provider/policy.go`. |
| 6406 | |
| 6407 | Replace: |
| 6408 | |
| 6409 | ```go |
| 6410 | || stat.Nlink != 1 |
| 6411 | ``` |
| 6412 | |
| 6413 | with: |
| 6414 | |
| 6415 | ```go |
| 6416 | // removed |
| 6417 | ``` |
| 6418 | |
| 6419 | ```sh |
| 6420 | CGO_ENABLED=0 go test ./internal/runner/provider -run ^TestPrivateHomeRejectsCredentialMount$ -count=1 |
| 6421 | ``` |
| 6422 | |
| 6423 | Exit 1, compiled failure: |
| 6424 | |
| 6425 | ```text |
| 6426 | --- FAIL: TestPrivateHomeRejectsCredentialMount (0.07s) |
| 6427 | policy_test.go:310: credential inode alias entered public manifest |
| 6428 | FAIL |
| 6429 | rastrillo-budget/v1 ran 69ms |
| 6430 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.071s |
| 6431 | FAIL |
| 6432 | ``` |
| 6433 | |
| 6434 | ### User-facing strings |
| 6435 | |
| 6436 | No 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 | |
| 6445 | All 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 | |
| 6450 | Status: DONE. All seven findings and the neutral-path cleanup are addressed. |
| 6451 | Commit subject: `fix: preserve refreshed logins and attest every direct launch` (61 characters). |
| 6452 | Branch: `plan-2b`. Work stayed in `/home/paulca/amadan.net/oficina/equipo-plan-2b`. |
| 6453 | |
| 6454 | ### What changed |
| 6455 | |
| 6456 | A 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 | |
| 6458 | Containment 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 | |
| 6460 | Manager.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 | |
| 6462 | Generated 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 | |
| 6464 | BuildPolicy 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 | |
| 6466 | DefaultHomeRules 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 | |
| 6468 | The 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 | |
| 6480 | The 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 | |
| 6482 | The 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 | |
| 6484 | Account 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 | |
| 6486 | The 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 | |
| 6490 | Commands 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 |
| 6493 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccountRefreshPending|TestAccountContainmentLatched|TestAccountHomeDefaultsIgnoreEnvironment|TestAccountHomeConfiguredDiscoveryAliases' -count=1 |
| 6494 | ``` |
| 6495 | |
| 6496 | Exit 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 |
| 6518 | FAIL |
| 6519 | rastrillo-budget/v1 ran 1.344s |
| 6520 | FAIL 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 |
| 6528 | FAIL |
| 6529 | rastrillo-budget/v1 ran 8ms |
| 6530 | FAIL amadan.net/oficina/equipo/internal/runner 0.012s |
| 6531 | FAIL |
| 6532 | ``` |
| 6533 | |
| 6534 | ```sh |
| 6535 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestEffectivePolicyTurnSources|TestPrivateHomeConfigOutsideWritableMounts|TestEffectivePolicyRejectsWritableSource|TestNamespaceProviderRequiresManifest' -count=1 |
| 6536 | ``` |
| 6537 | |
| 6538 | Exit 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 |
| 6555 | FAIL |
| 6556 | rastrillo-budget/v1 ran 1.28s |
| 6557 | FAIL amadan.net/oficina/equipo/internal/runner/provider 1.282s |
| 6558 | --- FAIL: TestNamespaceProviderRequiresManifest (0.11s) |
| 6559 | linux_test.go:688: provider launch without manifest forked |
| 6560 | FAIL |
| 6561 | rastrillo-budget/v1 ran 111ms |
| 6562 | FAIL amadan.net/oficina/equipo/internal/runner/containment 0.113s |
| 6563 | FAIL |
| 6564 | ``` |
| 6565 | |
| 6566 | ```sh |
| 6567 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespaceDirectPolicy' -count=1 |
| 6568 | ``` |
| 6569 | |
| 6570 | Exit 1: |
| 6571 | |
| 6572 | ```text |
| 6573 | # amadan.net/oficina/equipo/internal/runner/containment [amadan.net/oficina/equipo/internal/runner/containment.test] |
| 6574 | internal/runner/containment/linux_test.go:715:4: m.beforePin undefined (type *Manager has no field or method beforePin) |
| 6575 | FAIL amadan.net/oficina/equipo/internal/runner/containment [build failed] |
| 6576 | FAIL |
| 6577 | ``` |
| 6578 | |
| 6579 | ```sh |
| 6580 | CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestAccountContainmentPreflightLatched$' -count=1 |
| 6581 | ``` |
| 6582 | |
| 6583 | Exit 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> |
| 6591 | FAIL |
| 6592 | rastrillo-budget/v1 ran 204ms |
| 6593 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.206s |
| 6594 | FAIL |
| 6595 | ``` |
| 6596 | |
| 6597 | ```sh |
| 6598 | CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestAccountContainmentSourceFile$' -count=1 |
| 6599 | ``` |
| 6600 | |
| 6601 | Exit 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> |
| 6611 | FAIL |
| 6612 | rastrillo-budget/v1 ran 123ms |
| 6613 | FAIL amadan.net/oficina/equipo/internal/runner/provider 0.125s |
| 6614 | FAIL |
| 6615 | ``` |
| 6616 | |
| 6617 | An 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 | |
| 6621 | All implementation and supplemental tests passed before mutation checks. The intermediate commands were: |
| 6622 | |
| 6623 | ```sh |
| 6624 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner -run 'TestAccount' -count=1 |
| 6625 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestEffectivePolicy|TestPrivateHome|TestNamespaceProviderRequiresManifest' -count=1 |
| 6626 | CGO_ENABLED=0 go test ./internal/runner/provider ./internal/runner/containment -run 'TestAccountContainmentPreflightLatched|TestNamespaceDirectPolicy|TestNamespaceProviderRequiresManifest|TestAccountHomeLookupFailClosed|TestAccountRefreshPreflightPreservesLogin|TestEffectivePolicyProviderRequiresManifest' -count=1 |
| 6627 | CGO_ENABLED=0 go test ./internal/runner/provider -run 'TestAccountContainmentSourceFile|TestEffectivePolicyConfigDirectory' -count=1 |
| 6628 | CGO_ENABLED=0 go test ./internal/runner/provider -run 'TestAccountContainmentLatched|TestAccountRefreshFailure' -count=1 |
| 6629 | ``` |
| 6630 | |
| 6631 | Each 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 | |
| 6633 | After restoring all mutations, the required covering command passed: |
| 6634 | |
| 6635 | ```sh |
| 6636 | CGO_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 | |
| 6639 | Exit 0: |
| 6640 | |
| 6641 | ```text |
| 6642 | ok amadan.net/oficina/equipo/internal/runner/provider 8.656s |
| 6643 | ok amadan.net/oficina/equipo/internal/runner 19.597s |
| 6644 | ok amadan.net/oficina/equipo/internal/runner/containment 7.646s |
| 6645 | ok amadan.net/oficina/equipo/internal/runner/egress 3.280s |
| 6646 | ``` |
| 6647 | |
| 6648 | ```sh |
| 6649 | make runner-namespace-test |
| 6650 | ``` |
| 6651 | |
| 6652 | Exit 0: |
| 6653 | |
| 6654 | ```text |
| 6655 | CGO_ENABLED=0 go test ./internal/runner/containment -run '^TestNamespace' -count=1 |
| 6656 | ok amadan.net/oficina/equipo/internal/runner/containment 5.055s |
| 6657 | ``` |
| 6658 | |
| 6659 | `gofmt` was appli |