From d4907ee82f98437b71a3fd24e5b4fb86baa54173 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 11 Aug 2026 09:36:26 +0200 Subject: [PATCH] Publish post-review coordinator action --- .../src/bin/epiphany-mvp-coordinator.rs | 28 +++++++++++++++++++ notes/epiphany-current-algorithmic-map.md | 9 ++++++ notes/fresh-workspace-handoff.md | 21 ++++++++++++++ state/map.yaml | 2 +- state/scratch.md | 15 ++++++---- 5 files changed, 68 insertions(+), 7 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs index f849cfe5..4048f51a 100644 --- a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs +++ b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs @@ -796,6 +796,7 @@ fn run_coordinator(args: &Args) -> Result { json!({"type": "roleFailureReview", "roleId": role_id, "superseded": status_cli::sanitize_for_operator(superseded)}), ); final_status = collect_coordinator_status(&runtime_store, &thread_id)?; + refresh_final_action_from_status(&final_status, &mut final_action); append_operator_step_jsonl(&steps_path, &step)?; steps.push(step); continue; @@ -837,6 +838,7 @@ fn run_coordinator(args: &Args) -> Result { }), ); final_status = collect_coordinator_status(&runtime_store, &thread_id)?; + refresh_final_action_from_status(&final_status, &mut final_action); append_operator_step_jsonl(&steps_path, &step)?; steps.push(step); continue; @@ -857,6 +859,7 @@ fn run_coordinator(args: &Args) -> Result { ); } final_status = collect_coordinator_status(&runtime_store, &thread_id)?; + refresh_final_action_from_status(&final_status, &mut final_action); } "reviewReorientResult" => { let result = read_reorient_result(&runtime_store, &thread_id)?; @@ -2360,6 +2363,15 @@ fn state_revision(status: &Value) -> Option { .and_then(Value::as_i64) } +fn refresh_final_action_from_status(status: &Value, final_action: &mut Value) { + if let Some(coordinator) = status + .get("coordinator") + .filter(|value| value.get("action").and_then(Value::as_str).is_some()) + { + *final_action = coordinator.clone(); + } +} + fn push_event(step: &mut Value, event: Value) { step["events"].as_array_mut().unwrap().push(event); } @@ -2430,6 +2442,22 @@ fn home_dir() -> PathBuf { mod tests { use super::*; + #[test] + fn role_review_receipt_uses_the_post_transaction_coordinator_action() { + let mut final_action = json!({"action": "reviewModelingResult"}); + let status = json!({ + "coordinator": { + "action": "awaitFrontierProposal", + "reason": "The proposal-bound result was terminally reviewed." + } + }); + refresh_final_action_from_status(&status, &mut final_action); + assert_eq!(final_action["action"], "awaitFrontierProposal"); + + refresh_final_action_from_status(&json!({"coordinator": {}}), &mut final_action); + assert_eq!(final_action["action"], "awaitFrontierProposal"); + } + #[test] fn resident_required_action_refusal_precedes_the_action_match() { let source = include_str!("epiphany-mvp-coordinator.rs"); diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 12df5d44..05be56cc 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -3947,3 +3947,12 @@ proposal-bound result before settlement. That route is the next ownership cut. no continuation, then the same exact receipt emits one after its linked job and typed result become terminal; repeated ingestion remains idempotent. Thirty resident tests pass. Exact packaged copied replay remains required. + +Exact packaged `9f597ca2` proved the pending gate but exposed a second owner: +the role-review transaction updated typed coordinator state, while its run +receipt retained the action captured before the transaction. Receipt action is +now refreshed from post-transaction coordinator status after successful role +acceptance, failure supersession, or admission rejection. The receipt remains +the continuation source, but can no longer ask Heartbeat to replay an action +the same transaction already consumed. Nineteen coordinator tests pass; exact +packaged replay remains required. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 3b473e8c..07fa1937 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -58,6 +58,27 @@ resident tests pass, including a focused negative that pending review mints no pressure and the same receipt becomes eligible exactly once after terminal publication. Package and replay before accepting this coordination cut live. +Exact pushed `9f597ca2`, release +`sha256-7bcd1d40fd68ca3ae4a0ca6722f81b708a18867aff7e83ff6e928b6bd17d2d23`, +witness +`sha256-66bd4be740907ac23a1b126f5c73454298db20498a92cc219735576629534ca8` +proved that pending-result fix live: no review grant existed while outer job +`e8d56041-c2f9-4c05-8629-8b7d1b206211` was pending. The terminal result then +received one legitimate review, but a second review was still issued. The +first review transaction had already rejected/superseded the proposal-bound +admission and derived `awaitFrontierProposal`; its coordinator receipt falsely +retained the pre-step `reviewModelingResult` action. The second continuation +performed only `requiredActionRefusal` with consequence `none`. The copy was +braked and both owners exited zero. Receipts are under +`.epiphany-run/proposal-review-live-9f597ca2`. + +Current source fixes the remaining owner: after role acceptance, failure +supersession, or admission rejection, coordinator finalization refreshes the +receipt action from the post-transaction typed coordinator status. The receipt +therefore carries `awaitFrontierProposal` when that is what the transaction +actually derived. Nineteen coordinator tests pass, including a direct stale- +review-to-post-transaction-action check. Commit/package/live replay remain open. + ## Governed directory inventory accepted live - 2026-08-11 Actual c006 remains exact `c9a2a979`, alive and cognitively braked. All work diff --git a/state/map.yaml b/state/map.yaml index 3668cd55..9f34d0bc 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -70,7 +70,7 @@ current_status: yggdrasil_epiphany_service_contract: repaired_in_gamecult_ops_812b427_not_installed resident_physiology: c006_exact_c9a2a979_alive_braked_revision_34_after_two_receipt_bound_continuation_grants unresolved_authority: Coordinator receipt, Heartbeat pulse-artifact, genuine-idle and active resource plateaus, exact-grant terminality, restart-persistent cooldown refusal, schedule/action issuance cardinality, runtime-owned typed fulfillment, all three packaged fulfilled-before-receipt lanes, genuine packaged Imagination option generation, 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, co-resident resident lifecycle retention, authenticated outer-worker attempt retention, deployed supervisor/projector journald ownership, Docker named-volume atomic snapshot visibility, and deterministic incremental release construction are accepted. Starfire's Docker Desktop F: bind is rejected for mutable authority after an exact packaged lockless reader observed an empty published snapshot during writer interruption. Historical migrated semantic attempts without recorded physical namespace remain durable and non-retirable. One completed Discord consequence remains blocked by the absent Yggdrasil credential. Exact aa841873 also makes legacy coordinator repair one full-snapshot transaction so a later hostile family cannot leave an earlier partial repair. - next_action: Keep actual c006 exact c9a2a979 alive under its cognitive brake. Treat exact e723058a first-attempt proposal Modeling publication as accepted. The duplicate review owner is cut in current source: a receipt requesting role review is continuation-eligible only after the exact runtime-linked result is terminal, and the predicate reads the mixed store through its runtime-spine schema owner. Package and replay this cut on fresh copied state; require one proposal grant, one outer Modeling job, at most one review continuation, exact terminal settlement, zero open jobs, and no Hands, Persona, or deployment authority. Then continue copied autonomous turnover. Separately recheck Yggdrasil's Persona credential boundary before attempting the one missing public consequence. Yggdrasil never builds. + next_action: Keep actual c006 exact c9a2a979 alive under its cognitive brake. Treat exact e723058a first-attempt proposal Modeling publication as accepted. Exact packaged 9f597ca2 proved pending results no longer mint review pressure, but the one terminal review receipt still replayed because coordinator finalization retained its pre-transaction reviewModelingResult action after deriving awaitFrontierProposal. Current source refreshes final receipt action from post-review typed status after acceptance, failure supersession, or admission rejection; 19 coordinator tests pass. Commit, package, and replay on fresh copied state; require one proposal grant, one outer Modeling job, exactly one terminal review continuation, exact settlement, zero open jobs, and no Hands, Persona, or deployment authority. Then continue copied autonomous turnover. Separately recheck Yggdrasil's Persona credential boundary before attempting the one missing public consequence. Yggdrasil never builds. active_subgoals: - Prove Persona, Self, Eyes, Modeling, Imagination, Hands, Soul, Mind, Continuity, and nervous-system behavior individually. diff --git a/state/scratch.md b/state/scratch.md index 58b34938..1c078edc 100644 --- a/state/scratch.md +++ b/state/scratch.md @@ -4,8 +4,8 @@ Disposable working memory for one bounded rite. ## Current Subgoal -Package and replay the cut that makes receipt-bound role review continuation -eligible only after the exact runtime-linked result becomes terminal. +Package and replay the coordinator receipt cut that publishes the +post-transaction role-review action rather than its stale pre-step action. ## Accepted live boundary @@ -64,7 +64,10 @@ Hands/Eyes frontier. Both owners exited zero under the restored brake. Modeling job, at most one review continuation, exact settlement, zero open jobs, and no Hands, Persona, or deployment consequence. -Current source removes direct role-review actions from the unconditional -continuation set and makes Research, Modeling, and Soul review share the exact -terminal-result predicate. The predicate now opens the mixed store through -`runtime_spine_cache`; thirty resident tests pass. Package/live proof is open. +Exact packaged `9f597ca2` proves pending results mint no review pressure, but +one terminal review receipt retained stale `reviewModelingResult` after the +transaction derived `awaitFrontierProposal`; that caused one consequence-free +required-action refusal continuation. Current source refreshes final receipt +action from post-review typed coordinator status after accept, supersede, or +admission rejection. Nineteen coordinator tests pass. Commit/package/live proof +is open.