Delete aggregate runtime status projection

This commit is contained in:
Meta Vens 2026-08-23 22:23:04 +02:00
commit 3eca33949a
6 changed files with 11 additions and 107 deletions

View file

@ -23,7 +23,6 @@ use epiphany_core::put_hands_action_intent;
use epiphany_core::put_hands_action_review;
use epiphany_core::put_repo_frontier_hands_authority;
use epiphany_core::put_substrate_gate_repo_access_grant_receipt;
use epiphany_core::runtime_spine_status;
use epiphany_core::select_and_commit_repo_frontier_route;
use epiphany_core::substrate_gate_coordinator_implementation_grant;
use epiphany_core::{
@ -1331,7 +1330,6 @@ fn run_coordinator(args: &Args) -> Result<Value> {
"coordinator-final-status.txt".to_string(),
"coordinator-final-action.txt".to_string(),
"agent-function-telemetry.json".to_string(),
"runtime-spine-status.json".to_string(),
];
let sealed_artifact_manifest = Vec::new();
let receipt_created_at = now();
@ -1386,7 +1384,6 @@ fn run_coordinator(args: &Args) -> Result<Value> {
final_runtime_job_id: final_action["runtimeJobId"].as_str().map(str::to_string),
};
finalize_coordinator_run(&runtime_store, &coordinator_run_receipt)?;
let runtime_status = runtime_spine_status(&runtime_store)?;
let summary = json!({
"objective": "Coordinate the Epiphany MVP lanes through native typed state and runtime organs.",
"artifactDir": artifact_dir,
@ -1397,7 +1394,6 @@ fn run_coordinator(args: &Args) -> Result<Value> {
"codexHome": codex_home,
"mcpConfig": mcp_config,
"runtimeStore": runtime_store,
"runtimeSpine": runtime_status,
"workspace": cwd,
"threadId": operator_final_status["threadId"],
"mode": args.mode,
@ -1419,10 +1415,6 @@ fn run_coordinator(args: &Args) -> Result<Value> {
&artifact_dir.join("coordinator-final-status.json"),
&summary["finalStatus"],
)?;
write_json(
&artifact_dir.join("runtime-spine-status.json"),
&summary["runtimeSpine"],
)?;
fs::write(
artifact_dir.join("coordinator-final-status.txt"),
final_rendered,

View file

@ -248,7 +248,6 @@ pub use runtime_spine::EpiphanyRuntimeReorientWorkerResult;
pub use runtime_spine::EpiphanyRuntimeRoleWorkerResult;
pub use runtime_spine::EpiphanyRuntimeSession;
pub use runtime_spine::EpiphanyRuntimeSessionStatus;
pub use runtime_spine::EpiphanyRuntimeSpineStatus;
pub use runtime_spine::EpiphanyRuntimeSwarmBinding;
pub use runtime_spine::EpiphanyRuntimeToolExecutionBinding;
pub use runtime_spine::EpiphanyRuntimeWorkerLaunchRequest;
@ -332,6 +331,7 @@ pub use runtime_spine::runtime_hands_commit_receipt;
pub use runtime_spine::runtime_hands_patch_receipt;
pub use runtime_spine::runtime_has_actionable_hands_frontier;
pub use runtime_spine::runtime_job_snapshot;
pub use runtime_spine::runtime_identity;
pub use runtime_spine::runtime_registered_document_types;
pub use runtime_spine::runtime_reorient_worker_result;
pub use runtime_spine::runtime_repo_frontier_planning_lifecycle;
@ -339,7 +339,6 @@ pub use runtime_spine::runtime_repo_frontier_research_lifecycle;
pub use runtime_spine::runtime_requested_public_source_refs_for_worker;
pub use runtime_spine::runtime_role_worker_result;
pub use runtime_spine::runtime_spine_cache;
pub use runtime_spine::runtime_spine_status;
pub use runtime_spine::runtime_typed_request_attempt_exists;
pub use runtime_spine::runtime_typed_request_fulfillment;
pub use runtime_spine::runtime_worker_launch_request;

View file

@ -773,23 +773,6 @@ pub enum EpiphanyRuntimeJobStatus {
Cancelled,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct EpiphanyRuntimeSpineStatus {
pub store: String,
pub present: bool,
pub runtime_id: Option<String>,
pub display_name: Option<String>,
pub sessions: usize,
pub active_sessions: usize,
pub jobs: usize,
pub open_jobs: usize,
pub job_results: usize,
pub tool_invocation_intents: usize,
pub tool_invocation_receipts: usize,
pub pending_tool_invocations: usize,
pub supported_document_types: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct RuntimeSpineInitOptions {
pub runtime_id: String,
@ -9917,83 +9900,16 @@ pub fn complete_runtime_job(
Ok(result)
}
pub fn runtime_spine_status(store_path: impl AsRef<Path>) -> Result<EpiphanyRuntimeSpineStatus> {
pub fn runtime_identity(store_path: impl AsRef<Path>) -> Result<Option<EpiphanyRuntimeIdentity>> {
let store_path = store_path.as_ref();
if !store_path.exists() {
return Ok(EpiphanyRuntimeSpineStatus {
store: store_path.display().to_string(),
present: false,
runtime_id: None,
display_name: None,
sessions: 0,
active_sessions: 0,
jobs: 0,
open_jobs: 0,
job_results: 0,
tool_invocation_intents: 0,
tool_invocation_receipts: 0,
pending_tool_invocations: 0,
supported_document_types: Vec::new(),
});
return Ok(None);
}
let mut cache = runtime_spine_cache(store_path)?;
cache
.pull_all_backing_stores()
.with_context(|| format!("failed to read runtime spine {}", store_path.display()))?;
let identity = cache.get::<EpiphanyRuntimeIdentity>(RUNTIME_IDENTITY_KEY)?;
let sessions = cache.get_all::<EpiphanyRuntimeSession>()?;
let jobs = cache.get_all::<EpiphanyRuntimeJob>()?;
let job_results = cache.get_all::<EpiphanyRuntimeJobResult>()?;
let tool_intents = cache.get_all::<EpiphanyToolInvocationIntent>()?;
let tool_receipts = cache.get_all::<EpiphanyToolInvocationReceipt>()?;
let receipt_intent_ids = tool_receipts
.iter()
.map(|receipt| receipt.intent_id.as_str())
.collect::<BTreeSet<_>>();
let active_sessions = sessions
.iter()
.filter(|session| {
matches!(
session.status,
EpiphanyRuntimeSessionStatus::Active
| EpiphanyRuntimeSessionStatus::WaitingForReview
)
})
.count();
let open_jobs = jobs
.iter()
.filter(|job| {
matches!(
job.status,
EpiphanyRuntimeJobStatus::Queued
| EpiphanyRuntimeJobStatus::Running
| EpiphanyRuntimeJobStatus::WaitingForReview
)
})
.count();
let supported_document_types = if identity.is_some() {
runtime_registered_document_types()?
} else {
Vec::new()
};
Ok(EpiphanyRuntimeSpineStatus {
store: store_path.display().to_string(),
present: identity.is_some(),
runtime_id: identity.as_ref().map(|item| item.runtime_id.clone()),
display_name: identity.as_ref().map(|item| item.display_name.clone()),
sessions: sessions.len(),
active_sessions,
jobs: jobs.len(),
open_jobs,
job_results: job_results.len(),
tool_invocation_intents: tool_intents.len(),
tool_invocation_receipts: tool_receipts.len(),
pending_tool_invocations: tool_intents
.iter()
.filter(|intent| !receipt_intent_ids.contains(intent.intent_id.as_str()))
.count(),
supported_document_types,
})
cache.get::<EpiphanyRuntimeIdentity>(RUNTIME_IDENTITY_KEY)
}
pub fn runtime_registered_document_types() -> Result<Vec<String>> {