| index ea55dcc77..355fb6cec 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-durability-3a-escrow.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-durability-3a-escrow.tsv |
| @@ -32,7 +32,7 @@ |
| @legacy ea89afa7fe34b39ecf49c55c51f3fea23ba6fd785e1c71880d8d072237ee777e internal/activator/escrow.go ExecBackend.openEscrowLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: the host's publisher, from its ledger (readEscrowLedger: readCappedFile, O_NOFOLLOW, 32 MiB, under <data>/.escrow, the agent's own directory) with no request, else hostfiles.Open (one GET); the agent as carlos (carlos-edge.service), no root caller Fix round 1: marks the host checked when it reads the bucket; the same reads. Fix round 2: the ledger is read through ledgerFor (none while this process marks it untrusted); the same reads. Fix round 3: a bucket read is kept as what this process knows the bucket holds (noteKnown), replacing the checked flag; the same reads. Fix round 4: only an open from the bucket feeds what this process knows (learnBucket); an open from the ledger feeds nothing; a failed open or an unparseable manifest wraps errEscrowUnreadable; the same reads. Durability 3a Task 5: after an open from the bucket and learnBucket, noteRawSecrets(rt.Host, m). Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host site is that call's argument. file:Open@737,registry:Host@1040,registry:Host@528,registry:Host@584,whole:Route@415 a1e68a862a55c28dc76702f4558b480c1c5cb3c598f535470fde1f92c90be179 |
| @legacy c7f95f454a974537377434c9993beebc3b0761e814ae369a8e1e29a5c3fc5474 internal/activator/escrow.go ExecBackend.publishEscrow legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: publishEscrowAt on pathsFor whole:Route@149,whole:Route@164 e61757f12a116ef8bf819dcad7136f810c51dfa9f7104ceb7f810efece48cc29 |
| @legacy f6e622ed3b9e219a616ce6bf2f951b3e50c7897bd6e8a7f59ddb335fcbf8e3db internal/activator/escrow.go ExecBackend.publishEscrowAt legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: escrowReady and the layout checked, then publishEscrowLocked under the host's lock Fix round 1: refuses while the conflict marker exists or while this box does not hold the host's lease (P1-2), before anything is read. registry:Host@223,registry:Host@269,registry:Host@340,registry:Host@376,registry:Host@435,registry:Host@556,registry:Host@653,whole:Route@157,whole:Route@733 5e2b655605216fcaa50ddfd0511ca4ce913a8716582932a13debf22c4876f117 |
| -@legacy 80ebc4b3a30231d087c455e558c8098945174635b60b3feabd9942803ed9447d internal/activator/escrow.go ExecBackend.publishEscrowLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: reads <host>.env (unless the launch's capture is handed in), <host>/instance.key and <host>/report.token with readStamped beneath the row's data directory, seals what changed (StageSealed), DropRawSecrets of the constant raw names, commits, and writes the ledger (writeEscrowLedger: EnsureDirBeneath .escrow 0700, a 0600 temp, rename, fsync); an absent file stages nothing; a refused file publishes nothing for it; the agent as carlos (carlos-edge.service), no root caller Fix round 1: before staging, mintedConflict on the baseline it would replace, so a secret this box minted is never published over another escrowed value (P1-1). Fix round 2 (P1-1, P1-2, stale ledger): before staging, the write-once check (escrowDivergence, keyed digests only, no request): a staged instance.key or report.token whose escrowed item has another digest refuses the publish (escrowConflictFound); then, under the operation lock just before the commit, the lease again (holdsLease): lost, nothing is committed and the staged state is dropped; after a commit the ledger through keepLedger (written, else the stale one removed with RemoveBeneath under <data>/.escrow, else marked untrusted in memory). Fix round 3: escrowDivergence also holds the env's minted variables write-once (one GET of the sealed env, only when the env changed); the committed manifest is kept as what this process knows (noteKnown). Fix round 4: only a commit that wrote (the baseline's ETag moved) feeds what this process knows (learnBucket) and writes the ledger; a no-op commit on a ledger-opened publisher feeds nothing; the same reads and writes. Durability 3a Task 5: on the held baseline before staging and DropRawSecrets, noteRawSecrets(rt.Host, m). Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host site is that call's argument. registry:Host@2078,registry:Host@2342,registry:Host@2979,registry:Host@4079,registry:Host@4109,registry:Host@5151,registry:Host@574,whole:Route@2269,whole:Route@3036,whole:Route@3155 4a9dc6fc95d3e03e9d26de54c0bb05ee264775e7b113f3e1b6394da86afb82ad |
| +@legacy 4a141c323197e6de57e0f1929adfefd0ae05f117bf6f71522d9a4030c2ce4165 internal/activator/escrow.go ExecBackend.publishEscrowLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: reads <host>.env (unless the launch's capture is handed in), <host>/instance.key and <host>/report.token with readStamped beneath the row's data directory, seals what changed (StageSealed), DropRawSecrets of the constant raw names, commits, and writes the ledger (writeEscrowLedger: EnsureDirBeneath .escrow 0700, a 0600 temp, rename, fsync); an absent file stages nothing; a refused file publishes nothing for it; the agent as carlos (carlos-edge.service), no root caller Fix round 1: before staging, mintedConflict on the baseline it would replace, so a secret this box minted is never published over another escrowed value (P1-1). Fix round 2 (P1-1, P1-2, stale ledger): before staging, the write-once check (escrowDivergence, keyed digests only, no request): a staged instance.key or report.token whose escrowed item has another digest refuses the publish (escrowConflictFound); then, under the operation lock just before the commit, the lease again (holdsLease): lost, nothing is committed and the staged state is dropped; after a commit the ledger through keepLedger (written, else the stale one removed with RemoveBeneath under <data>/.escrow, else marked untrusted in memory). Fix round 3: escrowDivergence also holds the env's minted variables write-once (one GET of the sealed env, only when the env changed); the committed manifest is kept as what this process knows (noteKnown). Fix round 4: only a commit that wrote (the baseline's ETag moved) feeds what this process knows (learnBucket) and writes the ledger; a no-op commit on a ledger-opened publisher feeds nothing; the same reads and writes. Durability 3a Task 5: on the held baseline before staging and DropRawSecrets, noteRawSecrets(rt.Host, m). Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host site is that call's argument. Branch fix R1 P1-1: every failed manifest commit drops the publisher, stamps, preparation read and bucket knowledge; the next operation opens the bucket and repeats divergence checks before staging. No new root input or read site. registry:Host@2078,registry:Host@2342,registry:Host@2979,registry:Host@4079,registry:Host@4109,registry:Host@5119,registry:Host@574,whole:Route@2269,whole:Route@3036,whole:Route@3155 fb5b6aa589c2302f5a0ef7387f1d710d75653fad44c14db4db8d6dcdc5bc0f5e |
| @legacy b053870b57f516eddc82775c8a662b701c49173c2171cad2ef2d27cb7cde688a internal/activator/escrow.go ExecBackend.restoreEscrowIfMissing legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: checks each escrowed file with instancefs.OpenBeneathOrAbsent beneath the row's data directory; when one is absent, hostfiles.Open of the host's manifest, ReadSealed of each missing item, and writeIfAbsent (instancefs.WriteAtomic of a temp, then RenameBetweenNoReplace, so a present file is never replaced; EnsureDirBeneath for the files directory, 0700); on a box that is not ready it refuses unless the ledger shows the host escrowed and the env file is here; the agent as carlos (carlos-edge.service), no root caller Fix round 0 (controller readiness ruling): with no files store it does nothing (logged once); with no sealing key it restores nothing: a ledger here and an env file here go on, otherwise keylessEscrowed refuses when the bucket holds an escrow and goes on as before 3a when it holds none. Fix round 1: the conflict marker first, then the mode (P2-5): no files store, nothing; no key, the preparation's keyless read before any file check. With a key, each trio file is checked with OpenBeneathOrAbsent (a link or FIFO is not missing); the bucket is read (bucketManifest, the preparation's one GET) only for a missing env file, or a missing trio file the ledger says was escrowed, or with no ledger once per agent start (P2-6); the same writes. Fix round 2: the ledger is read through ledgerFor, and while it is untrusted (its write and the stale ledger's removal both failed) a missing trio file always reads the bucket; the same reads and writes. Fix round 3: the ledger no longer decides a restore: a missing trio file reads the bucket unless this process itself saw the bucket's manifest for the host (its read or its commit, escrowState.known) without the item; the same reads and writes otherwise. registry:Host@1027,registry:Host@1145,registry:Host@138,registry:Host@1853,registry:Host@2721,registry:Host@571,registry:Host@652,registry:Host@698,registry:Host@801,whole:Route@1654,whole:Route@1750,whole:Route@200,whole:Route@241,whole:Route@314,whole:Route@360,whole:Route@477 335cb066c95f026fba5e99df8f86252ee6a50b48f799d7b1042460c2ec188642 |
| @legacy 7d7ae676fe3d33d027489b397a804eaa184295667ad039688aed3757f662ab9d internal/activator/escrow.go ExecBackend.sweepPublish legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: publishEscrowAt, and on a supersession escrowReread and one more publish; a second one is the alert registry:Host@404,whole:Route@142,whole:Route@232,whole:Route@312 71bfee868a2ca8e3371cfc3c628b6ab5d8730ca48fcd099e7932049fe1e12a69 |
| @legacy c89cfff20022faa5af3e07251a620b1b63e0b42f350483a6efec4162efdd1cca internal/activator/escrow.go Service.EscrowSweep legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: the backend's EscrowSweep, nothing for a backend without one whole:Route@184 8ed0ea62a9807b7c43b3576d01f096bfe366c21bcc3be040831a3f1b80d1b123 |
| @@ -99,7 +99,7 @@ internal/activator/escrow.go ExecBackend.keylessEscrowed legacy accepted-legacy |
| internal/activator/escrow.go ExecBackend.openEscrowLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: the host's publisher, from its ledger (readEscrowLedger: readCappedFile, O_NOFOLLOW, 32 MiB, under <data>/.escrow, the agent's own directory) with no request, else hostfiles.Open (one GET); the agent as carlos (carlos-edge.service), no root caller Fix round 1: marks the host checked when it reads the bucket; the same reads. Fix round 2: the ledger is read through ledgerFor (none while this process marks it untrusted); the same reads. Fix round 3: a bucket read is kept as what this process knows the bucket holds (noteKnown), replacing the checked flag; the same reads. Fix round 4: only an open from the bucket feeds what this process knows (learnBucket); an open from the ledger feeds nothing; a failed open or an unparseable manifest wraps errEscrowUnreadable; the same reads. Durability 3a Task 5: after an open from the bucket and learnBucket, noteRawSecrets(rt.Host, m). Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host site is that call's argument. file:Open@737,registry:Host@1040,registry:Host@528,registry:Host@584,whole:Route@415 a1e68a862a55c28dc76702f4558b480c1c5cb3c598f535470fde1f92c90be179 |
| internal/activator/escrow.go ExecBackend.publishEscrow legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: publishEscrowAt on pathsFor whole:Route@149,whole:Route@164 e61757f12a116ef8bf819dcad7136f810c51dfa9f7104ceb7f810efece48cc29 |
| internal/activator/escrow.go ExecBackend.publishEscrowAt legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: escrowReady and the layout checked, then publishEscrowLocked under the host's lock Fix round 1: refuses while the conflict marker exists or while this box does not hold the host's lease (P1-2), before anything is read. registry:Host@223,registry:Host@269,registry:Host@340,registry:Host@376,registry:Host@435,registry:Host@556,registry:Host@653,whole:Route@157,whole:Route@733 5e2b655605216fcaa50ddfd0511ca4ce913a8716582932a13debf22c4876f117 |
| -internal/activator/escrow.go ExecBackend.publishEscrowLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: reads <host>.env (unless the launch's capture is handed in), <host>/instance.key and <host>/report.token with readStamped beneath the row's data directory, seals what changed (StageSealed), DropRawSecrets of the constant raw names, commits, and writes the ledger (writeEscrowLedger: EnsureDirBeneath .escrow 0700, a 0600 temp, rename, fsync); an absent file stages nothing; a refused file publishes nothing for it; the agent as carlos (carlos-edge.service), no root caller Fix round 1: before staging, mintedConflict on the baseline it would replace, so a secret this box minted is never published over another escrowed value (P1-1). Fix round 2 (P1-1, P1-2, stale ledger): before staging, the write-once check (escrowDivergence, keyed digests only, no request): a staged instance.key or report.token whose escrowed item has another digest refuses the publish (escrowConflictFound); then, under the operation lock just before the commit, the lease again (holdsLease): lost, nothing is committed and the staged state is dropped; after a commit the ledger through keepLedger (written, else the stale one removed with RemoveBeneath under <data>/.escrow, else marked untrusted in memory). Fix round 3: escrowDivergence also holds the env's minted variables write-once (one GET of the sealed env, only when the env changed); the committed manifest is kept as what this process knows (noteKnown). Fix round 4: only a commit that wrote (the baseline's ETag moved) feeds what this process knows (learnBucket) and writes the ledger; a no-op commit on a ledger-opened publisher feeds nothing; the same reads and writes. Durability 3a Task 5: on the held baseline before staging and DropRawSecrets, noteRawSecrets(rt.Host, m). Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host site is that call's argument. registry:Host@2078,registry:Host@2342,registry:Host@2979,registry:Host@4079,registry:Host@4109,registry:Host@5151,registry:Host@574,whole:Route@2269,whole:Route@3036,whole:Route@3155 4a9dc6fc95d3e03e9d26de54c0bb05ee264775e7b113f3e1b6394da86afb82ad |
| +internal/activator/escrow.go ExecBackend.publishEscrowLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: reads <host>.env (unless the launch's capture is handed in), <host>/instance.key and <host>/report.token with readStamped beneath the row's data directory, seals what changed (StageSealed), DropRawSecrets of the constant raw names, commits, and writes the ledger (writeEscrowLedger: EnsureDirBeneath .escrow 0700, a 0600 temp, rename, fsync); an absent file stages nothing; a refused file publishes nothing for it; the agent as carlos (carlos-edge.service), no root caller Fix round 1: before staging, mintedConflict on the baseline it would replace, so a secret this box minted is never published over another escrowed value (P1-1). Fix round 2 (P1-1, P1-2, stale ledger): before staging, the write-once check (escrowDivergence, keyed digests only, no request): a staged instance.key or report.token whose escrowed item has another digest refuses the publish (escrowConflictFound); then, under the operation lock just before the commit, the lease again (holdsLease): lost, nothing is committed and the staged state is dropped; after a commit the ledger through keepLedger (written, else the stale one removed with RemoveBeneath under <data>/.escrow, else marked untrusted in memory). Fix round 3: escrowDivergence also holds the env's minted variables write-once (one GET of the sealed env, only when the env changed); the committed manifest is kept as what this process knows (noteKnown). Fix round 4: only a commit that wrote (the baseline's ETag moved) feeds what this process knows (learnBucket) and writes the ledger; a no-op commit on a ledger-opened publisher feeds nothing; the same reads and writes. Durability 3a Task 5: on the held baseline before staging and DropRawSecrets, noteRawSecrets(rt.Host, m). Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. The +registry:Host site is that call's argument. Branch fix R1 P1-1: every failed manifest commit drops the publisher, stamps, preparation read and bucket knowledge; the next operation opens the bucket and repeats divergence checks before staging. No new root input or read site. registry:Host@2078,registry:Host@2342,registry:Host@2979,registry:Host@4079,registry:Host@4109,registry:Host@5119,registry:Host@574,whole:Route@2269,whole:Route@3036,whole:Route@3155 fb5b6aa589c2302f5a0ef7387f1d710d75653fad44c14db4db8d6dcdc5bc0f5e |
| internal/activator/escrow.go ExecBackend.restoreEscrowIfMissing legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: checks each escrowed file with instancefs.OpenBeneathOrAbsent beneath the row's data directory; when one is absent, hostfiles.Open of the host's manifest, ReadSealed of each missing item, and writeIfAbsent (instancefs.WriteAtomic of a temp, then RenameBetweenNoReplace, so a present file is never replaced; EnsureDirBeneath for the files directory, 0700); on a box that is not ready it refuses unless the ledger shows the host escrowed and the env file is here; the agent as carlos (carlos-edge.service), no root caller Fix round 0 (controller readiness ruling): with no files store it does nothing (logged once); with no sealing key it restores nothing: a ledger here and an env file here go on, otherwise keylessEscrowed refuses when the bucket holds an escrow and goes on as before 3a when it holds none. Fix round 1: the conflict marker first, then the mode (P2-5): no files store, nothing; no key, the preparation's keyless read before any file check. With a key, each trio file is checked with OpenBeneathOrAbsent (a link or FIFO is not missing); the bucket is read (bucketManifest, the preparation's one GET) only for a missing env file, or a missing trio file the ledger says was escrowed, or with no ledger once per agent start (P2-6); the same writes. Fix round 2: the ledger is read through ledgerFor, and while it is untrusted (its write and the stale ledger's removal both failed) a missing trio file always reads the bucket; the same reads and writes. Fix round 3: the ledger no longer decides a restore: a missing trio file reads the bucket unless this process itself saw the bucket's manifest for the host (its read or its commit, escrowState.known) without the item; the same reads and writes otherwise. registry:Host@1027,registry:Host@1145,registry:Host@138,registry:Host@1853,registry:Host@2721,registry:Host@571,registry:Host@652,registry:Host@698,registry:Host@801,whole:Route@1654,whole:Route@1750,whole:Route@200,whole:Route@241,whole:Route@314,whole:Route@360,whole:Route@477 335cb066c95f026fba5e99df8f86252ee6a50b48f799d7b1042460c2ec188642 |
| internal/activator/escrow.go ExecBackend.sweepPublish legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: publishEscrowAt, and on a supersession escrowReread and one more publish; a second one is the alert registry:Host@404,whole:Route@142,whole:Route@232,whole:Route@312 71bfee868a2ca8e3371cfc3c628b6ab5d8730ca48fcd099e7932049fe1e12a69 |
| internal/activator/escrow.go Service.EscrowSweep legacy accepted-legacy accepted-legacy;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 4: new: the backend's EscrowSweep, nothing for a backend without one whole:Route@184 8ed0ea62a9807b7c43b3576d01f096bfe366c21bcc3be040831a3f1b80d1b123 |
| @@ -143,7 +143,7 @@ internal/activator/paths.go ExecBackend.pathsFor legacy accepted-legacy accepted |
| @removed internal/host/movesfiles.go readClaimEnvFile H3 census-ruling-durability-3a-escrow;absent;basis=deleted: declaration and sites absent from the tree |
| @remove internal/host/schedule_wiring.go scheduleHostHA |
| @removed internal/host/schedule_wiring.go scheduleHostHA H3 census-ruling-durability-3a-escrow;absent;basis=durability 3a Task 4: renamed to scheduleHostEscrowed (on this card), asking SecretsEscrowed instead of IsHA |
| -@coverage internal/activator 0e6b2ebd7d38fd1b015a34b3b88d291271a70cb48258b67ef544a05fc788114e |
| +@coverage internal/activator 095e01249c36501ed819dcbb162624ab9dd1495bc170467d1fedb9ef46fecec5 |
| @coverage internal/host 3c8a9faa2e6abdc098bdb31624032e8b44da38e4e08b1e099c3bc969404e36aa |
| @coverage internal/hostfiles d79efb83d55025d18980240619281b671b8b928d72461aaefda686fbfa3ae68c |
| @coverage internal/layout f845fa728b0935279454d8b01023c5d6dae1c985061a41229cf0686e829f5c12 |