census static-sweep: two new legacy rows for the tree sweep (hand-written), internal/edge re-pinned
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+32
−0
docs/superpowers/notes/census-proposal-static-sweep.md+22 −0internal/provision/testdata/plan14-root-reads-chain.tsv+2 −0internal/provision/testdata/plan14-root-reads-static-sweep-new.tsv+5 −0internal/provision/testdata/plan14-root-reads-static-sweep.tsv+3 −0
CI passed — run details
diff --git a/docs/superpowers/notes/census-proposal-static-sweep.md b/docs/superpowers/notes/census-proposal-static-sweep.md| new file mode 100644 |
| index 000000000..65f07d879 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-static-sweep.md |
| @@ -0,0 +1,22 @@ |
| +# Census approval: static-sweep |
| + |
| +Ruling `census-ruling-static-sweep`. Every change below keeps the disposition it already has, so it needs an approval, not a decision. |
| + |
| +Envelopes re-pinned: `internal/edge`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Escalate if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. An escalation goes to the census owner as a decision. |
| + |
| +Seal: `a010097458a79647251ddf0bc3ed1fcbb3ca78e2f0e1f520c1df35563a16a0c6` → `a010097458a79647251ddf0bc3ed1fcbb3ca78e2f0e1f520c1df35563a16a0c6`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-static-sweep.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
| + |
| +## The decision: two new units, written by hand |
| + |
| +`internal/edge/static_sweep.go` adds two units that read the disk, so census-propose leaves them to a decision. Their rows are in `internal/provision/testdata/plan14-root-reads-static-sweep-new.tsv`, chained before the overlay above. They are `@legacy` rows, so the seal moves to `a0100974…a0c6`. |
| + |
| +| unit | reads | proposed disposition | |
| +|---|---|---| |
| +| `staticSite.sweepTrees` | `Readlink`, `ReadDir`, `Lstat` of its own app cache directory (`<cacheDir>/<acct>/<app>`) | `legacy`/`accepted-legacy`, J4 footing (`root-input`), as the static-redirects units are | |
| +| `staticSite.treeMissing` | `Stat` of the tree it serves | the same | |
| + |
| +Both run in the agent (`carlos-edge.service`, user carlos), not root. The sweep removes only extracted trees in that app's own cache directory, and only ones that are all of these: not named by the `current` link, not served by any handler in this process, not the tree the swap just replaced, and more than an hour old. It skips dot-named temp extractions and anything that is not a directory. Every tree is a cache of a signed release: `ensureExtracted` verifies the manifest digest and the archive's SHA-256 before it extracts one again, and `treeMissing` makes a handler do that if its tree has gone. |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 024e21cd2..3ad4aaec4 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -21,3 +21,5 @@ plan14-root-reads-edge-request-records.tsv 84cb1e17c2f9cabddcc1e6ed5b39b00ffa703 |
| plan14-root-reads-data-lifecycle-336.tsv 539ae875b4a089bc6512ae2e047fa9e353e8b760c18312b81ec3400e5e1f6d48 |
| plan14-root-reads-plans-4a-store.tsv 72dc835c04caf5b2b49cc6ecbfd865bb3123b997ee932e8ab7c0df239935a26b |
| plan14-root-reads-plans-4-notices-grace.tsv 43e430a3b3edf9333bfe2c64f24ca9e4c04475dc45ae4983d4e8bcab6a9c0bc4 |
| +plan14-root-reads-static-sweep-new.tsv a010097458a79647251ddf0bc3ed1fcbb3ca78e2f0e1f520c1df35563a16a0c6 |
| +plan14-root-reads-static-sweep.tsv a010097458a79647251ddf0bc3ed1fcbb3ca78e2f0e1f520c1df35563a16a0c6 |
diff --git a/internal/provision/testdata/plan14-root-reads-static-sweep-new.tsv b/internal/provision/testdata/plan14-root-reads-static-sweep-new.tsv| new file mode 100644 |
| index 000000000..705d627c0 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-static-sweep-new.tsv |
| @@ -0,0 +1,5 @@ |
| +# Census overlay static-sweep-new, hand-written: the two new units census-propose leaves to a decision (the static site tree sweep). census-ruling-static-sweep, asked of the census owner with the approval card (docs/superpowers/notes/census-proposal-static-sweep.md). |
| +@legacy 5bb899128c0ae4758794dbd9b98f10299f891d59cfb9d0be3ec0a337d770288e internal/edge/static_sweep.go staticSite.sweepTrees legacy accepted-legacy accepted-legacy;rev3=census-ruling-static-sweep;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input; on a version swap, reads its own app cache directory (<cacheDir>/<acct>/<app>: the current link, the entries, each entry's lstat) and removes extracted trees that no handler here serves, the current link does not name, the swap did not just replace, and that are older than an hour; skips dot-named and non-directory entries; every tree is a cache of a signed release that ensureExtracted re-verifies before extracting it again; no root decision file:Lstat@610,file:ReadDir@357,file:Readlink@127 a0111e2bde1734cbd657c358c87ca123f4150467c5f8b1d169fd5beaee00e19f |
| +@legacy db6fbd4600cf5c045a23b3aae72afa95bcea1faee6fb2388181a6c62935bcca1 internal/edge/static_sweep.go staticSite.treeMissing legacy accepted-legacy accepted-legacy;rev3=census-ruling-static-sweep;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input; stats the tree this handler serves at each pointer check, and a missing one is extracted again through ensureExtracted; no root decision file:Stat@90 e3a7319d3d1276c848d6477ded7ed67e8bc35159f1256636f7b26b8d90bb46b4 |
| +internal/edge/static_sweep.go staticSite.sweepTrees legacy accepted-legacy accepted-legacy;rev3=census-ruling-static-sweep;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input; on a version swap, reads its own app cache directory (<cacheDir>/<acct>/<app>: the current link, the entries, each entry's lstat) and removes extracted trees that no handler here serves, the current link does not name, the swap did not just replace, and that are older than an hour; skips dot-named and non-directory entries; every tree is a cache of a signed release that ensureExtracted re-verifies before extracting it again; no root decision file:Lstat@610,file:ReadDir@357,file:Readlink@127 a0111e2bde1734cbd657c358c87ca123f4150467c5f8b1d169fd5beaee00e19f |
| +internal/edge/static_sweep.go staticSite.treeMissing legacy accepted-legacy accepted-legacy;rev3=census-ruling-static-sweep;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input; stats the tree this handler serves at each pointer check, and a missing one is extracted again through ensureExtracted; no root decision file:Stat@90 e3a7319d3d1276c848d6477ded7ed67e8bc35159f1256636f7b26b8d90bb46b4 |
diff --git a/internal/provision/testdata/plan14-root-reads-static-sweep.tsv b/internal/provision/testdata/plan14-root-reads-static-sweep.tsv| new file mode 100644 |
| index 000000000..b3f65363f |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-static-sweep.tsv |
| @@ -0,0 +1,3 @@ |
| +# Census overlay static-sweep, written by census-propose (#369). census-ruling-static-sweep, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-static-sweep.md. |
| +# 0 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@coverage internal/edge c2ebb7b4bc5dcdbc3266911c78142ad2a1c6d5ebcfdd59b050d5b423cc3fdfc3 |