oficina / equipo Public

containment: record the outside-tree test binary run

Run the whole containment test binary with -test.skip '^TestSource' from
outside the tree and, as a control, from the package directory. No
failure comes from a source read: one is a socket path over the limit
under the long TMPDIR, and two follow a relative os.Args[0] in
parentFixture, failing the same inside the tree when invoked that way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 8a369908ebcd33f8ab420b4c7a40391d3eef8647 parent 86e74e3
1 file changed, +15 −0
  • docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md +15 −0
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
index b665bc79..ee6c8f56 100644
--- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
+++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
@@ -20,6 +20,21 @@ Tests in `internal/runner/containment` that read the source tree carry the `Test
Compiled binary outside the tree: `go test -c` into `mktemp -d "$TMPDIR/hosted-XXXX"`, run from there with `-test.run TestBubblewrapPins -test.skip '^TestSource'`: `--- PASS: TestBubblewrapPins`. Directory removed.
+Whole binary outside the tree (fix round 1, HEAD 975997ff). Environment: docs-t1, user paulca, `TMPDIR=/home/paulca/.cache/tmp`, systemd user session present (`XDG_RUNTIME_DIR=/run/user/1001`), `/usr/bin/bwrap` is bubblewrap 0.11.0, sandbox off. Built with `CGO_ENABLED=0 go test -c -o "$d/containment.test" ./internal/runner/containment`, `d=$(mktemp -d "$TMPDIR/hosted-XXXX")` (`hosted-qAHZ`). Each run is `<binary> -test.skip '^TestSource' -test.v`, no `-test.run`; counts are top-level tests (84 ran each time; no `TestSource` test ran; none skipped).
+
+| cwd | binary given as | pass | fail | failures |
+| --- | --- | --- | --- | --- |
+| `$d` (outside the tree) | `./containment.test` | 81 | 3 | `TestNamespaceParentDeath`, `TestNamespaceRecoveryCrashBeforeExit`, `TestNamespaceOpenCodeBinaryAfterAttestation` |
+| `$d` (outside the tree) | `$d/containment.test` | 83 | 1 | `TestNamespaceOpenCodeBinaryAfterAttestation` |
+| `internal/runner/containment` (control) | `$d/containment.test` | 83 | 1 | `TestNamespaceOpenCodeBinaryAfterAttestation` |
+| `internal/runner/containment` (control, `-test.run` on the two) | relative path to `$d/containment.test` | 0 | 2 | `TestNamespaceParentDeath`, `TestNamespaceRecoveryCrashBeforeExit` |
+
+Reasons, none a source read:
+- `TestNamespaceOpenCodeBinaryAfterAttestation/second_name`: `listen unix /home/paulca/.cache/tmp/TestNamespace...second_name1945606201/002/tool/equipo.sock: bind: invalid argument`. The socket path is 109 bytes, over the Unix socket limit, because of the long `TMPDIR`. Environmental; fails the same inside the tree.
+- `TestNamespaceParentDeath` and `TestNamespaceRecoveryCrashBeforeExit`: the re-executed child panics `namespace_mount_rejected` in `parentFixture` (`linux_test.go:412`), which passes `RunnerBinary: os.Args[0]`; a relative `os.Args[0]` is refused by the absolute-path mount rule. This follows how the binary is invoked, not where: an absolute path passes outside the tree, a relative path fails inside it. Not changed here (not a source read); a VM run must invoke the binary by absolute path, or `parentFixture` should use `os.Executable()` like `fixture` does.
+
+`rm -r "$d"`; `ls` confirms it is gone.
+
## Task 3
`TestNamespaceCgroupMoveKeepsMembership` asks `cgroupSkip` (in `internal/runner/containment/linux_test.go`) whether the `user@UID.service` cgroup exists. Where it does not, as inside a MicroVM, the test skips with `no systemd user session; production containment does not use cgroups`; with `EQUIPO_REQUIRE_USER_SESSION=1` it fails instead. A stat error other than "does not exist" fails either way. `make runner-namespace-test` sets `EQUIPO_REQUIRE_USER_SESSION=1`, so the CI host still fails loudly if its session goes away; `scripts/ci-test.py retried` passes the environment through to `go test` and to its retry.