carlos / platform Public

superseded-claim abandonment ends settled, so it never blocks cleanup startup (roster binding fix round 2)

AbandonRootInventory cleared a superseded intent and left the record
quarantined but not settled. With migration participation required,
startup's census then refused it with ErrFenced on every restart, and with
the intent gone nothing could ever settle it.

Both terminal resolutions now share Guard.resolveRootInventory: exact
intent bytes under the host lock; for abandonment, the fresh claim must
prove the intent superseded; a landed commit is reconciled through the
same applied callback (inventoryIntentApplied, rebindIntentUnapplied);
then the record is quarantined and settled: refused for execution and
admission, inspectable by the migration census. Only the unsafe-lock
quarantine remains non-settled.

TestRootStartupInspectsSupersededIntents: unchanged binding; a landed
inventory write whose claim moved to an operation session and a rebind
whose claim advanced are abandoned by RecoverPending; root then restarts
twice with migration participation required through the whole
OpenProductionClaimAssembly and stays up, with guard and inventory
revisions agreeing and the stop service answering. It fails with the old
non-settled abandonment ("execution denied by durable fence") and without
the reconciliation (errRootMigrationBusy). The hostguard abandoned subtest
now asserts the settled state. Census and 9B8 re-pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 4cdc6e3b7f18df3ef3c4e07c570fb285abe2469f parent baf278a
9 files changed, +206 −57
  • docs/superpowers/notes/census-proposal-claim-step8-readiness.md +4 −0
  • internal/host/claim_binding_startup_linux_test.go +90 −0
  • internal/host/rootinventory.go +2 −2
  • internal/hostguard/plan14_fix2_unix_test.go +2 −2
  • internal/hostguard/record.go +3 −2
  • internal/hostguard/root.go +33 −21
  • internal/hostguard/rootinventory_obsolete_unix_test.go +63 −23
  • internal/provision/claim_empty_cohort_fix1_census_test.go +3 −2
  • internal/provision/testdata/plan14-root-reads-roster-binding.tsv +6 −5
