diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index ecd9eb46..867049fd 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -1903,7 +1903,11 @@ app-server's `legacy_epiphany_rollout` quarantine module owns historical parsing and its latest-surviving/rollback tests; `codex-core` has no parser module or export and treats the legacy rollout variant as inert. Next remove the two Epiphany-named `CodexThread` convenience methods by deriving compatibility paths -and reference context at the app-server boundary. +and reference context at the app-server boundary. That cut is complete: +app-server derives runtime-spine paths from generic config snapshots and uses +generic `reference_turn_id`; `CodexThread` exposes no `epiphany_*` async API. +Next audit the broad Epiphany re-export slab in `codex-protocol` and make +compatibility code import native state contracts directly where possible. ## Immediate Re-entry Instruction diff --git a/notes/native-coordinator-liberation-map.md b/notes/native-coordinator-liberation-map.md index abdb7ed9..75ec19f4 100644 --- a/notes/native-coordinator-liberation-map.md +++ b/notes/native-coordinator-liberation-map.md @@ -299,3 +299,9 @@ where two migration tests prove latest-surviving selection and rollback rejection. `codex-core` no longer declares or exports an Epiphany rollout parser. The legacy `RolloutItem` variant remains readable so old files do not become undecodable, but normal core reconstruction treats it as inert cargo. + +`CodexThread` is now generic again at the remaining host seam. Its +Epiphany-named reference-turn and runtime-spine-path helpers are deleted; +app-server derives the compatibility store path from the generic config +snapshot and calls a generic `reference_turn_id` accessor. The core source guard +rejects any `pub async fn epiphany_*` API on `CodexThread`. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 51953681..4ee0e566 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index d84ec5b5..49eb6cc8 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -659,4 +659,4 @@ current_status: - Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass. - `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure. last_completed_repo_swarm_cut: Huginn live-fire has crossed the first real repo Body from Persona pressure to branch-local Hands commit and Soul/Mind closure, and now has repeatable closure and redacted-public-proof mouths. On `E:\Projects\Huginn` branch `epiphany/huginn/first-awakening`, `tools/epiphany_local_run.ps1 -Mode repo-persona-intake` accepted item `huginn-inspection-readback-livefire`, Weksa/Persona intake remained sealed, and `epiphany-work derive-plan` lowered it to model-authored safe family `repo.status_section` for `README.md` only. `tools/epiphany_local_run.ps1 -Mode repo-swarm-run` advanced four bounded pulses: run-from-plan, adopt-from-plan, execute-from-plan, and close-from-execute. Huginn commit `e9b07c38fceabbdc89ea35c2156326c80c0393a2` updated only `README.md`; closure receipt `.epiphany\work\work-close-huginn-inspection-readback-livefire.json` records status `closed`, Soul verdict `passed`, Mind state commit `repo-work-close-huginn-inspection-readback-livefire-mind-commit`, safe family `repo.status_section`, path scope `README.md`, Bifrost publication gate, and `privateStateExposed=false`. Verification also ran Huginn's TypeScript compiler through concrete Node path: `C:\Program Files\nodejs\node.exe E:\Projects\Huginn\node_modules\typescript\bin\tsc -p tsconfig.json` passed. Native verifier `epiphany-repo-livefire-closure-smoke --workspace E:\Projects\Huginn --item huginn-inspection-readback-livefire --expected-path README.md --expected-family repo.status_section --expected-gate awaiting-publication --expected-blocker bifrost-publication-missing` checks closure receipt, Mind map entry, overview gate/blocker, authority seals, and `git show` changed paths, returning `status=ok`, `soulVerdict=passed`, `publicationGate=Bifrost`, and `privateStateExposed=false`. Wrapper `tools/epiphany_local_run.ps1 -Mode repo-livefire-closure -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exposes the same read-only proof through the local operator mouth; artifact `local-20260621-190156-803-2f85ba15` printed commit, path, gate, blocker, Soul verdict, Mind commit receipt, and `privateStateExposed=False` without push, merge, publication, or target mutation. New wrapper `tools/epiphany_local_run.ps1 -Mode repo-work-public-proof -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exports the redacted proof bundle and repo-local Verse index without publishing; artifact `local-20260621-190645-345-4555b1dc` wrote `.epiphany\public\proof-bundles\repo-work-public-proof-huginn-inspection-readback-livefire.json`, proof id `repo-work-public-proof-huginn-inspection-readback-livefire`, SHA-256 `857545b199f3e37eb06c2e757e5cfc201958e46667bb1f8403fd333a22620f63`, nine artifact rows, zero publication rows, and `privateStateExposed=False`. Gjallar readback `local-20260621-190701-140-b9519ec6` sees the `REPO-WORK-PUBLIC-PROOF` row and action row from Huginn's repo-local Verse with the same SHA-256 while Bifrost publication remains missing. Launcher compact modes are now named compact operator-context modes instead of read-only modes, and `bifrost-public-proof` summaries print item, target public Verse, room, proof SHA-256, review receipts, and credit receipts so publication receipts are auditable without claiming upstream sync. - next_action: Remove the remaining Epiphany-named convenience methods from `codex-core::CodexThread`. App-server can derive the runtime-spine path from the generic config snapshot and should use a generic reference-context accessor; only inert legacy `RolloutItem::EpiphanyState` decoding should remain in core/protocol compatibility code. + next_action: Audit and minimize Epiphany types re-exported by `codex-protocol`. The live core now retains only inert matching for legacy `RolloutItem::EpiphanyState`; app-server protocol compatibility should import native state types directly wherever possible so Codex protocol does not masquerade as their owner. diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_automation.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_automation.rs index bd7596c3..b498d0d3 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_automation.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_automation.rs @@ -27,6 +27,7 @@ use super::epiphany_thread_host::EpiphanyCodexThreadHost; use super::epiphany_thread_host::client_visible_live_thread_epiphany_state; use super::epiphany_thread_host::epiphany_token_usage_snapshot; use super::epiphany_thread_host::load_authoritative_epiphany_state; +use super::epiphany_thread_host::runtime_spine_store_path; use crate::outgoing_message::ThreadScopedOutgoingMessageSender; use crate::thread_state::ThreadState; @@ -54,7 +55,7 @@ pub(crate) async fn maybe_run_epiphany_coordinator_automation_for_turn_boundary( .await; let token_usage_info = thread.token_usage_info().await; let token_usage_snapshot = epiphany_token_usage_snapshot(token_usage_info.as_ref()); - let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; + let runtime_store_path = runtime_spine_store_path(&thread).await; let verdict = select_epiphany_coordinator_automation(EpiphanyCoordinatorAutomationInput { thread_id: &thread_id_text, diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs index e685bc90..5637a1ab 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs @@ -3,6 +3,7 @@ use codex_core::CodexThread; use codex_protocol::ThreadId; use codex_protocol::protocol::EpiphanyRetrievalState; use super::epiphany_thread_host::load_authoritative_epiphany_state; +use super::epiphany_thread_host::runtime_spine_store_path; use epiphany_codex_bridge::cultnet::EpiphanySurfaceSource; use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot; use epiphany_codex_bridge::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; @@ -126,7 +127,7 @@ impl CodexMessageProcessor { }; let runtime_store_path = if core_epiphany_view_needs_runtime_store(&lenses) { if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(loaded_thread.epiphany_runtime_spine_store_path().await) + Some(runtime_spine_store_path(loaded_thread).await) } else { None } @@ -206,7 +207,7 @@ impl CodexMessageProcessor { } let runtime_store_path = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(loaded_thread.epiphany_runtime_spine_store_path().await) + Some(runtime_spine_store_path(loaded_thread).await) } else { None }; @@ -398,7 +399,7 @@ impl CodexMessageProcessor { EpiphanySurfaceSource::Stored }; let runtime_store_path = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(loaded_thread.epiphany_runtime_spine_store_path().await) + Some(runtime_spine_store_path(loaded_thread).await) } else { None }; diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs index 78fe278d..27f4ad25 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs @@ -28,7 +28,7 @@ impl EpiphanyMutationHost for EpiphanyCodexThreadHost<'_> { } async fn epiphany_state(&self) -> Option { - let store = self.thread.epiphany_runtime_spine_store_path().await; + let store = runtime_spine_store_path(self.thread).await; match load_authoritative_accepted_state(&store) { Ok(Some(state)) => Some(state), Ok(None) => load_legacy_rollout_state(self.thread).await, @@ -40,11 +40,11 @@ impl EpiphanyMutationHost for EpiphanyCodexThreadHost<'_> { } async fn epiphany_reference_turn_id(&self) -> Option { - self.thread.epiphany_reference_turn_id().await + self.thread.reference_turn_id().await } async fn epiphany_runtime_spine_store_path(&self) -> std::path::PathBuf { - self.thread.epiphany_runtime_spine_store_path().await + runtime_spine_store_path(self.thread).await } async fn client_visible_epiphany_state( @@ -95,7 +95,7 @@ pub(super) async fn live_thread_epiphany_state( pub(super) async fn load_authoritative_epiphany_state( thread: &CodexThread, ) -> Option { - let store = thread.epiphany_runtime_spine_store_path().await; + let store = runtime_spine_store_path(thread).await; match load_authoritative_accepted_state(&store) { Ok(Some(state)) => Some(state), Ok(None) => load_legacy_rollout_state(thread).await, @@ -106,6 +106,16 @@ pub(super) async fn load_authoritative_epiphany_state( } } +pub(super) async fn runtime_spine_store_path(thread: &CodexThread) -> std::path::PathBuf { + thread + .config_snapshot() + .await + .cwd + .join("state") + .join("runtime-spine.msgpack") + .to_path_buf() +} + async fn load_legacy_rollout_state(thread: &CodexThread) -> Option { let rollout_path = thread.rollout_path()?; match load_epiphany_state_from_rollout_path(&rollout_path).await { diff --git a/vendor/codex/codex-rs/core/src/codex_thread.rs b/vendor/codex/codex-rs/core/src/codex_thread.rs index 61b3f980..8976b6aa 100644 --- a/vendor/codex/codex-rs/core/src/codex_thread.rs +++ b/vendor/codex/codex-rs/core/src/codex_thread.rs @@ -315,7 +315,7 @@ impl CodexThread { self.codex.thread_config_snapshot().await } - pub async fn epiphany_reference_turn_id(&self) -> Option { + pub async fn reference_turn_id(&self) -> Option { self.codex .session .reference_context_item() @@ -323,15 +323,6 @@ impl CodexThread { .and_then(|item| item.turn_id) } - pub async fn epiphany_runtime_spine_store_path(&self) -> PathBuf { - self.config_snapshot() - .await - .cwd - .join("state") - .join("runtime-spine.msgpack") - .to_path_buf() - } - pub async fn codex_home(&self) -> PathBuf { self.codex.session.codex_home().await.to_path_buf() } diff --git a/vendor/codex/codex-rs/core/src/session/tests.rs b/vendor/codex/codex-rs/core/src/session/tests.rs index cd61aba9..77a63714 100644 --- a/vendor/codex/codex-rs/core/src/session/tests.rs +++ b/vendor/codex/codex-rs/core/src/session/tests.rs @@ -158,6 +158,7 @@ fn codex_session_has_no_epiphany_state_custody() { assert!(!session.contains("set_epiphany_state")); assert!(!session.contains("async fn epiphany_state")); assert!(!codex_thread.contains("async fn epiphany_state")); + assert!(!codex_thread.contains("pub async fn epiphany_")); assert!(!core_lib.contains("epiphany_rollout")); }