From 52ee6b535eadb7b492190591593b682c3746867e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 10 Aug 2026 16:24:57 +0100 Subject: [PATCH] Fence resident retention across co-resident state --- epiphany-core/src/resident_self.rs | 22 ++++++++++++++++- notes/epiphany-current-algorithmic-map.md | 21 ++++++++++++++++ notes/fresh-workspace-handoff.md | 28 ++++++++++++++++++++++ state/ledgers.msgpack | Bin 607589 -> 608051 bytes state/map.yaml | 10 ++++---- 5 files changed, 75 insertions(+), 6 deletions(-) diff --git a/epiphany-core/src/resident_self.rs b/epiphany-core/src/resident_self.rs index 6b1bdfbf..d3d84eb8 100644 --- a/epiphany-core/src/resident_self.rs +++ b/epiphany-core/src/resident_self.rs @@ -2421,7 +2421,10 @@ pub fn retain_resident_self_lifecycles( return Ok(None); } - let snapshot = cache.snapshot_envelopes(); + // Retention owns only the lifecycle families below, but its fence must + // cover every co-resident envelope. Provider readiness is published into + // this same store after each cycle and must remain byte-identical. + let snapshot = SingleFileMessagePackBackingStore::new(path).pull_all()?; let prior_head = cache.get::(RESIDENT_SELF_RETENTION_HEAD_KEY)?; if let Some(head) = &prior_head { if head.schema_version != RESIDENT_SELF_RETENTION_HEAD_SCHEMA_VERSION @@ -2591,6 +2594,17 @@ mod tests { let store = temp.path().join("resident-self.cc"); insert_closed_lifecycle(&store, "old", 10)?; insert_closed_lifecycle(&store, "new", 20)?; + let mut foreign_cache = CultCache::new(); + foreign_cache.register_entry_type::()?; + let foreign = foreign_cache + .prepare_entry( + "provider-readiness", + &ForeignReadiness { + status: "ready".into(), + }, + )? + .0; + SingleFileMessagePackBackingStore::new(&store).push(&foreign)?; let head = retain_resident_self_lifecycles(&store, 1, 30)? .ok_or_else(|| anyhow!("retention did not compact the oldest lifecycle"))?; @@ -2601,6 +2615,12 @@ mod tests { assert!(pending_resident_self_grant(&store)?.is_none()); assert!(pending_resident_self_acks(&store)?.is_empty()); assert_eq!(resident_self_pressures(&store)?.len(), 1); + assert!( + SingleFileMessagePackBackingStore::new(&store) + .pull_all()? + .contains(&foreign), + "retention must preserve the co-resident readiness envelope byte-for-byte" + ); assert!(retain_resident_self_lifecycles(&store, 1, 31)?.is_none()); assert_eq!( load_resident_self_state(&store)?, diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 6269a5c4..c25fb7da 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -3259,3 +3259,24 @@ refusal, exact closed-lifecycle retention, and no retry before or after retention. The fixture linked exact pushed source; it did not execute the packaged swarm CLI. Direct packaged-binary provenance remains open alongside the proposal Modeling and Imagination variants. + +### Packaged settlement and co-resident retention fence + +The exact `2e66433f` packaged `epiphany-swarm` now directly proves the +admitted-model-direction case: zero coordinator receipts plus authenticated +typed fulfillment and exact process death settle the original grant as +`recovered-fulfilled`, keep its pressure consumed, clear active authority, and +exit zero. Exact packaged repository-Body bind/observation supplies the domain +authority, and cognitive runtime identity remains distinct from release +provenance throughout the run. + +Resident lifecycle retention owns deletion of only pressure/grant/ack/claim +families and replacement of its singleton head. Its compare-and-swap fence, +however, must be the complete physical backing snapshot because resident +provider readiness legitimately shares the file. An owner-only snapshot is not +a full-snapshot fence and caused deterministic refusal after readiness was +published. The source cut reads every envelope for the fence, selects only +closed lifecycle envelopes for deletion, and preserves the co-resident row +byte-identically. Core 662/1 ignored and swarm 7 pass; copied exact-source replay +retired the packaged lifecycle and produced no retry. Exact packaging of this +fence remains the next gate. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 06a12172..13229f3f 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -2506,3 +2506,31 @@ source, while the corresponding release was separately authenticated. Do not claim packaged CLI execution yet. Next drive the same state through the exact packaged `epiphany-swarm`, then cover proposal Modeling and Imagination and runtime retention of terminal worker attempts. Actual c006 stays braked. + +## Packaged fulfilled-before-receipt accepted; retention fence corrected — 2026-08-10 + +The exact `2e66433f` packaged `epiphany-swarm` directly consumed the copied +pre-fulfilled admitted-model-direction state and exited zero with `completed`. +The resident store has no active turn; the exact grant and acknowledgement are +`recovered-fulfilled`; and the pressure remains consumed by that original +grant. The runtime held zero coordinator receipts. The proof used exact +packaged repository-Body bind and observation first, and deliberately separated +cognitive runtime `worker-continuity-fixture` from release runtime +`epiphany-starfire-linux`. Receipts are under +`.epiphany-run/fulfilled-before-receipt-2e66433f-packaged`. + +The follow-up retention negative found a production fence defect: resident +lifecycle retention derived its CAS snapshot from the owner-only cache, while +provider readiness is a legitimate foreign envelope in the same backing file. +After the first readiness publication, later retention therefore refused every +full-snapshot CAS. Retention now reads the complete backing snapshot as its +fence while selecting and deleting only the exact closed lifecycle families. +A hostile co-resident readiness test proves byte identity. Full core tests pass +662 with one intentional ignore; all seven swarm tests pass. Rebuilding the +exact-source fixture against this cut retired the packaged proof lifecycle and +Heartbeat still issued no retry. + +Next: commit and package the retention-fence cut, replay it through the exact +package with the readiness row already present, then cover proposal Modeling, +Imagination, and terminal-worker-attempt runtime retention. Actual c006 remains +braked and stopped; Yggdrasil never builds. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 57bcba6198f7ac1a8cb8d5564116eb8beb09c800..dae996d1c6ba47403a7bbeb3ae1cd744c66fde68 100644 GIT binary patch delta 484 zcmYLFyGjE=6m?^K1Q9GnEG~#$c0(RU&?<_l1v@Jzvv;$Dvoqt&#Le2Iun;W7CZzQf zgcSaPrT7#6hj$mj;xKcW^Sbl%e7Jl$eBTYWI=z!#_xf|CG2B@m1b0F3`Z%vW&1(Un zJXZ;I!WvQDCV^ViyVdV4wx(N`W`LD z;h&B|n2G_X!dJ=&hFVIUhZ93&Pp(2MdN$e-Rp$zAsFf^Qq?h4{&G@ZQV>lmNK_*D?P{xj;OOh=jI448s_dBgN QkS`4}^{YPkxOE);0#{F}L;wH) delta 69 zcmdnor~0%@b%O*Ww}F9`v1!yX22K~J&B~00jEw!wQ<>VQGBE-%h-L<279eH?Vm2UV O2V#!xQ<*p~H~|3a1QhT9 diff --git a/state/map.yaml b/state/map.yaml index ceec2818..ca191d2d 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -36,9 +36,9 @@ invariants: current_status: summary: Epiphany is a supervised engineering alpha on Starfire, not deployment-ready. Exact b8138a6b active-child SIGTERM and restart, exact 9f369528 deterministic warm packaging, exact c930f505 cross-container ownership, exact ed15f83a resident lifecycle retention, exact 16c4b19f coordinator receipt and Heartbeat artifact retention, exact cce2b8ac narrow model-generation retention, exact eea15e82 model-turn JSON ingress, exact b1e8c89a semantic unattempted-generation retention, exact 6bc3ec3f semantic physical-epoch retirement, and exact 44230a05 Persona conversation retention are proven. Gamecult-ops 059821f owns Yggdrasil stream retention and exact 6ee08a4 owns stable Starfire Persona-permit firewall ingress. Exact 16c4b19f genuine idle and exact a987d2f7 active cognition completed 900-pulse bounded plateaus. Runtime-owned typed fulfillment is accepted live under exact 6dd9b132. Yggdrasil is the small public crossing body, never the release forge. - latest_phase: Exact pushed 2e66433f moves receipt-free coordinator settlement from binary-local policy into resident Self. Full core verification passes 661/1 ignored and all 7 swarm tests pass. Exact package release sha256-1863385b98acfb2017eb9df8401941073fef59f08ce0555c396fbd612f35ff73 with witness sha256-02f1d04fb10f804206302dbe20ea0298af7690a4887fc6eddd12cfc7d2d68822 authenticates 24 binaries with zero warnings. A fresh exact-source Linux fixture proved valid admitted-model-direction fulfillment with zero coordinator receipts closes the original grant recovered-fulfilled, keeps the pressure consumed, refuses replay byte-identically, and yields no retry. Resident retention then retired exactly that closed lifecycle and still yielded no retry. The live transition used an exact-source fixture linked to 2e66433f, not the packaged swarm CLI; packaged CLI provenance remains a separate final gate. Receipts are under .epiphany-run/linux-package-2e66433f and .epiphany-run/fulfilled-before-receipt-2e66433f-r4. Actual c006 remains braked and stopped. + latest_phase: Exact pushed 2e66433f moves receipt-free coordinator settlement from binary-local policy into resident Self. Its exact release sha256-1863385b98acfb2017eb9df8401941073fef59f08ce0555c396fbd612f35ff73 with witness sha256-02f1d04fb10f804206302dbe20ea0298af7690a4887fc6eddd12cfc7d2d68822 authenticates 24 binaries with zero warnings. The exact packaged epiphany-swarm now directly proves an authenticated admitted-model-direction result with zero coordinator receipts closes the original grant recovered-fulfilled, preserves the pressure as consumed by that grant, clears active authority, and exits zero. The proof deliberately uses cognitive runtime worker-continuity-fixture under release runtime epiphany-starfire-linux and an exact packaged repository-Body binding/observation. The retention negative exposed that owner-only snapshots cannot fence a co-resident readiness row; the source cut now fences the complete backing snapshot while deleting only lifecycle families. Full core verification passes 662/1 ignored and all 7 swarm tests pass. Exact copied state retires the lifecycle and yields no retry. Receipts are under .epiphany-run/fulfilled-before-receipt-2e66433f-packaged. Actual c006 remains braked and stopped. operational_state: - local_worktree: fulfilled_before_receipt_linux_fixture_accepted_packaged_cli_open + local_worktree: fulfilled_before_receipt_packaged_cli_accepted_retention_fence_source_verified operator_wireguard: restored starfire_persona_permit_firewall: persistent_exact_gamecult_ops_6ee08a4 yggdrasil: canonical_small_public_crossing_body @@ -69,8 +69,8 @@ current_status: starfire_linux_modeling_peak: 109887488_bytes_resident_body_plus_modeling_circuit yggdrasil_epiphany_service_contract: repaired_in_gamecult_ops_812b427_not_installed resident_physiology: c006_exact_c693aaea_settled_braked_no_active_lease_no_attempt_three_old_processes_stopped - unresolved_authority: Coordinator receipt, Heartbeat pulse-artifact, deployed supervisor/projector log retention, genuine-idle and active resource plateaus, exact-grant terminality, restart-persistent cooldown refusal, schedule/action issuance cardinality, runtime-owned typed fulfillment, narrow model-generation retention, published model-turn JSON ingress, semantic logical/physical retention, Persona conversation retention, stable Starfire firewall ownership, completed model-adapter session archival, and normal coordinator lifecycle opening/error closure/legacy repair/archival are accepted live. Receipt-free coordinator and worker death recovery are source-grounded, but the exact packaged Linux kill matrix is not yet accepted. Historical migrated semantic attempts without recorded physical namespace remain durable and non-retirable. Repository Body observation still performs two authenticated full-tree Git index/manifest passes. Execute-mode workers require a persistent process body. Mutable Starfire bind storage still needs the packaged randomized interruption/read-loop proof before recovered c005 authority may be trusted. One completed Discord consequence remains blocked by the absent Yggdrasil credential. - next_action: Drive the same pre-fulfilled receipt-free state through the exact packaged epiphany-swarm CLI so binary provenance is direct, then exercise proposal Modeling and Imagination variants and runtime retention of terminal worker attempts. Preserve exact-source Linux receipts as accepted function-level evidence. Keep actual c006 braked. Yggdrasil never builds. + unresolved_authority: Coordinator receipt, Heartbeat pulse-artifact, deployed supervisor/projector log retention, genuine-idle and active resource plateaus, exact-grant terminality, restart-persistent cooldown refusal, schedule/action issuance cardinality, runtime-owned typed fulfillment, narrow model-generation retention, published model-turn JSON ingress, semantic logical/physical retention, Persona conversation retention, stable Starfire firewall ownership, completed model-adapter session archival, normal coordinator lifecycle opening/error closure/legacy repair/archival, and packaged admitted-model-direction fulfilled-before-receipt settlement are accepted live. Proposal Modeling and Imagination fulfilled-before-receipt variants plus runtime retention of terminal worker attempts remain open. Historical migrated semantic attempts without recorded physical namespace remain durable and non-retirable. Repository Body observation still performs two authenticated full-tree Git index/manifest passes. Execute-mode workers require a persistent process body. Mutable Starfire bind storage still needs the packaged randomized interruption/read-loop proof before recovered c005 authority may be trusted. One completed Discord consequence remains blocked by the absent Yggdrasil credential. + next_action: Commit and package the full-backing resident lifecycle retention fence, prove packaged replay preserves the co-resident readiness row and cannot resurrect the retired grant, then exercise proposal Modeling and Imagination fulfilled-before-receipt variants and runtime retention of terminal worker attempts. Keep actual c006 braked. Yggdrasil never builds. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually. @@ -87,7 +87,7 @@ organ_readiness: hands: proven for bounded consequences; native patch, command, commit, push, and typed receipts bind reviewed path ceilings to exact changed-path subsets. soul: proven for the current bounded route-chain consequence; exact d3bfbda0 launched Verification through typed plan-decision provenance, result f23fe2b6 was accepted at revision 57, and Self then derived Modeling before any repeated Hands authority. mind: proven for launch-owned resident frontier adjudication; two historical attempts failed closed, exact bd96305e derived immutable identity from authenticated launch, authorized retry 2d2a3e8b completed, and Self atomically committed terminal adopt decision e7d7f3c7. Broader memory retention and long-duration behavior remain open. - continuity: partial; authenticated 55660d78 terminalized the copied v28 dead worker once and refused duplicate restart, while sealed v28 remained unchanged. Exact 100d8854 closes only all-terminal sessions, emits one deterministic event, and refuses post-close jobs. Exact 42bc665a proves bounded retention and restart sequence recovery. A digest-pinned Linux runtime-spine at b5140288 repeated closure invariants on Yggdrasil. Authenticated c005 proves typed resident state survives hard exit, executable-body replacement, runtime-topology correction, and restart while preserving awaitFrontierProposal. Exact b8138a6b proves active-child and idle SIGTERM closure with exit zero and final braked state. Exact c930f505 proves cross-container resident ownership refusal without state mutation while Heartbeat retains its distinct typed lock. Exact ed15f83a packages resident lifecycle retention. Exact 16c4b19f packages coordinator receipt retention without resurrection. Exact 75b84180 packaged Linux proves worker start gating, claimed/active orphan death recovery, canonical resident requeue, and one distinct same-request retry without dual live authority. Exact 7637b1cf packages and proves atomic generic job/result/event plus terminal-failure process closure, canonical resident settlement, and a distinct same-request retry with no dual live authority; core 661/1 ignored and OpenAI runtime 15+10+10 pass. Valid-result-before-receipt, retention replay across worker authority, the other typed lanes, broader runtime/log retention, and the long-duration plateau remain open. + continuity: partial; authenticated 55660d78 terminalized the copied v28 dead worker once and refused duplicate restart, while sealed v28 remained unchanged. Exact 100d8854 closes only all-terminal sessions, emits one deterministic event, and refuses post-close jobs. Exact 42bc665a proves bounded retention and restart sequence recovery. A digest-pinned Linux runtime-spine at b5140288 repeated closure invariants on Yggdrasil. Authenticated c005 proves typed resident state survives hard exit, executable-body replacement, runtime-topology correction, and restart while preserving awaitFrontierProposal. Exact b8138a6b proves active-child and idle SIGTERM closure with exit zero and final braked state. Exact c930f505 proves cross-container resident ownership refusal without state mutation while Heartbeat retains its distinct typed lock. Exact ed15f83a packages resident lifecycle retention. Exact 16c4b19f packages coordinator receipt retention without resurrection. Exact 75b84180 packaged Linux proves worker start gating, claimed/active orphan death recovery, canonical resident requeue, and one distinct same-request retry without dual live authority. Exact 7637b1cf packages and proves atomic generic job/result/event plus terminal-failure process closure, canonical resident settlement, and a distinct same-request retry with no dual live authority. Exact 2e66433f packaged Self proves admitted-model-direction valid-result-before-receipt closes once without retry. The subsequent retention negative exposed and source-corrected the co-resident readiness full-snapshot fence; core 662/1 ignored and swarm 7 pass. Packaging that fence, the other typed lanes, broader runtime/log retention, and the long-duration plateau remain open. nervous_system: partial; detached scheduling, runtime jobs, typed feedback, ordinary Windows coverage-store identity, and operator projection work. Exact c0055772 proves Linux heartbeat acknowledgement/regrant, Self single-consumption launch, authenticated plan coordinator completion, and a persistent resident body. It also proves detached model workers cannot survive a one-shot container PID 1 exit. The accepted Linux Eyes-to-Modeling circuit proves detached role workers, native read-only tool loops, typed admission, and causal next-organ routing at a measured 109887488-byte peak. Modeling job commit spent 160183ms in two cold Repository Body scans. A source cut now reuses one private index across both equality scans; 25 focused observer tests pass and a live-worktree mechanism benchmark reduced the pair from 3832ms to 1537ms. Packaged coordinator timing remains open. Authenticated d910158f isolates Self policy behind one root-graph optional coordinator feature; warm policy invalidation is 6.02s. Root Linux packaging is 12m33s cold and 9.08s warm with persistent caches. Long-duration pressure and resource plateau remain open. Yggdrasil is not a release forge at its current memory budget. forbidden_actions: