From 4cc7e2858d668078e15b9b172c3d38ea3298efc7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 19 May 2026 11:18:36 +0100 Subject: [PATCH] Close state ledger document shape --- .../src/bin/epiphany-state-ledger-store.rs | 3 --- epiphany-core/src/bin/epiphany-state.rs | 3 --- epiphany-core/src/state_ledger.rs | 10 ---------- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 136354 -> 129280 bytes state/map.yaml | 1 + 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-state-ledger-store.rs b/epiphany-core/src/bin/epiphany-state-ledger-store.rs index ef869174..02209c3a 100644 --- a/epiphany-core/src/bin/epiphany-state-ledger-store.rs +++ b/epiphany-core/src/bin/epiphany-state-ledger-store.rs @@ -6,7 +6,6 @@ use epiphany_core::add_state_branch; use epiphany_core::append_state_evidence; use epiphany_core::close_state_branch; use epiphany_core::state_ledger_status; -use std::collections::BTreeMap; use std::env; use std::path::PathBuf; @@ -29,7 +28,6 @@ fn main() -> Result<()> { status: require_string_arg(&mut args, "--status")?, note: require_string_arg(&mut args, "--note")?, branch: optional_string_arg(&mut args, "--branch")?, - extra: BTreeMap::new(), }; print_json(&append_state_evidence(store, record)?)?; } @@ -44,7 +42,6 @@ fn main() -> Result<()> { status: "active".to_string(), artifacts, notes: note.unwrap_or_default(), - extra: BTreeMap::new(), }; print_json(&add_state_branch(store, branch)?)?; } diff --git a/epiphany-core/src/bin/epiphany-state.rs b/epiphany-core/src/bin/epiphany-state.rs index dd1bcdaa..a6a26ae9 100644 --- a/epiphany-core/src/bin/epiphany-state.rs +++ b/epiphany-core/src/bin/epiphany-state.rs @@ -6,7 +6,6 @@ use epiphany_core::add_state_branch; use epiphany_core::append_state_evidence; use epiphany_core::close_state_branch; use epiphany_core::load_state_ledger; -use std::collections::BTreeMap; use std::env; use std::fs; use std::path::Path; @@ -55,7 +54,6 @@ fn main() -> Result<()> { status: status.context("missing --status")?, note: note.context("missing --note")?, branch, - extra: BTreeMap::new(), }, )?; println!("Appended evidence record."); @@ -93,7 +91,6 @@ fn main() -> Result<()> { status: "active".to_string(), artifacts, notes: note.unwrap_or_default(), - extra: BTreeMap::new(), }, )?; println!("Added branch '{id}'."); diff --git a/epiphany-core/src/state_ledger.rs b/epiphany-core/src/state_ledger.rs index 3556e8cf..ed5c1f93 100644 --- a/epiphany-core/src/state_ledger.rs +++ b/epiphany-core/src/state_ledger.rs @@ -6,7 +6,6 @@ use cultcache_rs::SingleFileMessagePackBackingStore; use serde::Deserialize; use serde::Serialize; use serde_json::Value; -use std::collections::BTreeMap; use std::path::Path; pub const STATE_LEDGER_STORE_TYPE: &str = "epiphany.state_ledger"; @@ -22,8 +21,6 @@ pub struct EpiphanyStateLedgerEntry { pub branches: Vec, #[cultcache(key = 2)] pub evidence: Vec, - #[cultcache(key = 3, default)] - pub extra: BTreeMap, } #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] @@ -33,8 +30,6 @@ pub struct EpiphanyBranchRecord { pub status: String, pub artifacts: Vec, pub notes: String, - #[serde(flatten)] - pub extra: BTreeMap, } #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] @@ -46,8 +41,6 @@ pub struct EpiphanyLedgerEvidenceRecord { pub note: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde(flatten)] - pub extra: BTreeMap, } pub fn state_ledger_status(store_path: impl AsRef) -> Result { @@ -178,7 +171,6 @@ fn default_state_ledger() -> EpiphanyStateLedgerEntry { schema_version: STATE_LEDGER_SCHEMA_VERSION.to_string(), branches: Vec::new(), evidence: Vec::new(), - extra: BTreeMap::new(), } } @@ -228,7 +220,6 @@ mod tests { status: "active".to_string(), artifacts: vec!["state/map.yaml".to_string()], notes: "test".to_string(), - extra: BTreeMap::new(), }, )?; let entry = load_state_ledger(&store)?; @@ -242,7 +233,6 @@ mod tests { status: "ok".to_string(), note: "Native evidence append works.".to_string(), branch: Some("main".to_string()), - extra: BTreeMap::new(), }, )?; assert_eq!(load_state_ledger(&store)?.evidence.len(), 1); diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index a3793950..a1a2c4b8 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -39,6 +39,7 @@ remembers doctrine; the branch remembers the blade. - `epiphany-openai-runtime` worker result ingress now parses assistant output directly into typed role/reorient ingress structs selected from the durable launch document, stores nested `statePatch` and `selfPatch` as typed MessagePack in `EpiphanyRuntimeRoleWorkerResult`, and no longer passes worker result data through generic `serde_json::Value`. JSON survives there only as the OpenAI text-output edge before typed deserialization. - Agent self-memory review/application now has typed `AgentSelfPatch` core APIs. JSON-value selfPatch functions are compatibility wrappers for CLI/artifact ingress; native callers should parse once at the edge and then call `review_agent_self_patch_document` / `apply_agent_self_patch_document`. Role-result self-persistence no longer exports a JSON-value reviewer; the live API is `review_role_self_patch_document`. - Durable Ghostlight role dossiers now store typed relationship, event, scene, and perceived-overlay documents instead of `Vec`, and the durable dossier structs no longer preserve flattened unknown `extra` maps. `AgentSelfPatch.extra` remains deliberately, but only as an ingress rejection ledger for unexpected patch fields. +- The native state ledger is closed typed state now: branch and evidence records no longer preserve flattened `extra` maps. Evidence entries are explicit `ts` / `type` / `status` / `note` / optional branch records. - `epiphany-openai-codex-spine` no longer uses Codex's Responses client, model-provider layer, `codex-api`, `codex-model-provider`, `codex-model-provider-info`, or `codex-protocol` for outbound model requests. It reaches `codex-login` only through `epiphany-openai-auth-spine` so credential loading/refresh stays Codex-compatible while request/status/event/runtime surfaces stay typed Epiphany documents. - `notes/epiphany-memory-graph-unified-plan.md` is the current memory architecture direction drawn from `Fractal Domains And The Cache That Bites` plus the VoidBot memory scar tissue. The repo semantic architecture/dataflow graph and agent memory are one `EpiphanyMemoryGraph` substrate with repo, role, short-term, incubation, agency, candidate-intervention, and evidence profiles. The first native skeleton is landed: `epiphany-state-model` owns shared graph document types, `epiphany-core::memory_graph` owns stable ids, validation, freshness, context cuts, and CultCache persistence, and `epiphany-memory-graph` can status/validate/context/smoke the store without Qdrant. Qdrant is a contribution cache for typed graph documents, not truth. `notes/repo-fractal-dataflow-cache-plan.md` and `notes/agent-memory-fractal-cache-plan.md` are profile plans, not rival organs. - Durable Epiphany state types now live in root crate `epiphany-state-model`. `codex-protocol` re-exports them only so old rollout/API callers keep compiling; do not add new durable `Epiphany*` state structs under `vendor/codex`. The deterministic `` prompt renderer also lives beside that typed model now, with prompt text under `epiphany-state-model/src/prompts/`; `epiphany-core` only re-exports it for compatibility. `epiphany-core` imports the native model directly and no longer depends on `codex-protocol`. Pressure derives from native `EpiphanyTokenUsageSnapshot`; Codex token telemetry is mapped at the bridge. Codex rollout/event reconstruction now lives in `codex-core::epiphany_rollout`, where the Codex `RolloutItem` / `EventMsg` types belong. Exact retrieval path matching is native to `epiphany-core`, so `epiphany-core` has no direct vendored Codex crate dependency. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index bc93f186b98d7497d7e6c167bcd98bfa3675574e..1fc9e5b3a058331368e2afbbb7634bfc1282d07e 100644 GIT binary patch delta 15725 zcmaJo3w+Jx`~T-8wz&D33v_3zi6U2FeAOB)LZHsSLn-s*jJoB-B$kcn^V00Kza7~`rf=!|8!q@ zWroxMHYXJ=TI;YmGSY0WG>3D|gkZ3=q_o&u^hR*9bQ;QGku=Ma)M$0Fuf*pq&YOro z%UdiXA#KqIby(T<43E?9arH{I**rE|?PC1TBwt>sFJBr|?<7)6zZogz`||uH{$PL@ z_-?+Msw3oZdh8A)k!rK!zw4*_iv0!tJa1`a{j&OJkxW^Gq<9l(XM-v&DOWa%;_U5l z^cIk+j=5l1pNR^1oTvkrb+fpik@eL$y#}(qVQ0YKa~g3(db!cxT{POcvh6O9&E;`t zM9ieM#LmX&kj&O5W-{_$P3{2$olK7#t%Rzn=GM@WpN#JadcEvu1gB~TT5PnNT-~f8 zDe!x9y<$?A7ANrMCN1?p%L7}sqUGZfID#%osITLlk&W8g(VDKXpeEkOT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U(k3OsTlWN-jYhn|%?E>$$SJ-Y(6(ggXGL zU)aAT9>HPXg6_={MH1}yT3L-b`yKF)zOY@DMB3j~8hNEWxkoKpIQ|2#z<;^iCx0Z; zzV)iU=bkFR%8n<(iYF9T0snw0TX>B~d;c|T`Kflg@e>V(CH@QtG%kYd%B$v<*iHBa h=5W&GztTuc!C&D##7wRJaFzo<^oU8cyq-Sf{{XfbUX}m= diff --git a/state/map.yaml b/state/map.yaml index 4954cb79..44d43f96 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -100,6 +100,7 @@ accepted_design: - `epiphany-openai-runtime` worker result ingress now parses assistant output directly into launch-kind-specific typed documents and stores typed nested `statePatch` / `selfPatch` payloads as MessagePack inside `EpiphanyRuntimeRoleWorkerResult`; generic `serde_json::Value` no longer mediates role/reorient worker results in that crate. JSON still exists at the OpenAI text edge because the model's output is text, but the runtime boundary after parsing is typed. - Agent self-memory review/application now has typed `AgentSelfPatch` core APIs. The old JSON-value selfPatch functions remain only as edge compatibility wrappers for CLI/artifact ingress; `epiphany-agent-memory-store`, heartbeat rumination application, and repo initialization selfPatch processing parse once at the edge and then operate on typed documents. Role-result self-persistence no longer exports a JSON-value reviewer; native review uses `review_role_self_patch_document`. - Durable Ghostlight role dossiers are typed through their relationship/event/scene/perceived-overlay surfaces now. `EpiphanyAgentMemoryEntry` no longer stores those arrays as `serde_json::Value`, and durable Ghostlight structs no longer carry flattened unknown `extra` bags. `AgentSelfPatch.extra` remains only as an ingress guard so unknown patch keys can be rejected with reasons. + - The state ledger CultCache document is now a closed typed ledger shape. Branch and evidence records no longer carry flattened `extra` maps; evidence additions remain explicit records with `ts`, `type`, `status`, `note`, and optional branch. - Heartbeat durable document/schema types live in `epiphany-core/src/heartbeat_state/heartbeat_documents.rs`; role/default construction lives in `epiphany-core/src/heartbeat_state/heartbeat_roles.rs`; heartbeat persistence/validation lives in `epiphany-core/src/heartbeat_state/heartbeat_store.rs`; heartbeat status/artifact JSON projection lives in `epiphany-core/src/heartbeat_state/heartbeat_projection.rs`; the root heartbeat module remains the scheduling/cognition orchestration surface until those responsibilities are split into their own tested seams. Heartbeat timing authority is now typed state: adaptive pacing, scene protocol, participant personality/mood timing, initiative heat projection, birth personality seed receipts, and pending-turn freeze/multiplier facts are named fields rather than `extra` maps. The only remaining heartbeat `extra` bag is the sealed legacy combined-state reader for old `voidRoutine` migration. - Heartbeat role/default and store seams are pinned by module-local unit tests for fixed lane catalog, Ghostlight scene role projection, and typed state/cognition CultCache round-trip. - Heartbeat adaptive pacing lives in `epiphany-core/src/heartbeat_state/heartbeat_pacing.rs`; it owns pressure/concurrency derivation, running-turn count, initiative heat projection, and effective cooldown multipliers for scheduler/projection callers.