Normalize epiphany-core formatting
This commit is contained in:
parent
951dee9d45
commit
47689dfa1e
5 changed files with 45 additions and 42 deletions
|
|
@ -390,13 +390,11 @@ mod tests {
|
|||
)?;
|
||||
cache.put(
|
||||
crate::MEMORY_GRAPH_KEY,
|
||||
&crate::EpiphanyMemoryGraphEntry::from_snapshot(
|
||||
&crate::EpiphanyMemoryGraphSnapshot {
|
||||
schema_version: Some(crate::MEMORY_GRAPH_SCHEMA_VERSION.into()),
|
||||
graph_id: "bootstrap-model".into(),
|
||||
..Default::default()
|
||||
},
|
||||
)?,
|
||||
&crate::EpiphanyMemoryGraphEntry::from_snapshot(&crate::EpiphanyMemoryGraphSnapshot {
|
||||
schema_version: Some(crate::MEMORY_GRAPH_SCHEMA_VERSION.into()),
|
||||
graph_id: "bootstrap-model".into(),
|
||||
..Default::default()
|
||||
})?,
|
||||
)?;
|
||||
let before = std::fs::read(&store)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ use epiphany_core::{
|
|||
derive_resident_cognition_readiness, enqueue_resident_self_pressure,
|
||||
import_bifrost_persona_feedback_deliveries, ingest_resident_self_domain_pressure,
|
||||
load_epiphany_cultmesh_swarm_brake, load_resident_self_state, observe_process_instance,
|
||||
prepare_resident_self_launch, publish_resident_provider_readiness, resident_self_child_claim,
|
||||
resident_coordinator_thread_id, resident_self_local_provider_status,
|
||||
terminate_process_instance,
|
||||
validate_persona_feedback_store_separation, validate_resident_self_store_separation,
|
||||
prepare_resident_self_launch, publish_resident_provider_readiness,
|
||||
resident_coordinator_thread_id, resident_self_child_claim, resident_self_local_provider_status,
|
||||
terminate_process_instance, validate_persona_feedback_store_separation,
|
||||
validate_resident_self_store_separation,
|
||||
};
|
||||
use serde_json::json;
|
||||
use std::collections::BTreeMap;
|
||||
|
|
|
|||
|
|
@ -158,10 +158,9 @@ pub fn append_verification_hands_receipt_context(
|
|||
)
|
||||
.map_err(|error| format!("failed to load Mind RepoModel admission review for Soul: {error}"))?
|
||||
.ok_or_else(|| "Soul frontier admission receipt has no persisted Mind review".to_string())?;
|
||||
let admission_result_id = admission_receipt
|
||||
.result_id
|
||||
.as_deref()
|
||||
.ok_or_else(|| "Soul frontier admission receipt is not bound to a Modeling result".to_string())?;
|
||||
let admission_result_id = admission_receipt.result_id.as_deref().ok_or_else(|| {
|
||||
"Soul frontier admission receipt is not bound to a Modeling result".to_string()
|
||||
})?;
|
||||
let modeling_acceptances = state
|
||||
.acceptance_receipts
|
||||
.iter()
|
||||
|
|
@ -180,15 +179,16 @@ pub fn append_verification_hands_receipt_context(
|
|||
}
|
||||
let modeling_acceptance = modeling_acceptances[0];
|
||||
let state_commit_id = format!("mind-commit-{}", modeling_acceptance.id);
|
||||
let state_commit = crate::runtime_mind_state_commit_receipt(runtime_store_path, &state_commit_id)
|
||||
.map_err(|error| format!("failed to load Mind state commit receipt for Soul: {error}"))?
|
||||
.ok_or_else(|| "Soul frontier Modeling acceptance has no Mind state commit receipt".to_string())?;
|
||||
let gateway_review = crate::runtime_mind_gateway_review(
|
||||
runtime_store_path,
|
||||
&state_commit.gateway_id,
|
||||
)
|
||||
.map_err(|error| format!("failed to load Mind gateway review for Soul: {error}"))?
|
||||
.ok_or_else(|| "Soul frontier Mind state commit has no gateway review".to_string())?;
|
||||
let state_commit =
|
||||
crate::runtime_mind_state_commit_receipt(runtime_store_path, &state_commit_id)
|
||||
.map_err(|error| format!("failed to load Mind state commit receipt for Soul: {error}"))?
|
||||
.ok_or_else(|| {
|
||||
"Soul frontier Modeling acceptance has no Mind state commit receipt".to_string()
|
||||
})?;
|
||||
let gateway_review =
|
||||
crate::runtime_mind_gateway_review(runtime_store_path, &state_commit.gateway_id)
|
||||
.map_err(|error| format!("failed to load Mind gateway review for Soul: {error}"))?
|
||||
.ok_or_else(|| "Soul frontier Mind state commit has no gateway review".to_string())?;
|
||||
let telemetry = work_loop_telemetry_from_hands_chain(
|
||||
&chain,
|
||||
runtime_store_path,
|
||||
|
|
@ -363,7 +363,9 @@ pub fn has_complete_hands_consequence_after_latest_accepted_boundary(
|
|||
};
|
||||
runtime_latest_hands_receipt_chain_after(runtime_store_path, accepted_at)
|
||||
.map(|chain| chain.is_some())
|
||||
.map_err(|error| format!("failed to load Hands receipt chain for coordinator routing: {error}"))
|
||||
.map_err(|error| {
|
||||
format!("failed to load Hands receipt chain for coordinator routing: {error}")
|
||||
})
|
||||
}
|
||||
|
||||
pub fn append_modeling_repo_model_shape_context(
|
||||
|
|
@ -1380,7 +1382,9 @@ mod tests {
|
|||
);
|
||||
assert!(shape.contains("strict lexicographic ascending order with no duplicates"));
|
||||
assert!(shape.contains("proposal Evolution upsert must use status active"));
|
||||
assert!(shape.contains("recommended_next_organ must be exactly one routeable canonical value"));
|
||||
assert!(
|
||||
shape.contains("recommended_next_organ must be exactly one routeable canonical value")
|
||||
);
|
||||
assert!(shape.contains("Prefer accepted"));
|
||||
fs::remove_dir_all(&temp)?;
|
||||
Ok(())
|
||||
|
|
@ -1857,11 +1861,10 @@ mod tests {
|
|||
created_at: "2026-06-12T00:00:06Z".to_string(),
|
||||
},
|
||||
)?;
|
||||
assert!(has_complete_hands_consequence_after_latest_accepted_boundary(
|
||||
&runtime_store,
|
||||
&state
|
||||
)
|
||||
.map_err(anyhow::Error::msg)?);
|
||||
assert!(
|
||||
has_complete_hands_consequence_after_latest_accepted_boundary(&runtime_store, &state)
|
||||
.map_err(anyhow::Error::msg)?
|
||||
);
|
||||
let verification_result = crate::EpiphanyRuntimeRoleWorkerResult {
|
||||
schema_version: crate::RUNTIME_ROLE_WORKER_RESULT_SCHEMA_VERSION.to_string(),
|
||||
repository_body_observation_basis: None,
|
||||
|
|
@ -1955,12 +1958,14 @@ mod tests {
|
|||
.contains("verificationAcceptanceReceiptId: accept-verification-context")
|
||||
);
|
||||
assert!(modeling_context.contains("allowedDisposition: resolved"));
|
||||
assert!(modeling_context.contains(
|
||||
"Include the exact soulVerdictReceiptId in the top-level evidenceIds"
|
||||
));
|
||||
assert!(modeling_context.contains(
|
||||
"Include both verificationRequestId and soulVerdictReceiptId"
|
||||
));
|
||||
assert!(
|
||||
modeling_context
|
||||
.contains("Include the exact soulVerdictReceiptId in the top-level evidenceIds")
|
||||
);
|
||||
assert!(
|
||||
modeling_context
|
||||
.contains("Include both verificationRequestId and soulVerdictReceiptId")
|
||||
);
|
||||
assert!(modeling_context.contains("Set statePatch to null"));
|
||||
assert!(modeling_context.contains("identityMigrationBody:"));
|
||||
assert!(
|
||||
|
|
|
|||
|
|
@ -853,10 +853,8 @@ mod tests {
|
|||
#[test]
|
||||
fn source_commits_have_isolated_build_roots() {
|
||||
let root = Path::new("isolated-release-build");
|
||||
let first =
|
||||
release_bundle_target_dir(root, "0123456789abcdef0123456789abcdef01234567");
|
||||
let second =
|
||||
release_bundle_target_dir(root, "89abcdef0123456789abcdef0123456789abcdef");
|
||||
let first = release_bundle_target_dir(root, "0123456789abcdef0123456789abcdef01234567");
|
||||
let second = release_bundle_target_dir(root, "89abcdef0123456789abcdef0123456789abcdef");
|
||||
assert_ne!(first, second);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -536,7 +536,9 @@ pub fn coordinator_argv(
|
|||
pub fn resident_coordinator_thread_id(runtime_id: &str) -> Result<String> {
|
||||
let runtime_id = runtime_id.trim();
|
||||
if runtime_id.is_empty() {
|
||||
return Err(anyhow!("resident coordinator thread requires runtime identity"));
|
||||
return Err(anyhow!(
|
||||
"resident coordinator thread requires runtime identity"
|
||||
));
|
||||
}
|
||||
Ok(format!("resident-self-thread-{runtime_id}"))
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue