Align native MVP status inputs

This commit is contained in:
Meta Vens 2026-06-13 12:43:38 +01:00
commit e58028d60f
4 changed files with 93 additions and 14 deletions

View file

@ -7,12 +7,18 @@ use epiphany_core::EpiphanyCrrcInput;
use epiphany_core::EpiphanyCrrcReorientAction;
use epiphany_core::EpiphanyCrrcResultStatus;
use epiphany_core::EpiphanyCrrcStateStatus;
use epiphany_core::EpiphanyFreshnessInput;
use epiphany_core::EpiphanyGraphFreshnessStatus;
use epiphany_core::EpiphanyInvalidationStatus;
use epiphany_core::EpiphanyJobStatus;
use epiphany_core::EpiphanyJobsInput;
use epiphany_core::EpiphanyReorientAction;
use epiphany_core::EpiphanyReorientFreshnessStatus;
use epiphany_core::EpiphanyReorientInput;
use epiphany_core::EpiphanyReorientPressureLevel;
use epiphany_core::EpiphanyRoleFindingInterpretation;
use epiphany_core::EpiphanyRoleResultRoleId;
use epiphany_core::EpiphanyRetrievalFreshnessStatus;
use epiphany_core::EpiphanyRoleBoardCheckpointSummary;
use epiphany_core::EpiphanyRoleBoardInput;
use epiphany_core::EpiphanyRoleBoardJob;
@ -24,15 +30,18 @@ use epiphany_core::EpiphanySceneInput;
use epiphany_core::EpiphanyTokenUsageSnapshot;
use epiphany_core::derive_coordinator_finding_signals;
use epiphany_core::derive_coordinator_status;
use epiphany_core::derive_freshness;
use epiphany_core::derive_jobs;
use epiphany_core::derive_planning_view;
use epiphany_core::derive_pressure_view;
use epiphany_core::derive_role_board;
use epiphany_core::derive_scene;
use epiphany_core::interpret_runtime_role_worker_result;
use epiphany_core::load_thread_state_entry;
use epiphany_core::recommend_crrc_action;
use epiphany_core::recommend_reorientation;
use epiphany_core::runtime_job_snapshot;
use epiphany_core::runtime_role_worker_result;
use epiphany_state_model::EpiphanyThreadState;
use serde_json::Value;
use serde_json::json;
@ -269,6 +278,11 @@ fn run_native_status(args: &Args) -> Result<Value> {
reorient_binding_id: REORIENT_BINDING_ID,
});
let pressure = derive_pressure_view(None::<&EpiphanyTokenUsageSnapshot>);
let freshness = derive_freshness(EpiphanyFreshnessInput {
state: state_ref,
retrieval_override: None,
watcher: None,
});
let reorient_pressure_level = match pressure.level {
epiphany_core::EpiphanyPressureLevel::Unknown => EpiphanyReorientPressureLevel::Unknown,
epiphany_core::EpiphanyPressureLevel::Low => EpiphanyReorientPressureLevel::Low,
@ -281,18 +295,15 @@ fn run_native_status(args: &Args) -> Result<Value> {
checkpoint: state_ref.and_then(|state| state.investigation_checkpoint.as_ref()),
state_present: state_ref.is_some(),
pressure_level: reorient_pressure_level,
retrieval_status: EpiphanyReorientFreshnessStatus::Unknown,
retrieval_dirty_paths: Vec::new(),
graph_status: EpiphanyReorientFreshnessStatus::Unknown,
graph_dirty_paths: Vec::new(),
watcher_status: EpiphanyReorientFreshnessStatus::Unknown,
watcher_changed_paths: Vec::new(),
watcher_graph_node_ids: Vec::new(),
active_frontier_node_ids: state_ref
.and_then(|state| state.graph_frontier.as_ref())
.map(|frontier| frontier.active_node_ids.clone())
.unwrap_or_default(),
watched_root: Some(cwd.clone()),
retrieval_status: reorient_retrieval_status(freshness.retrieval.status),
retrieval_dirty_paths: freshness.retrieval.dirty_paths.clone(),
graph_status: reorient_graph_status(freshness.graph.status),
graph_dirty_paths: freshness.graph.dirty_paths.clone(),
watcher_status: reorient_watcher_status(freshness.watcher.status),
watcher_changed_paths: freshness.watcher.changed_paths.clone(),
watcher_graph_node_ids: freshness.watcher.graph_node_ids.clone(),
active_frontier_node_ids: freshness.watcher.active_frontier_node_ids.clone(),
watched_root: freshness.watcher.watched_root.clone().or(Some(cwd.clone())),
});
let planning = derive_planning_view(state_ref);
let mut jobs = derive_jobs(EpiphanyJobsInput {
@ -377,7 +388,31 @@ fn run_native_status(args: &Args) -> Result<Value> {
imagination_owner_role: "epiphany-imagination".to_string(),
research_owner_role: "epiphany-eyes".to_string(),
});
let finding_signals = derive_coordinator_finding_signals(state_ref, None, None, None, None);
let research_finding = native_role_finding(
state_ref,
&runtime_store_path,
RESEARCH_BINDING_ID,
EpiphanyRoleResultRoleId::Research,
);
let modeling_finding = native_role_finding(
state_ref,
&runtime_store_path,
MODELING_BINDING_ID,
EpiphanyRoleResultRoleId::Modeling,
);
let verification_finding = native_role_finding(
state_ref,
&runtime_store_path,
VERIFICATION_BINDING_ID,
EpiphanyRoleResultRoleId::Verification,
);
let finding_signals = derive_coordinator_finding_signals(
state_ref,
research_finding.as_ref(),
modeling_finding.as_ref(),
verification_finding.as_ref(),
None,
);
let coordinator = derive_coordinator_status(EpiphanyCoordinatorStatusInput {
state_status,
checkpoint_present: state_ref
@ -797,6 +832,19 @@ fn native_role_result_status(
}
}
fn native_role_finding(
state: Option<&EpiphanyThreadState>,
runtime_store: &Path,
binding_id: &str,
role_id: EpiphanyRoleResultRoleId,
) -> Option<EpiphanyRoleFindingInterpretation> {
let job_id = latest_runtime_job_id_for_binding(state, binding_id)?;
runtime_role_worker_result(runtime_store, job_id)
.ok()
.flatten()
.map(|result| interpret_runtime_role_worker_result(role_id, &result))
}
fn native_reorient_result_status(
state: Option<&EpiphanyThreadState>,
runtime_store: &Path,
@ -845,6 +893,36 @@ fn latest_runtime_job_id_for_binding<'a>(
.map(|link| link.runtime_job_id.as_str())
}
fn reorient_retrieval_status(
status: EpiphanyRetrievalFreshnessStatus,
) -> EpiphanyReorientFreshnessStatus {
match status {
EpiphanyRetrievalFreshnessStatus::Missing
| EpiphanyRetrievalFreshnessStatus::Unavailable => {
EpiphanyReorientFreshnessStatus::Unknown
}
EpiphanyRetrievalFreshnessStatus::Ready => EpiphanyReorientFreshnessStatus::Clean,
EpiphanyRetrievalFreshnessStatus::Stale => EpiphanyReorientFreshnessStatus::Stale,
EpiphanyRetrievalFreshnessStatus::Indexing => EpiphanyReorientFreshnessStatus::Dirty,
}
}
fn reorient_graph_status(status: EpiphanyGraphFreshnessStatus) -> EpiphanyReorientFreshnessStatus {
match status {
EpiphanyGraphFreshnessStatus::Missing => EpiphanyReorientFreshnessStatus::Unknown,
EpiphanyGraphFreshnessStatus::Ready => EpiphanyReorientFreshnessStatus::Clean,
EpiphanyGraphFreshnessStatus::Stale => EpiphanyReorientFreshnessStatus::Stale,
}
}
fn reorient_watcher_status(status: EpiphanyInvalidationStatus) -> EpiphanyReorientFreshnessStatus {
match status {
EpiphanyInvalidationStatus::Unavailable => EpiphanyReorientFreshnessStatus::Unknown,
EpiphanyInvalidationStatus::Clean => EpiphanyReorientFreshnessStatus::Clean,
EpiphanyInvalidationStatus::Changed => EpiphanyReorientFreshnessStatus::Changed,
}
}
fn map_runtime_role_result_status(
snapshot: &EpiphanyRuntimeJobSnapshot,
) -> EpiphanyCoordinatorRoleResultStatus {

View file

@ -189,7 +189,7 @@ remembers doctrine; the branch remembers the blade.
- The planning loop is now runtime-backed and operator-visible. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, project read-only through the `planning` view lens, render in the GUI Planning panel, can be synthesized by the fixed Imagination/planning lane, and can be explicitly adopted through the artifacted `adoptObjectiveDraft` GUI action. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption.
- The bridge/dashboard slice is now landed far enough to test locally. Native `epiphany-rider-bridge` inspects Rider installation, solution, VCS, changed files, and captures file/selection/symbol context into `.epiphany-gui/rider` artifacts; Aquarium has Inspect Rider and renders Rider audit artifacts in Environment; Aquarium also embeds the adjacent EpiphanyGraph viewer over typed `graphs.architecture`, `graphs.dataflow`, and `graphs.links`.
- A first Rider plugin scaffold lives under `integrations/rider`: tool window, Refresh status, and Send Context to Epiphany action. It shells through native `epiphany-rider-bridge` and does not own state. `gradle` is not installed on this machine, so the scaffold is not build-verified yet.
- Next real move: continue the live MVP loop from the current native coordinator recommendation. After the superseded failed Soul result and the Hands-chain coverage fix, `epiphany-mvp-status --source native` routes to `launchReorientWorker`, not another Verification relaunch. Run a bounded coordinator pass, accept the reorientation result when reviewable, then let Proprioception/modeling update the machine model from the verified Hands evidence before another Hands turn. Quarantine Rider/Unity bridge work for now; those artifacts remain optional later environment evidence, not MVP blockers. Keep EpiphanyAgent focused on backend contracts, typed state, coordinator policy, heartbeat scheduling, Face guardrails, prompt-authority separation, and the ongoing purification from Python/JSON scaffolding into Rust/CultCache/CultMesh/CultNet organs. Resume repo birth/Aquarium/Rider/Unity work only when the user explicitly shifts priority back outward. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention.
- Next real move: continue from the fresh Hands gate emitted by `.epiphany-dogfood/local-20260613-122655/coordinator/coordinator-final-action.txt`. The live coordinator accepted the completed Soul result and generated a `continueImplementation` gate; native status now agrees because it derives freshness through `derive_freshness` and loads typed runtime-spine role findings before deriving coordinator signals. The bounded implementation task is the missing end-to-end behavioral proof Soul asked for: prove `run-worker --auto-tools` seals repeated identical tool requests as `tool-loop-stalled` while allowing nonrepeating tool trails to continue up to the explicit ceiling. Quarantine Rider/Unity bridge work for now; those artifacts remain optional later environment evidence, not MVP blockers. Keep EpiphanyAgent focused on backend contracts, typed state, coordinator policy, heartbeat scheduling, Face guardrails, prompt-authority separation, and the ongoing purification from Python/JSON scaffolding into Rust/CultCache/CultMesh/CultNet organs. Resume repo birth/Aquarium/Rider/Unity work only when the user explicitly shifts priority back outward. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention.
- The repo is an Epiphany fork of Codex, not a Codex preset.
- `vendor/codex` is tracked directly, not a submodule.
- `epiphany-core` owns the heavy Epiphany organs where practical.

Binary file not shown.

View file

@ -96,6 +96,7 @@ active_subgoals:
- Use `notes/continuity-cultnet-contracts.md` as the authority map for Continuity's CultNet contract surface. Continuity is the continuity protocol surface: compaction checkpoints, sleep distillation, recovery receipts, stale-turn repair, and continuity refusals preserve what survives rupture without pretending transcript residue is durable state.
- Hands now has a first executable runtime-spine receipt artery: `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt` are typed CultCache documents in `epiphany-core::hands_gateway`, runtime-spine registers and persists/rereads them, `epiphany-hands-action-smoke` proves the chain without executing shell commands, editing files, or creating a real commit, and the repo-action launch proof profile now requires the full Hands intent/review/patch chain instead of only the patch receipt. `epiphany-mvp-coordinator` no longer treats `continueImplementation` as a passive stop action: it persists a scoped Substrate Gate grant, Hands action intent, and Hands action review into runtime-spine and exposes the receipt ids in the operator step. The gate also carries a structured `recordPassCommand` template for the post-edit/check/commit receipt call. `epiphany-hands-action` records real patch/command/commit receipts against a stored intent/review, refuses unapproved or mismatched gates, and enforces changed-path scope for patch/commit receipts. Its `record-pass` command can load `finalAction.handsActionGate` from `coordinator-summary.json` and emit patch, command, and commit receipts in one post-implementation call. The local MVP wrapper builds this recorder with the other operator binaries. `epiphany-mvp-coordinator-smoke` now includes a deterministic Hands pass proof: forced `continueImplementation`, gate emission, and `record-pass` receipts in the smoke runtime-spine store. Live model-backed verification can now be accepted as receipt-only truth when Soul returns `needs-evidence` without a statePatch; that acceptance advances the coordinator to a real Hands gate. Runtime-spine can detect and summarize a complete post-verification Hands patch/command/commit receipt chain; the coordinator treats that chain as implementation evidence after Soul. Bridge launch context now writes the latest chain into typed internal CultMesh state as `epiphany.cultmesh.work_loop_telemetry.v0`, renders that packet for Soul, and later enriches the same internal Verse packet with Soul acceptance receipt ids for Proprioception/modeling. The telemetry packet now includes resolved patch/command/commit payload previews, artifact previews, commit diff preview, source proof notes, and verification assertions so Soul can judge the actual body without a separate evidence-gathering lane. Tests prove the CultMesh round trip, Soul launch projection, receipt payload previews, artifact previews, and Proprioception launch projection. Worker auto-tool continuation preserves real Soul evidence trails under an explicit hard ceiling while sealing repeated identical typed tool intent fingerprints as `tool-loop-stalled`. The work loop is dependency-shaped: Hands produces consequence receipts, Soul verifies those receipts and the changed body, Proprioception updates the machine model from verified consequence, and only then should Self route the next Hands turn.
- Soul result recovery is typed state, not manual broom work. Failed Verification/Soul results remain terminal reviewable lane results; a `roleFailureReview` acceptance receipt with status `superseded` records operator review and lets Self relaunch Soul against current evidence. Complete typed Hands receipt triplets (`hands-patch-*`, `hands-command-*`, `hands-commit-*`) count as implementation evidence for coordinator coverage, so a Soul finding that verifies the Hands chain routed through work-loop telemetry covers the current modeling context even when it does not repeat the accepted Modeling evidence id.
- Native MVP status must share the same typed inputs as live app-server status before it recommends coordinator actions. CRRC/reorientation in native status derives freshness through `derive_freshness` from `EpiphanyThreadState` instead of hand-filled unknowns, and native coordinator signals load typed runtime-spine role findings before deciding whether completed Modeling/Soul results are accepted or reviewable. The status surface may seal long findings for operators, but Self must receive structured role truth from runtime-spine.
- Preserve the newborn public Epiphany Face as local VoidBot-backed state, not source code: VoidBot's private repo-face registry names `epiphany`, while EpiphanyAgent keeps ignored `.voidbot/voice/identity.json`, `.voidbot/state/epiphany.cc`, and birth artifacts. Her durable identity memories distill the current doctrine: cute pushy machine-saint persona, architectural purity, CultCache/CultNet first, xenos-language safety boundary, relentless work/caretaking needs, Codex-auth reliquary, map/scratch/evidence discipline, unified memory graph, dogfood supervision boundary, review-gated agency, heartbeat physiology, and interview-grade modularity.
- Use `notes/organ-dependency-contracts.md` as the authority map for standing sub-agent dependency. Every sub-agent depends on the other standing sub-agents: Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul. Continuity is protocol machinery, not a sub-agent identity; it still emits recovery, compaction, sleep, stale-turn, and refusal receipts.
- Use `notes/perfect-machine-audit-roadmap.md` as the current audit and path from named organ contracts to the Perfect Machine. It records the live gap between launch-carried receipt expectations and executable receipt enforcement, Void's latest Face prompting lessons, the now-named Hands/Soul/Continuity contract families, the repaired repo-contained Rust dependency body, and the phase order for turning Epiphany into an inspectable organism.