carlos / platform Public

plans: gvisor slice 1.2 describes the hoist, not the refusal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 1ac9e116a6779a425aabf8ca8dc3e84e8445d700 parent dfb6401
1 file changed, +3 −1
  • docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md +3 −1
diff --git a/docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md b/docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md
index 6a77d2b51..01fc41cb1 100644
--- a/docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md
+++ b/docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md
@@ -48,12 +48,14 @@ Both apply today under the native sandbox, so this slice ships first and protect
- **Fix:** an iterative removal with a fixed budget of at most 3 live directory descriptors, temporary ones included.
- It keeps a stack of name components, not fds. To reach a directory it walks from the purge root ONE COMPONENT AT A TIME: `openat2(parentfd, name, RESOLVE_BENEATH|RESOLVE_NO_SYMLINKS|RESOLVE_NO_MAGICLINKS)`, then closes the parent. No joined pathname is ever passed to the kernel, so total path length (beyond PATH_MAX) does not matter. The walk is quadratic in depth, which is accepted.
- It reads entries in batches of 256.
- - The name stack is bounded at 65,536 components (at most about 16 MiB of names). Past that, purge refuses with "too deep", leaves the tree, and marks the demo for operator recovery (`carlos` box verb, documented in the runbook). This is a reachable refusal, accepted; the guest has no directory-depth limit.
+ - The name stack is bounded at 65,536 components (at most about 16 MiB of names). Past that, purge does not refuse: it renames the directory it would descend into up into the purge root (`renameat2` with `RENAME_NOREPLACE`, the root reopened one component at a time and checked by device and inode) under a name of 128 random bits, and carries on. Each move shortens the deepest path, so any depth is removed with the same stack and descriptors, and no name a tenant plants can make every retry fail. An interrupted purge leaves the moved directory as an ordinary entry for the next one. No operator recovery step or box verb is needed.
+ - Once removal has begun, no error reads as "already absent": a directory that goes missing mid-walk (the parent at a move included) was moved, perhaps with data in it, so it is an error, never success.
- **Tests:**
- a tree whose total path is over 64 KiB (long 255-byte names), and a 10,000-deep tree, both purge with `RLIMIT_NOFILE` set to 16;
- a 100k-entry directory purges with bounded memory;
- a directory swapped for a symlink between batches is not followed;
- an interrupted purge (error injected mid-walk) resumes and completes on retry.
+ - with a small depth bound: a purge past it moves directories up and finishes, through `RemoveAllBeneath` and `PurgeProven` alike; planted names (the old `.carlos-removing-0` to `-63` included) do not stop it; a name collision is retried; a purge stopped after a move resumes; and the parent vanishing at a move is an error, not "gone".
The census applies (`internal/demobuild`, `internal/instancefs`, `internal/instancectl` and `internal/host/units`). Release with the usual dev-first roll; the dev demo box witnesses one large build and one deep purge.