carlos / platform Public

root checks an inventory write's target stamp before persisting its intent (roster binding fix round 1, finding 2)

commitRootInventoryPending validated q.Inventory.DirectoryRevision against
the fresh binding but never q.Target.DirectoryRevision, and startup's
obsolescence check consulted that unchecked target stamp: an agent could
persist an intent whose target named another binding and have startup
settle (quarantine) an installation whose binding never changed.

A non-empty target stamp must now equal the validated inventory stamp
before any intent is persisted, and obsoleteIntent takes one stamp,
validated binding evidence only (an inventory's or a successor's).

TestRootInventoryRefusesContradictoryTarget writes through the agent's own
journal client: a contradictory target is refused before the intent and the
installation keeps working; the control (target naming the binding,
interrupted) replays and completes; a legacy intent persisted with a
contradictory target is not settled as obsolete. Census re-pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev a9e67553375c0bcd4bf6b95b525bc42e19069287 parent dc1b2bb
4 files changed, +177 −43
  • internal/host/claim_binding_startup_linux_test.go +153 −17
  • internal/host/rootinventory.go +13 −18
  • internal/provision/claim_empty_cohort_fix1_census_test.go +7 −4
  • internal/provision/testdata/plan14-root-reads-roster-binding.tsv +4 −4
diff --git a/internal/host/claim_binding_startup_linux_test.go b/internal/host/claim_binding_startup_linux_test.go
index 0a7fafd5d..1547e1b9d 100644
--- a/internal/host/claim_binding_startup_linux_test.go
+++ b/internal/host/claim_binding_startup_linux_test.go
@@ -119,34 +119,74 @@ func (w *assemblyWorld) migrationRequired(actor hostbox.Actor) {
rootMigrationStartupFloors = func(string, rootFloorIdentity) error { return nil }
}
-// plantedFirstInstall leaves a first inventory write for rec pending at
-// root, stamped stamp, as a root that died after persisting the intent and
-// before its journal commit leaves it: the guard's real
-// CommitRootInventoryArtifacts persists the intent, and the commit fails
-// before any inventory is written.
-func (w *assemblyWorld) plantedFirstInstall(rec provision.Record, stamp string) {
+// plantInventoryIntent leaves q pending at root for installation, as a root
+// that died after persisting the intent and before its commit leaves it:
+// the guard's real CommitRootInventoryArtifacts persists the intent, and the
+// commit fails before any inventory is written.
+func (w *assemblyWorld) plantInventoryIntent(q hostbox.JournalRequest, installation hostguard.RootInstallation) {
+ w.t.Helper()
+ raw, err := json.Marshal(q)
+ if err != nil {
+ w.t.Fatal(err)
+ }
+ before := w.pending()
+ err = w.assembly.Guard.CommitRootInventoryArtifacts(w.t.Context(), installation, raw, func(*hostclaim.Claim) error { return nil }, nil, func(hostguard.RootInstallation) error { return errRootInterrupted }, nil)
+ if !errors.Is(err, errRootInterrupted) || w.pending() != before+1 {
+ w.t.Fatalf("planted intent: %v, pending %d", err, w.pending())
+ }
+}
+
+// inventoryRequest is an inventory write for rec's current installation as
+// the agent would send it: inventory in, at revision, against the claim and
+// record as they are now.
+func (w *assemblyWorld) inventoryRequest(rec provision.Record, in hostbox.StopInventory, revision uint64, id string) hostbox.JournalRequest {
w.t.Helper()
- ctx := w.t.Context()
o := w.claim(rec.Host)
h := o.Claim.Holder
- _, recordETag, err := w.store.Get(ctx, h.Key)
+ _, recordETag, err := w.store.Get(w.t.Context(), h.Key)
if err != nil {
w.t.Fatal(err)
}
+ return hostbox.JournalRequest{V: 3, ID: id, Op: "inventory-write", Revision: revision, RecordKey: h.Key, RecordETag: recordETag, Inventory: in,
+ Target: hostguard.FenceTarget{Host: rec.Host, Incarnation: h.Incarnation, Stamp: h.Stamp, Session: h.Session, Box: "box-1", Enrollment: w.roster.row().Enrollment, ClaimETag: o.ETag, Op: o.Claim.Op.ID, Phase: o.Claim.Op.Phase}}
+}
+
+// plantedFirstInstall leaves rec's first inventory write pending at root,
+// stamped stamp, with no inventory written.
+func (w *assemblyWorld) plantedFirstInstall(rec provision.Record, stamp string) {
+ w.t.Helper()
+ h := w.claim(rec.Host).Claim.Holder
enrollment := w.roster.row().Enrollment
- q := hostbox.JournalRequest{V: 3, ID: "planted-" + rec.Host, Op: "inventory-write", RecordKey: h.Key, RecordETag: recordETag,
- Target: hostguard.FenceTarget{Host: rec.Host, Incarnation: h.Incarnation, Stamp: h.Stamp, Session: h.Session, Box: "box-1", Enrollment: enrollment, ClaimETag: o.ETag},
- Inventory: hostbox.StopInventory{Complete: true, Host: rec.Host, Incarnation: h.Incarnation, InstallationStamp: h.Stamp, Box: "box-1", Enrollment: enrollment, DirectoryRevision: stamp}}
- raw, err := json.Marshal(q)
+ q := w.inventoryRequest(rec, hostbox.StopInventory{Complete: true, Host: rec.Host, Incarnation: h.Incarnation, InstallationStamp: h.Stamp, Box: "box-1", Enrollment: enrollment, DirectoryRevision: stamp}, 0, "planted-"+rec.Host)
+ w.plantInventoryIntent(q, hostguard.RootInstallation{Empty: true, Host: rec.Host, Incarnation: h.Incarnation, Stamp: h.Stamp, Account: h.Account, App: h.App, Record: h.Key, Box: "box-1", Enrollment: enrollment, Migration: 1, InventoryRevision: 1})
+}
+
+// targetStampedWrite is agent's inventory write of rec's current inventory,
+// unchanged, through the agent's own journal client, with its target's
+// DirectoryRevision set to stamp: an agent-chosen request field that root
+// must not take on trust. The request is prepared (nonce, issue time, ID)
+// by the client exactly as any agent write is.
+func (w *assemblyWorld) targetStampedWrite(agent *bindingAgent, rec provision.Record, stamp string) error {
+ w.t.Helper()
+ ctx := w.t.Context()
+ h := w.claim(rec.Host).Claim.Holder
+ _, etag, err := w.store.Get(ctx, h.Key)
if err != nil {
w.t.Fatal(err)
}
- installation := hostguard.RootInstallation{Empty: true, Host: rec.Host, Incarnation: h.Incarnation, Stamp: h.Stamp, Account: h.Account, App: h.App, Record: h.Key, Box: "box-1", Enrollment: enrollment, Migration: 1, InventoryRevision: 1}
- before := w.pending()
- err = w.assembly.Guard.CommitRootInventoryArtifacts(ctx, installation, raw, func(*hostclaim.Claim) error { return nil }, nil, func(hostguard.RootInstallation) error { return errRootInterrupted }, nil)
- if !errors.Is(err, errRootInterrupted) || w.pending() != before+1 {
- w.t.Fatalf("planted first install: %v, pending %d", err, w.pending())
+ captured := hostguard.Captured{Incarnation: h.Incarnation, Stamp: h.Stamp}
+ in, revision, err := agent.remote.Snapshot(ctx, rec.Host, captured)
+ if err != nil {
+ w.t.Fatal(err)
}
+ client := hostbox.ReconcileAdapter{Reconciler: hostbox.Reconciler{Guard: agent.guard, Claims: w.store}, Box: agent.pinned.Box, Enrollment: agent.pinned.Enrollment}
+ expected, err := client.CaptureInventory(ctx, hostbox.RecordSelection{Host: rec.Host, Key: h.Key, ETag: etag, Incarnation: h.Incarnation, Family: h.Family}, captured, revision)
+ if err != nil {
+ w.t.Fatal(err)
+ }
+ expected.Target.DirectoryRevision = stamp
+ _, err = agent.remote.WriteExpected(ctx, in, expected)
+ return err
}
// N3 (roster binding task 5b, fix round 1 finding 1): interrupted intents
@@ -303,3 +343,99 @@ func TestRootStartupSettlesObsoleteIntents(t *testing.T) {
})
}
}
+
+// Fix round 1, finding 2: root validates an agent-sent target stamp against
+// the inventory's validated binding before it persists any intent, and
+// startup decides obsolescence on validated binding evidence only.
+// Contradictory: a request whose inventory names B0 (valid) and whose
+// target names another binding is refused before any intent, and the
+// installation keeps working. Control: the same request with the target
+// naming B0, interrupted after its intent, replays and completes at the
+// next start. Legacy: an intent persisted with a contradictory target (as
+// the unchecked root accepted one) is not settled as obsolete at startup.
+func TestRootInventoryRefusesContradictoryTarget(t *testing.T) {
+ ctx := t.Context()
+ w := newAssemblyWorld(t)
+ w.mustStart()
+ b0 := w.fresh()
+ recA, routeA := w.newHost("a")
+ recB, routeB := w.newHost("b")
+ for _, h := range []struct {
+ rec provision.Record
+ route registry.Route
+ }{{recA, routeA}, {recB, routeB}} {
+ if err := w.agent(b0).install(h.rec, h.route); err != nil {
+ t.Fatal(err)
+ }
+ }
+ other := strings.Repeat("ab", 32)
+ if other == b0.Binding {
+ t.Fatal("fixture binding collision")
+ }
+ restart := func(what string) string {
+ t.Helper()
+ logs := captureLog(t)
+ if err := w.restart(); err != nil {
+ t.Fatal(what, err)
+ }
+ if err := w.root.RecoverPending(ctx); err != nil {
+ t.Fatal(what, err)
+ }
+ return logs()
+ }
+
+ // Contradictory target: refused before the intent.
+ _, before := w.inventory(recA.Host)
+ *w.interrupt = 1
+ err := w.targetStampedWrite(w.agent(b0), recA, other)
+ consumed := *w.interrupt == 0
+ *w.interrupt = -1
+ if err == nil || w.pending() != 0 || consumed {
+ t.Fatalf("contradictory target: %v, pending %d, root wrote %v", err, w.pending(), consumed)
+ }
+ if _, after := w.inventory(recA.Host); after != before {
+ t.Fatalf("contradictory target changed the inventory: %d -> %d", before, after)
+ }
+ if logs := restart("restart after a contradictory target:"); strings.Contains(logs, "obsolete pending") {
+ t.Fatalf("an unchanged binding was settled as obsolete: %s", logs)
+ }
+ if err := w.agent(b0).registerState(recA.Host, routeA.DBPath, b0); err != nil {
+ t.Fatal("the installation after a refused contradictory target:", err)
+ }
+
+ // Control: the target names the validated binding; interrupted, then
+ // replayed at the next start.
+ _, before = w.inventory(recB.Host)
+ *w.interrupt = 1
+ err = w.targetStampedWrite(w.agent(b0), recB, b0.Binding)
+ *w.interrupt = -1
+ if err == nil || w.pending() != 1 {
+ t.Fatalf("same-binding target was not interrupted after its intent: %v, pending %d", err, w.pending())
+ }
+ if logs := restart("restart with a same-binding target:"); strings.Contains(logs, "obsolete pending") {
+ t.Fatalf("a same-binding intent was settled: %s", logs)
+ }
+ if _, after := w.inventory(recB.Host); w.pending() != 0 || after != before+1 {
+ t.Fatalf("same-binding target: pending %d, inventory revision %d -> %d", w.pending(), before, after)
+ }
+
+ // Legacy: an intent persisted with a contradictory target. Startup does
+ // not take its target as obsolescence evidence; the replay is refused
+ // and the intent stays pending for the ordinary recovery.
+ in, revision := w.inventory(recA.Host)
+ q := w.inventoryRequest(recA, in, revision, "legacy-"+recA.Host)
+ q.Target.DirectoryRevision = other
+ h := w.claim(recA.Host).Claim.Holder
+ installed, err := w.assembly.Guard.Root.Installation(ctx, recA.Host, hostguard.Captured{Incarnation: h.Incarnation, Stamp: h.Stamp})
+ if err != nil {
+ t.Fatal(err)
+ }
+ installed.InventoryRevision = revision + 1
+ w.plantInventoryIntent(q, installed)
+ if logs := restart("restart with a legacy contradictory intent:"); strings.Contains(logs, "obsolete pending") {
+ t.Fatalf("a contradictory target was taken as obsolescence evidence: %s", logs)
+ }
+ if w.pending() != 1 {
+ t.Fatalf("legacy contradictory intent: pending %d", w.pending())
+ }
+}
diff --git a/internal/host/rootinventory.go b/internal/host/rootinventory.go
index 6e1a56900..b94e9cb90 100644
--- a/internal/host/rootinventory.go
+++ b/internal/host/rootinventory.go
@@ -63,7 +63,10 @@ func (h ClaimRootHTTP) commitRootInventoryPending(ctx context.Context, q hostbox
}
in, t := q.Inventory, q.Target
in.Entries = append([]hostbox.StopInventoryEntry(nil), in.Entries...)
- if q.Op != "inventory-write" || !in.Complete || in.Box != actor.Box || in.Enrollment != actor.Enrollment || in.DirectoryRevision != actor.Binding || t.Host != in.Host || t.Incarnation != in.Incarnation || t.Stamp != in.InstallationStamp || t.Box != actor.Box || t.Enrollment != actor.Enrollment || t.ClaimETag == "" || q.RecordKey == "" || q.RecordETag == "" {
+ // The inventory's stamp is validated against the fresh binding; a target
+ // stamp, when the agent sends one, must name that same binding before
+ // any intent is persisted (fix round 1, finding 2).
+ if q.Op != "inventory-write" || !in.Complete || in.Box != actor.Box || in.Enrollment != actor.Enrollment || in.DirectoryRevision != actor.Binding || (t.DirectoryRevision != "" && t.DirectoryRevision != in.DirectoryRevision) || t.Host != in.Host || t.Incarnation != in.Incarnation || t.Stamp != in.InstallationStamp || t.Box != actor.Box || t.Enrollment != actor.Enrollment || t.ClaimETag == "" || q.RecordKey == "" || q.RecordETag == "" {
return out, hostbox.ErrChanged
}
observed, err := hostclaim.Read(ctx, h.Stop.Coordinator.Evidence, in.Host)
@@ -360,22 +363,14 @@ func (h ClaimRootHTTP) verifyNewInventoryIdentities(prior, next hostbox.StopInve
}
// obsoleteIntent reports whether a pending intent was stamped under a binding
-// other than the startup binding: an inventory's stamp (and its target's, when
-// it carries one) or a rebind's successor stamp. Replaying it would compare
-// the old binding with today's authority; it is settled instead (N3).
-func (h ClaimRootHTTP) obsoleteIntent(stamp string, more ...string) bool {
- if h.startupBinding == "" {
- return false
- }
- if stamp != h.startupBinding {
- return true
- }
- for _, s := range more {
- if s != "" && s != h.startupBinding {
- return true
- }
- }
- return false
+// other than the startup binding. Its stamp is validated binding evidence
+// only: an inventory's own stamp (checked against the fresh binding before
+// the intent was persisted) or a rebind's successor stamp (likewise). An
+// agent-sent target stamp is never consulted (fix round 1, finding 2).
+// Replaying an obsolete intent would compare the old binding with today's
+// authority; it is settled instead (N3).
+func (h ClaimRootHTTP) obsoleteIntent(stamp string) bool {
+ return h.startupBinding != "" && stamp != h.startupBinding
}
// settleObsoleteIntent settles an obsolete pending intent through the
@@ -468,7 +463,7 @@ func (h ClaimRootHTTP) recoverRootInventory(ctx context.Context) error {
} else if settleErr != nil {
return settleErr
}
- if h.obsoleteIntent(q.Inventory.DirectoryRevision, q.Target.DirectoryRevision) {
+ if h.obsoleteIntent(q.Inventory.DirectoryRevision) {
h.settleObsoleteIntent(ctx, q.Target.Host, raw, "inventory", q.Inventory.DirectoryRevision, h.inventoryIntentApplied(q))
continue
}
diff --git a/internal/provision/claim_empty_cohort_fix1_census_test.go b/internal/provision/claim_empty_cohort_fix1_census_test.go
index f38dd42c3..bf53cf47c 100644
--- a/internal/provision/claim_empty_cohort_fix1_census_test.go
+++ b/internal/provision/claim_empty_cohort_fix1_census_test.go
@@ -61,12 +61,15 @@ func plan14ClaimMergeMovesOfflineWriteCensusInventory() []censusEntry {
// inventory's stamp must equal it.
// - executionAuthority: the authority carries the fresh actor's binding.
// - commitRootInventoryPending: the inventory's stamp must equal the fresh
-// InventoryActor's binding.
+// InventoryActor's binding, and a target stamp, when sent, the
+// inventory's (fix round 1, finding 2).
// - recoverRootInventory: a pending intent stamped under another binding
// than the startup binding is settled through the guard's
// SettleObsoleteRootInventory (host-local guard state: the intent
// cleared, the record quarantined and marked settled), never replayed
-// (fix round 1, finding 1). It reads the inventory version only.
+// (fix round 1, finding 1). It reads the inventory version only, and
+// decides obsolescence on the inventory's validated stamp alone
+// (finding 2).
// - rebindRecoveryInventory: the successor and the predecessor inventory
// must both carry the fresh actor's binding.
//
@@ -86,8 +89,8 @@ func plan14ClaimRosterBindingWriteCensusInventory() []censusEntry {
{"internal/host/claimrecovery_remote.go", "claimCrossBoxHandover.installRecoveryRemote", "key-site", "key:RecordKey", "999a89cc8558d09465cbabb455f19a2974cef0ab92935536dcbe68c09db86b8f"},
{"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", "95491a926852d6354b12179401138d2bc907806a915e13534485768bd6e1c1fb"},
- {"internal/host/rootinventory.go", "ClaimRootHTTP.recoverRootInventory", "key-site", "key:RecordKey", "5456fde9349eefa927247b58035f256cccb5ca1d271299baa08b9bab6d5f088b"},
+ {"internal/host/rootinventory.go", "ClaimRootHTTP.commitRootInventoryPending", "key-site", "key:RecordKey", "bb679c624346c0392db6f7dcddbf75aa1d96baf93e614cc509217d2c2a69d24a"},
+ {"internal/host/rootinventory.go", "ClaimRootHTTP.recoverRootInventory", "key-site", "key:RecordKey", "61424258bbfe48b148e7b54bf0aef67f44e8015274fc6af828f225de66ba9aa9"},
{"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 aa2bd8d5e..2f322fe94 100644
--- a/internal/provision/testdata/plan14-root-reads-roster-binding.tsv
+++ b/internal/provision/testdata/plan14-root-reads-roster-binding.tsv
@@ -1,5 +1,5 @@
# 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 029d77f62565cb727abe4772283703a60e56de5d76d6d54f6b96be0a5a5722af
+@coverage internal/host 0e0c8163f603164e66ea2c06213b141b7b6db7879f1423911b11da202d1994d1
@coverage internal/hostactors 1af14a5c45dacffe3d5b1878fde611b6887b1f3fdf2604adad427c819818813b
@coverage internal/hostbox 6a698fe2c67cf9096d341b558e3f151481221f4134f578fcd2b8dbfcb07f3b50
@coverage internal/hostguard 6579d40d41a929bfcb71a09a97efb19c85e9fd2059bf3b8760a4970ebeb561fb
@@ -23,8 +23,8 @@ internal/host/claimstop.go ClaimStopCoordinator.witnessNoProcess authority C,G,J
internal/host/claimstop_writers.go ClaimStopCoordinator.WritersStopped authority C,G,J4 root-input;kept=C,G;scope=protected-decision-only;rev3=PROPOSED-roster-binding;basis=the same reads; the request must carry roster_revision, copied into the observation's fence target; no receipt comes from it file:Read@1078,file:Read@2771 cb0fbe24c32dc361c4d3661a1f99dbcdedb26b5cc771263d424407f23304dc56
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 file:Read@1429,file:Read@3469,registry:Account@4833,registry:Account@4848,registry:App@4869,registry:App@4880,registry:ClaimIncarnation@4339,registry:ClaimOwner@4389,registry:ClaimOwner@5519,registry:ClaimOwnership@4931,registry:ClaimOwnership@4953,registry:ClaimOwnership@5835,registry:ClaimOwnership@8038,registry:ClaimRowID@4553,registry:ClaimRowID@4630,registry:ClaimStamp@4367,registry:DBPath@4897,registry:DBPath@4911,registry:Host@4803,registry:Host@4815,registry:Host@8502,registry:Name@8525,whole:ClaimOwnership@4935,whole:ClaimOwnership@4963,whole:ClaimOwnership@5845,whole:ClaimOwnership@8049,whole:Route@10292,whole:Route@3661,whole:Route@4044,whole:Route@4060,whole:Route@4115,whole:Route@4766,whole:Route@4779,whole:Route@4788,whole:Route@5026,whole:Route@5258,whole:Route@6092,whole:Route@6228,whole:Route@6452,whole:Route@7894,whole:Route@9557,whole:Route@9618,whole:Timer@8510,whole:Timer@8533 95491a926852d6354b12179401138d2bc907806a915e13534485768bd6e1c1fb
-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 file:Read@1939,file:Read@911 5456fde9349eefa927247b58035f256cccb5ca1d271299baa08b9bab6d5f088b
+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/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
@@ -51,7 +51,7 @@ internal/host/claimhandover_transport.go ClaimRootHTTP.coldHandover authority C,
internal/host/claimhandover_transport.go ClaimRootHTTP.admitColdSuccessor authority C,J4 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: RequireNewWork, then the successor's box, enrollment and stamp against a fresh InventoryActor (non-empty binding); refuses without InventoryActor; runs before any successor state (N5, B1); executed by ColdHandover.Run for coldHandover's callers, their class 72681b40f684ac60e937c8c40984fe97951af92770de9a5d73c1ac5bbbab34eb
internal/hostbox/coldhandover.go ColdHandover.settleObsolete authority C rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: settles a journaled handover in phase prepared, parked or complete through the guard's SettleObsoleteColdHandover, whose record step rewrites the journal as settled (B3); ColdHandover.Recover is its only caller, and its class ecdbb6d7e71426e782a2007e730d3e06c46d3a7113290768286a78f64a1aaa70
internal/hostguard/coldhandover.go Guard.SettleObsoleteColdHandover authority C rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: under the host lock, on the guard record it already reads, requires the prior's completed fence receipt, active stamp and the matching barrier, retires the successor stamp, clears the barrier, restores the prior's completed fence to the deny slot, writes the record, then records; an already settled record only records; ColdHandover.settleObsolete is its only caller, and its class a342cd17b58ec7d4afdee1d5666b675ced000e4a3ef68bf938651e4229fa7f78
-internal/host/rootinventory.go ClaimRootHTTP.obsoleteIntent authority C,E1,J4 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: reports a stamp other than startupBinding (empty startupBinding never); no read; the class of its callers recoverRootInventory (C,E1) and RecoverPending (C,J4) 0e47d85d007b8f56b5a9f7ec87abc7b5085f0ebebb9da5310a34304dd207730e
+internal/host/rootinventory.go ClaimRootHTTP.obsoleteIntent authority C,E1,J4 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: reports a stamp other than startupBinding (empty startupBinding never); no read; the class of its callers recoverRootInventory (C,E1) and RecoverPending (C,J4); fix round 1 (finding 2): takes one stamp, validated binding evidence only (an inventory's or a successor's), so an agent-sent target stamp can never mark an intent obsolete; no read 215523d8427b282d262453a45727effa40641a697169baa577e5d30df57e4582
internal/host/rootinventory.go ClaimRootHTTP.settleObsoleteIntent authority C,E1 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: abandons an obsolete pending intent through the guard's existing AbandonRootInventory (same host lock, exact intent bytes), logged; never consults InventoryActor; recoverRootInventory is its only caller, and its class; fix round 1 (finding 1): settles through the guard's SettleObsoleteRootInventory instead of AbandonRootInventory, so the installation is quarantined and marked settled, inspectable by the migration census and still refused for execution; no read afe2fea20a0b5368d8762664bd812908f6ae16536acefc735a7c340e2fc4c5c4
internal/host/claimstop.go stopReceiptNumeral authority C,G,J4 rev3=PROPOSED-roster-binding;identity=root instance-control uid 0;basis=new: the receipt numeral from the fence target's persisted RosterRevision, zero refused; no read; the class of its callers FenceAndStop, witnessNoProcess and RecoverStopped b1776ff85789af138c7215cd3fc4beb758823fdbcd4a98d802b3de29b8490439
internal/host/claimstop.go receiptRosterRevision authority G,J4 rev3=PROPOSED-roster-binding;identity=carlos system journal-migrate offline operator uid 0;basis=new: parses a receipt's directory_revision as a canonical non-zero decimal; no read; its root caller is readMigrationStop, and its class (the agent's validateTransportStop also uses it) 40f6c90cdfdf0d03bc3f2e30d7739d9ec5001ad1c412ab2ceb8a27c9d4583009