carlos / platform Public

host: the migration census names the raw instance directory through layout.RawInstanceDir

CI's raw-directory guard (TestRawInstancesDirectoryIsNamedOnlyHere) refused
claimcensus_migration_linux.go naming .instances itself. A new exported
accessor beside layout's rawInstanceDir keeps internal/layout the only
package that spells it. Census envelopes and the 9B8 digest re-pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev fe0117b65a6abc0eb29f31659fb43f0fbc4648aa parent 8376a46
4 files changed, +11 −2
  • internal/host/claimcensus_migration_linux.go +2 −1
  • internal/layout/plan.go +5 −0
  • internal/provision/claim_step8_readiness_census_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-claim-rootaws-sentinel.tsv +3 −0

CI cancelled — superseded by a newer push — run details

diff --git a/internal/host/claimcensus_migration_linux.go b/internal/host/claimcensus_migration_linux.go
index 8b37f43b3..6d89ab1cd 100644
--- a/internal/host/claimcensus_migration_linux.go
+++ b/internal/host/claimcensus_migration_linux.go
@@ -5,6 +5,7 @@ package host
import (
"errors"
"fmt"
+ "github.com/carlosframework/platform/internal/layout"
"os"
"path/filepath"
"slices"
@@ -211,7 +212,7 @@ func hostInstallationPaths(r ClaimRuntimeResources, host string) ([]string, stri
id := provision.InstanceID(host)
return []string{
hostbox.CensusTree(claimCensusRel(r.DataDir, filepath.Join(r.DataDir, "instances", id))),
- hostbox.CensusTree(claimCensusRel(r.DataDir, filepath.Join(r.DataDir, ".instances", id))),
+ hostbox.CensusTree(claimCensusRel(r.DataDir, layout.RawInstanceDir(r.DataDir, host))),
// release's programPath: the program history the bake keeps per host.
hostbox.CensusFile(claimCensusRel(r.DataDir, filepath.Join(r.DataDir, "programs", host+".json"))),
}, claimCensusRel(r.OptDir, release.LiveLink(r.OptDir, host))
diff --git a/internal/layout/plan.go b/internal/layout/plan.go
index ed1b17194..7e5d17868 100644
--- a/internal/layout/plan.go
+++ b/internal/layout/plan.go
@@ -103,6 +103,11 @@ func rawInstanceDir(dataDir, host string) string {
return filepath.Join(dataDir, ".instances", provision.InstanceID(host))
}
+// RawInstanceDir is rawInstanceDir for readers outside this package that
+// must classify the raw tree, such as the claim migration census. It names
+// the path only, and grants no access through the bind mount.
+func RawInstanceDir(dataDir, host string) string { return rawInstanceDir(dataDir, host) }
+
func rawRunDir(socketDir, host string) string {
return filepath.Join(socketDir, ".instances", provision.InstanceID(host))
}
diff --git a/internal/provision/claim_step8_readiness_census_test.go b/internal/provision/claim_step8_readiness_census_test.go
index 3ba28e362..d72655ce9 100644
--- a/internal/provision/claim_step8_readiness_census_test.go
+++ b/internal/provision/claim_step8_readiness_census_test.go
@@ -35,6 +35,6 @@ func plan14ClaimStep8ReadinessWriteCensusInventory() []censusEntry {
censusEntry{"internal/hostops/backfill_publish.go", "Backfill.Publish", "nonrecord", "sel:Put", "92754dcc02c07fecaab58ef014bfb381c49ee5d90d5f5ca256bbfe275087d8b9"},
censusEntry{"internal/claimactivation/backfill.go", "Runner.backfillCollect", "nonrecord", "sel:Put", "ac53546891b2c6f982c0316595f86ff6b550250a3a4edcbc16d51d84fd18b06a"},
censusEntry{"internal/hostops/backfill_publish.go", "Backfill.Done", "nonrecord", "sel:Put", "9a5baeea4eace87c960d1df2a4b01487980b6b2b3f2aaf761835ae475ec34f4f"},
- censusEntry{"internal/host/claimcensus_migration_linux.go", "hostInstallationPaths", "key-site", "lit:instances", "e697ca40c82911d63a5f8b401f61fee7e9e20552a2530ed358e55c4b8d827370"},
+ censusEntry{"internal/host/claimcensus_migration_linux.go", "hostInstallationPaths", "key-site", "lit:instances", "075f00c6ebd5f7a0492f044b5c42894c852aa788554072d90a8079d8ab2b612c"},
)
}
diff --git a/internal/provision/testdata/plan14-root-reads-claim-rootaws-sentinel.tsv b/internal/provision/testdata/plan14-root-reads-claim-rootaws-sentinel.tsv
index 8c8032e9b..e70d1590b 100644
--- a/internal/provision/testdata/plan14-root-reads-claim-rootaws-sentinel.tsv
+++ b/internal/provision/testdata/plan14-root-reads-claim-rootaws-sentinel.tsv
@@ -1,2 +1,5 @@
# Census overlay claim-rootaws-sentinel (a scrubbed root parent's own disabled shared-file sentinels are not an override in a root child, so the child's scrub stays silent; found by platform-d8's deployment harness at G4: a guard-armed box refused every router update because the candidate's version printed the ALERT into the guarded updater's combined output), loaded LAST, after claim-empty-cohort-fix2. RULED (platform-1e, 2026-10-20): accepted. Envelope only: ScrubEnvironment has no classified root-read unit; no row changes and the seal stands.
@coverage internal/rootaws ad641674b84d17a9f6a7b1acb4cf88b68cc2a882812a28c8f622d4fd9616b470
+# Also (CI fix, same ruling): hostInstallationPaths names the raw instance directory through layout.RawInstanceDir, a new exported accessor beside layout's rawInstanceDir, so the raw-directory guard holds; internal/host and internal/layout envelopes re-pinned here, and hostInstallationPaths's 9B8 digest re-pinned at its class (key-site, lit:instances).
+@coverage internal/host 7d6b2153dc1775c1221b0aabe191343d1c5db2e82e7f84b561d0dc3664ade971
+@coverage internal/layout cbb195397ab6f0018704e745b30e57df56d49289de87a1132d2f7ba426cf006b