carlos / platform Public

fix: managed cloud-init root witness uses a live token expiry

Root cause: the root witness rendered goldenInput(), whose token expiry
is fixed at 2026-11-09T12:30Z. Since the R2 fix the script bounds the
seed fetch by that expiry, so on the 13:28Z root-runner run the fetch
window was already closed: no request was made and the script exited 1
silently, leaving only bootstrap_failed. A test-fixture defect, not a
script defect: a real box gets its live token's expiry, and a box whose
token has expired could not enrol anyway. Reproduced unprivileged with
the same symptom (no stderr, zero requests); an open window passes.

- The root witness uses an expiry 30 min ahead and, on failure, reports
  breadcrumbs, stderr and the last shimmed commands (boottest Explain).
- The script names its otherwise silent exits on stderr (no codename,
  no service uid, seed fetch window closed, seed fetch refused with the
  HTTP status); exit conditions are unchanged. Golden regenerated.
- New TestManagedCloudInitFetchWindow (unprivileged): closed window =>
  no request, named failure; open window => one request, seed verified.
  The script-run witness asserts the named 403 refusal.
- Census: overlay re-frozen for the template change (card clean).

Root runner run 20261109T133737-20131d: TestManagedCloudInitRootOwnership
PASS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 1046b87000ff5408ac9252d7da109cde437730a6 parent 4ff43b3
9 files changed, +90 −15
  • docs/superpowers/notes/census-proposal-managed-fleets-2b2.md +1 −1
  • internal/console/managedseed_linux_test.go +3 −0
  • internal/managedboot/boottest/boottest.go +21 −1
  • internal/managedboot/cloudinit_v1.sh.tmpl +6 −4
  • internal/managedboot/testdata/userdata-v1.golden +6 −4
  • internal/managedboot/userdata_linux_test.go +45 −0
  • internal/managedboot/userdata_rootrunner_linux_test.go +4 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-managed-fleets-2b2.tsv +3 −3