diff --git a/docs/superpowers/notes/census-proposal-claim-step8-readiness.md b/docs/superpowers/notes/census-proposal-claim-step8-readiness.md
index 2f9ea51b3..156d370b6 100644
--- a/docs/superpowers/notes/census-proposal-claim-step8-readiness.md
+++ b/docs/superpowers/notes/census-proposal-claim-step8-readiness.md
@@ -323,3 +323,7 @@ New units, at their callers' class:
| `internal/host/claimcleanup_identity.go` `claimCleanupEnrollment.rosterRevision` | root's fresh signed-roster read (one `Read`) | authority C,G,J4, root-input kept C,G |
9B8: `commitRootInventoryPending` and `recoverRootInventory` re-pinned again; kinds and class unchanged. Ruling 6 now also pins the callers of `openRootMigrationState` (its two), `rootMigrationStartupFloors`, `SettleObsoleteRootInventory` and `boundRosterRevision`.
+
+### Roster binding, fix round 2
+
+Status: PROPOSED with the rest of Roster binding. The superseded-claim abandonment (`Guard.AbandonRootInventory`, reached from `recoverRootInventory`) now ends in the same terminal state as an obsolete-intent settlement. It keeps its exact-intent and fresh-claim checks, reconciles a landed commit through the same `applied` callback, and leaves the record quarantined and settled. Before, it left a quarantine the startup census refused on every restart. Both entry points now share the new `Guard.resolveRootInventory` (authority C,E1, a declaration with no read of its own). Re-pinned: `recoverRootInventory` (also in 9B8; kinds and class unchanged), `AbandonRootInventory`, `SettleObsoleteRootInventory`.
diff --git a/internal/host/claim_binding_startup_linux_test.go b/internal/host/claim_binding_startup_linux_test.go
index 1547e1b9d..f7fbd8b07 100644
--- a/internal/host/claim_binding_startup_linux_test.go
+++ b/internal/host/claim_binding_startup_linux_test.go
@@ -439,3 +439,93 @@ func TestRootInventoryRefusesContradictoryTarget(t *testing.T) {
t.Fatalf("legacy contradictory intent: pending %d", w.pending())
}
}
+
+// Fix round 2: an intent whose claim advanced before recovery is abandoned
+// (the guard's exact-intent and fresh-claim checks), and the abandoned
+// installation ends settled like an obsolete one, so it never blocks
+// cleanup startup. The binding never changes here. A landed inventory write
+// whose claim then moved to an operation session, and a rebind intent whose
+// claim then advanced, are abandoned by the service's RecoverPending. Root
+// then restarts twice with migration participation required through the
+// whole OpenProductionClaimAssembly: its startup census inspects both
+// abandoned installations, and the terminal state persists across restarts.
+// (Abandonment runs in the service, as it can in production: the startup
+// recovery's replays need root's creation history and the guard's lock
+// directory, root-owned paths this test host does not have.)
+func TestRootStartupInspectsSupersededIntents(t *testing.T) {
+ ctx := t.Context()
+ w := newAssemblyWorld(t)
+ b0 := w.fresh()
+ w.migrationRequired(b0)
+ w.mustStart()
+ agent := w.agent(b0)
+ recA, routeA := w.newHost("a")
+ recD, routeD := w.newHost("d")
+ if err := agent.install(recA, routeA); err != nil {
+ t.Fatal(err)
+ }
+ if err := agent.install(recD, routeD); err != nil {
+ t.Fatal(err)
+ }
+
+ // A: a landed inventory write, then the claim moves on.
+ _, beforeA := w.inventory(recA.Host)
+ w.interruptedRegistration(agent, recA, routeA, b0)
+ moved := w.operationSession(recA.Host)
+ // D: a rebind intent, then the claim moves on.
+ w.interruptedRebind(recD, b0.Binding)
+ if _, err := hostclaim.Update(ctx, w.store, w.claim(recD.Host), func(c *hostclaim.Claim) error {
+ c.Holder.Generation = "advanced"
+ return nil
+ }); err != nil {
+ t.Fatal(err)
+ }
+ if err := w.restart(); err != nil {
+ t.Fatal(err)
+ }
+ if err := w.root.RecoverPending(ctx); err != nil {
+ t.Fatal("service recovery of superseded intents:", err)
+ }
+ if w.pending() != 0 {
+ t.Fatalf("superseded intents left pending: %d", w.pending())
+ }
+ for _, round := range []string{"first restart", "second restart"} {
+ w.migrating = true
+ if err := w.restart(); err != nil {
+ t.Fatalf("%s with migration participation required: %v", round, err)
+ }
+ if w.fresh().Binding != b0.Binding {
+ t.Fatal("the binding changed")
+ }
+ }
+ views, err := w.assembly.Guard.Root.MigrationInstallations(ctx)
+ if err != nil {
+ t.Fatal("migration census:", err)
+ }
+ settled := map[string]hostguard.FenceView{}
+ for _, v := range views {
+ if v.Settled {
+ settled[v.Host] = v
+ }
+ }
+ for _, rec := range []provision.Record{recA, recD} {
+ v, ok := settled[rec.Host]
+ if !ok {
+ t.Fatalf("%s not settled: %+v", rec.Host, views)
+ }
+ _, revision, err := w.assembly.Journals.Inventory.Snapshot(ctx, rec.Host, v.Captured)
+ if err != nil || revision != v.Installation.InventoryRevision {
+ t.Fatalf("%s: guard revision %d, inventory %d %v", rec.Host, v.Installation.InventoryRevision, revision, err)
+ }
+ if _, err := w.assembly.Guard.Root.View(ctx, rec.Host, v.Captured); !errors.Is(err, hostguard.ErrFenced) {
+ t.Fatalf("%s: abandoned installation's execution view: %v", rec.Host, err)
+ }
+ }
+ if v := settled[recA.Host]; v.Installation.InventoryRevision != beforeA+1 {
+ t.Fatalf("landed write not recorded: %d", v.Installation.InventoryRevision)
+ }
+ // The stop service is up and stops A's moved-on operation session.
+ if _, err := w.root.Stop.Coordinator.FenceAndStop(ctx, w.priorStop(moved, b0.Binding)); err != nil {
+ t.Fatal("stop service after abandonment:", err)
+ }
+}
diff --git a/internal/host/rootinventory.go b/internal/host/rootinventory.go
index b94e9cb90..1f73b40bf 100644
--- a/internal/host/rootinventory.go
+++ b/internal/host/rootinventory.go
@@ -448,7 +448,7 @@ func (h ClaimRootHTTP) recoverRootInventory(ctx context.Context) error {
err = errors.Join(err, h.Stop.Coordinator.Guard.AbandonRootInventory(ctx, n.Host, raw, func(c *hostclaim.Claim) bool {
fresh, e := hostclaim.Read(ctx, h.Stop.Coordinator.Evidence, n.Host)
return e == nil && fresh.Claim != nil && reflect.DeepEqual(c, fresh.Claim) && fresh.ETag != n.ETag
- }))
+ }, rebindIntentUnapplied))
}
log.Printf("instance-control: %s: %v", n.Host, err)
}
@@ -476,7 +476,7 @@ func (h ClaimRootHTTP) recoverRootInventory(ctx context.Context) error {
}
_, recordETag, recordErr := h.Stop.Coordinator.Evidence.Get(ctx, q.RecordKey)
return recordErr == nil && recordETag != q.RecordETag || fresh.ETag != q.Target.ClaimETag || c.Holder == nil || c.Holder.Incarnation != q.Target.Incarnation || c.Holder.Stamp != q.Target.Stamp || c.Holder.Session != q.Target.Session || c.Op.ID != q.Target.Op || c.Op.Phase != q.Target.Phase || errors.Is(err, hostbox.ErrJournalUncertain)
- }))
+ }, h.inventoryIntentApplied(q)))
}
log.Printf("instance-control: %s: %v", q.Target.Host, err)
}
diff --git a/internal/hostguard/plan14_fix2_unix_test.go b/internal/hostguard/plan14_fix2_unix_test.go
index 15756492e..f1338ec94 100644
--- a/internal/hostguard/plan14_fix2_unix_test.go
+++ b/internal/hostguard/plan14_fix2_unix_test.go
@@ -67,10 +67,10 @@ func TestPlan14Fix2PendingIntentCanBeAbandoned(t *testing.T) {
if err := f.g.CommitRootInventory(t.Context(), in, intent, allow, nil, func(RootInstallation) error { return failure }); !errors.Is(err, failure) {
t.Fatal(err)
}
- if err := f.g.AbandonRootInventory(t.Context(), target.Host, intent, func(*hostclaim.Claim) bool { return false }); !errors.Is(err, ErrFenced) {
+ if err := f.g.AbandonRootInventory(t.Context(), target.Host, intent, func(*hostclaim.Claim) bool { return false }, unlanded); !errors.Is(err, ErrFenced) {
t.Fatal("abandoned committable intent", err)
}
- if err := f.g.AbandonRootInventory(t.Context(), target.Host, intent, func(*hostclaim.Claim) bool { return true }); err != nil {
+ if err := f.g.AbandonRootInventory(t.Context(), target.Host, intent, func(*hostclaim.Claim) bool { return true }, unlanded); err != nil {
t.Fatal(err)
}
pending, err := f.g.Root.PendingInstallations()
diff --git a/internal/hostguard/record.go b/internal/hostguard/record.go
index cc3978f6a..13cc118ce 100644
--- a/internal/hostguard/record.go
+++ b/internal/hostguard/record.go
@@ -28,8 +28,9 @@ type Captured struct {
type record struct {
migrationDenies []MigrationDeny
quarantined bool
- // settled marks a quarantine whose only cause is root's settlement of
- // an obsolete pending intent (roster binding N3). It never lifts the
+ // settled marks a quarantine whose only cause is root's terminal
+ // resolution of a pending intent: an obsolete binding (roster binding
+ // N3) or a claim proven to have superseded it. It never lifts the
// quarantine's execution refusal; the refusal-only migration census
// alone may inspect such an installation.
settled bool
diff --git a/internal/hostguard/root.go b/internal/hostguard/root.go
index 77e75f55e..b23544c2d 100644
--- a/internal/hostguard/root.go
+++ b/internal/hostguard/root.go
@@ -302,29 +302,19 @@ func (a *RootAuthority) PendingInstallation(ctx context.Context, host string) (R
return *r.pendingInstallation, append([]byte(nil), r.pendingInventory...), nil
}
-func (g Guard) AbandonRootInventory(ctx context.Context, host string, intent []byte, superseded func(*hostclaim.Claim) bool) error {
- if g.Root == nil || superseded == nil {
+// AbandonRootInventory resolves a pending root inventory intent that a
+// fresh claim proves superseded: the exact intent bytes, then superseded
+// over the guard's fresh claim read, under the host lock. The installation
+// ends in the same terminal state as an obsolete-intent settlement
+// (resolveRootInventory): quarantined and settled, still refused for every
+// execution and admission, inspectable by the migration census, with a
+// landed commit's revision reconciled first (fix round 2: an abandoned
+// installation no longer blocks cleanup startup on every restart).
+func (g Guard) AbandonRootInventory(ctx context.Context, host string, intent []byte, superseded func(*hostclaim.Claim) bool, applied func(context.Context, RootInstallation) (bool, error)) error {
+ if superseded == nil {
return ErrInvalidInput
}
- return g.readLocked(ctx, host, func(d *recordDir) error {
- r, err := d.read(host)
- if err != nil {
- return err
- }
- if !bytes.Equal(r.pendingInventory, intent) || r.pendingInstallation == nil {
- return ErrInvalidInput
- }
- c, err := g.fresh(ctx, host)
- if err != nil {
- return err
- }
- if !superseded(c) {
- return ErrFenced
- }
- r.pendingInventory, r.pendingInstallation = nil, nil
- r.quarantined, r.settled = true, false
- return d.write(r)
- })
+ return g.resolveRootInventory(ctx, host, intent, superseded, applied)
}
// SettleObsoleteRootInventory settles a pending root inventory intent that
@@ -342,6 +332,19 @@ func (g Guard) AbandonRootInventory(ctx context.Context, host string, intent []b
// guard and the inventory agree on the revision. Otherwise the record keeps
// the installation it had.
func (g Guard) SettleObsoleteRootInventory(ctx context.Context, host string, intent []byte, applied func(context.Context, RootInstallation) (bool, error)) error {
+ return g.resolveRootInventory(ctx, host, intent, nil, applied)
+}
+
+// resolveRootInventory is the one terminal resolution of a pending root
+// inventory intent, for an obsolete binding (superseded nil: the binding
+// difference alone supersedes it, no claim is read) or a proven superseded
+// claim (superseded over the fresh claim, ErrFenced when it does not hold).
+// The intent must match exactly. applied reconciles a commit that landed
+// before its record write was lost; then the intent is cleared and the
+// record marked quarantined and settled. A settled record is terminal: no
+// pending intent remains to resolve it again, so it must stay inspectable
+// by the census, and the quarantine keeps every execution path refusing.
+func (g Guard) resolveRootInventory(ctx context.Context, host string, intent []byte, superseded func(*hostclaim.Claim) bool, applied func(context.Context, RootInstallation) (bool, error)) error {
if g.Root == nil || applied == nil || len(intent) == 0 {
return ErrInvalidInput
}
@@ -353,6 +356,15 @@ func (g Guard) SettleObsoleteRootInventory(ctx context.Context, host string, int
if !bytes.Equal(r.pendingInventory, intent) || r.pendingInstallation == nil {
return ErrInvalidInput
}
+ if superseded != nil {
+ c, err := g.fresh(ctx, host)
+ if err != nil {
+ return err
+ }
+ if !superseded(c) {
+ return ErrFenced
+ }
+ }
pending := *r.pendingInstallation
landed, err := applied(ctx, pending)
if err != nil {
diff --git a/internal/hostguard/rootinventory_obsolete_unix_test.go b/internal/hostguard/rootinventory_obsolete_unix_test.go
index 7341512fb..701298237 100644
--- a/internal/hostguard/rootinventory_obsolete_unix_test.go
+++ b/internal/hostguard/rootinventory_obsolete_unix_test.go
@@ -11,7 +11,7 @@ import (
"testing"
)
-// Fix round 1, finding 1: an obsolete pending intent is settled into a
+// Fix round 1, finding 1 (and round 2): an obsolete pending intent is settled into a
// quarantine the migration census may inspect, while every execution read
// still refuses it. A landed commit is recorded as the commit would have
// recorded it; an unlanded one leaves the record's installation.
@@ -88,27 +88,67 @@ func TestSettleObsoleteRootInventory(t *testing.T) {
})
}
- // The superseded-claim abandonment is not a settlement: the census
- // still refuses it.
- t.Run("abandoned", func(t *testing.T) {
- ctx := t.Context()
- f, target, captured := fenceFixture(t)
- f.obs.Claim.Holder.Account, f.obs.Claim.Holder.App = "bab", "console"
- f.g.Root = NewRootAuthority(&rootTestStore{dir: t.TempDir()})
- in := RootInstallation{Host: target.Host, Incarnation: captured.Incarnation, Stamp: captured.Stamp, Account: "bab", App: "console", Record: "record", Box: target.Box, Enrollment: target.Enrollment, Migration: 1, InventoryRevision: 1}
- if err := f.g.EstablishRoot(ctx, in, allow); err != nil {
- t.Fatal(err)
- }
- in.InventoryRevision++
- fault := errors.New("interrupted")
- if err := f.g.CommitRootInventory(ctx, in, []byte("exact"), allow, nil, func(RootInstallation) error { return fault }); !errors.Is(err, fault) {
- t.Fatal(err)
- }
- if err := f.g.AbandonRootInventory(ctx, target.Host, []byte("exact"), func(*hostclaim.Claim) bool { return true }); err != nil {
- t.Fatal(err)
- }
- if _, err := f.g.Root.MigrationInstallations(ctx); !errors.Is(err, ErrFenced) {
- t.Fatal("census accepted an abandoned installation:", err)
+ // The superseded-claim abandonment ends in the same terminal state (fix
+ // round 2): it keeps its exact-intent and fresh-claim checks, reconciles a
+ // landed commit, and leaves an installation the census can inspect and
+ // execution still refuses.
+ for _, landed := range []bool{true, false} {
+ name := "abandoned-unlanded"
+ if landed {
+ name = "abandoned-landed"
}
- })
+ t.Run(name, func(t *testing.T) {
+ ctx := t.Context()
+ f, target, captured := fenceFixture(t)
+ f.obs.Claim.Holder.Account, f.obs.Claim.Holder.App = "bab", "console"
+ f.g.Root = NewRootAuthority(&rootTestStore{dir: t.TempDir()})
+ in := RootInstallation{Host: target.Host, Incarnation: captured.Incarnation, Stamp: captured.Stamp, Account: "bab", App: "console", Record: "record", Box: target.Box, Enrollment: target.Enrollment, Migration: 1, InventoryRevision: 1}
+ if err := f.g.EstablishRoot(ctx, in, allow); err != nil {
+ t.Fatal(err)
+ }
+ before := in
+ in.InventoryRevision++
+ fault := errors.New("interrupted")
+ if err := f.g.CommitRootInventory(ctx, in, []byte("exact"), allow, nil, func(RootInstallation) error { return fault }); !errors.Is(err, fault) {
+ t.Fatal(err)
+ }
+ answer := func(context.Context, RootInstallation) (bool, error) { return landed, nil }
+ if err := f.g.AbandonRootInventory(ctx, target.Host, []byte("forged"), func(*hostclaim.Claim) bool { return true }, answer); !errors.Is(err, ErrInvalidInput) {
+ t.Fatal("forged intent abandoned:", err)
+ }
+ if err := f.g.AbandonRootInventory(ctx, target.Host, []byte("exact"), func(*hostclaim.Claim) bool { return false }, answer); !errors.Is(err, ErrFenced) {
+ t.Fatal("unsuperseded intent abandoned:", err)
+ }
+ if pending, err := f.g.Root.PendingInstallations(); err != nil || len(pending) != 1 {
+ t.Fatalf("refused abandonment changed the intent: %d %v", len(pending), err)
+ }
+ if err := f.g.AbandonRootInventory(ctx, target.Host, []byte("exact"), func(*hostclaim.Claim) bool { return true }, answer); err != nil {
+ t.Fatal(err)
+ }
+ r, err := f.g.Root.read(target.Host)
+ if err != nil || !r.quarantined || !r.settled || r.pendingInstallation != nil {
+ t.Fatalf("after abandonment: %+v %v", r, err)
+ }
+ want := before
+ if landed {
+ want = in
+ }
+ if r.installation != want {
+ t.Fatalf("installation %+v, want %+v", r.installation, want)
+ }
+ if _, err := f.g.Root.View(ctx, target.Host, captured); !errors.Is(err, ErrFenced) {
+ t.Fatal("execution view of an abandoned installation:", err)
+ }
+ if err := r.admits(f.obs.Claim, captured); !errors.Is(err, ErrFenced) {
+ t.Fatal("admission of an abandoned installation:", err)
+ }
+ views, err := f.g.Root.MigrationInstallations(ctx)
+ if err != nil || len(views) != 1 || !views[0].Settled || views[0].Installation != want {
+ t.Fatalf("census of an abandoned installation: %+v %v", views, err)
+ }
+ })
+ }
}
+
+// unlanded is an applied answer for an intent whose commit never landed.
+func unlanded(context.Context, RootInstallation) (bool, error) { return false, nil }
diff --git a/internal/provision/claim_empty_cohort_fix1_census_test.go b/internal/provision/claim_empty_cohort_fix1_census_test.go
index bf53cf47c..87a5e3921 100644
--- a/internal/provision/claim_empty_cohort_fix1_census_test.go
+++ b/internal/provision/claim_empty_cohort_fix1_census_test.go
@@ -69,7 +69,8 @@ func plan14ClaimMergeMovesOfflineWriteCensusInventory() []censusEntry {
// cleared, the record quarantined and marked settled), never replayed
// (fix round 1, finding 1). It reads the inventory version only, and
// decides obsolescence on the inventory's validated stamp alone
-// (finding 2).
+// (finding 2). A superseded-claim abandonment ends in the same settled
+// state, with the same reconciliation (fix round 2).
// - rebindRecoveryInventory: the successor and the predecessor inventory
// must both carry the fresh actor's binding.
//
@@ -90,7 +91,7 @@ func plan14ClaimRosterBindingWriteCensusInventory() []censusEntry {
{"internal/host/claimservingparksource_linux.go", "servingParkStateDirectory", "key-site", "lit:instances", "3596d8a75440c454d0acfa8033a8bf67cbae0625911925a0bb45140975d55baa"},
{"internal/host/rootexecution_authority.go", "ClaimRootHTTP.executionAuthority", "key-site", "key:RecordKey,lit:instances", "00818a660276f82be32f4753aae26edc547ef55654c51c6dec81fdd2e9404cdd"},
{"internal/host/rootinventory.go", "ClaimRootHTTP.commitRootInventoryPending", "key-site", "key:RecordKey", "bb679c624346c0392db6f7dcddbf75aa1d96baf93e614cc509217d2c2a69d24a"},
- {"internal/host/rootinventory.go", "ClaimRootHTTP.recoverRootInventory", "key-site", "key:RecordKey", "61424258bbfe48b148e7b54bf0aef67f44e8015274fc6af828f225de66ba9aa9"},
+ {"internal/host/rootinventory.go", "ClaimRootHTTP.recoverRootInventory", "key-site", "key:RecordKey", "877fbabf76173278757f8696582c56e361934986052fa02fce12cec20ce364d1"},
{"internal/host/rootrecovery_rebind.go", "ClaimRootHTTP.rebindRecoveryInventory", "key-site", "key:RecordKey", "0e9f3ee60e6077c46c5a951be7abe6878ec79f76a71f78872ac9e54d519a66f4"},
}
entries := plan14ClaimMergeMovesOfflineWriteCensusInventory()
diff --git a/internal/provision/testdata/plan14-root-reads-roster-binding.tsv b/internal/provision/testdata/plan14-root-reads-roster-binding.tsv
index 335566b2c..4aaa06d0b 100644
--- a/internal/provision/testdata/plan14-root-reads-roster-binding.tsv
+++ b/internal/provision/testdata/plan14-root-reads-roster-binding.tsv
@@ -1,8 +1,8 @@
# Census overlay roster-binding (roster binding, design-roster-revision-holds.md rev 3 plus section 7, tasks 1 to 7 at 7103ee07): installed state is stamped with and compared against hostactors.BoxBinding, a digest of the box's roster row and the deployment's binding facts, instead of the roster write counter, so holds and other unrelated roster writes no longer refuse claim work while a quarantine, readmission, re-enrolment, floor, home or census-key change still does. The binding is computed from the reads the claim roster adapter and the cleanup identity already make; root's inventory actor is the fresh Identity.Verify; stop receipts take their directory_revision numeral from the fence's persisted RosterRevision and carry the binding in a new field; root startup settles obsolete inventory and rebind intents through the existing abandonment write and obsolete cold-handover barriers through the new fenced SettleObsoleteColdHandover; the cold handover admits only a fresh successor. Changed units are re-pinned at their existing class, task and identity; new units take the class of the callers that execute them; servingPriorRevision is removed (renamed servingPriorBinding). productionClaimRoster.Actor is folded from the claim-ack-refresh overlay, which stays loaded before this one. No accepted-legacy row, so the seal stands. PROPOSED, awaiting a ruling (docs/superpowers/notes/census-proposal-claim-step8-readiness.md, "Roster binding").
-@coverage internal/host 94a41c4d945fb3bcd2ee36f4a01ab73fbbd734b7e51046cb49affd33562172ee
+@coverage internal/host 2f1e867cf9128498d39f12c3203942e6b3c077d4029928893153f0bb6796b9da
@coverage internal/hostactors 1af14a5c45dacffe3d5b1878fde611b6887b1f3fdf2604adad427c819818813b
@coverage internal/hostbox 6a698fe2c67cf9096d341b558e3f151481221f4134f578fcd2b8dbfcb07f3b50
-@coverage internal/hostguard 6579d40d41a929bfcb71a09a97efb19c85e9fd2059bf3b8760a4970ebeb561fb
+@coverage internal/hostguard d3483cd67d197851473583e9ef941ff73d7007aa15d048c4b315d45185ec2764
internal/host/claimassembly.go ClaimAssembly.Build authority C,G rev3=PROPOSED-roster-binding;identity=agent uid carlos; root instance-control uid 0;basis=as before; the agent's install pin (Reconcile.DirectoryRevision) and its census pin are the startup actor's binding, not the roster write counter; reads unchanged file:Prepare@3791,file:Prepare@3824,file:Prepare@3840,file:Prepare@3857,file:Prepare@4606,file:Read@4536,whole:Timer@2044 cc979699a6390a04b76b1c02b8d53ff1f72b11a40191ad7e6951aed9cf21f9ba
internal/host/claimcleanup_identity.go verifyClaimCleanupEnrollment authority C,G,J4 root-input;kept=C,G;scope=protected-decision-only;rev3=PROPOSED-roster-binding;basis=the same read; the cleanup actor also carries hostactors.BoxBinding of its row in that startup read, which stamps only what the cleanup identity itself constructs; fresh authority is never this actor file:Read@173 dafa2d78591fccac8a3bd7d6b6faa5088e2f3fda665a9906e8b9ae128ade1908
internal/host/claimconstruction.go OpenProductionClaimAssembly authority C,E3,J4 rev3=PROPOSED-roster-binding;identity=root controller and service UID using authenticated root projection;basis=as before; the launch owner's fence target is stamped with the actor's binding and carries the roster write counter as RosterRevision, the stop receipt's numeral; reads unchanged file:Read@10611,file:Read@4684,file:ReadFile@4228,registry:Host@10638,whole:Route@10726,whole:Route@11475 171e91d7bb19f31def2d0077694b0cc7fd4b4917d62b4b852c0a74b2d0d786b0
@@ -24,7 +24,7 @@ internal/host/claimstop_writers.go ClaimStopCoordinator.WritersStopped authority
internal/host/claimwakestop.go ClaimAssembly.collectCapturedStop authority C,G,J4 rev3=PROPOSED-roster-binding;basis=as before; with no launch record the expected stamp is the actor's binding; the request carries the launch record's roster numeral, or the actor's write counter when the record names none; same reads file:Exec@3264,file:Read@605 45c827a643468eeac5413de43546f0135d28e7d18b99aee31dcd290fd5fbad78
internal/host/rootexecution_authority.go ClaimRootHTTP.executionAuthority authority C,E2,J4 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=as before; the execution authority carries the fresh actor's binding as its DirectoryRevision; same reads file:Exec@1657,file:Read@553 00818a660276f82be32f4753aae26edc547ef55654c51c6dec81fdd2e9404cdd
internal/host/rootinventory.go ClaimRootHTTP.commitRootInventoryPending authority E2 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=as before; the inventory's stamp must equal the binding of a fresh InventoryActor (root's inventory actor is Identity.Verify on every call, R2); same reads; fix round 1 (finding 2): a non-empty target DirectoryRevision must equal the inventory's stamp, itself equal to the fresh binding, before any intent is persisted; same reads file:Read@1708,file:Read@3748,registry:Account@5112,registry:Account@5127,registry:App@5148,registry:App@5159,registry:ClaimIncarnation@4618,registry:ClaimOwner@4668,registry:ClaimOwner@5798,registry:ClaimOwnership@5210,registry:ClaimOwnership@5232,registry:ClaimOwnership@6114,registry:ClaimOwnership@8317,registry:ClaimRowID@4832,registry:ClaimRowID@4909,registry:ClaimStamp@4646,registry:DBPath@5176,registry:DBPath@5190,registry:Host@5082,registry:Host@5094,registry:Host@8781,registry:Name@8804,whole:ClaimOwnership@5214,whole:ClaimOwnership@5242,whole:ClaimOwnership@6124,whole:ClaimOwnership@8328,whole:Route@10571,whole:Route@3940,whole:Route@4323,whole:Route@4339,whole:Route@4394,whole:Route@5045,whole:Route@5058,whole:Route@5067,whole:Route@5305,whole:Route@5537,whole:Route@6371,whole:Route@6507,whole:Route@6731,whole:Route@8173,whole:Route@9836,whole:Route@9897,whole:Timer@8789,whole:Timer@8812 bb679c624346c0392db6f7dcddbf75aa1d96baf93e614cc509217d2c2a69d24a
-internal/host/rootinventory.go ClaimRootHTTP.recoverRootInventory authority C,E1 rev3=PROPOSED-roster-binding;basis=as before (E16, E46); a pending inventory or rebind intent stamped under a binding other than root's startup binding is obsolete: it is settled, one intent at a time, through the guard's existing AbandonRootInventory (settleObsoleteIntent), logged, never replayed and never an assembly abort (N3); same reads. Executing identity: root instance-control or root participation/update; fix round 1 (finding 1): an obsolete intent is settled through SettleObsoleteRootInventory, told whether an interrupted inventory write already landed (inventoryIntentApplied) or, for a rebind, that its predecessor is kept (rebindIntentUnapplied); same reads; fix round 1 (finding 2): obsolescence is decided on the inventory's validated stamp only (obsoleteIntent takes one stamp), never the agent-sent target stamp; same reads file:Read@1911,file:Read@911 61424258bbfe48b148e7b54bf0aef67f44e8015274fc6af828f225de66ba9aa9
+internal/host/rootinventory.go ClaimRootHTTP.recoverRootInventory authority C,E1 rev3=PROPOSED-roster-binding;basis=as before (E16, E46); a pending inventory or rebind intent stamped under a binding other than root's startup binding is obsolete: it is settled, one intent at a time, through the guard's existing AbandonRootInventory (settleObsoleteIntent), logged, never replayed and never an assembly abort (N3); same reads. Executing identity: root instance-control or root participation/update; fix round 1 (finding 1): an obsolete intent is settled through SettleObsoleteRootInventory, told whether an interrupted inventory write already landed (inventoryIntentApplied) or, for a rebind, that its predecessor is kept (rebindIntentUnapplied); same reads; fix round 1 (finding 2): obsolescence is decided on the inventory's validated stamp only (obsoleteIntent takes one stamp), never the agent-sent target stamp; same reads; fix round 2: a superseded-claim abandonment passes the same applied reconciliation (inventoryIntentApplied, rebindIntentUnapplied), so it ends settled like an obsolete intent; same reads file:Read@1934,file:Read@911 877fbabf76173278757f8696582c56e361934986052fa02fce12cec20ce364d1
internal/host/rootmigration_evidence.go readMigrationStop authority G,J4 rev3=PROPOSED-roster-binding;identity=carlos system journal-migrate offline operator uid 0;basis=as before; the wanted receipt is matched on its binding field; a receipt whose directory_revision is not a canonical non-zero numeral is skipped, and the numeral is carried into the target's RosterRevision; same read file:Read@592 e16256c1a4c6807b32e55a0617bbc6e17d12ff708a7fcaa765af9b35226c61b7
internal/host/rootrecovery_rebind.go ClaimRootHTTP.rebindRecoveryInventory authority C rev3=PROPOSED-roster-binding;basis=retain fresh claim and inventory checks and refuse a box listed Lost; the successor must be stamped with the fresh actor's non-empty binding, and the predecessor inventory must carry that binding too (R3) before any reuse; same reads file:Exec@2625,file:Read@1519,file:Read@2129,registry:Account@3346,registry:App@3383,registry:ClaimIncarnation@3446,registry:ClaimOwner@3626,registry:ClaimRowID@3648,registry:ClaimStamp@3474,registry:Host@3318,whole:Route@3767 0e9f3ee60e6077c46c5a951be7abe6878ec79f76a71f78872ac9e54d519a66f4
internal/hostbox/coldhandover.go ColdHandover.Run authority C,J2,J4 rev3=PROPOSED-roster-binding;identity=root claim, migration or adoption controller uid 0;basis=as before; when Admit is set (root's handler and startup recovery), it runs first, before any successor state, for a new handover and for every replay (N5, B1); same reads file:Exec@1114,file:Lstat@10883,file:OpenRoot@10805,file:Read@1466,registry:Addr@3741,registry:Addrs@3759,registry:Backing@3778,registry:Canary@3835,registry:ClaimIncarnation@3619,registry:ClaimIncarnation@4121,registry:ClaimOwner@11633,registry:ClaimOwner@4203,registry:ClaimOwner@4223,registry:ClaimOwner@6098,registry:ClaimOwner@7190,registry:ClaimOwner@8444,registry:ClaimOwnership@11225,registry:ClaimOwnership@3589,registry:ClaimOwnership@4567,registry:ClaimOwnership@4785,registry:ClaimOwnership@4818,registry:ClaimRowID@11523,registry:ClaimRowID@11604,registry:ClaimRowID@4241,registry:ClaimRowID@4849,registry:ClaimRowID@7149,registry:ClaimRowID@8469,registry:ClaimStamp@3664,registry:ClaimStamp@4168,registry:Host@7026,registry:Host@8406,registry:Kind@3697,registry:Name@4903,registry:Name@7041,registry:Name@8425,registry:Platform@3819,registry:Registration@4267,registry:Registration@7106,registry:Registration@8494,registry:Replica@3849,registry:Route@11225,registry:Route@4567,registry:Route@4818,registry:Route@5349,registry:Route@6098,registry:Timers@4766,registry:Timers@4785,registry:Timers@4849,registry:Timers@4903,registry:Timers@6978,registry:Timers@8281,registry:Tunnel@3799,registry:Unit@3723,whole:ClaimOwnership@11239,whole:ClaimOwnership@3593,whole:ClaimOwnership@4579,whole:ClaimOwnership@4801,whole:ClaimOwnership@4830,whole:ColdRows@11227,whole:ColdRows@12339,whole:ColdRows@12349,whole:ColdRows@5064,whole:ColdRows@5072,whole:ColdRows@5080,whole:ColdRows@5087,whole:ColdRows@5351,whole:ColdRows@6100,whole:ColdRows@6980,whole:ColdRows@8283,whole:Route@11233,whole:Route@3574,whole:Route@3934,whole:Route@4366,whole:Route@4374,whole:Route@4425,whole:Route@4433,whole:Route@4573,whole:Route@4824,whole:Route@5358,whole:Route@6107,whole:Timer@4105,whole:Timer@4379,whole:Timer@4387,whole:Timer@4438,whole:Timer@4476,whole:Timer@4772,whole:Timer@4791,whole:Timer@4855,whole:Timer@4909,whole:Timer@6987,whole:Timer@8290 14778af6e9553d5d386ad88c48c5331e7312e0bc94d48e8ad8e72a8d3e8b06fa
@@ -61,7 +61,7 @@ internal/host/rootinventory.go ClaimRootHTTP.inventoryIntentApplied authority C,
internal/host/rootinventory.go rebindIntentUnapplied authority C,E1 rev3=PROPOSED-roster-binding;identity=root instance-control or root participation/update uid 0;basis=new (fix round 1, finding 1): constant false, a rebind's commit writes only the successor's inventory so the kept predecessor agrees with its own; no read; the class of its caller recoverRootInventory 19399a184c63b259c3150b6e86c7cdbcab21e2b0f2da64eff07700d0b98930c4
internal/host/rootmigration_startup.go var rootMigrationStartupFloors authority G,F,J4 rev3=PROPOSED-roster-binding;identity=root instance-control startup and recovery uid 0;basis=new (fix round 1, finding 1): the startup's installed-binary floor check, verifyRootMigrationFloors unchanged, behind a variable so tests without root-owned floor binaries can stand in for it; its only caller is verifyRootMigrationStartup, and its class 250545174d349672c1c5f8d3a4ff8ea46a0fc73d38fd15e8b81d8b3cbdb61f1e
internal/hostguard/guard.go Guard.locked authority C rev3=PROPOSED-roster-binding;basis=fix round 1 (finding 1): an unsafe-lock quarantine also clears the settled mark, so hostile evidence is never inspectable as a settlement; reads unchanged fdebfbd4bff4d2064d830ce26c539d99ce140f383e39ce88ac9ce2a8a191c536
-internal/hostguard/root.go Guard.AbandonRootInventory authority C rev3=PROPOSED-roster-binding;basis=fix round 1 (finding 1): the superseded-claim abandonment also clears the settled mark; it stays a refusing quarantine for the migration census; no read change a0f7b41ad7d42cd845b2a563c8b126b80878eec0caecd5b1ab1bebf66f22284f
+internal/hostguard/root.go Guard.AbandonRootInventory authority C rev3=PROPOSED-roster-binding;basis=fix round 1 (finding 1): the superseded-claim abandonment also clears the settled mark; it stays a refusing quarantine for the migration census; no read change; fix round 2: now resolveRootInventory with its superseded check: exact intent and fresh claim kept, a landed commit reconciled, the record left quarantined and settled (inspectable by the census, refused for execution) instead of a non-settled quarantine that blocked cleanup startup on every restart 2d53cdc6491ad4ea53128cb1b48040c33aa3607ecc35da0aab80165d7d7ce1c7
internal/hostguard/root.go Guard.CommitRootInventoryArtifacts authority G,J4 rev3=PROPOSED-roster-binding;identity=root claim controller construction uid 0;basis=fix round 1 (finding 1): a successful commit clears the settled mark with the quarantine; reads unchanged 1f640a3d6411ee23f6d23db4b7a5b276bb43e02c5945d537e765ddab093193ab
internal/hostguard/root.go RootAuthority.write authority C,G,J4 rev3=PROPOSED-roster-binding;identity=root control uid 0;basis=fix round 1 (finding 1): persists the settled mark (Settled, omitempty); no read d9da59ba4d96884af78bb953fe7789e0cf737b7c7eff576c28d459f4152bd0f6
internal/hostguard/root.go RootAuthority.read authority C,G,J4 rev3=PROPOSED-roster-binding;identity=root control/startup/generation uid 0;basis=fix round 1 (finding 1): reads the settled mark; a record Settled but not Quarantined is malformed; same read file:Read@175 acd752ed113ea01908ae1dc42dd6742ce7ff00078ac21e67b454e1c38df07f6e
@@ -69,7 +69,8 @@ internal/hostguard/rootrebind.go Guard.RebindRootInventory authority E2 rev3=PRO
internal/hostguard/rootview.go RootAuthority.viewLocked authority C,G,J4 rev3=PROPOSED-roster-binding;identity=carlos instance-control, root control service uid 0;basis=fix round 1 (finding 1): now readView with census false, unchanged behaviour: quarantined (settled or not) and pending records refuse 2bc13f3341e273be24c275db459e3e9bbaa2f79354562dfad792ab88f628e45c
internal/hostguard/rootmigration_inventory.go RootAuthority.MigrationInstallations authority C,G,J4 rev3=PROPOSED-roster-binding;identity=root migration/startup uid 0;basis=fix round 1 (finding 1): reads each record through readView with census true, so a settled installation is listed, marked Settled; any other quarantined or pending record still refuses the census; reads unchanged 11170afcb762367188400d9472f81c87d6eaf74a6d36b2582001ee8cf99766e6
internal/hostguard/rootview.go RootAuthority.readView authority C,G,J4 rev3=PROPOSED-roster-binding;identity=carlos instance-control, root control service uid 0;basis=new (fix round 1, finding 1): viewLocked's read moved unchanged, plus the census exception for a settled record; reads through RootAuthority.read; the class of its callers viewLocked and MigrationInstallations cd67585f565aa68f6f73a2ad3540ef79c2ce4c5303b99c80317c77b0be9d5667
-internal/hostguard/root.go Guard.SettleObsoleteRootInventory authority C,E1 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new (fix round 1, finding 1): under the host lock and with the exact intent bytes, clears an obsolete pending intent, records the installation the interrupted commit would have recorded when applied says it landed, and marks the record quarantined and settled; no claim read; reads through the guard's record directory; the class of its caller settleObsoleteIntent dcb5caf851fc00e089b1aedc4ef83f2f75c02837ce02ed689057fbd387e6f6e9
+internal/hostguard/root.go Guard.SettleObsoleteRootInventory authority C,E1 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new (fix round 1, finding 1): under the host lock and with the exact intent bytes, clears an obsolete pending intent, records the installation the interrupted commit would have recorded when applied says it landed, and marks the record quarantined and settled; no claim read; reads through the guard's record directory; the class of its caller settleObsoleteIntent; fix round 2: its body moved unchanged into resolveRootInventory (no claim read) 89729f43d693b26f516ec35d4f73bd3110bd7d715b3d6adb966322626a459ba6
internal/host/claimstop.go type ClaimStopCoordinator authority C,G,J4 rev3=PROPOSED-roster-binding;basis=fix round 1 (finding 3): gains VerifiedRosterRevision, root's fresh verified roster read that bounds an agent-sent receipt numeral; nil refuses every stop and no-process witness d492a16fa6b3d75c90a72b34c6a30f025e8e8baf085ee49ebf18955f10602cfe
internal/host/claimstop.go ClaimStopCoordinator.boundRosterRevision authority C,G,J4 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new (fix round 1, finding 3): refuses an agent-sent RosterRevision outside 0 < n <= VerifiedRosterRevision's value, nil refusing; no read of its own; the class of its callers FenceAndStop (C,J4) and witnessNoProcess (C,G,J4) ddd535a321268d90f9058388304a417d81320d64b468a2ce5a9d65d3789902d3
internal/host/claimcleanup_identity.go claimCleanupEnrollment.rosterRevision authority C,G,J4 root-input;kept=C,G;scope=protected-decision-only;rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new (fix round 1, finding 3): root's own read of the signed roster (hostactors Directory.Read verifies the deployment signature) at the moment of a stop, never the startup read; the box's row must still name this enrollment; returns the roster's write counter whether or not the box is quarantined, so historical cleanup keeps working; the same read configureSigner makes; reached only through rootStopCoordinator's VerifiedRosterRevision, so the class of boundRosterRevision's callers file:Read@157 42b607901a37ef0dcd3e3dad7f0c053beab426c3f2acec0457a65800a0fd7f22
+internal/hostguard/root.go Guard.resolveRootInventory authority C,E1 rev3=PROPOSED-roster-binding;identity=root instance-control or root participation/update uid 0;basis=new (fix round 2): the one terminal resolution of a pending root inventory intent, under the host lock with the exact intent bytes; for a superseded claim it reads the fresh claim through the guard and requires superseded; reconciles a landed commit through applied; clears the intent and marks the record quarantined and settled; reads through the guard's record directory; the class of its callers AbandonRootInventory and SettleObsoleteRootInventory (both reached from recoverRootInventory) 5549be9c521f8ad6514f4c79a39bbcc2442c644641b1f21786f0c94ea54612a6