From 32c4dc5a30993cec7778118020254af740b877d5 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 17 Aug 2026 21:03:43 +0200 Subject: [PATCH] Record keyed Body Modeling lifecycle --- notes/epiphany-current-algorithmic-map.md | 74 +++++++++++++-------- notes/epiphany-fork-implementation-plan.md | 14 ++-- notes/fresh-workspace-handoff.md | 22 ++++-- state/ledgers.msgpack | Bin 625813 -> 626501 bytes state/map.yaml | 8 +-- 5 files changed, 73 insertions(+), 45 deletions(-) diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index bd4742b7..91a9da94 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -355,11 +355,11 @@ scheduler, route, notification, or interface contract. | Owner | Inputs | Outputs | Invariant | |---|---|---|---| -| `epiphany-state-model` | typed state fields | `EpiphanyThreadState` and prompt projection | State is typed; rendering is not authority. | -| `coordinator_state_transaction.rs` | expected state, next state, typed companion envelopes | one atomic canonical-state transaction | Sole production writer of `THREAD_STATE_KEY`; companions cannot impersonate state. | -| `coordinator_state.rs` | current state plus validated ordinary update | proposed next state and transaction request | Owns update meaning, not persistence. | -| `coordinator_launch.rs` | validated launch plan, state, runtime envelopes | state-plus-launch transaction request | Launch constructs runtime companions; the transaction owner commits them. | -| `coordinator_acceptance.rs` | reviewed finding, Mind review, commit receipt | state-plus-Mind-witness transaction request | Acceptance owns admission meaning; the transaction owner commits its witnesses. | +| keyed Mind documents and `mind_transaction.rs` | exact semantic documents, strong reads, and invariant-owned mutations | disjoint atomic Mind commits plus exact receipts | Decision authority lives in typed document identities; unrelated writes do not share a revision head. | +| `current_work.rs` | sealed Mind view plus exact family requests, jobs, results, and decisions | pure family-specific scheduling/continuation projections | Events, timestamps, role lanes, and thread revisions cannot create or suppress work. | +| Body Modeling launch/acceptance owners | exact Body obligation, runtime attempt, sealed decision context, and semantic mutation | one job-bound lifecycle and keyed Mind/RepoModel commit | Baseline Body Modeling never reads or writes `EpiphanyThreadStateEntry`; Eyes is not its gate. | +| `coordinator_state_transaction.rs` and `EpiphanyThreadStateEntry` | legacy aggregate state and unmigrated family companions | obsolete aggregate commits for residual families only | This is a deletion target, not canonical Mind; it may not regain authority over migrated Body Modeling. | +| `coordinator_acceptance.rs` | reviewed family result and its concrete admission owner | family-owned admission or residual legacy aggregate transaction | Baseline Body delegates to `accept_body_modeling_result`; no duplicate semantic owner survives there. | | `thread_state_store.rs` | typed state entry | low-level CultCache codec/read access | Substrate, not policy; it exposes no production writer. | | `coordinator_service.rs` | state/runtime store paths and typed commands | state update, launch, accept, interrupt results | Facade routes typed work; it contains no policy or protocol mapping. | | `surfaces/*` | native state, runtime snapshots, pressure/freshness inputs | scene, jobs, roles, planning, context, graph, CRRC, coordinator recommendations | Read surfaces derive; they do not mutate. | @@ -379,25 +379,22 @@ scheduler, route, notification, or interface contract. ```mermaid flowchart LR - I["Typed intent or worker finding"] --> G["Mind gateway review"] - G -->|reject| R["Typed rejection receipt"] - G -->|admit| V["State validation"] - V --> C["Single coordinator commit path"] - C --> S["Native thread-state CultCache"] - S --> P["Derived native surfaces"] + I["Typed observation or worker decision"] --> G["Concrete invariant owner"] + G -->|reject or conflict| R["Typed refusal or fresh work obligation"] + G -->|admit| V["Exact strong-read validation"] + V --> C["MindMutation batch CAS"] + C --> S["Keyed Mind CultCache documents"] + S --> P["Deterministic current-work and interface projections"] P --> O["Coordinator / operator / Eve projections"] ``` -`coordinator_state_transaction::{open_coordinator_state_transaction, -commit_coordinator_state_transaction}` is the single persistence owner. -Ordinary updates, launch transactions, and accepted findings construct their -domain-specific next state or companion documents, then submit them to that -owner. It rejects stale expected state, refuses companion envelopes that target -the canonical key, and commits state plus companions in one prepared batch. -`thread_state_store.rs` retains typed codec/read access only; its production raw -writers and their public exports are deleted. A source guard rejects any second -production `THREAD_STATE_KEY` writer. `EpiphanyCoordinatorService` is the narrow -caller-facing facade. +`mind_transaction::commit_mind_mutation` is the canonical keyed Mind commit +primitive. Concrete invariant owners derive exact strong reads and complete +write sets; disjoint document identities merge under one CultCache batch CAS, +while same-identity or changed strong-read conflicts refuse without partial +mutation. `coordinator_state_transaction` remains only because unmigrated +families still depend on the obsolete aggregate. It is explicitly not a second +canonical Mind and must be deleted when those families move. Forbidden writers: @@ -4904,10 +4901,9 @@ Outputs: one typed scheduling/display projection with the Mind projection digest. Derived state: status JSON and coordinator recommendations. Forbidden writers: events, latest-result lanes, accepted-at ordering, and thread revisions cannot manufacture or suppress current work. Shared path: status is migrated; -operator and Resident Self actuation must consume the same projection after the -launch transaction is cut. Cut line: Body Modeling is observable but cannot yet -recommend `launchModeling`, because the surviving coordinator launch still -writes `EpiphanyThreadStateEntry`. Verification: Body work appears before its +operator and Resident Self actuation consume the same projection. Cut line: +Body Modeling recommends `launchModeling`, follows exact Launch/Wait/Review +state, and never writes `EpiphanyThreadStateEntry`. Verification: Body work appears before its exact decision receipt, clears after that receipt, and performs zero external Body reads; the coordinator-runtime status binary builds. @@ -4927,8 +4923,7 @@ Output: one atomic runtime worker family and scoped read grant. Derived state: status, role boards, and eventual runtime links. Forbidden writers: unrelated Persona, Hands, evidence, or graph documents cannot conflict with this launch; thread state cannot create or repair it. Duplicate live launch refuses, while a -failed/cancelled attempt makes the work eligible for a distinct ordinal. The -remaining cut is to route operator and Resident Self callers through this owner. +failed/cancelled attempt makes the work eligible for a distinct ordinal. Exact `587c56d2` routes the operator half. The shared Self policy now treats unresolved Body Modeling work as a first-class `launchModeling` reason without @@ -4936,5 +4931,26 @@ requiring persisted thread presence. The coordinator dispatches that specific baseline case through `launch_current_body_modeling_work`; proposal, repair, verdict, Research, and Verification launches retain their family paths. Thus a fresh keyed Mind can begin Modeling directly, while Eyes remains an independent -external-evidence obligation rather than a gate on Body understanding. Resident -Self remains the next caller to migrate. +external-evidence obligation rather than a gate on Body understanding. + +Exact `478fb923` completes that lifecycle through Resident Self and Mind +admission. `EpiphanyCurrentWorkProjection.body_modeling_action` derives typed +Launch, Wait, or Review from the exact Body work, family launch binding, runtime +job/result, and Body decision receipt. Resident Self emits one semantically keyed +`body-modeling` pressure only for Launch. The coordinator receipt records the +exact runtime job ID, so continuation revalidates that family lifecycle instead +of consulting a generic Modeling lane. + +Owner: `accept_body_modeling_result` owns baseline Body semantic admission. +Inputs: the exact completed job, exact baseline Modeling result, sealed decision +context, and current keyed Mind/RepoModel strong reads. Output: one atomic +RepoModel mutation, Body decision document, and `EpiphanyMindCommitReceipt`. +Derived state: role boards, events, status, and legacy aggregate projections. +Forbidden writers: proposal, repair, or verdict results cannot satisfy Body +work; role-lane terminality and thread state cannot manufacture review or +acceptance; the aggregate coordinator acceptance branch delegates this family +to the same owner. Shared paths: operator and Resident review use the same +current-work projection and admission primitive. Verification exercises Body +work through pressure, launch, wait, terminal result, review, keyed acceptance, +and cleared continuation with zero external Body reads; focused current-work, +Resident, Self-policy, coordinator/status, and full core-library checks pass. diff --git a/notes/epiphany-fork-implementation-plan.md b/notes/epiphany-fork-implementation-plan.md index a93e3716..e61672d0 100644 --- a/notes/epiphany-fork-implementation-plan.md +++ b/notes/epiphany-fork-implementation-plan.md @@ -225,13 +225,13 @@ Cut in this order: from explicit external-evidence obligations. Body-generation Modeling identity, typed Body-to-Mind admission, sealed reasoning, and atomic decision admission are landed. Current-work no longer reads the external Body store; - status consumes the shared projection, but actuation remains intentionally - withheld from the aggregate coordinator launch path. -3. **Baseline transaction landed at `9f7b164f`; operator routing at `587c56d2`:** move Resident Self launch/review consumers to it and - exact request/result identities. Thread ID remains immutable pass provenance - only. -4. Move role/reorient acceptance from aggregate state patches to family-owned - `MindMutation` plans and exact commit receipts. + status consumes the shared projection. +3. **Baseline transaction landed at `9f7b164f`; operator routing at `587c56d2`; Resident continuation and keyed acceptance at `478fb923`:** baseline Body Modeling is now thread-free from unresolved Body obligation through Launch/Wait/Review and exact Mind admission. Resident and operator callers consume the same family projection and acceptance owner. Thread ID remains immutable pass provenance only. +4. Migrate proposal, repair, verdict, Research, Verification, planning, and + reorientation acceptance from aggregate state patches and generic role lanes + to family-owned current-work projections, exact job identities, + `MindMutation` plans, and exact commit receipts. Reuse pure invariant + primitives, not a generic mutable registry. 5. Delete `EpiphanyThreadStateEntry`, `coordinator_state_transaction`, global expected revisions, aggregate update APIs, and all source references from production. Refuse old writable stores; add no dual reader or migrator. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 42b1a9ec..c8feaf30 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -12,7 +12,7 @@ effects, receipts, Mind admission, brakes, external consequence gates, and terminal commit. Focused core and OpenAI-runtime Persona suites pass. The five-day shakedown remains paused. The active branch includes exact -`587c56d2` on `codex/epiphany-shakedown-live`: the keyed Mind foundation, federated Model Atlas +`478fb923` on `codex/epiphany-shakedown-live`: the keyed Mind foundation, federated Model Atlas vertical slice, ordinary Modeling authoring path, durable publisher identity, fresh seven-organ Mind bootstrap, and atomic RepoModel projection bootstrap are landed. Historical aggregate RepoModel and partial Gate stores are evidence @@ -21,7 +21,10 @@ or repair path can restore their authority. This is not yet the full Concurrent Mind cut. Persisted `EpiphanyThreadStateEntry`, its coordinator transaction, and multiple -launch/acceptance/status readers remain live production authorities. Fresh Gate +unmigrated launch/acceptance/status readers remain live production authorities. +Baseline Body Modeling is no longer among them: keyed Mind owns its work +projection, operator and Resident launch, exact job-bound continuation, review, +and semantic admission. Fresh Gate preflight proved the consequence: both keyed semantic partitions reached ready, but status still called the organism missing because no thread aggregate existed. Model Atlas Gate 1 is therefore paused behind that deletion, not merely @@ -333,9 +336,18 @@ work is visible there. Exact `9f7b164f` adds its atomic thread-free launch owner one exact Body strong read commits the runtime job/request/event, family launch binding, and read-only Substrate Gate grant without a thread-state write. Exact `587c56d2` routes status and operator baseline Modeling through that owner while -preserving distinct proposal/repair/verdict families. Route Resident Self launch -through it, migrate review and remaining family -acceptance paths, and delete the aggregate schema/transaction. Run the source +preserving distinct proposal/repair/verdict families. Exact `478fb923` completes +the reference lifecycle: Resident Self derives exact Body pressure from the same +current-work projection, coordinator receipts retain the exact runtime job, +Launch/Wait/Review never consult a role lane, and operator/Resident acceptance +share one `accept_body_modeling_result` MindMutation owner. The legacy aggregate +acceptance branch delegates this exact family to that owner rather than retaining +a second semantic opinion. + +Inventory the remaining aggregate behavioral readers and writers, then migrate +the other Modeling request families onto the same doctrine without turning the +reference shape into a generic registry. Continue with Research, Verification, +planning, and reorientation; then delete the aggregate schema/transaction. Run the source guards and fresh-store concurrency/decision-context suite. Only after that may Model Atlas Gate 1 restart from a new external root. Keep the current fresh and partial roots read-only; do not release scheduling, register operational diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 74394ee036f7d35426c51a2d315ae3d2d27ec8a3..4d83becdeb8e919adf31959ea98dcdd230f3c7b7 100644 GIT binary patch delta 700 zcmYjOJ!=$E6m{0bxP@340x5)xfmAd5DP|MvSeYgU1QC|EZ|?5g?3?#y-^XsoW(yHP z#734y1Y0cy8!ap>^hfv?{1e`t4PtS4pZA=5&Rx9Q|M_A6^G2>h_-ex>A30 z=gVF+iK4I17qyp*TEtkbR~Z|OO~y6G7UTNIMXmm7d-1K)>fB3Oy`+6`)?QP+ZNJ~y z`y`~q!ejco_VoBdNDp@pdc(nCrwh{Lg+h zMuX3+38M^5fmV29LGY(jbd;j@phVCzivcT%b2CT=Ch&)c)qV4^Am2R2DdCJ|wI?0K ziZ!lSTqf+Cb=R%-2PQ51xk*ux9`!A{pnTQSN$^z_h%_hXxV`~r8G^!*kR^!G$nwtP zC6Uk)VPJX5fXS*S$3DniwmB3zsq#J?m*{TCV2xrfq0z{LFY8$ zY4NG@O6b;sS5isA*&>J3v^WWDH*uWOdfJ8XnQMHPJcWxU7F1+HmkAGQjH#JvZfhFh EUpln>r2qf` delta 70 zcmX>)Pi^W