carlos / platform Public

census: re-pin claims-on-gate-recover for fix round 4, still PROPOSED

internal/host envelope re-pinned (settleWithoutJournal has no row of its own).
Note: the round 4 section, and Ruling 6 qualified: a claims-off box that
retains a census still uses participation and receives the settlement changes.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 86d8977ee8c35b2c4889abab722f1c1047ca6406 parent b8166ac
2 files changed, +21 −2
  • docs/superpowers/notes/census-proposal-claims-on-gate-recover.md +19 −1
  • internal/provision/testdata/plan14-root-reads-claims-on-gate-recover.tsv +2 −1

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-claims-on-gate-recover.md b/docs/superpowers/notes/census-proposal-claims-on-gate-recover.md
index 4561f437b..5f73ca302 100644
--- a/docs/superpowers/notes/census-proposal-claims-on-gate-recover.md
+++ b/docs/superpowers/notes/census-proposal-claims-on-gate-recover.md
@@ -20,7 +20,11 @@ record write is added or moved.
## Ruling 6
-Claims-off and no-census boxes see no change.
+No-census boxes see no change, and claims-off boxes see none in the gate. A
+claims-off box that retains a census (claims were on and were turned off)
+still uses root participation, so it receives the recover settlement
+changes below exactly as a claims-on box does; that is the existing
+retained-census rule, not a new one.
- The gate's new window and fail-fast are keyed on CARLOS_HOST_CLAIM, read
with `hostwrite.Enabled` from the update and recover units' environment
@@ -177,6 +181,20 @@ seal stands; `internal/host`'s envelope is re-pinned again.
task is "held to" its image now says it is rechecked at observation points
and names what a recheck cannot see.
+## Fix round 4 (Astra's round 4 on 2a823aef)
+
+- **A barrier prerequisite failure is a barrier failure.** In
+ `settleWithoutJournal`, when `ParticipationRequired` itself failed (the
+ store did not open, a retained census did not read) the original census
+ refusal was returned bare, so the legacy marker's settlement logged it and
+ recover exited 0 without a barrier. It now returns `errAcquisitionBarrier`
+ with both errors kept, which `settleMarker` makes fatal in every mode; a
+ box where participation is not required still falls back as before.
+ `TestRecoverFailsALegacyMarkerWhoseBarrierPrerequisiteFails` injects the
+ failure after `BeginUpdate` has withdrawn its record.
+- **Ruling 6 wording** qualified: a claims-off box with a retained census
+ still uses participation and receives the settlement changes.
+
## The census window and the worst-case boot delay
Each call of root's kernel census runs under one deadline, 20 s from its
diff --git a/internal/provision/testdata/plan14-root-reads-claims-on-gate-recover.tsv b/internal/provision/testdata/plan14-root-reads-claims-on-gate-recover.tsv
index 74f62ac22..54bc67382 100644
--- a/internal/provision/testdata/plan14-root-reads-claims-on-gate-recover.tsv
+++ b/internal/provision/testdata/plan14-root-reads-claims-on-gate-recover.tsv
@@ -5,6 +5,7 @@
# Fix round 1 (Astra): checkGuardRecovery, checkUnarmedParticipationRecovery, generationKernel.task, generationCensusRetry, generationServiceReader, generationServiceEnv.reader and .deletedProgram re-pinned; productionGenerationKernelCensus, productionGenerationAbsence, type generationKernel and generationRetiredController re-pinned at main's class (E2); generationServiceEnv.recheck, generationExeIdentity and generationContextReader.Read new at F,J4 with the image proof they serve. Still no legacy row; the seal stands.
# Fix round 2 (Astra round 2): checkGuardRecovery, systemApplier.Run and checkUnarmedParticipationRecovery re-pinned for the post-journal deferral and the acquisition barrier; Ledger.HoldUpdate new at its siblings' class (D); the signed-image proof moves under the census deadline (readRootFloorBinary re-pinned as a no-read wrapper, readRootFloorBinaryContext at its class with p3's reads, generationContextReader.Read moved beside it); generationServiceReader, .reader and .deletedProgram bases corrected (sampled identity checks, not execution exclusion; the deadline's coverage and its gaps). internal/rootparticipation's envelope re-pinned. Still no legacy row; the seal stands.
# Fix round 3 (Astra round 3): systemApplier.Run re-pinned and settleUpdateBegun pinned as a declaration for the legacy marker's settlement through settleWithoutJournal (barrier held, barrier failure fatal); generationKernel.task, type generationKernel, generationServiceEnv.recheck and generationCensusRetry bases qualified (sampled identity checks at observation points; cooperative cancellation at checkpoints, with the uncancelled work named). Still no legacy row; the seal stands.
+# Fix round 4 (Astra round 4): settleWithoutJournal classifies a failed ParticipationRequired check as an acquisition-barrier failure (both errors kept), so the legacy marker's settlement cannot log it and exit 0; no row changes (settleWithoutJournal has no read of its own); internal/host envelope re-pinned. The seal stands.
internal/host/guardtransaction.go systemApplier.checkGuardRecovery authority D rev3=PROPOSED-claims-on-gate-recover;identity=root system update/recovery uid 0 (carlos-system-update.service, carlos-system-recover.service);basis=re-pinned at its class and task; its reads are unchanged (activation and marker records). Fix round 1: every no-journal settlement (the controllers census, the completion or withdrawal, and the census again inside EndParticipation, in the marker, no-marker and already-completed branches) goes through settleWithoutJournal, which defers only a result that is a census refusal and nothing else (onlyCensusRefusal), on a census box: Run under --recover then exits 0 with the reservation, marker and update record kept. An image that does not verify, malformed or foreign state, a live or unreadable controller and a failed durable write fail as on main; so do the journal-open branch, the apply and no-census boxes (ruling 6). An unfinished transaction's marker is removed inside the settlement, after its census. Claims-on or retained root census uses root exclusion; claims-off with no census preserves main participation and recovery behavior. TestRecoverDefersACensusRefusalWithNoJournalOpen, TestRecoverDefersACensusRefusalOnlyAtTheEndOfParticipation, TestRecoverDefersACensusRefusalOfAnUnfinishedTransaction, TestRecoverDefersACensusRefusalOfAnAlreadyCompletedTransaction, TestRecoverStillFailsSettlementErrorsThatAreNotCensusRefusals, TestRuling6NoCensusRecoverIsUnchanged. Fix round 2: once the journal is durably removed, closeGuardJournal's settlement (endGuard, clearUpdateBegun) also goes through settleWithoutJournal, forward and backward, guarded and unarmed; before it defers a transaction with no update record, settleWithoutJournal holds acquisitions refused under the transaction lock with Ledger.HoldUpdate (root's update record kept, or written under the transaction's id, with no census of its own); a barrier that cannot be written leaves the refusal fatal; an already-completed transaction with no record left replays at once with no census. TestRecoverDefersARefusalAfterTheJournalIsRemoved, TestRecoverStillFailsANonCensusErrorAfterTheJournalIsRemoved, TestGuardedRollbackCloseDefersARefusalAfterTheJournalIsRemoved, TestRecoverHoldsAcquisitionsWhenNoUpdateRecordWasBegun, TestRecoverReplaysASettledTransactionWithoutACensus, TestRecoverDoesNotDeferWithoutABarrier. file:ReadFile@433,file:ReadFile@660 98821263c0f79caf845c2627e4ee5e0535e7e83b5a6211b32d23c71837ad09e8
internal/host/systemapply.go systemApplier.Run authority D,F,J4 rev3=PROPOSED-claims-on-gate-recover;identity=root apply/recovery uid 0;basis=re-pinned at its class and task; its lock-file read is unchanged. A checkGuardRecovery error wrapping errSettlementDeferred under --recover is logged and not fatal, and the end-of-run settlement is not retried after a deferral; every other refusal returns as before. root-input;kept=D,F;scope=protected-decision-only. TestRecoverDefersACensusRefusalWithNoJournalOpen, TestApplyStillFailsACensusRefusalWithNoJournalOpen. Fix round 2: a deferral that recoverIfNeeded returns after the journal was removed is consumed the same way, with no fatal error kept and no settlement retried. TestRecoverDefersARefusalAfterTheJournalIsRemoved. Fix round 3: the end-of-run marker settlement (settleMarker, settleUpdateBegun) also goes through settleWithoutJournal, so a legacy update-begun marker with no update record and no journal defers a census refusal with the recover-legacy barrier held; a barrier that cannot be written joins the run's error in every mode; every other marker failure is logged as on main. TestRecoverHoldsAcquisitionsForALegacyMarker, TestRecoverFailsALegacyMarkerWhoseBarrierCannotBeWritten. file:OpenFile@483 7d9c6997336322ee4c4a9feacc8312c4c7b6175393a26932246a32ce77fe5c55
internal/host/systemparticipation.go systemApplier.settleUpdateBegun authority D rev3=PROPOSED-claims-on-gate-recover;identity=root apply/recovery uid 0;basis=pinned as a declaration (no read of its own) for fix round 3: the end-of-run marker settlement on a census box goes through settleWithoutJournal, returning a census refusal as errSettlementDeferred with the recover-legacy barrier held, a barrier that could not be written as errAcquisitionBarrier, and logging everything else as on main; clearUpdateBegun's reads are unchanged. TestRecoverHoldsAcquisitionsForALegacyMarker, TestRecoverFailsALegacyMarkerWhoseBarrierCannotBeWritten. b36cd2040f531d903a50300dd040efc8f2cdc1cadf00626365b539cdd4a47a3f
@@ -28,5 +29,5 @@ internal/host/rootmovesfloor_refresh.go generationContextReader.Read authority F
internal/host/rootmovesfloor_refresh.go readRootFloorBinary authority F,J4 rev3=PROPOSED-claims-on-gate-recover;identity=root adopt refresh, root system update/recovery and root guard floor readers, uid 0;basis=re-pinned at its class and task, no read of its own since fix round 2: readRootFloorBinaryContext under context.Background(), for the callers that have no deadline; behaviour unchanged. 8ac4df055cc5f91436f65929bea964152009d120d98e6ee5069a63ed406242e6
internal/host/rootmovesfloor_refresh.go readRootFloorBinaryContext authority F,J4 rev3=PROPOSED-claims-on-gate-recover;identity=root adopt refresh, root system update/recovery, root guard floor readers and the root generation kernel reader, uid 0;basis=readRootFloorBinary's body at its class (p3: verifies checked executable and signed system manifest; reads signed moves and seeds protocol numbers rather than version sidecar), now under a context: the image hash stops between reads (generationContextReader) and the identity-cache scan stops before each identity (rootFloorSignedIdentity) once the context ends; the reads are p3's. Fix round 2, for the census deadline. TestSignedBinaryProofStopsWhenTheCensusDeadlineEnds (the two helpers), TestRecoverCensusDeadlineReachesTheSignedBinaryProof (the lookup hands the deadline to the proof; the production plumbing from this function into the helpers is not witnessed by a non-root test). file:Open@660,file:Read@925,file:Stat@304 32e5002e5a6cc3ab6fa9b11972b2b24a2cd15c632ec7726d13f1f9537494dc22
internal/rootparticipation/ledger.go Ledger.HoldUpdate authority D rev3=PROPOSED-claims-on-gate-recover;identity=root system recover uid 0 (settleWithoutJournal, under the transaction lock);basis=new unit at its siblings' class (Ledger.BeginUpdateWith, Ledger.EndUpdateWith, D): the recovery acquisition barrier. Under the same-ledger transaction exclusion it reads the recovery census and update.json and, when no acquisition is pending and no update record exists, writes root's update record under the deferring transaction's id, so Acquire stays refused while recover defers a census refusal; it runs no census of its own (EndUpdateWith, with its census, still removes the record). Fix round 2 (Astra finding 1b). TestHoldUpdateRefusesAcquisitionsWithoutACensus, TestHoldUpdateLeavesAPendingAcquisitionCensusAlone, TestRecoverHoldsAcquisitionsWhenNoUpdateRecordWasBegun, TestRecoverDoesNotDeferWithoutABarrier. file:Read@319 e5cfaa26ccf5241507b41920d64e1ccf7db2e6435d071a9226246fac1a346645
-@coverage internal/host 6743a93b1794568a1cadd040e0eec1fab76649bd21f0b2a957c40aa76215aa7d
+@coverage internal/host d92e492a30973333e8c6df8a939a347dbb96a30a0e404327737f502232376268
@coverage internal/rootparticipation 6c6d03dec45fe2fca86efc0fcb7615a4ab531c1da0a3a10adab36932d9d81a5a