Delete duplicate continuity recovery receipts

This commit is contained in:
Meta Vens 2026-08-24 05:20:45 +02:00
commit fed4b85780
4 changed files with 3 additions and 80 deletions

View file

@ -1,63 +0,0 @@
use crate::EpiphanyReorientFindingInterpretation;
use cultcache_rs::DatabaseEntry;
pub const CONTINUITY_RECOVERY_RECEIPT_TYPE: &str = "epiphany.continuity.recovery_receipt";
pub const CONTINUITY_RECOVERY_RECEIPT_SCHEMA_VERSION: &str =
"epiphany.continuity.recovery_receipt.v0";
#[derive(Debug, Clone, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.continuity.recovery_receipt",
schema = "ContinuityRecoveryReceipt"
)]
pub struct ContinuityRecoveryReceipt {
#[cultcache(key = 0)]
pub schema_version: String,
#[cultcache(key = 1)]
pub receipt_id: String,
#[cultcache(key = 2)]
pub source_result_id: String,
#[cultcache(key = 3)]
pub source_job_id: String,
#[cultcache(key = 4)]
pub binding_id: String,
#[cultcache(key = 5)]
pub mode: String,
#[cultcache(key = 6)]
pub checkpoint_still_valid: String,
#[cultcache(key = 7)]
pub summary: String,
#[cultcache(key = 8)]
pub next_safe_move: String,
#[cultcache(key = 9)]
pub files_inspected: Vec<String>,
#[cultcache(key = 10)]
pub emitted_at: String,
#[cultcache(key = 11)]
pub contract: String,
}
pub fn continuity_recovery_receipt_from_reorient_finding(
receipt_id: String,
binding_id: String,
finding: &EpiphanyReorientFindingInterpretation,
emitted_at: String,
) -> ContinuityRecoveryReceipt {
ContinuityRecoveryReceipt {
schema_version: CONTINUITY_RECOVERY_RECEIPT_SCHEMA_VERSION.to_string(),
receipt_id,
source_result_id: finding.runtime_result_id.clone().unwrap_or_default(),
source_job_id: finding.runtime_job_id.clone().unwrap_or_default(),
binding_id,
mode: finding.mode.clone().unwrap_or_else(|| "unknown".to_string()),
checkpoint_still_valid: finding
.checkpoint_still_valid
.map(|value| value.to_string())
.unwrap_or_else(|| "unknown".to_string()),
summary: finding.summary.clone().unwrap_or_default(),
next_safe_move: finding.next_safe_move.clone().unwrap_or_default(),
files_inspected: finding.files_inspected.clone(),
emitted_at,
contract: "Continuity recovery emitted from a reviewed reorientation finding; it proves what survived rupture before Mind admits recovery state.".to_string(),
}
}

View file

@ -1,7 +1,6 @@
mod agent_launch;
pub mod atlas;
mod causal_work_identity;
mod continuity_gateway;
mod coordinator_objective_intake;
mod coordinator_results;
pub mod coordinator_status;
@ -75,7 +74,6 @@ pub use agent_launch::epiphany_role_label;
pub use agent_launch::epiphany_role_launch_output_schema;
pub use atlas::*;
pub use causal_work_identity::*;
pub use continuity_gateway::*;
pub use coordinator_objective_intake::USER_OBJECTIVE_INTAKE_CONTRACT;
pub use coordinator_objective_intake::USER_OBJECTIVE_INTAKE_SCHEMA_VERSION;
pub use coordinator_objective_intake::USER_OBJECTIVE_INTAKE_TYPE;

View file

@ -418,13 +418,12 @@ pub fn record_reorientation_pass_failure(
}
let write =
crate::mind_documents::prepare_mind_document(&cache, &failure.failure_id, &failure)?;
match crate::reasoning_context::commit_mind_mutation_with_derived_companions(
match crate::reasoning_context::commit_mind_mutation(
store_path,
decision_context_id,
"Continuity.reorientation_failure",
strong_reads,
vec![write],
Vec::new(),
&terminal.completed_at,
)? {
crate::EpiphanyMindCommitOutcome::Committed(receipt) => Ok(receipt),
@ -621,13 +620,6 @@ pub fn accept_reorientation_result(
next_safe_move: result.next_safe_move.clone(),
decided_at: accepted_at.into(),
};
let finding = crate::interpret_runtime_reorient_worker_result(&result);
let recovery = crate::continuity_recovery_receipt_from_reorient_finding(
format!("continuity-recovery-{}", request.request_id),
crate::EPIPHANY_REORIENT_LAUNCH_BINDING_ID.into(),
&finding,
accepted_at.into(),
);
let mut strong_reads = exact_source_envelopes(&cache, &request.source_documents)?;
for (document_type, document_key) in [
(
@ -652,14 +644,12 @@ pub fn accept_reorientation_result(
}
let write =
crate::mind_documents::prepare_mind_document(&cache, &decision.decision_id, &decision)?;
let companion = cache.prepare_entry(&recovery.receipt_id, &recovery)?.0;
match crate::reasoning_context::commit_mind_mutation_with_derived_companions(
match crate::reasoning_context::commit_mind_mutation(
store_path,
&result.decision_context_id,
"Continuity.reorientation",
strong_reads,
vec![write],
vec![companion],
accepted_at,
)? {
crate::EpiphanyMindCommitOutcome::Committed(receipt) => Ok(receipt),

View file

@ -5,7 +5,6 @@ use crate::agent_launch::{
EPIPHANY_MIND_OWNER_ROLE, EPIPHANY_MIND_ROLE_BINDING_ID, EPIPHANY_MODELING_OWNER_ROLE,
EPIPHANY_MODELING_ROLE_BINDING_ID,
};
use crate::continuity_gateway::ContinuityRecoveryReceipt;
use crate::eyes_gateway::EyesEvidencePacket;
use crate::eyes_gateway::EyesSourceLookupReceipt;
use crate::hands_gateway::*;
@ -86,7 +85,7 @@ pub const COORDINATOR_RUN_RECEIPT_TYPE: &str = "epiphany.coordinator_run_receipt
pub const RUNTIME_IDENTITY_KEY: &str = "self";
pub const RUNTIME_SWARM_BINDING_KEY: &str = "runtime-swarm-binding";
pub const RUNTIME_SWARM_BINDING_SCHEMA_VERSION: &str = "epiphany.runtime.swarm_binding.v1";
pub const RUNTIME_SPINE_SCHEMA_VERSION: &str = "epiphany.runtime_spine.v24";
pub const RUNTIME_SPINE_SCHEMA_VERSION: &str = "epiphany.runtime_spine.v25";
pub const EPIPHANY_RUNTIME_ROOT_SESSION_ID: &str = "epiphany-main";
pub const RUNTIME_MODEL_EXECUTION_BINDING_SCHEMA_VERSION: &str =
"epiphany.runtime.model_execution_binding.v0";
@ -860,7 +859,6 @@ fn runtime_spine_schema_cache() -> Result<CultCache> {
cache.register_entry_type::<HandsCommandReceipt>()?;
cache.register_entry_type::<HandsCommitReceipt>()?;
cache.register_entry_type::<SoulVerdictReceipt>()?;
cache.register_entry_type::<ContinuityRecoveryReceipt>()?;
cache.register_entry_type::<EpiphanyOpenAiModelRequest>()?;
cache.register_entry_type::<EpiphanyOpenAiStreamEvent>()?;
cache.register_entry_type::<EpiphanyOpenAiModelReceipt>()?;