carlos / platform Public

census-ruling-claim-empty-cohort-fix2: record platform-1e's acceptance; loader comments for fix1 and fix2 say ruled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev a4290bf8a33aef894513296e30ca16808260ab94 parent c8a36da
3 files changed, +8 −8
  • docs/superpowers/notes/census-proposal-claim-step8-readiness.md +1 −1
  • internal/provision/plan14_root_reads_test.go +3 −3
  • internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv +4 −4

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-claim-step8-readiness.md b/docs/superpowers/notes/census-proposal-claim-step8-readiness.md
index e89d99a07..a07e47745 100644
--- a/docs/superpowers/notes/census-proposal-claim-step8-readiness.md
+++ b/docs/superpowers/notes/census-proposal-claim-step8-readiness.md
@@ -85,7 +85,7 @@ Envelopes re-pinned: `internal/host`, `internal/hostops`. The new `doneRecords`
## Fix round 2
-Status: PROPOSED. The ruling is owed. Astra's re-review of `claim-empty-cohort-done` found F1 resolved. It found one new MEDIUM in F2's repair: `repairRootFloorDir` made a missing floor directory with the pathname `mkdirAllExact`, which follows an ancestor symlink, before its `O_NOFOLLOW` walk, and that walk checked the owner only of the final directory. The controller ruled a descriptor walk shared with `consoleDir`. The re-pins are in a new overlay, `internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv`, loaded last and marked `rev3=PROPOSED-claim-empty-cohort-fix2`. No accepted-legacy row is added, so the seal stands.
+Status: RULED (platform-1e, 2026-10-20): accepted as proposed. Astra's re-review of `claim-empty-cohort-done` found F1 resolved. It found one new MEDIUM in F2's repair: `repairRootFloorDir` made a missing floor directory with the pathname `mkdirAllExact`, which follows an ancestor symlink, before its `O_NOFOLLOW` walk, and that walk checked the owner only of the final directory. The controller ruled a descriptor walk shared with `consoleDir`. The re-pins are in a new overlay, `internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv`, loaded last and marked `rev3=PROPOSED-claim-empty-cohort-fix2`. No accepted-legacy row is added, so the seal stands.
- **The shared walk.** `walkNoFollowDir` (new, `internal/host/nofollowdir_linux.go`) is `consoleDir`'s walk moved out unchanged. It opens the caller's base, `/` in production, then each name beneath it with `O_NOFOLLOW|O_DIRECTORY`. The caller's check sees every directory before anything beneath it is opened or made. A missing name is made, only where the caller allows it, by `Mkdirat` then `Fchmodat` to 0755 beneath the checked parent, and the parent is fsynced. The name is then opened again with `O_NOFOLLOW`.
- **`consoleDir`** keeps its own check (root-owned, not group or other writable, other-searchable; the last exactly 0755 root:root). It allows creation at every component when asked, as before, so its behaviour is the same. Its row loses the open and Openat sites to `walkNoFollowDir` and keeps its class.
diff --git a/internal/provision/plan14_root_reads_test.go b/internal/provision/plan14_root_reads_test.go
index 4a4eec029..c9e8eb82a 100644
--- a/internal/provision/plan14_root_reads_test.go
+++ b/internal/provision/plan14_root_reads_test.go
@@ -963,8 +963,8 @@ func TestPlan14RootReadCensus(t *testing.T) {
// Census overlay claim-empty-cohort-fix1 (fix round 1 for
// claim-empty-cohort-done: Backfill.Done lists the records again before
// and after its write; the root migration repairs its floor directories
- // before the first floor read), loaded last. PROPOSED: the ruling is
- // owed (docs/superpowers/notes/census-proposal-claim-step8-readiness.md,
+ // before the first floor read), loaded last. Ruled by platform-1e, accepted as
+ // proposed (docs/superpowers/notes/census-proposal-claim-step8-readiness.md,
// "Fix round 1"). It adds no accepted-legacy row, so the seal stands.
if err = loadRootReadInventory(filepath.Join(root, "internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix1.tsv"), &inv, true); err != nil {
t.Fatal(err)
@@ -972,7 +972,7 @@ func TestPlan14RootReadCensus(t *testing.T) {
// Census overlay claim-empty-cohort-fix2 (fix round 2: the floor repair
// walks from / by descriptor and checks every ancestor before it makes
// or changes anything, through walkNoFollowDir, consoleDir's walk
- // factored out unchanged), loaded last. PROPOSED: the ruling is owed
+ // factored out unchanged), loaded last. Ruled by platform-1e, accepted as proposed
// (docs/superpowers/notes/census-proposal-claim-step8-readiness.md,
// "Fix round 2"). It adds no accepted-legacy row, so the seal stands.
if err = loadRootReadInventory(filepath.Join(root, "internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv"), &inv, true); err != nil {
diff --git a/internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv b/internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv
index bbfc38cd4..6fcae6952 100644
--- a/internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv
+++ b/internal/provision/testdata/plan14-root-reads-claim-empty-cohort-fix2.tsv
@@ -1,6 +1,6 @@
-# Census overlay claim-empty-cohort-fix2 (fix round 2 for claim-empty-cohort-done: Astra's re-review finding on the floor repair, as ruled by the controller), loaded LAST, after claim-empty-cohort-fix1. PROPOSED: the ruling is owed; the proposal is docs/superpowers/notes/census-proposal-claim-step8-readiness.md, section "Fix round 2".
+# Census overlay claim-empty-cohort-fix2 (fix round 2 for claim-empty-cohort-done: Astra's re-review finding on the floor repair, as ruled by the controller), loaded LAST, after claim-empty-cohort-fix1. RULED (platform-1e, 2026-10-20): accepted as proposed; the proposal is docs/superpowers/notes/census-proposal-claim-step8-readiness.md, section "Fix round 2".
# consoleDir's descriptor walk is factored out, unchanged, into walkNoFollowDir (new), and repairRootFloorDir now walks with it, checking every ancestor before it makes or changes anything; the pathname Lstat and mkdirAllExact are gone from the floor repair. consoleDir keeps its class and task exactly; walkNoFollowDir takes the class both its callers have. It adds no accepted-legacy row, so the seal stands.
@coverage internal/host 4b1e0c8679f254b618c81c495c9af1aa3ec55d3f6a72ccc1a47b60850515333a
-internal/host/activation_artifacts_linux.go consoleDir authority G,J4 rev3=PROPOSED-claim-empty-cohort-fix2;identity=explicit box installer uid 0 (claims install-console);basis=walks from / by no-follow descriptors; every component root-owned, not group or other writable and other-searchable; creates missing components 0755 and fsyncs the parent; the protected directory must be exactly 0755 root:root. Fix round 2: the walk itself (the open of /, each O_NOFOLLOW Openat, Mkdirat and Fchmodat beneath a checked parent, the parent fsync and the reopen) moved unchanged into walkNoFollowDir; consoleDir keeps its own checks, its Fstat of every component, and passes create for every component, so its behaviour is the same file:Fstat@259 689a231d7b7dc9cd8db1adc7a250947ad9a1646a7549119034a69d13761ae7a8
-internal/host/nofollowdir_linux.go walkNoFollowDir authority G,J4 rev3=PROPOSED-claim-empty-cohort-fix2;identity=uid 0 callers only: consoleDir (claims install-console) and repairRootFloorDir (carlos system journal-migrate, offline); basis=new, consoleDir's walk factored out unchanged: opens the caller's base (/ in production) then each name beneath it with O_RDONLY, O_DIRECTORY, O_NOFOLLOW and O_CLOEXEC; the caller's check sees every directory before anything beneath it is opened or made, and the final directory once open; a missing name is made only where the caller allows (Mkdirat 0755 then Fchmodat 0755 beneath the checked parent, the parent fsynced, the name reopened with O_NOFOLLOW); it reads no file content and returns the checked final descriptor file:Open@193,file:Openat@449,file:Openat@768 f9107577a7dbf5bf17472506903419e304e4f0300698f2e9b0e927f5bfd148d6
-internal/host/rootmigration_production_linux.go repairRootFloorDir authority G,J4 rev3=PROPOSED-claim-empty-cohort-fix2;identity=carlos system journal-migrate, offline operator CLI, uid 0;basis=as ruled under census-ruling-claim-empty-cohort-fix1, repairs one of the two fixed floor directories (guard/moves, guard/seeds) to 0755 only when it is a directory owned by root:root. Fix round 2: no pathname Lstat or mkdirAllExact any more; it walks from / with walkNoFollowDir and Fstats every directory on the way, refusing unless each from / to guard/ is a real directory, not a symlink, owned by root and not writable by group or others, before anything is made; only then is a missing floor directory made by Mkdirat beneath the checked guard/, opened with O_NOFOLLOW, Fstatted (a directory owned by root:root) and Fchmodded to 0755, with one more Fstat to confirm; a symlink or a missing directory on the way, an untrusted ancestor, or a floor directory that is a symlink, a file or another owner's refuses with nothing made or changed; no file content is read file:Fstat@1124,file:Fstat@539,file:Fstat@952 d5937bfe755c2b86b38756a3016d56cf89a635b3bf0ff2869dc19d22a35622cb
+internal/host/activation_artifacts_linux.go consoleDir authority G,J4 rev3=census-ruling-claim-empty-cohort-fix2;identity=explicit box installer uid 0 (claims install-console);basis=walks from / by no-follow descriptors; every component root-owned, not group or other writable and other-searchable; creates missing components 0755 and fsyncs the parent; the protected directory must be exactly 0755 root:root. Fix round 2: the walk itself (the open of /, each O_NOFOLLOW Openat, Mkdirat and Fchmodat beneath a checked parent, the parent fsync and the reopen) moved unchanged into walkNoFollowDir; consoleDir keeps its own checks, its Fstat of every component, and passes create for every component, so its behaviour is the same file:Fstat@259 689a231d7b7dc9cd8db1adc7a250947ad9a1646a7549119034a69d13761ae7a8
+internal/host/nofollowdir_linux.go walkNoFollowDir authority G,J4 rev3=census-ruling-claim-empty-cohort-fix2;identity=uid 0 callers only: consoleDir (claims install-console) and repairRootFloorDir (carlos system journal-migrate, offline); basis=new, consoleDir's walk factored out unchanged: opens the caller's base (/ in production) then each name beneath it with O_RDONLY, O_DIRECTORY, O_NOFOLLOW and O_CLOEXEC; the caller's check sees every directory before anything beneath it is opened or made, and the final directory once open; a missing name is made only where the caller allows (Mkdirat 0755 then Fchmodat 0755 beneath the checked parent, the parent fsynced, the name reopened with O_NOFOLLOW); it reads no file content and returns the checked final descriptor file:Open@193,file:Openat@449,file:Openat@768 f9107577a7dbf5bf17472506903419e304e4f0300698f2e9b0e927f5bfd148d6
+internal/host/rootmigration_production_linux.go repairRootFloorDir authority G,J4 rev3=census-ruling-claim-empty-cohort-fix2;identity=carlos system journal-migrate, offline operator CLI, uid 0;basis=as ruled under census-ruling-claim-empty-cohort-fix1, repairs one of the two fixed floor directories (guard/moves, guard/seeds) to 0755 only when it is a directory owned by root:root. Fix round 2: no pathname Lstat or mkdirAllExact any more; it walks from / with walkNoFollowDir and Fstats every directory on the way, refusing unless each from / to guard/ is a real directory, not a symlink, owned by root and not writable by group or others, before anything is made; only then is a missing floor directory made by Mkdirat beneath the checked guard/, opened with O_NOFOLLOW, Fstatted (a directory owned by root:root) and Fchmodded to 0755, with one more Fstat to confirm; a symlink or a missing directory on the way, an untrusted ancestor, or a floor directory that is a symlink, a file or another owner's refuses with nothing made or changed; no file content is read file:Fstat@1124,file:Fstat@539,file:Fstat@952 d5937bfe755c2b86b38756a3016d56cf89a635b3bf0ff2869dc19d22a35622cb