diff --git a/docs/superpowers/notes/census-proposal-managed-fleets-2b2.md b/docs/superpowers/notes/census-proposal-managed-fleets-2b2.md
index b2ce17208..5d2a7758c 100644
--- a/docs/superpowers/notes/census-proposal-managed-fleets-2b2.md
+++ b/docs/superpowers/notes/census-proposal-managed-fleets-2b2.md
@@ -85,6 +85,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/managedboot/cloudinit_v1.sh.tmpl:external`: reads +file:external; written legacy, accepted-legacy, frozen
- new `internal/managedboot/identity_linux.go:readRootOwned`: reads +file:Fstat, +file:Open, +file:Openat, +file:ReadAll; written legacy, accepted-legacy, frozen
-Seal: `d467adec3d86ae220afe98269aa226e87adba1b83e31eda214ceea0f02720a98` โ†’ `4793f5c2ff0221bd6760a1caa5318ea614a2eb7191e7c783ed63d532593d6f31`.
+Seal: `d467adec3d86ae220afe98269aa226e87adba1b83e31eda214ceea0f02720a98` โ†’ `cc27a0dc9417ea502ef81270a6fd1638949a365f78d458f7f31af19354ae4828`.
Overlay: `internal/provision/testdata/plan14-root-reads-managed-fleets-2b2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/console/managedseed_linux_test.go b/internal/console/managedseed_linux_test.go
index 712ac8846..320e1fe91 100644
--- a/internal/console/managedseed_linux_test.go
+++ b/internal/console/managedseed_linux_test.go
@@ -123,6 +123,9 @@ func TestManagedCloudInitScriptRun(t *testing.T) {
if slept != sleeps || curls != attempts {
t.Fatalf("sleeps %d curls %d", slept, curls)
}
+ if kind == "refused" && h.Stderr != "curl: (22) The requested URL returned error: 403\nmanaged boot: seed fetch refused (HTTP 403)\n" {
+ t.Fatalf("refusal not named:\n%s", h.Explain(t, out))
+ }
var curl string
for _, c := range calls {
if strings.HasPrefix(c, "curl ") {
diff --git a/internal/managedboot/boottest/boottest.go b/internal/managedboot/boottest/boottest.go
index 26f0bbf94..6771d66f1 100644
--- a/internal/managedboot/boottest/boottest.go
+++ b/internal/managedboot/boottest/boottest.go
@@ -22,6 +22,8 @@ type Harness struct {
Log string // one line per shimmed call
Script string
Env []string
+ // Stderr is the last Run's standard error.
+ Stderr string
}
// ServiceUID is what the id shim reports for the carlos user.
@@ -89,12 +91,30 @@ func (h *Harness) Run(t testing.TB) (string, error) {
var out, errOut bytes.Buffer
cmd.Stdout, cmd.Stderr = &out, &errOut
err := cmd.Run()
+ h.Stderr = errOut.String()
if err != nil {
- t.Logf("script stderr: %s", errOut.String())
+ t.Logf("script stderr: %s", h.Stderr)
}
return out.String(), err
}
+// Explain describes a failed run for a test failure: the breadcrumbs, the
+// script's standard error and the last commands it called, so the step
+// that failed is named without tracing the script.
+func (h *Harness) Explain(t testing.TB, out string) string {
+ t.Helper()
+ calls := h.Calls(t)
+ if len(calls) > 3 {
+ calls = calls[len(calls)-3:]
+ }
+ for i, c := range calls {
+ if len(c) > 160 {
+ calls[i] = c[:60] + " ... " + c[len(c)-100:]
+ }
+ }
+ return "breadcrumbs:\n" + out + "stderr:\n" + h.Stderr + "last calls:\n " + strings.Join(calls, "\n ")
+}
+
// Calls is the shim log, one entry per call.
func (h *Harness) Calls(t testing.TB) []string {
t.Helper()
diff --git a/internal/managedboot/cloudinit_v1.sh.tmpl b/internal/managedboot/cloudinit_v1.sh.tmpl
index ecc2ac9ce..01b469e44 100644
--- a/internal/managedboot/cloudinit_v1.sh.tmpl
+++ b/internal/managedboot/cloudinit_v1.sh.tmpl
@@ -7,6 +7,7 @@ if [ "${CARLOS_MANAGED_BOOT_BOUNDED:-}" != 1 ]; then
exec timeout 900 /bin/sh "$0"
fi
crumb() { printf 'CARLOS_BOOT:%s\n' "$1"; }
+fail() { printf 'managed boot: %s\n' "$1" >&2; exit 1; }
trap 'rc=$?; [ "$rc" = 0 ] || crumb bootstrap_failed' EXIT
trap 'exit 1' HUP INT TERM
R=${CARLOS_MANAGED_BOOT_ROOT:-}
@@ -69,14 +70,14 @@ put() { python3 -I -c "$P" "$R$1" "$2"; }
# Packages come from the HTTPS Debian mirror only.
C=$(sed -n 's/^VERSION_CODENAME=//p' "$R/etc/os-release")
-case $C in ''|*[!a-z]*) exit 1 ;; esac
+case $C in ''|*[!a-z]*) fail 'no distribution codename' ;; esac
K='[signed-by=/usr/share/keyrings/debian-archive-keyring.gpg]'
printf 'deb %s https://deb.debian.org/debian %s main\ndeb %s https://deb.debian.org/debian %s-updates main\ndeb %s https://deb.debian.org/debian-security %s-security main\n' "$K" "$C" "$K" "$C" "$K" "$C" | put /var/lib/carlos-managed-boot/sources.list 600
apt-get -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null update
apt-get -y -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null install nftables curl ca-certificates python3
id -u carlos >/dev/null 2>&1 || useradd --system --user-group --no-create-home --shell /usr/sbin/nologin carlos
U=$(id -u carlos)
-case $U in ''|*[!0-9]*) exit 1 ;; esac
+case $U in ''|*[!0-9]*) fail 'no service uid' ;; esac
# Instance metadata: uid 0 and carlos only; forwarded traffic never.
put /etc/nftables.conf 644 <<NFT
@@ -148,7 +149,7 @@ D=$(( $(date +%s) + 600 ))
[ "$D" -lt {{sq .Expires}} ] || D={{sq .Expires}}
fetch() {
left=$(( D - $(date +%s) ))
- [ "$left" -gt 0 ] || return 2
+ [ "$left" -gt 0 ] || return 3
[ "$left" -lt 300 ] || left=300
rm -f "$B/seed.part"
code=$(curl --proto =https --tlsv1.2 -fsS --connect-timeout 10 --max-time "$left" --max-filesize 100663296 -H 'Content-Type: application/json' --data-binary @"$B/seed-request.json" -o "$B/seed.part" -w '%{http_code}' "$ORIGIN/api/fleet/enrol/seed") && return 0
@@ -159,7 +160,8 @@ while :; do
r=0
fetch || r=$?
[ "$r" != 0 ] || break
- [ "$r" = 1 ] || exit 1
+ [ "$r" != 3 ] || fail 'seed fetch window closed'
+ [ "$r" = 1 ] || fail "seed fetch refused (HTTP $code)"
sleep 5
done
chmod 0700 "$B/seed.part"
diff --git a/internal/managedboot/testdata/userdata-v1.golden b/internal/managedboot/testdata/userdata-v1.golden
index ad4ade7d4..2aab99d8c 100644
--- a/internal/managedboot/testdata/userdata-v1.golden
+++ b/internal/managedboot/testdata/userdata-v1.golden
@@ -7,6 +7,7 @@ if [ "${CARLOS_MANAGED_BOOT_BOUNDED:-}" != 1 ]; then
exec timeout 900 /bin/sh "$0"
fi
crumb() { printf 'CARLOS_BOOT:%s\n' "$1"; }
+fail() { printf 'managed boot: %s\n' "$1" >&2; exit 1; }
trap 'rc=$?; [ "$rc" = 0 ] || crumb bootstrap_failed' EXIT
trap 'exit 1' HUP INT TERM
R=${CARLOS_MANAGED_BOOT_ROOT:-}
@@ -69,14 +70,14 @@ put() { python3 -I -c "$P" "$R$1" "$2"; }
# Packages come from the HTTPS Debian mirror only.
C=$(sed -n 's/^VERSION_CODENAME=//p' "$R/etc/os-release")
-case $C in ''|*[!a-z]*) exit 1 ;; esac
+case $C in ''|*[!a-z]*) fail 'no distribution codename' ;; esac
K='[signed-by=/usr/share/keyrings/debian-archive-keyring.gpg]'
printf 'deb %s https://deb.debian.org/debian %s main\ndeb %s https://deb.debian.org/debian %s-updates main\ndeb %s https://deb.debian.org/debian-security %s-security main\n' "$K" "$C" "$K" "$C" "$K" "$C" | put /var/lib/carlos-managed-boot/sources.list 600
apt-get -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null update
apt-get -y -q -o Dir::Etc::SourceList="$B/sources.list" -o Dir::Etc::SourceParts=/dev/null install nftables curl ca-certificates python3
id -u carlos >/dev/null 2>&1 || useradd --system --user-group --no-create-home --shell /usr/sbin/nologin carlos
U=$(id -u carlos)
-case $U in ''|*[!0-9]*) exit 1 ;; esac
+case $U in ''|*[!0-9]*) fail 'no service uid' ;; esac
# Instance metadata: uid 0 and carlos only; forwarded traffic never.
put /etc/nftables.conf 644 <<NFT
@@ -148,7 +149,7 @@ D=$(( $(date +%s) + 600 ))
[ "$D" -lt '1794227400' ] || D='1794227400'
fetch() {
left=$(( D - $(date +%s) ))
- [ "$left" -gt 0 ] || return 2
+ [ "$left" -gt 0 ] || return 3
[ "$left" -lt 300 ] || left=300
rm -f "$B/seed.part"
code=$(curl --proto =https --tlsv1.2 -fsS --connect-timeout 10 --max-time "$left" --max-filesize 100663296 -H 'Content-Type: application/json' --data-binary @"$B/seed-request.json" -o "$B/seed.part" -w '%{http_code}' "$ORIGIN/api/fleet/enrol/seed") && return 0
@@ -159,7 +160,8 @@ while :; do
r=0
fetch || r=$?
[ "$r" != 0 ] || break
- [ "$r" = 1 ] || exit 1
+ [ "$r" != 3 ] || fail 'seed fetch window closed'
+ [ "$r" = 1 ] || fail "seed fetch refused (HTTP $code)"
sleep 5
done
chmod 0700 "$B/seed.part"
diff --git a/internal/managedboot/userdata_linux_test.go b/internal/managedboot/userdata_linux_test.go
index b69fd4972..c82e12e5a 100644
--- a/internal/managedboot/userdata_linux_test.go
+++ b/internal/managedboot/userdata_linux_test.go
@@ -3,13 +3,19 @@ package managedboot
import (
"crypto/sha256"
"encoding/hex"
+ "encoding/pem"
"fmt"
+ "io"
+ "net/http"
+ "net/http/httptest"
"os"
"os/exec"
"path/filepath"
"strings"
+ "sync/atomic"
"syscall"
"testing"
+ "time"
"github.com/carlosframework/platform/internal/managedboot/boottest"
)
@@ -201,3 +207,42 @@ func must(t *testing.T, err error) {
t.Fatal(err)
}
}
+
+// TestManagedCloudInitFetchWindow: a seed fetch whose window has closed
+// (the token's expiry has passed) makes no request and fails naming that
+// step on standard error; an open window fetches once.
+func TestManagedCloudInitFetchWindow(t *testing.T) {
+ seed := []byte("#!/bin/false\nwindow seed\n")
+ digest := sha256.Sum256(seed)
+ for _, open := range []bool{false, true} {
+ var requests atomic.Int32
+ srv := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ requests.Add(1)
+ _, _ = io.Copy(io.Discard, r.Body)
+ _, _ = w.Write(seed)
+ }))
+ ca := filepath.Join(t.TempDir(), "ca.pem")
+ must(t, os.WriteFile(ca, pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: srv.Certificate().Raw}), 0o644))
+ in := goldenInput()
+ in.Expires = time.Now().Add(-time.Minute).UTC().Truncate(time.Second)
+ if open {
+ in.Expires = time.Now().Add(30 * time.Minute).UTC().Truncate(time.Second)
+ }
+ in.Frozen.ConsoleOrigin = srv.URL
+ in.Frozen.SeedSHA256 = hex.EncodeToString(digest[:])
+ script, err := RenderUserData(in)
+ must(t, err)
+ h := boottest.New(t, script, fmt.Sprintf("%d:%d", os.Getuid(), os.Getgid()), ca)
+ out, err := h.Run(t)
+ srv.Close()
+ if open {
+ if err != nil || out != Breadcrumb(CodeSeedVerified)+"\n" || requests.Load() != 1 {
+ t.Fatalf("open window: %v %d\n%s", err, requests.Load(), h.Explain(t, out))
+ }
+ continue
+ }
+ if err == nil || out != Breadcrumb(CodeBootstrapFailed)+"\n" || requests.Load() != 0 || h.Stderr != "managed boot: seed fetch window closed\n" {
+ t.Fatalf("closed window: %v %d\n%s", err, requests.Load(), h.Explain(t, out))
+ }
+ }
+}
diff --git a/internal/managedboot/userdata_rootrunner_linux_test.go b/internal/managedboot/userdata_rootrunner_linux_test.go
index 47c94c5da..37fb32e45 100644
--- a/internal/managedboot/userdata_rootrunner_linux_test.go
+++ b/internal/managedboot/userdata_rootrunner_linux_test.go
@@ -16,6 +16,7 @@ import (
"strings"
"syscall"
"testing"
+ "time"
"github.com/carlosframework/platform/internal/managedboot/boottest"
)
@@ -46,6 +47,8 @@ func TestManagedCloudInitRootOwnership(t *testing.T) {
t.Fatal(err)
}
in := goldenInput()
+ // The script honours the token's expiry; the golden one is long past.
+ in.Expires = time.Now().Add(30 * time.Minute).UTC().Truncate(time.Second)
in.Frozen.ConsoleOrigin = srv.URL
in.Frozen.SeedSHA256 = hex.EncodeToString(digest[:])
script, err := RenderUserData(in)
@@ -55,7 +58,7 @@ func TestManagedCloudInitRootOwnership(t *testing.T) {
// A root prefix and no owner variable: root:root is the expected owner.
h := boottest.New(t, script, "", ca)
if out, err := h.Run(t); err != nil {
- t.Fatalf("root run failed: %v\n%s", err, out)
+ t.Fatalf("root run failed: %v\n%s", err, h.Explain(t, out))
}
work := h.Path(BootDir)
for name, mode := range map[string]os.FileMode{"seed": 0o700, "seed.sha256": 0o600, "boot-input.json": 0o600, "verify.py": 0o600} {
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index bf783185a..672523bc6 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -131,4 +131,4 @@ plan14-root-reads-instance-restore-658-cli.tsv b970bb28c5a633d2572a1da549030e925
plan14-root-reads-instance-stop-execstop-528.tsv 75fb3eb24d0bf3a8405b929675d919ec88f15386d43e9ff687ce138a7ed968a4
plan14-root-reads-region-ha-shutting-down-retry.tsv 75fb3eb24d0bf3a8405b929675d919ec88f15386d43e9ff687ce138a7ed968a4
plan14-root-reads-managed-fleets-2b1.tsv d467adec3d86ae220afe98269aa226e87adba1b83e31eda214ceea0f02720a98
-plan14-root-reads-managed-fleets-2b2.tsv 4793f5c2ff0221bd6760a1caa5318ea614a2eb7191e7c783ed63d532593d6f31
+plan14-root-reads-managed-fleets-2b2.tsv cc27a0dc9417ea502ef81270a6fd1638949a365f78d458f7f31af19354ae4828
diff --git a/internal/provision/testdata/plan14-root-reads-managed-fleets-2b2.tsv b/internal/provision/testdata/plan14-root-reads-managed-fleets-2b2.tsv
index 12483d627..0850edda9 100644
--- a/internal/provision/testdata/plan14-root-reads-managed-fleets-2b2.tsv
+++ b/internal/provision/testdata/plan14-root-reads-managed-fleets-2b2.tsv
@@ -42,7 +42,7 @@
@legacy 539a276737045b83c1cce5f03a5c2ff6a13a8ed58dc3abdeb29acd9a8d7a877a internal/managedboot/admission_linux.go openOwnedFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=O_NOFOLLOW|O_NONBLOCK openat + fstat: regular, nlink 1, root:root, mode 0600 file:Fstat@246,file:Openat@90 12c06f48e2c9485db495425980fc708ea02405009d67f47e4bd79efdd3a4936f
@legacy babd6f849203f1f19f87019f74e89ebcb299619c7934acbc460fb7c12a443360 internal/managedboot/admission_linux.go readAdmission legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=reads admission.json (4 KiB cap) through openOwnedFile and re-verifies it with the identity's release key file:ReadAll@217 29b380055f916ed936dfb93f4c10038b63238ec9457acb1105f620ab5151ddb7
@legacy 4ac10098384575d8bae36abc76a24eb6d0cba251a3e7e9121299daf611f9ad98 internal/managedboot/admission_linux.go writeAdmission legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=O_EXCL|O_NOFOLLOW temp in the verified dir, fsync, renameat2 RENAME_NOREPLACE (link fallback), dir fsync; the read is crypto/rand for the temp suffix file:Openat@266,file:Read@137 630607347195c991bb1445bea77069f5638ba90af0b6212349def6f24ddf0bfd
-@legacy 8917484e3d13f33f5dc6ac247a6df0dca134e5a3e92e6520f817b4c59e32395e internal/managedboot/cloudinit_v1.sh.tmpl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=Task 1's frozen v1 cloud-init script; fix round 1 orders carlos-managed-boot.service After=cloud-init.service cloud-init-network.service so it runs after cloud-init rewrites the user data; rendered by the console only, never executed by the root binary file:external@0 6d696b09eb91245e489f9bb3f10b036d5a1bf49bb64923f83a7a285865c6ebb0
+@legacy 8ff2bf71fbcd7448dedfa512d9c3e2e134269f35b322500ca3b5c98eaaf15901 internal/managedboot/cloudinit_v1.sh.tmpl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=Task 1's frozen v1 cloud-init script; fix round 1 orders carlos-managed-boot.service After=cloud-init.service cloud-init-network.service so it runs after cloud-init rewrites the user data; rendered by the console only, never executed by the root binary; root-runner fix: the script names its otherwise silent exits on stderr (fail helper: no distribution codename, no service uid, seed fetch window closed, seed fetch refused with the HTTP status), exit conditions unchanged, no new read file:external@0 164a9c44a1cb37127a40997d0d38a1fa6b3c11923e204d3706215bab74cb56af
@legacy ba8b61b68d4becc173795a6579e2801c7332411d2ebb5cc7b85c9c49812e05ca internal/managedboot/identity_linux.go readRootOwned legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=the O_NOFOLLOW openat walk moved out of loadIdentity unchanged (every component owned by the expected uid, not g/o writable; regular, nlink 1, size cap), parameterised by path and limit; callers: loadIdentity (/etc/carlos/managed-box.json, 4 KiB) and loadKeyStatus (/etc/carlos/managed-key-status.json, 1 KiB) file:Fstat@775,file:Open@130,file:Openat@532,file:ReadAll@1099 3f2a099882de9ffaac6189a3a844f3a3026cf02398ed7d6d247ae9461de29a09
internal/host/agent.go fastConvergeLoop authority B3 rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): every pass context carries the box's lifetime judge (provision.WithLifetimes) and the reconcile config is boxProvisionConfig's; read sites unchanged, offsets moved; B3 authority retained;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, ยง4.2 writer rule): Task 12: its pass config is now BoxProvisionConfig(reg, os.Getenv, judge, configure) (BoxProvisionConfig replaces boxProvisionConfig: the hub predicate hubArmed and, on the hub, ReconcileConfig.FleetOwners from hubFleetOwners); a call, no read site; read sites unchanged (2); B3 authority retained.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: wire the coordinator's nonblocking SignalTick to the existing fast tick. No new timer, polling read or authority.;rev3=census-ruling-region-ha-p3b;basis=Bind systemLeg to the existing cached reader fold and handle a nil leg on groups; names-2 rollback gate runs before artifact/request/marker work. Agent-memory evidence only, no new direct or cloud read and no autonomous group update.;rev3=census-ruling-restart-new-box-gap;basis=restart leg closure moved into armRestartLegs (same reg.List + restartRequestLeg); also wires restartGain; read moved, not added;rev3=census-ruling-agent-start-demo-3;basis=Attach the moved reader to the existing shared change watch and advertise that reader as armed. Census read-site delta: unchanged (2).;rev3=census-ruling-managed-fleets-2b2;basis=sets fastDeps.managedReady from the armed managedJoin (nil on BYO): the joining ready leg, a store-door GET of fleets/<fleet>/boxes/<label>/ready.json and a local root-door relay; requests a full pass on root's 200; no new read in this unit whole:Route@9005 30f3e153833c32995efbd006c561e6adfa6a08a647c21688dd254525fb423de9
internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. Final review I3: signal the owned renewal worker instead of waiting for its sequential console HTTP calls. Existing convergence and record read unchanged.;rev3=census-ruling-region-ha-p3a;basis=Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged;rev3=census-ruling-agent-start-demo-3;basis=Refresh moved notices through the shared watch before normal convergence; no new per-box poll. Census read-site delta: unchanged (1).;rev3=census-ruling-managed-fleets-2b2;basis=calls d.managedReady after the serial read on every tick (nil on BYO, returns at once once admitted); no read of its own added registry:Host@5679 741db8b2f80543447fee068dc520bf8cee4c9da2a3b67dac640236ca46591701
@@ -93,13 +93,13 @@ internal/managedboot/admission_linux.go openAdmissionDir legacy accepted-legacy
internal/managedboot/admission_linux.go openOwnedFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=O_NOFOLLOW|O_NONBLOCK openat + fstat: regular, nlink 1, root:root, mode 0600 file:Fstat@246,file:Openat@90 12c06f48e2c9485db495425980fc708ea02405009d67f47e4bd79efdd3a4936f
internal/managedboot/admission_linux.go readAdmission legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=reads admission.json (4 KiB cap) through openOwnedFile and re-verifies it with the identity's release key file:ReadAll@217 29b380055f916ed936dfb93f4c10038b63238ec9457acb1105f620ab5151ddb7
internal/managedboot/admission_linux.go writeAdmission legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=O_EXCL|O_NOFOLLOW temp in the verified dir, fsync, renameat2 RENAME_NOREPLACE (link fallback), dir fsync; the read is crypto/rand for the temp suffix file:Openat@266,file:Read@137 630607347195c991bb1445bea77069f5638ba90af0b6212349def6f24ddf0bfd
-internal/managedboot/cloudinit_v1.sh.tmpl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=Task 1's frozen v1 cloud-init script; fix round 1 orders carlos-managed-boot.service After=cloud-init.service cloud-init-network.service so it runs after cloud-init rewrites the user data; rendered by the console only, never executed by the root binary file:external@0 6d696b09eb91245e489f9bb3f10b036d5a1bf49bb64923f83a7a285865c6ebb0
+internal/managedboot/cloudinit_v1.sh.tmpl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=Task 1's frozen v1 cloud-init script; fix round 1 orders carlos-managed-boot.service After=cloud-init.service cloud-init-network.service so it runs after cloud-init rewrites the user data; rendered by the console only, never executed by the root binary; root-runner fix: the script names its otherwise silent exits on stderr (fail helper: no distribution codename, no service uid, seed fetch window closed, seed fetch refused with the HTTP status), exit conditions unchanged, no new read file:external@0 164a9c44a1cb37127a40997d0d38a1fa6b3c11923e204d3706215bab74cb56af
internal/managedboot/identity_linux.go readRootOwned legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-2b2;basis=the O_NOFOLLOW openat walk moved out of loadIdentity unchanged (every component owned by the expected uid, not g/o writable; regular, nlink 1, size cap), parameterised by path and limit; callers: loadIdentity (/etc/carlos/managed-box.json, 4 KiB) and loadKeyStatus (/etc/carlos/managed-key-status.json, 1 KiB) file:Fstat@775,file:Open@130,file:Openat@532,file:ReadAll@1099 3f2a099882de9ffaac6189a3a844f3a3026cf02398ed7d6d247ae9461de29a09
internal/host/namedrecovery_pass.go namedUnitRecovery.passOption authority B3,E1 Production recovery wrapper preserves main exit status for per-host failures; only remaining named routes can probe the census for history selection. Ordinary routes make no census or binding-store reads. Fixtures: TestPlan14ERecoveryOrdinaryPass, TestPlan14Fix4AdoptPerHostFailureExitsZero, TestPlan14Fix5MainEquivalence.;rev3=census-ruling-managed-fleets-2b2;basis=asks refusedByGate before recover; on refusal recovers nothing; the whole:Route site is the route handed to refusedByGate for its log line, no new read registry:Host@333,registry:Host@557,registry:Unit@510,registry:Unit@527,whole:Route@273,whole:Route@470,whole:Route@502 3e50e426466ebfd148adea21d70fba68fa86cf5d9e4d226953f6fe4abe3a5ea5
@coverage . 1dcaf53ecd6db0cc4870833eda8d18c2a1604e48c316e16eb153f80f612daefb
@coverage internal/appconfig 7238cd97ab717ace4651cd2fbf236b8c923e76d5bddfd5235d7ed0d11d1bf325
@coverage internal/host ec2bd6f5706f873aabfe0a6846dcd4ac8913901bad1787bb4472cf526bb92d54
@coverage internal/instancectl a43bb997d24941b7153600d3a4b7a513324ee659454dce215cb400cb5e64a9f6
-@coverage internal/managedboot c791f182f5d56d79c8337b78aa3ea71199238d5922fdfc4392bd1dde1f01b321
+@coverage internal/managedboot 40827917d2f3828be234876d51783a22cf73d9093cab74d8e56bd4561bf9de28
@coverage internal/provision 41c4e4c822dd31b7b09c867203add50386cff05a1f88786a44e655aeb295a456
@coverage internal/status 7a4d4c3475f74524fccd5db7fa928be845dc677b57accf96bf8e1b4ad47cf158