Delete operator and work-loop CultMesh shadows

This commit is contained in:
Meta Vens 2026-08-23 07:30:52 +02:00
commit db6a713160
4 changed files with 0 additions and 829 deletions

View file

@ -44,24 +44,6 @@ use uuid::Uuid;
pub const EPIPHANY_CULTMESH_STATUS_TYPE: &str = "epiphany.cultmesh.status";
pub const EPIPHANY_CULTMESH_STATUS_SCHEMA_VERSION: &str = "epiphany.cultmesh.status.v0";
pub const EPIPHANY_CULTMESH_STATUS_KEY: &str = "epiphany-local/status";
pub const EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_TYPE: &str =
"epiphany.cultmesh.operator_run_intent";
pub const EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION: &str =
"epiphany.cultmesh.operator_run_intent.v0";
pub const EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY: &str =
"epiphany-local/operator-run-intent/latest";
pub const EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_TYPE: &str =
"epiphany.cultmesh.operator_run_receipt";
pub const EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION: &str =
"epiphany.cultmesh.operator_run_receipt.v0";
pub const EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_LATEST_KEY: &str =
"epiphany-local/operator-run-receipt/latest";
pub const EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_TYPE: &str =
"epiphany.cultmesh.work_loop_telemetry";
pub const EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION: &str =
"epiphany.cultmesh.work_loop_telemetry.v0";
pub const EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_LATEST_KEY: &str =
"epiphany-internal/work-loop-telemetry/latest";
pub const EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_TYPE: &str = "epiphany.cultmesh.repo_work_overview";
pub const EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION: &str =
"epiphany.cultmesh.repo_work_overview.v0";
@ -259,154 +241,6 @@ pub struct EpiphanyCultMeshStatusEntry {
pub verse_tier: String,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.cultmesh.operator_run_intent",
schema = "EpiphanyCultMeshOperatorRunIntentEntry"
)]
pub struct EpiphanyCultMeshOperatorRunIntentEntry {
#[cultcache(key = 0)]
pub schema_version: String,
#[cultcache(key = 1)]
pub runtime_id: String,
#[cultcache(key = 2)]
pub verse_id: String,
#[cultcache(key = 3)]
pub run_id: String,
#[cultcache(key = 4)]
pub requested_at_utc: String,
#[cultcache(key = 5)]
pub mode: String,
#[cultcache(key = 6)]
pub root: String,
#[cultcache(key = 7)]
pub workspace: String,
#[cultcache(key = 8)]
pub thread_id: String,
#[cultcache(key = 9)]
pub codex_home: String,
#[cultcache(key = 10)]
pub target_dir: String,
#[cultcache(key = 11)]
pub max_steps: u32,
#[cultcache(key = 12)]
pub timeout_seconds: u32,
#[cultcache(key = 13)]
pub auto_review: bool,
#[cultcache(key = 14)]
pub no_ephemeral: bool,
#[cultcache(key = 15)]
pub artifact_root: String,
#[cultcache(key = 16)]
pub dogfood_root: String,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.cultmesh.operator_run_receipt",
schema = "EpiphanyCultMeshOperatorRunReceiptEntry"
)]
pub struct EpiphanyCultMeshOperatorRunReceiptEntry {
#[cultcache(key = 0)]
pub schema_version: String,
#[cultcache(key = 1)]
pub runtime_id: String,
#[cultcache(key = 2)]
pub verse_id: String,
#[cultcache(key = 3)]
pub run_id: String,
#[cultcache(key = 4)]
pub completed_at_utc: String,
#[cultcache(key = 5)]
pub mode: String,
#[cultcache(key = 6)]
pub status: String,
#[cultcache(key = 7)]
pub result_path: String,
#[cultcache(key = 8)]
pub artifact_root: String,
#[cultcache(key = 9)]
pub dogfood_root: String,
#[cultcache(key = 10)]
pub operator_snapshot_store: String,
#[cultcache(key = 11)]
pub operator_snapshot_id: String,
#[cultcache(key = 12)]
pub artifact_refs: Vec<String>,
#[cultcache(key = 13)]
pub notes: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.cultmesh.work_loop_telemetry",
schema = "EpiphanyCultMeshWorkLoopTelemetryEntry"
)]
pub struct EpiphanyCultMeshWorkLoopTelemetryEntry {
#[cultcache(key = 0)]
pub schema_version: String,
#[cultcache(key = 1)]
pub runtime_id: String,
#[cultcache(key = 2)]
pub verse_id: String,
#[cultcache(key = 3)]
pub telemetry_id: String,
#[cultcache(key = 4)]
pub thread_id: String,
#[cultcache(key = 5)]
pub produced_at_utc: String,
#[cultcache(key = 6)]
pub source_stage: String,
#[cultcache(key = 7)]
pub target_stages: Vec<String>,
#[cultcache(key = 8)]
pub lower_bound_receipt_at: String,
#[cultcache(key = 9)]
pub hands_intent_id: String,
#[cultcache(key = 10)]
pub hands_review_id: String,
#[cultcache(key = 11)]
pub hands_runtime_job_id: String,
#[cultcache(key = 12)]
pub substrate_gate_grant_receipt_id: String,
#[cultcache(key = 13)]
pub hands_patch_receipt_id: String,
#[cultcache(key = 14)]
pub hands_command_receipt_id: String,
#[cultcache(key = 15)]
pub hands_commit_receipt_id: String,
#[cultcache(key = 16)]
pub command: String,
#[cultcache(key = 17)]
pub exit_code: String,
#[cultcache(key = 18)]
pub stdout_artifact: String,
#[cultcache(key = 19)]
pub stderr_artifact: String,
#[cultcache(key = 20)]
pub commit_sha: String,
#[cultcache(key = 21)]
pub branch: String,
#[cultcache(key = 22)]
pub changed_paths: Vec<String>,
#[cultcache(key = 23)]
pub artifact_previews: Vec<String>,
#[cultcache(key = 24)]
pub source_refs: Vec<String>,
#[cultcache(key = 25)]
pub source_path_proof: Vec<String>,
#[cultcache(key = 26)]
pub soul_receipt_ids: Vec<String>,
#[cultcache(key = 27)]
pub summary: String,
#[cultcache(key = 28, default)]
pub receipt_payload_previews: Vec<String>,
#[cultcache(key = 29, default)]
pub commit_diff_preview: String,
#[cultcache(key = 30, default)]
pub verification_assertions: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.cultmesh.repo_work_overview",
@ -1590,37 +1424,11 @@ pub struct EpiphanyLocalVerseContext {
Option<EpiphanyCultMeshBifrostGithubPublicationReceiptEntry>,
pub arrival_latest_bifrost_public_proof_publication_receipt:
Option<EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry>,
pub latest_operator_run_intent: Option<EpiphanyCultMeshOperatorRunIntentEntry>,
pub latest_operator_run_receipt: Option<EpiphanyCultMeshOperatorRunReceiptEntry>,
pub latest_work_loop_summary: Option<EpiphanyLocalVerseWorkLoopSummary>,
pub latest_repo_work_overview: Option<EpiphanyCultMeshRepoWorkOverviewEntry>,
pub latest_repo_work_map_entry: Option<EpiphanyCultMeshRepoWorkMapEntry>,
pub contract_summaries: Vec<EpiphanyLocalVerseContractSummary>,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EpiphanyLocalVerseWorkLoopSummary {
pub telemetry_id: String,
pub thread_id: String,
pub source_stage: String,
pub target_stages: Vec<String>,
pub hands_intent_id: String,
pub hands_review_id: String,
pub substrate_gate_grant_receipt_id: String,
pub hands_patch_receipt_id: String,
pub hands_command_receipt_id: String,
pub hands_commit_receipt_id: String,
pub commit_sha: String,
pub branch: String,
pub changed_path_count: usize,
pub source_ref_count: usize,
pub soul_receipt_ids: Vec<String>,
pub verification_assertion_count: usize,
pub summary: String,
pub sealed_preview_note: String,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EpiphanyLocalVerseContractSummary {
@ -1634,9 +1442,6 @@ pub struct EpiphanyLocalVerseContractSummary {
cultmesh_documents!(EpiphanyCultMeshDocuments {
EpiphanyCultMeshStatusEntry => EPIPHANY_CULTMESH_STATUS_SCHEMA_VERSION,
EpiphanyCultMeshOperatorRunIntentEntry => EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION,
EpiphanyCultMeshOperatorRunReceiptEntry => EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION,
EpiphanyCultMeshWorkLoopTelemetryEntry => EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION,
EpiphanyCultMeshRepoWorkOverviewEntry => EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION,
EpiphanyCultMeshRepoWorkReadinessEntry => EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION,
EpiphanyCultMeshRepoWorkMapEntry => EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION,
@ -1891,156 +1696,6 @@ pub fn load_epiphany_cultmesh_status(
node.get(EPIPHANY_CULTMESH_STATUS_KEY)
}
pub fn write_epiphany_cultmesh_operator_run_intent(
store_path: impl AsRef<Path>,
intent: EpiphanyCultMeshOperatorRunIntentEntry,
) -> Result<EpiphanyCultMeshOperatorRunIntentEntry> {
validate_operator_run_intent(&intent)?;
let mut node = open_epiphany_cultmesh_node(&store_path, intent.runtime_id.clone())?;
let intent_key = epiphany_cultmesh_operator_run_intent_key(&intent.run_id);
let written = node.put(intent_key.as_str(), &intent)?;
let current_latest = node.get::<EpiphanyCultMeshOperatorRunIntentEntry>(
EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY,
)?;
if current_latest.as_ref().is_none_or(|current| {
operator_run_intent_event_key(&written) >= operator_run_intent_event_key(current)
}) {
node.put(EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY, &written)?;
}
node.flush()?;
Ok(written)
}
pub fn load_epiphany_cultmesh_operator_run_intent(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
run_id: &str,
) -> Result<Option<EpiphanyCultMeshOperatorRunIntentEntry>> {
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
node.get(epiphany_cultmesh_operator_run_intent_key(run_id).as_str())
}
pub fn load_latest_epiphany_cultmesh_operator_run_intent(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
) -> Result<Option<EpiphanyCultMeshOperatorRunIntentEntry>> {
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
node.get(EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY)
}
pub fn write_epiphany_cultmesh_operator_run_receipt(
store_path: impl AsRef<Path>,
receipt: EpiphanyCultMeshOperatorRunReceiptEntry,
) -> Result<EpiphanyCultMeshOperatorRunReceiptEntry> {
validate_operator_run_receipt(&receipt)?;
let mut node = open_epiphany_cultmesh_node(&store_path, receipt.runtime_id.clone())?;
let receipt_key = epiphany_cultmesh_operator_run_receipt_key(&receipt.run_id);
let written = node.put(receipt_key.as_str(), &receipt)?;
let current_latest = node.get::<EpiphanyCultMeshOperatorRunReceiptEntry>(
EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_LATEST_KEY,
)?;
if current_latest.as_ref().is_none_or(|current| {
operator_run_receipt_event_key(&written) >= operator_run_receipt_event_key(current)
}) {
node.put(EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_LATEST_KEY, &written)?;
}
node.flush()?;
Ok(written)
}
fn validate_operator_run_intent(intent: &EpiphanyCultMeshOperatorRunIntentEntry) -> Result<()> {
if intent.schema_version != EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION {
return Err(anyhow!(
"operator run intent has unsupported schema version"
));
}
if intent.verse_id != EPIPHANY_CULTMESH_INTERNAL_VERSE_ID {
return Err(anyhow!(
"operator run intent must remain in the internal Verse"
));
}
for (label, value) in [
("runtime id", intent.runtime_id.as_str()),
("run id", intent.run_id.as_str()),
("mode", intent.mode.as_str()),
("root", intent.root.as_str()),
("workspace", intent.workspace.as_str()),
("artifact root", intent.artifact_root.as_str()),
] {
if value.trim().is_empty() {
return Err(anyhow!("operator run intent missing {label}"));
}
}
DateTime::parse_from_rfc3339(&intent.requested_at_utc)
.map_err(|error| anyhow!("operator run intent has invalid requested_at_utc: {error}"))?;
Ok(())
}
fn validate_operator_run_receipt(receipt: &EpiphanyCultMeshOperatorRunReceiptEntry) -> Result<()> {
if receipt.schema_version != EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION {
return Err(anyhow!(
"operator run receipt has unsupported schema version"
));
}
if receipt.verse_id != EPIPHANY_CULTMESH_INTERNAL_VERSE_ID {
return Err(anyhow!(
"operator run receipt must remain in the internal Verse"
));
}
for (label, value) in [
("runtime id", receipt.runtime_id.as_str()),
("run id", receipt.run_id.as_str()),
("mode", receipt.mode.as_str()),
("status", receipt.status.as_str()),
("result path", receipt.result_path.as_str()),
("artifact root", receipt.artifact_root.as_str()),
] {
if value.trim().is_empty() {
return Err(anyhow!("operator run receipt missing {label}"));
}
}
DateTime::parse_from_rfc3339(&receipt.completed_at_utc)
.map_err(|error| anyhow!("operator run receipt has invalid completed_at_utc: {error}"))?;
Ok(())
}
fn operator_run_intent_event_key(
intent: &EpiphanyCultMeshOperatorRunIntentEntry,
) -> (DateTime<FixedOffset>, &str) {
(
DateTime::parse_from_rfc3339(&intent.requested_at_utc)
.expect("validated operator run intent timestamp"),
intent.run_id.as_str(),
)
}
fn operator_run_receipt_event_key(
receipt: &EpiphanyCultMeshOperatorRunReceiptEntry,
) -> (DateTime<FixedOffset>, &str) {
(
DateTime::parse_from_rfc3339(&receipt.completed_at_utc)
.expect("validated operator run receipt timestamp"),
receipt.run_id.as_str(),
)
}
pub fn load_latest_epiphany_cultmesh_operator_run_receipt(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
) -> Result<Option<EpiphanyCultMeshOperatorRunReceiptEntry>> {
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
node.get(EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_LATEST_KEY)
}
pub fn load_epiphany_cultmesh_operator_run_receipt(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
run_id: &str,
) -> Result<Option<EpiphanyCultMeshOperatorRunReceiptEntry>> {
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
node.get(epiphany_cultmesh_operator_run_receipt_key(run_id).as_str())
}
pub fn epiphany_cultmesh_daemon_poke_intent_from_status(
intent_id: impl Into<String>,
requesting_agent_id: impl Into<String>,
@ -3906,136 +3561,6 @@ fn validate_bifrost_metrics_receipt(
Ok(())
}
pub fn write_epiphany_cultmesh_work_loop_telemetry(
store_path: impl AsRef<Path>,
telemetry: EpiphanyCultMeshWorkLoopTelemetryEntry,
) -> Result<EpiphanyCultMeshWorkLoopTelemetryEntry> {
validate_work_loop_telemetry(&telemetry)?;
let mut node = open_epiphany_cultmesh_node(&store_path, telemetry.runtime_id.clone())?;
let written = node.put(telemetry.telemetry_id.clone(), &telemetry)?;
let current_latest = node.get::<EpiphanyCultMeshWorkLoopTelemetryEntry>(
EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_LATEST_KEY,
)?;
if current_latest.as_ref().is_none_or(|current| {
work_loop_telemetry_event_key(&written) >= work_loop_telemetry_event_key(current)
}) {
node.put(EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_LATEST_KEY, &written)?;
}
node.flush()?;
Ok(written)
}
fn validate_work_loop_telemetry(telemetry: &EpiphanyCultMeshWorkLoopTelemetryEntry) -> Result<()> {
if telemetry.verse_id != EPIPHANY_CULTMESH_INTERNAL_VERSE_ID {
return Err(anyhow!(
"work-loop telemetry must remain in the internal Verse"
));
}
for (label, value) in [
("schema version", telemetry.schema_version.as_str()),
("runtime id", telemetry.runtime_id.as_str()),
("telemetry id", telemetry.telemetry_id.as_str()),
("source stage", telemetry.source_stage.as_str()),
("Hands intent id", telemetry.hands_intent_id.as_str()),
("Hands review id", telemetry.hands_review_id.as_str()),
(
"Hands runtime job id",
telemetry.hands_runtime_job_id.as_str(),
),
(
"Substrate Gate grant receipt id",
telemetry.substrate_gate_grant_receipt_id.as_str(),
),
(
"Hands patch receipt id",
telemetry.hands_patch_receipt_id.as_str(),
),
(
"Hands command receipt id",
telemetry.hands_command_receipt_id.as_str(),
),
(
"Hands commit receipt id",
telemetry.hands_commit_receipt_id.as_str(),
),
("command", telemetry.command.as_str()),
("commit SHA", telemetry.commit_sha.as_str()),
("branch", telemetry.branch.as_str()),
] {
if value.trim().is_empty() {
return Err(anyhow!("work-loop telemetry missing {label}"));
}
}
if telemetry.target_stages.is_empty()
|| telemetry
.target_stages
.iter()
.any(|stage| stage.trim().is_empty())
|| telemetry.changed_paths.is_empty()
|| telemetry
.changed_paths
.iter()
.any(|path| path.trim().is_empty())
{
return Err(anyhow!(
"work-loop telemetry requires nonempty target stages and changed paths"
));
}
let produced_at = DateTime::parse_from_rfc3339(&telemetry.produced_at_utc)
.map_err(|error| anyhow!("work-loop telemetry has invalid produced at: {error}"))?;
let lower_bound = DateTime::parse_from_rfc3339(&telemetry.lower_bound_receipt_at)
.map_err(|error| anyhow!("work-loop telemetry has invalid receipt lower bound: {error}"))?;
if lower_bound > produced_at {
return Err(anyhow!(
"work-loop telemetry receipt lower bound occurs after packet production"
));
}
Ok(())
}
fn work_loop_telemetry_event_key(
telemetry: &EpiphanyCultMeshWorkLoopTelemetryEntry,
) -> (DateTime<FixedOffset>, &str) {
(
DateTime::parse_from_rfc3339(&telemetry.produced_at_utc)
.expect("validated work-loop telemetry timestamp"),
telemetry.telemetry_id.as_str(),
)
}
pub fn load_latest_epiphany_cultmesh_work_loop_telemetry(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
) -> Result<Option<EpiphanyCultMeshWorkLoopTelemetryEntry>> {
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
node.get(EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_LATEST_KEY)
}
pub fn epiphany_local_verse_work_loop_summary(
telemetry: &EpiphanyCultMeshWorkLoopTelemetryEntry,
) -> EpiphanyLocalVerseWorkLoopSummary {
EpiphanyLocalVerseWorkLoopSummary {
telemetry_id: telemetry.telemetry_id.clone(),
thread_id: telemetry.thread_id.clone(),
source_stage: telemetry.source_stage.clone(),
target_stages: telemetry.target_stages.clone(),
hands_intent_id: telemetry.hands_intent_id.clone(),
hands_review_id: telemetry.hands_review_id.clone(),
substrate_gate_grant_receipt_id: telemetry.substrate_gate_grant_receipt_id.clone(),
hands_patch_receipt_id: telemetry.hands_patch_receipt_id.clone(),
hands_command_receipt_id: telemetry.hands_command_receipt_id.clone(),
hands_commit_receipt_id: telemetry.hands_commit_receipt_id.clone(),
commit_sha: telemetry.commit_sha.clone(),
branch: telemetry.branch.clone(),
changed_path_count: telemetry.changed_paths.len(),
source_ref_count: telemetry.source_refs.len(),
soul_receipt_ids: telemetry.soul_receipt_ids.clone(),
verification_assertion_count: telemetry.verification_assertions.len(),
summary: telemetry.summary.clone(),
sealed_preview_note: "Internal work-loop telemetry may carry receipt bodies, artifact previews, and commit diff previews; local Verse context exposes only this digest.".to_string(),
}
}
pub fn load_latest_epiphany_cultmesh_repo_work_overview(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
@ -4294,14 +3819,6 @@ pub fn query_epiphany_local_verse_context(
.get(EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_ARRIVAL_LATEST_KEY)?,
arrival_latest_bifrost_public_proof_publication_receipt: node
.get(EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_ARRIVAL_LATEST_KEY)?,
latest_operator_run_intent: node.get(EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY)?,
latest_operator_run_receipt: node.get(EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_LATEST_KEY)?,
latest_work_loop_summary: node
.get::<EpiphanyCultMeshWorkLoopTelemetryEntry>(
EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_LATEST_KEY,
)?
.as_ref()
.map(epiphany_local_verse_work_loop_summary),
latest_repo_work_overview: node.get(EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_LATEST_KEY)?,
latest_repo_work_map_entry: node.get(EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY)?,
contract_summaries,
@ -4391,14 +3908,6 @@ impl_local_verse_contract_summary!(crate::SoulCultNetContract);
impl_local_verse_contract_summary!(crate::ContinuityCultNetContract);
impl_local_verse_contract_summary!(EpiphanyCultMeshBifrostContractEntry);
fn epiphany_cultmesh_operator_run_intent_key(run_id: &str) -> String {
format!("epiphany-local/operator-run-intent/{run_id}")
}
fn epiphany_cultmesh_operator_run_receipt_key(run_id: &str) -> String {
format!("epiphany-local/operator-run-receipt/{run_id}")
}
fn epiphany_cultmesh_daemon_poke_intent_key(intent_id: &str) -> String {
format!("epiphany-local/daemon-poke-intent/{intent_id}")
}
@ -6048,218 +5557,6 @@ mod tests {
Ok(())
}
#[test]
fn operator_run_intent_and_receipt_round_trip_as_native_cultmesh_documents() -> Result<()> {
let temp = tempfile::tempdir()?;
let store = temp.path().join("epiphany-operator-run.ccmp");
let intent = EpiphanyCultMeshOperatorRunIntentEntry {
schema_version: EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION.to_string(),
runtime_id: "epiphany-test".to_string(),
verse_id: EPIPHANY_CULTMESH_INTERNAL_VERSE_ID.to_string(),
run_id: "run-test".to_string(),
requested_at_utc: "2026-05-27T00:00:00Z".to_string(),
mode: "status".to_string(),
root: "E:\\Projects\\EpiphanyAgent".to_string(),
workspace: "E:\\Projects\\EpiphanyAgent".to_string(),
thread_id: String::new(),
codex_home: "C:\\Users\\Meta\\.codex".to_string(),
target_dir: "C:\\Users\\Meta\\.cargo-target-codex".to_string(),
max_steps: 4,
timeout_seconds: 240,
auto_review: false,
no_ephemeral: false,
artifact_root: ".epiphany-run/run-test".to_string(),
dogfood_root: ".epiphany-dogfood/run-test".to_string(),
};
let receipt = EpiphanyCultMeshOperatorRunReceiptEntry {
schema_version: EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION.to_string(),
runtime_id: "epiphany-test".to_string(),
verse_id: EPIPHANY_CULTMESH_INTERNAL_VERSE_ID.to_string(),
run_id: "run-test".to_string(),
completed_at_utc: "2026-05-27T00:00:01Z".to_string(),
mode: "status".to_string(),
status: "completed".to_string(),
result_path: ".epiphany-run/run-test/status.json".to_string(),
artifact_root: ".epiphany-run/run-test".to_string(),
dogfood_root: ".epiphany-dogfood/run-test".to_string(),
operator_snapshot_store: ".epiphany-run/cultmesh/operator-snapshots.ccmp".to_string(),
operator_snapshot_id: "run-test-status".to_string(),
artifact_refs: vec![".epiphany-run/run-test/status.json".to_string()],
notes: vec!["receipt".to_string()],
};
write_epiphany_cultmesh_operator_run_intent(&store, intent.clone())?;
write_epiphany_cultmesh_operator_run_receipt(&store, receipt.clone())?;
assert_eq!(
load_latest_epiphany_cultmesh_operator_run_intent(&store, "epiphany-test")?,
Some(intent.clone())
);
assert_eq!(
load_latest_epiphany_cultmesh_operator_run_receipt(&store, "epiphany-test")?,
Some(receipt.clone())
);
let mut newer_intent = intent.clone();
newer_intent.run_id = "run-newer".to_string();
newer_intent.requested_at_utc = "2026-05-27T01:00:00Z".to_string();
write_epiphany_cultmesh_operator_run_intent(&store, newer_intent.clone())?;
let mut delayed_intent = intent.clone();
delayed_intent.run_id = "run-delayed".to_string();
delayed_intent.requested_at_utc = "2026-05-26T23:00:00Z".to_string();
write_epiphany_cultmesh_operator_run_intent(&store, delayed_intent.clone())?;
assert_eq!(
load_latest_epiphany_cultmesh_operator_run_intent(&store, "epiphany-test")?,
Some(newer_intent)
);
assert_eq!(
load_epiphany_cultmesh_operator_run_intent(&store, "epiphany-test", "run-delayed")?,
Some(delayed_intent)
);
let mut newer_receipt = receipt.clone();
newer_receipt.run_id = "run-newer".to_string();
newer_receipt.completed_at_utc = "2026-05-27T01:00:01Z".to_string();
write_epiphany_cultmesh_operator_run_receipt(&store, newer_receipt.clone())?;
let mut delayed_receipt = receipt.clone();
delayed_receipt.run_id = "run-delayed".to_string();
delayed_receipt.completed_at_utc = "2026-05-26T23:00:01Z".to_string();
write_epiphany_cultmesh_operator_run_receipt(&store, delayed_receipt)?;
assert_eq!(
load_latest_epiphany_cultmesh_operator_run_receipt(&store, "epiphany-test")?,
Some(newer_receipt)
);
let mut invalid_intent = intent.clone();
invalid_intent.run_id = "run-invalid".to_string();
invalid_intent.requested_at_utc = "not-a-time".to_string();
assert!(
write_epiphany_cultmesh_operator_run_intent(&store, invalid_intent)
.unwrap_err()
.to_string()
.contains("invalid requested_at_utc")
);
let mut wrong_verse_receipt = receipt;
wrong_verse_receipt.run_id = "run-wrong-verse".to_string();
wrong_verse_receipt.verse_id = EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string();
assert!(
write_epiphany_cultmesh_operator_run_receipt(&store, wrong_verse_receipt)
.unwrap_err()
.to_string()
.contains("internal Verse")
);
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
assert!(
node.documents()
.binding(EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_TYPE)
.is_some()
);
assert!(
node.documents()
.binding(EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_TYPE)
.is_some()
);
Ok(())
}
#[test]
fn work_loop_telemetry_round_trips_as_internal_cultmesh_document() -> Result<()> {
let temp = tempfile::tempdir()?;
let store = temp.path().join("epiphany-local-verse.ccmp");
let telemetry = EpiphanyCultMeshWorkLoopTelemetryEntry {
schema_version: EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION.to_string(),
runtime_id: "epiphany-test".to_string(),
verse_id: EPIPHANY_CULTMESH_INTERNAL_VERSE_ID.to_string(),
telemetry_id: "work-loop-telemetry-test".to_string(),
thread_id: "thread-test".to_string(),
produced_at_utc: "2026-06-12T00:00:00Z".to_string(),
source_stage: "hands".to_string(),
target_stages: vec!["soul".to_string(), "Modeling".to_string()],
lower_bound_receipt_at: "2026-06-11T23:59:59Z".to_string(),
hands_intent_id: "hands-intent-test".to_string(),
hands_review_id: "hands-review-test".to_string(),
hands_runtime_job_id: "hands-job-test".to_string(),
substrate_gate_grant_receipt_id: "substrate-grant-test".to_string(),
hands_patch_receipt_id: "hands-patch-test".to_string(),
hands_command_receipt_id: "hands-command-test".to_string(),
hands_commit_receipt_id: "hands-commit-test".to_string(),
command: "cargo test".to_string(),
exit_code: "0".to_string(),
stdout_artifact: "stdout.log".to_string(),
stderr_artifact: "stderr.log".to_string(),
commit_sha: "abc123".to_string(),
branch: "codex/test".to_string(),
changed_paths: vec!["epiphany-core/src/runtime_spine.rs".to_string()],
artifact_previews: vec!["stdout: ok".to_string()],
source_refs: vec!["epiphany-core/src/runtime_spine.rs".to_string()],
source_path_proof: vec!["runtime-spine persisted Hands receipts".to_string()],
soul_receipt_ids: vec!["accept-verification-test".to_string()],
summary: "Hands consequence telemetry for the work loop.".to_string(),
receipt_payload_previews: vec!["patch receipt body".to_string()],
commit_diff_preview: "diff --git a/file b/file".to_string(),
verification_assertions: vec!["test asserts CultMesh round trip".to_string()],
};
write_epiphany_cultmesh_work_loop_telemetry(&store, telemetry.clone())?;
assert_eq!(
load_latest_epiphany_cultmesh_work_loop_telemetry(&store, "epiphany-test")?,
Some(telemetry.clone())
);
let context = query_epiphany_local_verse_context(&store, "epiphany-test")?;
let summary = context
.latest_work_loop_summary
.expect("local Verse context should expose a sealed work-loop digest");
assert_eq!(summary.telemetry_id, telemetry.telemetry_id);
assert_eq!(summary.hands_patch_receipt_id, "hands-patch-test");
assert_eq!(summary.hands_command_receipt_id, "hands-command-test");
assert_eq!(summary.hands_commit_receipt_id, "hands-commit-test");
assert_eq!(summary.changed_path_count, 1);
assert_eq!(summary.source_ref_count, 1);
assert_eq!(summary.verification_assertion_count, 1);
let serialized_summary = serde_json::to_string(&summary)?;
assert!(!serialized_summary.contains("patch receipt body"));
assert!(!serialized_summary.contains("diff --git"));
assert!(!serialized_summary.contains("stdout: ok"));
assert!(serialized_summary.contains("exposes only this digest"));
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
assert!(
node.documents()
.binding(EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_TYPE)
.is_some()
);
let mut newer = telemetry.clone();
newer.telemetry_id = "work-loop-telemetry-newer".to_string();
newer.produced_at_utc = "2026-06-12T01:00:00Z".to_string();
write_epiphany_cultmesh_work_loop_telemetry(&store, newer.clone())?;
let mut delayed = telemetry.clone();
delayed.telemetry_id = "work-loop-telemetry-delayed".to_string();
delayed.produced_at_utc = "2026-06-11T23:30:00Z".to_string();
delayed.lower_bound_receipt_at = "2026-06-11T23:00:00Z".to_string();
write_epiphany_cultmesh_work_loop_telemetry(&store, delayed)?;
assert_eq!(
load_latest_epiphany_cultmesh_work_loop_telemetry(&store, "epiphany-test")?,
Some(newer)
);
let mut future_bound = telemetry.clone();
future_bound.telemetry_id = "work-loop-telemetry-future-bound".to_string();
future_bound.lower_bound_receipt_at = "2026-06-12T00:00:01Z".to_string();
let err = write_epiphany_cultmesh_work_loop_telemetry(&store, future_bound)
.expect_err("future receipt lower bound must be refused");
assert!(err.to_string().contains("after packet production"));
let mut wrong_verse = telemetry;
wrong_verse.telemetry_id = "work-loop-telemetry-wrong-verse".to_string();
wrong_verse.verse_id = EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string();
let err = write_epiphany_cultmesh_work_loop_telemetry(&store, wrong_verse)
.expect_err("work-loop evidence outside internal Verse must be refused");
assert!(err.to_string().contains("internal Verse"));
Ok(())
}
#[test]
fn cluster_topology_names_private_verses_body_daemons_and_eve_surfaces() -> Result<()> {
let temp = tempfile::tempdir()?;

View file

@ -175,12 +175,6 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_LOCAL_AREA_TIER;
pub use cultmesh_integration::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_LATEST_KEY;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY;
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_TYPE;
@ -201,9 +195,6 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_STATUS_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_SWARM_BRAKE_KEY;
pub use cultmesh_integration::EPIPHANY_CULTMESH_SWARM_BRAKE_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_SWARM_BRAKE_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_LATEST_KEY;
pub use cultmesh_integration::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_TYPE;
pub use cultmesh_integration::EPIPHANY_WORKSPACE_COVERAGE_PROJECTOR_DAEMON_ID;
pub use cultmesh_integration::EPIPHANY_WORKSPACE_COVERAGE_PROJECTOR_SERVICE_ID;
pub use cultmesh_integration::EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry;
@ -225,8 +216,6 @@ pub use cultmesh_integration::EpiphanyCultMeshDocuments;
pub use cultmesh_integration::EpiphanyCultMeshIdunnAftercareAuditReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshIdunnDeploymentReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshManagedServicePolicyEntry;
pub use cultmesh_integration::EpiphanyCultMeshOperatorRunIntentEntry;
pub use cultmesh_integration::EpiphanyCultMeshOperatorRunReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshRepoWorkMapEntry;
pub use cultmesh_integration::EpiphanyCultMeshRepoWorkOverviewEntry;
pub use cultmesh_integration::EpiphanyCultMeshRepoWorkPublicProofEntry;
@ -234,11 +223,9 @@ pub use cultmesh_integration::EpiphanyCultMeshRepoWorkReadinessEntry;
pub use cultmesh_integration::EpiphanyCultMeshSemanticProjectionHealthEntry;
pub use cultmesh_integration::EpiphanyCultMeshStatusEntry;
pub use cultmesh_integration::EpiphanyCultMeshSwarmBrakeEntry;
pub use cultmesh_integration::EpiphanyCultMeshWorkLoopTelemetryEntry;
pub use cultmesh_integration::EpiphanyGlobalRoomPolicy;
pub use cultmesh_integration::EpiphanyLocalVerseContext;
pub use cultmesh_integration::EpiphanyLocalVerseContractSummary;
pub use cultmesh_integration::EpiphanyLocalVerseWorkLoopSummary;
pub use cultmesh_integration::EpiphanyServiceExecutionAuditCheck;
pub use cultmesh_integration::EpiphanyServiceExecutionAuditReport;
pub use cultmesh_integration::EpiphanyVersePolicy;
@ -262,7 +249,6 @@ pub use cultmesh_integration::epiphany_cultmesh_bifrost_public_proof_publication
pub use cultmesh_integration::epiphany_cultmesh_daemon_poke_intent_from_status;
pub use cultmesh_integration::epiphany_cultmesh_daemon_poke_receipt_for_intent;
pub use cultmesh_integration::epiphany_global_room_policies;
pub use cultmesh_integration::epiphany_local_verse_work_loop_summary;
pub use cultmesh_integration::epiphany_service_execution_audit_report;
pub use cultmesh_integration::epiphany_verse_policies;
pub use cultmesh_integration::idunn_recover_memory_semantic_projection_from_cultmesh;
@ -287,8 +273,6 @@ pub use cultmesh_integration::load_epiphany_cultmesh_idunn_deployment_receipt;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policies;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policy;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policy_with_digest;
pub use cultmesh_integration::load_epiphany_cultmesh_operator_run_intent;
pub use cultmesh_integration::load_epiphany_cultmesh_operator_run_receipt;
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_map_entries;
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_overviews;
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_public_proofs;
@ -304,13 +288,10 @@ pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_service_lifec
pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt_for_service;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_idunn_aftercare_audit_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_idunn_deployment_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_operator_run_intent;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_operator_run_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_map_entry;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_overview;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_public_proof;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_readiness;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_work_loop_telemetry;
pub use cultmesh_integration::open_epiphany_cultmesh_node;
pub use cultmesh_integration::publish_epiphany_cultmesh_semantic_projection_health;
pub use cultmesh_integration::query_epiphany_local_verse_context;
@ -337,12 +318,9 @@ pub use cultmesh_integration::write_epiphany_cultmesh_daemon_service_lifecycle_r
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_status;
#[cfg(test)]
pub use cultmesh_integration::write_epiphany_cultmesh_managed_service_policy;
pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_intent;
pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_semantic_projector_service_policy;
pub use cultmesh_integration::write_epiphany_cultmesh_status;
pub use cultmesh_integration::write_epiphany_cultmesh_swarm_brake;
pub use cultmesh_integration::write_epiphany_cultmesh_work_loop_telemetry;
pub use cultmesh_integration::write_epiphany_cultmesh_workspace_coverage_projector_service_policy;
pub use current_work::*;
pub use distillation::EpiphanyDistillInput;

View file

@ -111,24 +111,6 @@ pub fn render_epiphany_prompt_context(input: &EpiphanyPromptContextInput) -> Str
}
}
if let Some(summary) = input.local_verse.latest_work_loop_summary.as_ref() {
lines.push("## Work Loop Receipt Digest".to_string());
lines.push(format!(
"- Telemetry `{}`: {} -> {}; hands=({}/{}/{}), changed_paths={}, source_refs={}, soul_receipts={}, verification_assertions={}",
summary.telemetry_id,
summary.source_stage,
summary.target_stages.join(","),
summary.hands_patch_receipt_id,
summary.hands_command_receipt_id,
summary.hands_commit_receipt_id,
summary.changed_path_count,
summary.source_ref_count,
summary.soul_receipt_ids.len(),
summary.verification_assertion_count
));
lines.push(format!("- {}", compact_line(&summary.sealed_preview_note)));
}
if !input.local_verse.contract_summaries.is_empty() {
lines.push("## Organ Contract Summary".to_string());
for contract in input.local_verse.contract_summaries.iter().take(8) {
@ -283,9 +265,6 @@ fn push_omitted_count(lines: &mut Vec<String>, total: usize, shown: usize, label
#[cfg(test)]
mod tests {
use super::*;
use crate::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
use crate::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION;
use crate::EpiphanyCultMeshWorkLoopTelemetryEntry;
use crate::epiphany_cultmesh_bifrost_body_change_publication_intent;
use crate::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent;
use crate::epiphany_cultmesh_bifrost_github_publication_receipt_for_publication;
@ -294,7 +273,6 @@ mod tests {
use crate::write_epiphany_cultmesh_bifrost_body_change_publication_intent;
use crate::write_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use crate::write_epiphany_cultmesh_bifrost_github_publication_receipt;
use crate::write_epiphany_cultmesh_work_loop_telemetry;
use epiphany_state_model::EpiphanyMemoryContextPacket;
use epiphany_state_model::EpiphanyMemoryFreshnessStatus;
use epiphany_state_model::EpiphanyMemorySummary;
@ -360,44 +338,6 @@ mod tests {
"epiphany-test",
github_receipt,
)?;
write_epiphany_cultmesh_work_loop_telemetry(
&store,
EpiphanyCultMeshWorkLoopTelemetryEntry {
schema_version: EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION.to_string(),
runtime_id: "epiphany-test".to_string(),
verse_id: EPIPHANY_CULTMESH_INTERNAL_VERSE_ID.to_string(),
telemetry_id: "work-loop-prompt-test".to_string(),
thread_id: "thread-prompt-test".to_string(),
produced_at_utc: "2026-06-18T00:00:00Z".to_string(),
source_stage: "Hands".to_string(),
target_stages: vec!["Soul".to_string(), "Modeling".to_string()],
lower_bound_receipt_at: "2026-06-18T00:00:00Z".to_string(),
hands_intent_id: "hands-intent-prompt-test".to_string(),
hands_review_id: "hands-review-prompt-test".to_string(),
hands_runtime_job_id: "hands-job-prompt-test".to_string(),
substrate_gate_grant_receipt_id: "substrate-grant-prompt-test".to_string(),
hands_patch_receipt_id: "hands-patch-prompt-test".to_string(),
hands_command_receipt_id: "hands-command-prompt-test".to_string(),
hands_commit_receipt_id: "hands-commit-prompt-test".to_string(),
command: "cargo test".to_string(),
exit_code: "0".to_string(),
stdout_artifact: "stdout.log".to_string(),
stderr_artifact: "stderr.log".to_string(),
commit_sha: "abc123".to_string(),
branch: "codex/perfect-machine-cultmesh".to_string(),
changed_paths: vec!["epiphany-core/src/prompt_context.rs".to_string()],
artifact_previews: vec!["sealed stdout preview should stay internal".to_string()],
source_refs: vec!["epiphany-core/src/prompt_context.rs".to_string()],
source_path_proof: vec!["source proof should stay internal".to_string()],
soul_receipt_ids: vec!["soul-acceptance-prompt-test".to_string()],
summary: "Hands consequence digest for prompt assembly.".to_string(),
receipt_payload_previews: vec![
"sealed patch payload should stay internal".to_string(),
],
commit_diff_preview: "diff --git sealed".to_string(),
verification_assertions: vec!["prompt renders digest only".to_string()],
},
)?;
let local_verse = query_epiphany_local_verse_context(&store, "epiphany-test")?;
let memory_context = EpiphanyMemoryContextPacket {
id: "memctx-test".to_string(),
@ -455,15 +395,6 @@ mod tests {
assert!(rendered.contains("github_receipt=github-publication-prompt-test"));
assert!(rendered.contains("github-publication-receipt-prompt-test"));
assert!(rendered.contains("hands_pr=hands-pr-prompt-test"));
assert!(rendered.contains("Work Loop Receipt Digest"));
assert!(rendered.contains("work-loop-prompt-test"));
assert!(rendered.contains("hands-patch-prompt-test"));
assert!(rendered.contains("hands-command-prompt-test"));
assert!(rendered.contains("hands-commit-prompt-test"));
assert!(rendered.contains("exposes only this digest"));
assert!(!rendered.contains("sealed patch payload should stay internal"));
assert!(!rendered.contains("diff --git sealed"));
assert!(!rendered.contains("sealed stdout preview should stay internal"));
assert!(rendered.contains("gamecult-local"));
assert!(rendered.contains("Shared graph law"));
assert!(rendered.contains("Mind reviews durable state effects"));

View file

@ -7,10 +7,6 @@ use crate::agent_launch::{
};
use crate::continuity_gateway::ContinuityRecoveryReceipt;
use crate::continuity_gateway::*;
use crate::cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION;
use crate::cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_TYPE;
use crate::cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION;
use crate::cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_TYPE;
use crate::eyes_gateway::EYES_EVIDENCE_PACKET_SCHEMA_VERSION;
use crate::eyes_gateway::EYES_EVIDENCE_PACKET_TYPE;
use crate::eyes_gateway::EYES_EVIDENCE_REFUSAL_RECEIPT_SCHEMA_VERSION;
@ -13952,37 +13948,6 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
"The ledger is inspected as durable memory; writes are mediated by role-specific state flows.",
],
),
mutation_contract(
EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_TYPE,
EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION,
vec![
CultNetDocumentOperation::Snapshot,
CultNetDocumentOperation::DocumentPut,
],
CultNetMutationAuthority::LocalUser,
vec![],
vec![EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_TYPE],
vec![
"Operator run intents record explicit local wrapper requests before status/plan/smoke/run actions execute.",
"This is not a scheduler queue; it is the typed consent/trace surface for local operator action.",
],
),
mutation_contract(
EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_TYPE,
EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION,
vec![
CultNetDocumentOperation::Snapshot,
CultNetDocumentOperation::DocumentPut,
CultNetDocumentOperation::ReceiptWatch,
],
CultNetMutationAuthority::LocalUser,
vec![],
vec![],
vec![
"Operator run receipts record completed local wrapper actions and evidence artifact references.",
"Referenced artifacts remain evidence; the receipt is the native completion contract.",
],
),
]
}