Durability 3a: sealed escrow for instance secrets, no raw writes (#477)
No release from 3a on writes <host>.env, instance.key or report.token to the bucket unsealed, born-HA hosts included. One classifier (internal/layout/pubclass) decides what a publication may carry and hands out the only value that can stage a sealed item; a go/ast guard holds every staging call and every files-manifest write to it. Sealed items are appconfig v2 envelopes bound to account and app, sealed to the box's own CARLOS_SECRETS_KEY, with a keyed digest. Every activator host gets an escrow at <hibernate prefix>/files/0/, published from the launch's one capture of the env and by a 30 s sweep; a box that lost an env restores the sealed copy instead of minting. Minted values and the trio are write-once against the escrow through one gate for HA and non-HA (a divergence refuses, alerts and leaves <data>/.escrow/<host>.conflict); a box key changed outside the console fails closed. After an uncertain commit the publisher must re-read the manifest. Parked claim, moves and relocation publishers refuse raw-secret baselines and pins. Instance create, lifetime recovery and fleet key replacement share one account lock; replacement is refused while the fleet has instances, trashed apps included. Rulings: Paul 2026-10-31 (rollback as today, the step 7 copier refuses raw items; one fleet-key lock), Paul 2026-11-01 (hostname reuse left to #199, binding cut; refuse raw baselines, no 4th round), controller 2026-11-01 (key change fails closed). Spec rev 4.3; copy DUR3A-C01..C02 approved by delegation (Luna). Reviews: plan Astra R1-R3; per-task Astra (3-5) and Opus (6-7); whole-branch Astra R1-R3, R3's one P1 fixed and checked by Opus (closed). Census census-ruling-durability-3a-escrow approved by Astra on #280. Follow-ups in discussion 499. Historical raw objects stay until 3b's migration, so #477 stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from durability-3a-escrow into main.
docs/site/cli.md+2 −0docs/superpowers/notes/census-durability-3a-escrow-claims.md+97 −0docs/superpowers/notes/census-proposal-durability-3a-escrow.md+127 −0docs/superpowers/plans/2026-10-30-durability-step3-escrow-fence-restore.md+1 −1docs/superpowers/plans/LUNA-COPY-BRIEF-DURABILITY-3A.md+75 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R2.md+119 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R3.md+133 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch.md+100 −0docs/superpowers/specs/2026-10-23-durability-design.md+23 −2internal/activator/admintoken.go+5 −4internal/activator/backend_exec.go+51 −0internal/activator/claim_snapshot.go+1 −1internal/activator/escrow.go+1,634 −0internal/activator/escrow_branchfix_test.go+110 −0internal/activator/escrow_hostname_reuse_test.go+58 −0internal/activator/escrow_known_guard_test.go+263 −0internal/activator/escrow_linux_test.go+138 −0internal/activator/escrow_stamp_linux.go+18 −0internal/activator/escrow_stamp_other.go+12 −0internal/activator/escrow_test.go+1,642 −0internal/activator/haescrow_branchfix_test.go+339 −0internal/activator/hafiles.go+257 −66internal/activator/hafiles_test.go+177 −22internal/activator/harelease_test.go+14 −6internal/activator/hasecrets.go+126 −80internal/activator/hasecrets_test.go+66 −12internal/activator/hawake.go+85 −7internal/activator/hawake_test.go+285 −3internal/activator/instancekey.go+13 −9internal/activator/paths.go+6 −0internal/activator/rawsecret_test.go+295 −0internal/activator/rootfs_deploy_test.go+8 −1internal/activator/rootfs_test.go+4 −1internal/activator/seedplace.go+3 −1internal/console/apiinstances.go+4 −3internal/console/fleetsecrets_race_test.go+207 −0internal/console/fleetsecretskey.go+65 −3internal/console/fleetsecretskey_test.go+356 −0internal/console/lifetimes_create_test.go+14 −21internal/console/lifetimes_recovery.go+4 −0internal/console/recordcreators_guard_test.go+157 −0internal/console/sealkey_guard_test.go+4 −0internal/console/store.go+19 −0internal/host/agent.go+48 −0internal/host/buildstate_carry_test.go+1 −0internal/host/buildstate_moves_test.go+7 −1internal/host/claimfiles_test.go+0 −1internal/host/claimfilesseed_assembly_linux_test.go+0 −3internal/host/claimfilesseed_integration_linux_test.go+0 −3internal/host/claimfilesseed_select_linux_test.go+0 −3internal/host/claimfilesseed_stage.go+13 −2internal/host/claimfilesseed_stage_linux_test.go+3 −3internal/host/escrow_loop.go+52 −0internal/host/escrow_publication_race_linux_test.go+100 −0internal/host/hawake_wiring_test.go+26 −2internal/host/movesbuildstatepark_test.go+3 −1internal/host/movescarries_test.go+8 −6internal/host/movesclose_order_test.go+4 −0internal/host/movesenvpin_lifetime_test.go+4 −0internal/host/movesenvpin_test.go+7 −0internal/host/movesenvskew_test.go+2 −0internal/host/movesevents_test.go+2 −0internal/host/movesfiles.go+108 −74internal/host/movesfiles_test.go+102 −162internal/host/movesfilescap_test.go+0 −2internal/host/movesfileslive_test.go+7 −4internal/host/movesfinal_test.go+20 −1internal/host/movesheldclaim_test.go+12 −1internal/host/moveshome_fixture_test.go+12 −0internal/host/moveshome_target_test.go+8 −0internal/host/moveshome_test.go+1 −0internal/host/movesinstall_test.go+12 −11internal/host/movesland_commit_test.go+9 −0internal/host/movesland_finalfix_test.go+15 −9internal/host/movesland_probe_test.go+11 −0internal/host/movesland_test.go+32 −3internal/host/movesloss_test.go+23 −0internal/host/movespaging_test.go+27 −0internal/host/movesparks_test.go+6 −0internal/host/movespass_lost_test.go+3 −0internal/host/movesphase1_harness_test.go+13 −2internal/host/movesprobeowners_committed_test.go+11 −0internal/host/movesprobeowners_fix1_test.go+9 −0internal/host/movesprobeowners_test.go+8 −0internal/host/movesrecover_test.go+15 −0internal/host/movesrecoveryowners_test.go+11 −0internal/host/movesretire_byop_test.go+1 −0internal/host/movesretry_test.go+7 −0internal/host/movesrevert_test.go+6 −0internal/host/movesrollback_finalfix_test.go+9 −2internal/host/movesrollback_test.go+20 −0internal/host/movesrollback_witness_test.go+2 −0internal/host/movessources_test.go+6 −0internal/host/movesstuckpage_test.go+4 −0internal/host/moveswakesource_linux_test.go+6 −0internal/host/parkedrefusals_linux_test.go+245 −0internal/host/parkedsecretflow_test.go+33 −0internal/host/plan10_j2_adapter_test.go+2 −0internal/host/plan13_amendments_test.go+1 −0internal/host/plan13_fix1_test.go+1 −0internal/host/rawbaseline_linux_test.go+176 −0internal/host/rawsecretpage_test.go+59 −0internal/host/relocationbuild_test.go+7 −1internal/host/relocationflush.go+47 −32internal/host/relocationflush_adoption_test.go+2 −3internal/host/relocationflush_saferead_linux_test.go+38 −12internal/host/relocationflush_wake_linux_test.go+9 −29internal/host/relocationprobefiles_linux_test.go+44 −96internal/host/schedule_wiring.go+13 −11internal/host/schedule_wiring_test.go+103 −0internal/hostfiles/contract.go+8 −3internal/hostfiles/hostfiles_test.go+84 −7internal/hostfiles/manifest.go+7 −0internal/hostfiles/origins_test.go+10 −10internal/hostfiles/platform.go+3 −0internal/hostfiles/prepared.go+5 −2internal/hostfiles/prepared_test.go+5 −5internal/hostfiles/publisher.go+72 −35internal/hostfiles/publisher_refresh_test.go+99 −0internal/hostfiles/rawbaseline.go+65 −0internal/hostfiles/rawbaseline_test.go+100 −0internal/hostfiles/rawsecrets.go+35 −0internal/hostfiles/rawsecrets_test.go+104 −0internal/hostfiles/refuse.go+95 −0internal/hostfiles/refuse_other.go+16 −0internal/hostfiles/refuse_test.go+206 −0internal/hostfiles/restore.go+41 −5internal/hostfiles/sealed.go+263 −0internal/hostfiles/sealed_test.go+474 −0internal/hostfiles/seed.go+6 −0internal/hostrelocate/pin.go+6 −0internal/hostrelocate/pin_envkey_test.go+2 −0internal/hostrelocate/pin_test.go+8 −0internal/hostrelocate/pin_versioned_test.go+1 −0internal/hostrelocate/rawbaseline_test.go+132 −0internal/layout/extras.go+5 −36internal/layout/extras_test.go+3 −25internal/layout/hostsused.go+2 −1internal/layout/inventory.go+62 −0internal/layout/inventory_test.go+90 −0internal/layout/pass_linux_test.go+5 −4internal/layout/plan.go+27 −109internal/layout/pubclass/names.go+140 −0internal/layout/pubclass/pubclass.go+290 −0internal/layout/pubclass/pubclass_test.go+246 −0internal/layout/pubclass/publication_guard_test.go+1,132 −0internal/layout/pubclass/testdata/publication_guard/baseline.go+21 −0internal/layout/pubclass/testdata/publication_guard/clean.go+145 −0internal/layout/pubclass/testdata/publication_guard/embedding.go+18 −0internal/layout/pubclass/testdata/publication_guard/iface.go+21 −0internal/layout/pubclass/testdata/publication_guard/ignored.go+20 −0internal/layout/pubclass/testdata/publication_guard/manifestwrite.go+89 −0internal/layout/pubclass/testdata/publication_guard/mixedalias.go+40 −0internal/layout/pubclass/testdata/publication_guard/nilvar.go+34 −0internal/layout/pubclass/testdata/publication_guard/preflight.go+19 −0internal/layout/pubclass/testdata/publication_guard/prepared.go+17 −0internal/layout/pubclass/testdata/publication_guard/reassign.go+48 −0internal/layout/pubclass/testdata/publication_guard/refusalwrites.go+41 −0internal/layout/pubclass/testdata/publication_guard/unclassified.go+57 −0internal/layout/pubclass/testdata/publication_guard/unmapped.go+18 −0internal/layout/pubclass/testdata/publication_guard/wrapper.go+11 −0internal/layout/pubclass_guard_test.go+47 −0internal/provision/durability_3a_branchfix2b_census_test.go+19 −0internal/provision/durability_3a_branchfix3_census_test.go+25 −0internal/provision/durability_3a_branchfix3b_census_test.go+25 −0internal/provision/durability_3a_branchfix_census_test.go+27 −0internal/provision/durability_3a_escrow_census_test.go+74 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-durability-3a-escrow.tsv+160 −0
CI passed — run details
docs/site/cli.mdLoading diff…
docs/superpowers/notes/census-durability-3a-escrow-claims.mdLoading diff…
docs/superpowers/notes/census-proposal-durability-3a-escrow.mdLoading diff…
docs/superpowers/plans/2026-10-30-durability-step3-escrow-fence-restore.mdLoading diff…
docs/superpowers/plans/LUNA-COPY-BRIEF-DURABILITY-3A.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R2.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch-R3.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-durability-3a-branch.mdLoading diff…
docs/superpowers/specs/2026-10-23-durability-design.mdLoading diff…
internal/activator/admintoken.goLoading diff…
internal/activator/backend_exec.goLoading diff…
internal/activator/claim_snapshot.goLoading diff…
internal/activator/escrow.goLoading diff…
internal/activator/escrow_branchfix_test.goLoading diff…
internal/activator/escrow_hostname_reuse_test.goLoading diff…
internal/activator/escrow_known_guard_test.goLoading diff…
internal/activator/escrow_linux_test.goLoading diff…
internal/activator/escrow_stamp_linux.goLoading diff…
internal/activator/escrow_stamp_other.goLoading diff…
internal/activator/escrow_test.goLoading diff…
internal/activator/haescrow_branchfix_test.goLoading diff…
internal/activator/hafiles.goLoading diff…
internal/activator/hafiles_test.goLoading diff…
internal/activator/harelease_test.goLoading diff…
internal/activator/hasecrets.goLoading diff…
internal/activator/hasecrets_test.goLoading diff…
internal/activator/hawake.goLoading diff…
internal/activator/hawake_test.goLoading diff…
internal/activator/instancekey.goLoading diff…
internal/activator/paths.goLoading diff…
internal/activator/rawsecret_test.goLoading diff…
internal/activator/rootfs_deploy_test.goLoading diff…
internal/activator/rootfs_test.goLoading diff…
internal/activator/seedplace.goLoading diff…
internal/console/apiinstances.goLoading diff…
internal/console/fleetsecrets_race_test.goLoading diff…
internal/console/fleetsecretskey.goLoading diff…
internal/console/fleetsecretskey_test.goLoading diff…
internal/console/lifetimes_create_test.goLoading diff…
internal/console/lifetimes_recovery.goLoading diff…
internal/console/recordcreators_guard_test.goLoading diff…
internal/console/sealkey_guard_test.goLoading diff…
internal/console/store.goLoading diff…
internal/host/agent.goLoading diff…
internal/host/buildstate_carry_test.goLoading diff…
internal/host/buildstate_moves_test.goLoading diff…
internal/host/claimfiles_test.goLoading diff…
internal/host/claimfilesseed_assembly_linux_test.goLoading diff…
internal/host/claimfilesseed_integration_linux_test.goLoading diff…
internal/host/claimfilesseed_select_linux_test.goLoading diff…
internal/host/claimfilesseed_stage.goLoading diff…
internal/host/claimfilesseed_stage_linux_test.goLoading diff…
internal/host/escrow_loop.goLoading diff…
internal/host/escrow_publication_race_linux_test.goLoading diff…
internal/host/hawake_wiring_test.goLoading diff…
internal/host/movesbuildstatepark_test.goLoading diff…
internal/host/movescarries_test.goLoading diff…
internal/host/movesclose_order_test.goLoading diff…
internal/host/movesenvpin_lifetime_test.goLoading diff…
internal/host/movesenvpin_test.goLoading diff…
internal/host/movesenvskew_test.goLoading diff…
internal/host/movesevents_test.goLoading diff…
internal/host/movesfiles.goLoading diff…
internal/host/movesfiles_test.goLoading diff…
internal/host/movesfilescap_test.goLoading diff…
internal/host/movesfileslive_test.goLoading diff…
internal/host/movesfinal_test.goLoading diff…
internal/host/movesheldclaim_test.goLoading diff…
internal/host/moveshome_fixture_test.goLoading diff…
internal/host/moveshome_target_test.goLoading diff…
internal/host/moveshome_test.goLoading diff…
internal/host/movesinstall_test.goLoading diff…
internal/host/movesland_commit_test.goLoading diff…
internal/host/movesland_finalfix_test.goLoading diff…
internal/host/movesland_probe_test.goLoading diff…
internal/host/movesland_test.goLoading diff…
internal/host/movesloss_test.goLoading diff…
internal/host/movespaging_test.goLoading diff…
internal/host/movesparks_test.goLoading diff…
internal/host/movespass_lost_test.goLoading diff…
internal/host/movesphase1_harness_test.goLoading diff…
internal/host/movesprobeowners_committed_test.goLoading diff…
internal/host/movesprobeowners_fix1_test.goLoading diff…
internal/host/movesprobeowners_test.goLoading diff…
internal/host/movesrecover_test.goLoading diff…
internal/host/movesrecoveryowners_test.goLoading diff…
internal/host/movesretire_byop_test.goLoading diff…
internal/host/movesretry_test.goLoading diff…
internal/host/movesrevert_test.goLoading diff…
internal/host/movesrollback_finalfix_test.goLoading diff…
internal/host/movesrollback_test.goLoading diff…
internal/host/movesrollback_witness_test.goLoading diff…
internal/host/movessources_test.goLoading diff…
internal/host/movesstuckpage_test.goLoading diff…
internal/host/moveswakesource_linux_test.goLoading diff…
internal/host/parkedrefusals_linux_test.goLoading diff…
internal/host/parkedsecretflow_test.goLoading diff…
internal/host/plan10_j2_adapter_test.goLoading diff…
internal/host/plan13_amendments_test.goLoading diff…
internal/host/plan13_fix1_test.goLoading diff…
internal/host/rawbaseline_linux_test.goLoading diff…
internal/host/rawsecretpage_test.goLoading diff…
internal/host/relocationbuild_test.goLoading diff…
internal/host/relocationflush.goLoading diff…
internal/host/relocationflush_adoption_test.goLoading diff…
internal/host/relocationflush_saferead_linux_test.goLoading diff…
internal/host/relocationflush_wake_linux_test.goLoading diff…
internal/host/relocationprobefiles_linux_test.goLoading diff…
internal/host/schedule_wiring.goLoading diff…
internal/host/schedule_wiring_test.goLoading diff…
internal/hostfiles/contract.goLoading diff…
internal/hostfiles/hostfiles_test.goLoading diff…
internal/hostfiles/manifest.goLoading diff…
internal/hostfiles/origins_test.goLoading diff…
internal/hostfiles/platform.goLoading diff…
internal/hostfiles/prepared.goLoading diff…
internal/hostfiles/prepared_test.goLoading diff…
internal/hostfiles/publisher.goLoading diff…
internal/hostfiles/publisher_refresh_test.goLoading diff…
internal/hostfiles/rawbaseline.goLoading diff…
internal/hostfiles/rawbaseline_test.goLoading diff…
internal/hostfiles/rawsecrets.goLoading diff…
internal/hostfiles/rawsecrets_test.goLoading diff…
internal/hostfiles/refuse.goLoading diff…
internal/hostfiles/refuse_other.goLoading diff…
internal/hostfiles/refuse_test.goLoading diff…
internal/hostfiles/restore.goLoading diff…
internal/hostfiles/sealed.goLoading diff…
internal/hostfiles/sealed_test.goLoading diff…
internal/hostfiles/seed.goLoading diff…
internal/hostrelocate/pin.goLoading diff…
internal/hostrelocate/pin_envkey_test.goLoading diff…
internal/hostrelocate/pin_test.goLoading diff…
internal/hostrelocate/pin_versioned_test.goLoading diff…
internal/hostrelocate/rawbaseline_test.goLoading diff…
internal/layout/extras.goLoading diff…
internal/layout/extras_test.goLoading diff…
internal/layout/hostsused.goLoading diff…
internal/layout/inventory.goLoading diff…
internal/layout/inventory_test.goLoading diff…
internal/layout/pass_linux_test.goLoading diff…
internal/layout/plan.goLoading diff…
internal/layout/pubclass/names.goLoading diff…
internal/layout/pubclass/pubclass.goLoading diff…
internal/layout/pubclass/pubclass_test.goLoading diff…
internal/layout/pubclass/publication_guard_test.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/baseline.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/clean.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/embedding.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/iface.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/ignored.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/manifestwrite.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/mixedalias.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/nilvar.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/preflight.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/prepared.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/reassign.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/refusalwrites.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/unclassified.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/unmapped.goLoading diff…
internal/layout/pubclass/testdata/publication_guard/wrapper.goLoading diff…
internal/layout/pubclass_guard_test.goLoading diff…
internal/provision/durability_3a_branchfix2b_census_test.goLoading diff…
internal/provision/durability_3a_branchfix3_census_test.goLoading diff…
internal/provision/durability_3a_branchfix3b_census_test.goLoading diff…
internal/provision/durability_3a_branchfix_census_test.goLoading diff…
internal/provision/durability_3a_escrow_census_test.goLoading diff…
internal/provision/plan9_b8_census_test.goLoading diff…
internal/provision/testdata/plan14-root-reads-chain.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-durability-3a-escrow.tsvLoading diff…