diff --git a/epiphany-core/src/bin/epiphany-daemon-supervisor.rs b/epiphany-core/src/bin/epiphany-daemon-supervisor.rs index be60e8d3..8ca5f6fa 100644 --- a/epiphany-core/src/bin/epiphany-daemon-supervisor.rs +++ b/epiphany-core/src/bin/epiphany-daemon-supervisor.rs @@ -60,8 +60,8 @@ use epiphany_core::{ WorkspaceCoverageProcessBootstrap, WorkspaceCoverageProcessLifecycleObservation, authenticate_recovery_workspace_coverage_claim_sight, authenticate_workspace_coverage_managed_process_launch, - authenticate_workspace_coverage_replacement_lineage, authenticate_workspace_coverage_provider_heartbeat, + authenticate_workspace_coverage_replacement_lineage, authenticate_workspace_coverage_termination_with_envelope_digest, capture_process_instance, load_latest_workspace_coverage_managed_process_launch, load_latest_workspace_coverage_provider_heartbeat, @@ -2440,8 +2440,8 @@ fn reconcile_workspace_coverage_projector( return Ok(()); } let terminal_sight = match authenticate_current_workspace_coverage_terminal_sight( - &args.store, &runtime_store, + &args.store, &args.runtime_id, host.entry(), ) { @@ -4561,7 +4561,9 @@ mod semantic_projector_authority_tests { .unwrap(); let stale_rotation = body.find("if !current_policy_matches_latest").unwrap(); let terminal_sight = body - .find("let terminal_sight = match authenticate_current_workspace_coverage_terminal_sight") + .find( + "let terminal_sight = match authenticate_current_workspace_coverage_terminal_sight", + ) .unwrap(); let claim_sight = body .find("let target = match authenticate_recovery_workspace_coverage_claim_sight") @@ -4616,13 +4618,18 @@ mod semantic_projector_authority_tests { fn terminal_workspace_coverage_is_observed_without_recovery_authority() { let source = include_str!("epiphany-daemon-supervisor.rs"); let start = source - .find("let terminal_sight = match authenticate_current_workspace_coverage_terminal_sight") + .find( + "let terminal_sight = match authenticate_current_workspace_coverage_terminal_sight", + ) .unwrap(); let end = source[start..] .find("let target = match authenticate_recovery_workspace_coverage_claim_sight") .map(|offset| start + offset) .unwrap(); let branch = &source[start..end]; + assert!(branch.contains( + "authenticate_current_workspace_coverage_terminal_sight(\n &runtime_store,\n &args.store," + )); let lineage = branch .find("authenticate_workspace_coverage_replacement_lineage") .unwrap(); diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index e3d9c766..27e5da27 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -1244,9 +1244,9 @@ pub use workspace_coverage_process_documents::{ authenticate_historical_workspace_coverage_managed_process_launch, authenticate_recovery_workspace_coverage_claim_sight, authenticate_workspace_coverage_managed_process_launch, - authenticate_workspace_coverage_replacement_lineage, authenticate_workspace_coverage_process_termination_observation, authenticate_workspace_coverage_provider_heartbeat, + authenticate_workspace_coverage_replacement_lineage, authenticate_workspace_coverage_termination_with_envelope_digest, load_latest_workspace_coverage_managed_process_launch, load_latest_workspace_coverage_provider_heartbeat, diff --git a/epiphany-core/src/resident_readiness.rs b/epiphany-core/src/resident_readiness.rs index 2fbf7de6..b58630d1 100644 --- a/epiphany-core/src/resident_readiness.rs +++ b/epiphany-core/src/resident_readiness.rs @@ -533,10 +533,9 @@ fn provider_authority_failures( failures.push("source-commit"); } if !executable.is_some_and(|path| { - canonical_or_absolute(path) - == canonical_or_absolute(Path::new(&value.process_executable_path)) - }) - { + canonical_or_absolute(path) + == canonical_or_absolute(Path::new(&value.process_executable_path)) + }) { failures.push("executable"); } if value.status != "ready" { diff --git a/epiphany-core/src/workspace_coverage_process_documents.rs b/epiphany-core/src/workspace_coverage_process_documents.rs index e4dbf1be..1dcc71cd 100644 --- a/epiphany-core/src/workspace_coverage_process_documents.rs +++ b/epiphany-core/src/workspace_coverage_process_documents.rs @@ -1271,10 +1271,9 @@ pub fn authenticate_workspace_coverage_replacement_lineage( host_identity, )? }; - let parent_id = child - .replaces_launch_id - .as_deref() - .ok_or_else(|| anyhow!("workspace coverage replacement lineage ended before the claimed launch"))?; + let parent_id = child.replaces_launch_id.as_deref().ok_or_else(|| { + anyhow!("workspace coverage replacement lineage ended before the claimed launch") + })?; let (termination, termination_digest) = authenticate_workspace_coverage_termination_with_envelope_digest( store_path, @@ -2387,9 +2386,7 @@ pub fn write_workspace_coverage_recovery_directive( replacement_ready_heartbeat_id, host.entry(), )?; - if ready.launch_id != replacement.launch_id - || ready.status != "ready" - { + if ready.launch_id != replacement.launch_id || ready.status != "ready" { bail!("workspace coverage recovery directive evidence is not an exact ready replacement"); } let mut entry = WorkspaceCoverageRecoveryDirectiveEntry { diff --git a/epiphany-core/src/workspace_coverage_projector.rs b/epiphany-core/src/workspace_coverage_projector.rs index b06aa06c..8724fb79 100644 --- a/epiphany-core/src/workspace_coverage_projector.rs +++ b/epiphany-core/src/workspace_coverage_projector.rs @@ -33,9 +33,9 @@ use crate::{ validate_workspace_coverage_projection_plan, workspace_coverage_execution_collection, workspace_coverage_process_documents::{ authenticate_historical_workspace_coverage_managed_process_launch_with_envelope_digest, - authenticate_workspace_coverage_replacement_lineage, authenticate_workspace_coverage_managed_process_launch_with_envelope_digest, authenticate_workspace_coverage_provider_heartbeat_with_envelope_digest, + authenticate_workspace_coverage_replacement_lineage, authenticate_workspace_coverage_termination_with_envelope_digest, }, }; diff --git a/epiphany-core/src/workspace_coverage_projector_service.rs b/epiphany-core/src/workspace_coverage_projector_service.rs index 06343c95..09a6b610 100644 --- a/epiphany-core/src/workspace_coverage_projector_service.rs +++ b/epiphany-core/src/workspace_coverage_projector_service.rs @@ -272,8 +272,7 @@ impl WorkspaceCoverageProjectorServiceBody { &authority.runtime_id, &self.managed_process_launch_id, &authority.trusted_host, - )? - { + )? { if directive.workspace_id != basis.workspace_id || directive.body_binding_sha256 != basis.body_binding_sha256 || directive.body_observation_id != basis.observation_id @@ -430,12 +429,8 @@ mod tests { let recovery = body .find("recover_workspace_coverage_projection_with_authority") .unwrap(); - let retirement = body - .find("retire_workspace_coverage_collections") - .unwrap(); - let classification = body - .find("classify_current_workspace_coverage") - .unwrap(); + let retirement = body.find("retire_workspace_coverage_collections").unwrap(); + let classification = body.find("classify_current_workspace_coverage").unwrap(); let new_work = body.find("RepositoryBodyReadSession::open").unwrap(); assert!(retirement < classification); assert!(classification < directive && directive < recovery);