| new file mode 100644 |
| index 000000000..aec595503 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-gvisor-slice1-control-purge.tsv |
| @@ -0,0 +1,27 @@ |
| +# Census overlay gvisor-slice1-control-purge, written by census-propose (#369). census-ruling-gvisor-slice1-control-purge, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-gvisor-slice1-control-purge.md. |
| +# 4 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 removed: each unit's declaration, or each envelope's directory, is absent from the scanned tree, so its row goes, a frozen declaration is retired as absent, and an envelope is retired. |
| +# 5 new dispositions: 0 reads re-frozen at their disposition with the claim, 5 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy d1ccc0376483b6c5b2dcc9474e6a471f7a83234ca615b1b2a75a58cadde5d0ca internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. Task 9: Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3: after the stop proof and before opening out/app, waits (within the build ctx) for the process-wide one-at-a-time output turn; every failure releases it, success hands it to the caller in BuildOutput. Same no-follow OpenBeneath of out/app; validation moves to readOutput. No new read path or input. file:ReadAll@584 f8177b5e9c0f7ec9614d8e1c83ed015c120818942022fc4a43151e50801e9408 |
| +@legacy 1cb47c62b706c88965edfca3983bf53d643cdd02a614cda275508208fbfbf2a3 internal/demobuild/runner.go ValidateOutput legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads bounded bytes, ELF header/program headers and computes their SHA-256; never executes output.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3: body split; ELF/segment/digest checks moved verbatim into validateBinary, which ValidateOutput (client side) and readOutput (root) both call. Same bounded ReadAll; checks unchanged. file:ReadAll@67 a62ad64a8972e972cf152acca76fe58b0600f9bae50bcd7a988f71672c585cee |
| +@legacy 7686cf000ca3308db6b658cf0dcca389c41e5e9be3a2d46dbc7e95de49d7944a internal/demobuild/worker.go Worker.Build legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Holds the build/purge read lock through cleanup; existing bounded source read remains.;rev3=census-ruling-demo-slice-adopt;basis=Before admission, call the admit hook (nil = reconcileBudget); a pending budget change (errBudgetPending) is retried every 2 s until the job deadline, any other error fails at once. reconcileBudget reads the fixed build slice's systemctl show budget, its cgroup limit files and cgroup.events under the fixed root cgroup path, and list-jobs (a listing at the capture limit defers); only with buildPurge held exclusively, the slice empty and no build or slice job queued does it run systemctl stop on the fixed slice name. No tenant, app or agent input names a path or unit.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3: when scratch cleanup fails and the output is discarded, releases its output turn first. No read change. file:ReadAll@1087 792953e07fca9fa7f731a81355728babf898d813a4cfaac95e8d02dc14ba1a91 |
| +@legacy 986fe36a12acad4650d3e27d6fa49ad312552dfd97950bf80265e13d22025c43 internal/instancectl/demo_cleanup.go Server.purgeDemoWithJobs legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Checks root config and current registry identity/hold; reads derived unit/cgroup/exe/drop-in state, stops and proves emptiness before no-follow removal. Fix round 1: passes the descriptor host to the root build-scratch cleaner; same registry, cgroup and derived path reads.;rev3=census-ruling-agent-start-demo-3;basis=Share derived unit stop/empty proof with freeze before deleting demo data; directory enumeration moved to stopDemoUnits. Census read-site delta: -file:ReadDir.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6: the remove closure logs DEMO-PURGE-OPERATOR (demo id, host, error) when RemoveAllBeneath refuses with ErrTooDeep, then returns the error as before. No read change. file:Lstat@1638,registry:Account@833,registry:App@871,registry:DemoExpiresAt@798,registry:DemoHost@676,registry:DemoID@655,registry:DemoLifetime@701,registry:HoldOp@762,registry:Status@734,whole:Route@1374,whole:Route@625 93ed9869b1af4b948621ccad40caba83f216b09a9552ede7c6ed9762e75f0045 |
| +@legacy 95eb701b556f8512cdf18075320faab42bfda098a9fe694b02b3449a4aaacc82 internal/demobuild/runner.go readOutput legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3, new: root reads the already-open out/app (from Run's no-follow OpenBeneath) by fstat size into one exact buffer; refuses non-regular or over BinaryMaxBytes, refuses a file still growing past its size, then validateBinary on exactly those bytes. Reads only the fd it is given. file:Read@304,file:Stat@63 9c0196894754b9a9d323ab7622e86ee28c5c4e71c86f5e5610289edfe27103d4 |
| +@legacy 3a12b768f3f978410bfd23a4387d5ebb7721b480485b401dc8f4ddfc47118520 internal/instancefs/dirs_linux.go treeRemover.clear legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new: getdents in batches of 256 on an open dir fd; per entry fstatat AT_SYMLINK_NOFOLLOW then unlinkat (AT_REMOVEDIR for dirs); a non-empty dir is returned to descend into. Never follows an entry. file:Fstatat@448 5c78478ebb13128d4cae7913afa86bd2473385e7ae868eca10e0b4988bea263d |
| +@legacy 149232ea92f91ea58f48f16d8c3406c80f10bf3ed4f431d55446f27074815f86 internal/instancefs/dirs_linux.go treeRemover.open legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new: openat2(parentfd, one name, O_RDONLY|O_DIRECTORY|O_NOFOLLOW, RESOLVE_BENEATH|RESOLVE_NO_SYMLINKS|RESOLVE_NO_MAGICLINKS); never a joined path; retries EINTR/EAGAIN. file:Openat2@318 907a0219945d5fec7dd63ad909a3b8121375e3afec270b38b1d7adbf24ec224f |
| +@legacy 66f2ada03c002f2fa959169aafc0d574f7dbdcbb17cded0084c56997daa657d0 internal/instancefs/dirs_linux.go treeRemover.remove legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new (replaces removeAt): iterative no-follow removal of a derived child of a root-named dir. fstatat AT_SYMLINK_NOFOLLOW on top; non-dir unlinked; dirs walked by a name stack, each level opened by treeRemover.open from its parent fd; empty dirs removed with unlinkat AT_REMOVEDIR on the parent fd; refuses past 65,536 levels (ErrTooDeep). Re-opens dir only through openDir (RESOLVE_NO_SYMLINKS), as RemoveAllBeneath did, and checks top dev/ino unchanged. file:Fstatat@169 9ba2d23a227b357a760c777a71950add2833cb074d77a1c0edc4dc7b8daa61a4 |
| +@legacy 2575069725632e38b00793d60ee00431588b8d5d4a68f7512280e85ed6395c9f internal/instancefs/dirs_linux.go treeRemover.sameTop legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new: fstat of the re-opened top fd; refuses if dev/ino differ from the top the walk began on. file:Fstat@77 ed275affbeee89c9122580e4df3823be61cd02951040897e9f4e63ee2e624e89 |
| +internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. Task 9: Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3: after the stop proof and before opening out/app, waits (within the build ctx) for the process-wide one-at-a-time output turn; every failure releases it, success hands it to the caller in BuildOutput. Same no-follow OpenBeneath of out/app; validation moves to readOutput. No new read path or input. file:ReadAll@584 f8177b5e9c0f7ec9614d8e1c83ed015c120818942022fc4a43151e50801e9408 |
| +internal/demobuild/runner.go ValidateOutput legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads bounded bytes, ELF header/program headers and computes their SHA-256; never executes output.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3: body split; ELF/segment/digest checks moved verbatim into validateBinary, which ValidateOutput (client side) and readOutput (root) both call. Same bounded ReadAll; checks unchanged. file:ReadAll@67 a62ad64a8972e972cf152acca76fe58b0600f9bae50bcd7a988f71672c585cee |
| +internal/demobuild/worker.go Worker.Build legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Holds the build/purge read lock through cleanup; existing bounded source read remains.;rev3=census-ruling-demo-slice-adopt;basis=Before admission, call the admit hook (nil = reconcileBudget); a pending budget change (errBudgetPending) is retried every 2 s until the job deadline, any other error fails at once. reconcileBudget reads the fixed build slice's systemctl show budget, its cgroup limit files and cgroup.events under the fixed root cgroup path, and list-jobs (a listing at the capture limit defers); only with buildPurge held exclusively, the slice empty and no build or slice job queued does it run systemctl stop on the fixed slice name. No tenant, app or agent input names a path or unit.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3: when scratch cleanup fails and the output is discarded, releases its output turn first. No read change. file:ReadAll@1087 792953e07fca9fa7f731a81355728babf898d813a4cfaac95e8d02dc14ba1a91 |
| +internal/instancectl/demo_cleanup.go Server.purgeDemoWithJobs legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Checks root config and current registry identity/hold; reads derived unit/cgroup/exe/drop-in state, stops and proves emptiness before no-follow removal. Fix round 1: passes the descriptor host to the root build-scratch cleaner; same registry, cgroup and derived path reads.;rev3=census-ruling-agent-start-demo-3;basis=Share derived unit stop/empty proof with freeze before deleting demo data; directory enumeration moved to stopDemoUnits. Census read-site delta: -file:ReadDir.;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6: the remove closure logs DEMO-PURGE-OPERATOR (demo id, host, error) when RemoveAllBeneath refuses with ErrTooDeep, then returns the error as before. No read change. file:Lstat@1638,registry:Account@833,registry:App@871,registry:DemoExpiresAt@798,registry:DemoHost@676,registry:DemoID@655,registry:DemoLifetime@701,registry:HoldOp@762,registry:Status@734,whole:Route@1374,whole:Route@625 93ed9869b1af4b948621ccad40caba83f216b09a9552ede7c6ed9762e75f0045 |
| +internal/demobuild/runner.go readOutput legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F3, new: root reads the already-open out/app (from Run's no-follow OpenBeneath) by fstat size into one exact buffer; refuses non-regular or over BinaryMaxBytes, refuses a file still growing past its size, then validateBinary on exactly those bytes. Reads only the fd it is given. file:Read@304,file:Stat@63 9c0196894754b9a9d323ab7622e86ee28c5c4e71c86f5e5610289edfe27103d4 |
| +internal/instancefs/dirs_linux.go treeRemover.clear legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new: getdents in batches of 256 on an open dir fd; per entry fstatat AT_SYMLINK_NOFOLLOW then unlinkat (AT_REMOVEDIR for dirs); a non-empty dir is returned to descend into. Never follows an entry. file:Fstatat@448 5c78478ebb13128d4cae7913afa86bd2473385e7ae868eca10e0b4988bea263d |
| +internal/instancefs/dirs_linux.go treeRemover.open legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new: openat2(parentfd, one name, O_RDONLY|O_DIRECTORY|O_NOFOLLOW, RESOLVE_BENEATH|RESOLVE_NO_SYMLINKS|RESOLVE_NO_MAGICLINKS); never a joined path; retries EINTR/EAGAIN. file:Openat2@318 907a0219945d5fec7dd63ad909a3b8121375e3afec270b38b1d7adbf24ec224f |
| +internal/instancefs/dirs_linux.go treeRemover.remove legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new (replaces removeAt): iterative no-follow removal of a derived child of a root-named dir. fstatat AT_SYMLINK_NOFOLLOW on top; non-dir unlinked; dirs walked by a name stack, each level opened by treeRemover.open from its parent fd; empty dirs removed with unlinkat AT_REMOVEDIR on the parent fd; refuses past 65,536 levels (ErrTooDeep). Re-opens dir only through openDir (RESOLVE_NO_SYMLINKS), as RemoveAllBeneath did, and checks top dev/ino unchanged. file:Fstatat@169 9ba2d23a227b357a760c777a71950add2833cb074d77a1c0edc4dc7b8daa61a4 |
| +internal/instancefs/dirs_linux.go treeRemover.sameTop legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-slice1-control-purge;basis=F6, new: fstat of the re-opened top fd; refuses if dev/ino differ from the top the walk began on. file:Fstat@77 ed275affbeee89c9122580e4df3823be61cd02951040897e9f4e63ee2e624e89 |
| +@remove internal/instancefs/dirs_linux.go removeAt |
| +@removed internal/instancefs/dirs_linux.go removeAt H3 census-ruling-gvisor-slice1-control-purge;absent;basis=F6: deleted, replaced by treeRemover (same no-follow guarantees, no depth-64 refusal, bounded descriptors and memory). |
| +@coverage internal/demobuild adc39d4c132efea607f93bdfe958750d4fb337039828d7d9357162a4f3afaecf |
| +@coverage internal/instancectl 334f328e94c5d4bad991a2da02c7b701218bb48119d90ffacf95becc9b504f2e |
| +@coverage internal/instancefs 7dacabd500557997379167369906e46ad73d14a19c1f7553b6493e70fd2be383 |