Separate live coverage sight from recovery

This commit is contained in:
Meta Vens 2026-07-18 15:37:31 +01:00
commit 42c08e0c6b
6 changed files with 864 additions and 131 deletions

View file

@ -57,14 +57,16 @@ use epiphany_core::{EpiphanyPackagedReleaseEntry, authenticate_epiphany_packaged
use epiphany_core::{
ProcessInstanceIdentity, ProcessInstanceObservation,
WORKSPACE_COVERAGE_PROCESS_LAUNCH_SCHEMA_VERSION, WorkspaceCoverageManagedProcessLaunchEntry,
WorkspaceCoverageProcessBootstrap, authenticate_current_workspace_coverage_claim_sight,
WorkspaceCoverageProcessBootstrap, WorkspaceCoverageProcessLifecycleObservation,
authenticate_current_workspace_coverage_claim_sight,
authenticate_workspace_coverage_managed_process_launch,
authenticate_workspace_coverage_provider_heartbeat,
authenticate_workspace_coverage_termination_with_envelope_digest, capture_process_instance,
load_latest_workspace_coverage_managed_process_launch,
load_latest_workspace_coverage_provider_heartbeat,
load_workspace_coverage_process_termination_observation, native_boot_identity,
observe_process_instance, open_default_host_identity, sign_workspace_coverage_launch,
observe_process_instance, observe_workspace_coverage_managed_process,
open_default_host_identity, sign_workspace_coverage_launch,
workspace_coverage_host_identity_record_digest,
write_workspace_coverage_managed_process_launch, write_workspace_coverage_process_bootstrap,
write_workspace_coverage_process_termination_observation,
@ -108,6 +110,54 @@ enum ManagedServiceLineage {
LegacyV1,
}
enum WorkspaceCoverageRecoveryActuation<T> {
Written(T),
Degraded(WorkspaceCoverageProcessLifecycleObservation),
Terminal(WorkspaceCoverageProcessLifecycleObservation),
}
fn actuate_workspace_coverage_recovery_if_alive<T>(
observation: WorkspaceCoverageProcessLifecycleObservation,
write: impl FnOnce() -> Result<T>,
) -> Result<WorkspaceCoverageRecoveryActuation<T>> {
match observation {
WorkspaceCoverageProcessLifecycleObservation::ExactAlive => {
Ok(WorkspaceCoverageRecoveryActuation::Written(write()?))
}
WorkspaceCoverageProcessLifecycleObservation::Inaccessible
| WorkspaceCoverageProcessLifecycleObservation::Indeterminate { .. } => {
Ok(WorkspaceCoverageRecoveryActuation::Degraded(observation))
}
WorkspaceCoverageProcessLifecycleObservation::BootSuperseded { .. }
| WorkspaceCoverageProcessLifecycleObservation::ExactExited { .. }
| WorkspaceCoverageProcessLifecycleObservation::Missing
| WorkspaceCoverageProcessLifecycleObservation::Replaced { .. } => {
Ok(WorkspaceCoverageRecoveryActuation::Terminal(observation))
}
}
}
fn report_workspace_coverage_replacement_not_alive(
policy: &EpiphanyCultMeshManagedServicePolicyEntry,
replacement: &WorkspaceCoverageManagedProcessLaunchEntry,
observation: WorkspaceCoverageProcessLifecycleObservation,
status: &str,
) -> Result<()> {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": status,
"serviceId": policy.service_id,
"launchId": replacement.launch_id,
"observation": format!("{observation:?}"),
"restarted": false,
"privateStateExposed": false,
}))?
);
Ok(())
}
#[cfg(windows)]
use std::os::windows::process::CommandExt;
@ -2232,117 +2282,255 @@ fn reconcile_workspace_coverage_projector(
)?;
let host = open_default_host_identity()
.context("workspace coverage reconciliation requires an enrolled host identity")?;
let Some(target) = authenticate_current_workspace_coverage_claim_sight(
let target = match authenticate_current_workspace_coverage_claim_sight(
&args.store,
&runtime_store,
&args.runtime_id,
host.entry(),
)?
else {
let latest = load_latest_workspace_coverage_managed_process_launch(
&args.store,
args.runtime_id.clone(),
)?;
if let Some(latest) = latest {
let host = open_default_host_identity()
.context("workspace coverage reconciliation requires an enrolled host identity")?;
if load_workspace_coverage_process_termination_observation(
&args.store,
args.runtime_id.clone(),
&latest.launch_id,
)?
.is_none()
&& let Err(error) = write_workspace_coverage_process_termination_observation(
&args.store,
args.runtime_id.clone(),
&latest.launch_id,
&host,
)
{
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "awaiting-first-claim",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
) {
Ok(target) => target,
Err(error) => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-refused",
"serviceId": policy.service_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
};
let latest = match load_latest_workspace_coverage_managed_process_launch(
&args.store,
args.runtime_id.clone(),
) {
Ok(latest) => latest,
Err(error) => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-refused",
"serviceId": policy.service_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
};
let Some(latest) = latest else {
args.service_command = Some(PathBuf::from(&policy.command));
args.service_args = policy.args.clone();
args.cwd = policy.cwd.clone().map(PathBuf::from);
args.stdout_artifact = Some(PathBuf::from(policy.stdout_artifact.clone()));
args.stderr_artifact = Some(PathBuf::from(policy.stderr_artifact.clone()));
let _ = service_launch_internal(args, None, true)?;
return Ok(());
};
if target
.as_ref()
.is_some_and(|claim| claim.launch_id != latest.launch_id)
{
let old_target = target
.clone()
.context("workspace coverage mismatch lost its authenticated claim target")?;
let in_flight = (|| -> Result<_> {
let (termination, termination_digest) =
authenticate_workspace_coverage_termination_with_envelope_digest(
&args.store,
args.runtime_id.clone(),
&latest.launch_id,
&old_target.launch_id,
host.entry(),
)?;
if load_latest_workspace_coverage_managed_process_launch(
let old_launch = authenticate_workspace_coverage_managed_process_launch(
&args.store,
args.runtime_id.clone(),
)?
.is_some_and(|candidate| {
candidate.replaces_termination_id.as_deref()
== Some(termination.termination_id.as_str())
}) {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "awaiting-first-claim",
"serviceId": policy.service_id,
"restarted": false,
"privateStateExposed": false,
}))?
&old_target.launch_id,
host.entry(),
)?;
let replacement = authenticate_workspace_coverage_managed_process_launch(
&args.store,
args.runtime_id.clone(),
&latest.launch_id,
host.entry(),
)?;
if replacement.replaces_launch_id.as_deref() != Some(old_target.launch_id.as_str())
|| replacement.replaces_termination_id.as_deref()
!= Some(termination.termination_id.as_str())
|| replacement.replaces_termination_envelope_digest.as_deref()
!= Some(termination_digest.as_str())
|| replacement.policy_id != old_launch.policy_id
|| replacement.policy_envelope_digest != old_launch.policy_envelope_digest
|| replacement.command != old_launch.command
|| replacement.args != old_launch.args
|| replacement.cwd != old_launch.cwd
{
anyhow::bail!(
"latest launch is not the exact authenticated in-flight replacement lineage"
);
return Ok(());
}
args.service_command = Some(PathBuf::from(&policy.command));
args.service_args = policy.args;
args.cwd = policy.cwd.map(PathBuf::from);
args.stdout_artifact = Some(PathBuf::from(policy.stdout_artifact));
args.stderr_artifact = Some(PathBuf::from(policy.stderr_artifact));
let replacement = CoverageReplacementEvidence {
old_launch_id: latest.launch_id,
termination_id: termination.termination_id,
termination_envelope_digest: termination_digest,
Ok(replacement)
})();
if let Ok(replacement) = in_flight {
let replacement_observation = match observe_workspace_coverage_managed_process(
&args.store,
args.runtime_id.clone(),
&replacement.launch_id,
host.entry(),
) {
Ok(observation) => observation,
Err(error) => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-refused",
"serviceId": policy.service_id,
"launchId": replacement.launch_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
};
let _ = service_launch_internal(args, Some(replacement), true)?;
return Ok(());
} else {
args.service_command = Some(PathBuf::from(&policy.command));
args.service_args = policy.args;
args.cwd = policy.cwd.map(PathBuf::from);
args.stdout_artifact = Some(PathBuf::from(policy.stdout_artifact));
args.stderr_artifact = Some(PathBuf::from(policy.stderr_artifact));
let _ = service_launch_internal(args, None, true)?;
match replacement_observation {
WorkspaceCoverageProcessLifecycleObservation::ExactAlive => {
return finish_workspace_coverage_recovery(
&args,
&policy,
&runtime_store,
host.entry(),
&host,
old_target,
replacement,
false,
);
}
WorkspaceCoverageProcessLifecycleObservation::Inaccessible
| WorkspaceCoverageProcessLifecycleObservation::Indeterminate { .. } => {
return report_workspace_coverage_replacement_not_alive(
&policy,
&replacement,
replacement_observation,
"observation-degraded",
);
}
WorkspaceCoverageProcessLifecycleObservation::BootSuperseded { .. }
| WorkspaceCoverageProcessLifecycleObservation::ExactExited { .. }
| WorkspaceCoverageProcessLifecycleObservation::Missing
| WorkspaceCoverageProcessLifecycleObservation::Replaced { .. } => {
return report_workspace_coverage_replacement_not_alive(
&policy,
&replacement,
replacement_observation,
"replacement-terminal",
);
}
}
}
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-refused",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"reason": "authenticated claim sight does not name the current managed launch",
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
let observation = match observe_workspace_coverage_managed_process(
&args.store,
args.runtime_id.clone(),
&latest.launch_id,
host.entry(),
) {
Ok(observation) => observation,
Err(error) => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-refused",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
};
match observation {
WorkspaceCoverageProcessLifecycleObservation::ExactAlive => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observed-alive",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"claimId": target.as_ref().map(|claim| claim.claim_id.as_str()),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
WorkspaceCoverageProcessLifecycleObservation::Inaccessible
| WorkspaceCoverageProcessLifecycleObservation::Indeterminate { .. } => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-degraded",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"observation": format!("{observation:?}"),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
WorkspaceCoverageProcessLifecycleObservation::BootSuperseded { .. }
| WorkspaceCoverageProcessLifecycleObservation::ExactExited { .. }
| WorkspaceCoverageProcessLifecycleObservation::Missing
| WorkspaceCoverageProcessLifecycleObservation::Replaced { .. } => {}
}
if load_workspace_coverage_process_termination_observation(
&args.store,
args.runtime_id.clone(),
&target.launch_id,
&latest.launch_id,
)?
.is_none()
{
if let Err(error) = write_workspace_coverage_process_termination_observation(
&args.store,
args.runtime_id.clone(),
&target.launch_id,
&latest.launch_id,
&host,
) {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "awaiting-exact-termination",
"status": "termination-refused",
"serviceId": policy.service_id,
"claimId": target.claim_id,
"claimId": target.as_ref().map(|claim| claim.claim_id.as_str()),
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
@ -2355,11 +2543,55 @@ fn reconcile_workspace_coverage_projector(
authenticate_workspace_coverage_termination_with_envelope_digest(
&args.store,
args.runtime_id.clone(),
&target.launch_id,
&latest.launch_id,
host.entry(),
)?;
// Claim acquisition may race the first reconciliation observation. The
// terminal proof is the cut: authenticate Body sight again after it, and
// use only this post-terminal target for replacement/recovery authority.
let post_terminal_target = match authenticate_current_workspace_coverage_claim_sight(
&args.store,
&runtime_store,
&args.runtime_id,
host.entry(),
) {
Ok(target) => target,
Err(error) => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "recovery-refused",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
};
if post_terminal_target
.as_ref()
.is_some_and(|claim| claim.launch_id != latest.launch_id)
{
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "recovery-refused",
"serviceId": policy.service_id,
"launchId": latest.launch_id,
"reason": "post-terminal claim sight does not name the terminated managed launch",
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
let replacement_evidence = CoverageReplacementEvidence {
old_launch_id: target.launch_id.clone(),
old_launch_id: latest.launch_id.clone(),
termination_id: termination.termination_id.clone(),
termination_envelope_digest: termination_digest,
};
@ -2368,23 +2600,70 @@ fn reconcile_workspace_coverage_projector(
args.runtime_id.clone(),
)?
.filter(|launch| {
launch.replaces_launch_id.as_deref() == Some(target.launch_id.as_str())
launch.replaces_launch_id.as_deref() == Some(latest.launch_id.as_str())
&& launch.replaces_termination_id.as_deref()
== Some(termination.termination_id.as_str())
});
let replacement = if let Some(existing) = existing_replacement {
existing
let (replacement, launched_now) = if let Some(existing) = existing_replacement {
(existing, false)
} else {
args.service_command = Some(PathBuf::from(&policy.command));
args.service_args = policy.args;
args.cwd = policy.cwd.map(PathBuf::from);
args.stdout_artifact = Some(PathBuf::from(policy.stdout_artifact));
args.stderr_artifact = Some(PathBuf::from(policy.stderr_artifact));
service_launch_internal(args.clone(), Some(replacement_evidence), false)?
.coverage_launch
.context("workspace coverage replacement launch returned no specialized identity")?
args.service_args = policy.args.clone();
args.cwd = policy.cwd.clone().map(PathBuf::from);
args.stdout_artifact = Some(PathBuf::from(policy.stdout_artifact.clone()));
args.stderr_artifact = Some(PathBuf::from(policy.stderr_artifact.clone()));
(
service_launch_internal(args.clone(), Some(replacement_evidence), false)?
.coverage_launch
.context(
"workspace coverage replacement launch returned no specialized identity",
)?,
true,
)
};
let Some(target) = post_terminal_target else {
let status = if launched_now {
"replacement-launched-awaiting-claim"
} else {
"replacement-observed-awaiting-claim"
};
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": status,
"serviceId": policy.service_id,
"replacementLaunchId": replacement.launch_id,
"restarted": launched_now,
"privateStateExposed": false,
}))?
);
return Ok(());
};
finish_workspace_coverage_recovery(
&args,
&policy,
&runtime_store,
host.entry(),
&host,
target,
replacement,
launched_now,
)
}
fn finish_workspace_coverage_recovery(
args: &Args,
policy: &EpiphanyCultMeshManagedServicePolicyEntry,
runtime_store: &Path,
host_identity: &epiphany_core::HostIncarnationIdentityEntry,
host: &epiphany_core::HostIdentitySigner,
target: epiphany_core::WorkspaceCoverageClaimSightEntry,
replacement: WorkspaceCoverageManagedProcessLaunchEntry,
launched_now: bool,
) -> Result<()> {
let ready = (0..100).find_map(|_| {
let observed = load_latest_workspace_coverage_provider_heartbeat(
&args.store,
@ -2395,11 +2674,12 @@ fn reconcile_workspace_coverage_projector(
.flatten();
if let Some(heartbeat) = observed
&& heartbeat.status == "ready"
&& timestamp_is_fresh(&heartbeat.observed_at_utc).unwrap_or(false)
&& authenticate_workspace_coverage_provider_heartbeat(
&args.store,
args.runtime_id.clone(),
&heartbeat.heartbeat_id,
host.entry(),
host_identity,
)
.is_ok()
{
@ -2411,15 +2691,59 @@ fn reconcile_workspace_coverage_projector(
let Some(ready) = ready else {
anyhow::bail!("workspace coverage replacement did not publish signed readiness in time");
};
let directive = write_workspace_coverage_recovery_directive(
let actuation_observation = match observe_workspace_coverage_managed_process(
&args.store,
&runtime_store,
&args.runtime_id,
&target,
args.runtime_id.clone(),
&replacement.launch_id,
&ready.heartbeat_id,
&host,
)?;
host_identity,
) {
Ok(observation) => observation,
Err(error) => {
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.workspace_coverage_reconcile.v0",
"status": "observation-refused",
"serviceId": policy.service_id,
"launchId": replacement.launch_id,
"reason": error.to_string(),
"restarted": false,
"privateStateExposed": false,
}))?
);
return Ok(());
}
};
let actuation = actuate_workspace_coverage_recovery_if_alive(actuation_observation, || {
write_workspace_coverage_recovery_directive(
&args.store,
runtime_store,
&args.runtime_id,
&target,
&replacement.launch_id,
&ready.heartbeat_id,
host,
)
})?;
let directive = match actuation {
WorkspaceCoverageRecoveryActuation::Written(directive) => directive,
WorkspaceCoverageRecoveryActuation::Degraded(observation) => {
return report_workspace_coverage_replacement_not_alive(
policy,
&replacement,
observation,
"observation-degraded",
);
}
WorkspaceCoverageRecoveryActuation::Terminal(observation) => {
return report_workspace_coverage_replacement_not_alive(
policy,
&replacement,
observation,
"replacement-terminal",
);
}
};
println!(
"{}",
serde_json::to_string_pretty(&json!({
@ -2429,7 +2753,7 @@ fn reconcile_workspace_coverage_projector(
"oldClaimId": target.claim_id,
"replacementLaunchId": replacement.launch_id,
"directiveId": directive.directive_id,
"restarted": true,
"restarted": launched_now,
"privateStateExposed": false,
}))?
);
@ -3930,6 +4254,14 @@ mod semantic_projector_authority_tests {
let tail = &source[start..];
let end = tail.find("\nfn service_runbook").unwrap();
let body = &tail[..end];
let observation = body
.find("observe_workspace_coverage_managed_process")
.unwrap();
let alive = body.find("status\": \"observed-alive").unwrap();
let degraded = body.find("status\": \"observation-degraded").unwrap();
let termination_write = body
.find("write_workspace_coverage_process_termination_observation")
.unwrap();
let termination = body
.rfind("authenticate_workspace_coverage_termination_with_envelope_digest")
.unwrap();
@ -3940,13 +4272,200 @@ mod semantic_projector_authority_tests {
let recovery = body
.rfind("write_workspace_coverage_recovery_directive")
.unwrap();
assert!(observation < alive && alive < termination_write);
assert!(observation < degraded && degraded < termination_write);
assert!(termination_write < termination);
assert!(termination < launch && launch < readiness && readiness < recovery);
assert!(body.contains("write_workspace_coverage_process_termination_observation"));
assert!(body.contains("status == \"ready\""));
assert!(
body.contains("authenticated claim sight does not name the current managed launch")
);
assert!(!body.contains("awaiting-exact-termination"));
assert!(!body.contains("open_workspace_coverage_authority"));
assert!(!body.contains("recover_workspace_coverage_projection"));
}
#[test]
fn workspace_coverage_none_to_some_claim_race_uses_post_terminal_sight() {
let source = include_str!("epiphany-daemon-supervisor.rs");
let start = source
.find("fn reconcile_workspace_coverage_projector(")
.unwrap();
let tail = &source[start..];
let end = tail.find("\nfn service_runbook").unwrap();
let body = &tail[..end];
let termination = body
.rfind("authenticate_workspace_coverage_termination_with_envelope_digest")
.unwrap();
let post_auth = body
.find("let post_terminal_target = match authenticate_current_workspace_coverage_claim_sight")
.unwrap();
let replacement_selection = body.find("let existing_replacement =").unwrap();
let post_target = body
.find("let Some(target) = post_terminal_target")
.unwrap();
let directive = body
.find("write_workspace_coverage_recovery_directive")
.unwrap();
assert!(termination < post_auth && post_auth < replacement_selection);
assert!(replacement_selection < post_target && post_target < directive);
assert!(body[post_auth..].contains("&target,"));
assert!(
body.contains("post-terminal claim sight does not name the terminated managed launch")
);
}
#[test]
fn workspace_coverage_reused_replacement_reports_observation_not_restart() {
let source = include_str!("epiphany-daemon-supervisor.rs");
let start = source
.find("fn reconcile_workspace_coverage_projector(")
.unwrap();
let tail = &source[start..];
let end = tail.find("\nfn service_runbook").unwrap();
let body = &tail[..end];
assert!(body.contains("(existing, false)"));
assert!(body.contains("replacement-observed-awaiting-claim"));
assert!(body.matches("\"restarted\": launched_now").count() >= 2);
}
#[test]
fn workspace_coverage_launch_to_directive_crash_resumes_exact_replacement() {
let source = include_str!("epiphany-daemon-supervisor.rs");
let start = source
.find("fn reconcile_workspace_coverage_projector(")
.unwrap();
let tail = &source[start..];
let end = tail
.find("\nfn finish_workspace_coverage_recovery")
.unwrap();
let body = &tail[..end];
let mismatch = body.find("claim.launch_id != latest.launch_id").unwrap();
let branch = &body[mismatch..body.find("let observation = match").unwrap()];
let termination = branch
.find("authenticate_workspace_coverage_termination_with_envelope_digest")
.unwrap();
let old_launch = branch
.find("let old_launch = authenticate_workspace_coverage_managed_process_launch")
.unwrap();
let replacement = branch
.find("let replacement = authenticate_workspace_coverage_managed_process_launch")
.unwrap();
let lineage = branch
.find("replacement.replaces_termination_envelope_digest")
.unwrap();
let resume = branch
.find("return finish_workspace_coverage_recovery")
.unwrap();
assert!(termination < old_launch && old_launch < replacement);
assert!(replacement < lineage && lineage < resume);
assert!(
branch.contains(
"replacement.policy_envelope_digest != old_launch.policy_envelope_digest"
)
);
assert!(!branch.contains("service_launch_internal"));
let finish = &source[source
.find("fn finish_workspace_coverage_recovery")
.unwrap()..];
assert!(finish.contains("write_workspace_coverage_recovery_directive"));
assert!(finish.contains("\"restarted\": launched_now"));
}
#[test]
fn workspace_coverage_stale_ready_missing_replacement_cannot_direct_or_mutate() {
let source = include_str!("epiphany-daemon-supervisor.rs");
let start = source
.find("fn reconcile_workspace_coverage_projector(")
.unwrap();
let tail = &source[start..];
let end = tail
.find("\nfn finish_workspace_coverage_recovery")
.unwrap();
let body = &tail[..end];
let mismatch = body.find("claim.launch_id != latest.launch_id").unwrap();
let branch = &body[mismatch..body.find("let observation = match").unwrap()];
let replacement_sight = branch
.find("let replacement_observation = match observe_workspace_coverage_managed_process")
.unwrap();
let alive_gate = branch
.find("WorkspaceCoverageProcessLifecycleObservation::ExactAlive")
.unwrap();
let finish_call = branch
.find("return finish_workspace_coverage_recovery")
.unwrap();
assert!(replacement_sight < alive_gate && alive_gate < finish_call);
assert!(branch.contains("WorkspaceCoverageProcessLifecycleObservation::Missing"));
assert!(branch.contains("\"replacement-terminal\""));
assert!(branch.contains("\"observation-degraded\""));
assert!(!branch.contains("write_workspace_coverage_process_termination_observation"));
assert!(!branch.contains("service_launch_internal"));
let finish = &source[source
.find("fn finish_workspace_coverage_recovery")
.unwrap()..];
let freshness = finish
.find("timestamp_is_fresh(&heartbeat.observed_at_utc)")
.unwrap();
let directive = finish
.find("write_workspace_coverage_recovery_directive")
.unwrap();
assert!(freshness < directive);
}
#[test]
fn workspace_coverage_actuation_reobserves_after_readiness() -> Result<()> {
let mut disappeared = std::collections::VecDeque::from([
WorkspaceCoverageProcessLifecycleObservation::ExactAlive,
WorkspaceCoverageProcessLifecycleObservation::Missing,
]);
assert_eq!(
disappeared.pop_front(),
Some(WorkspaceCoverageProcessLifecycleObservation::ExactAlive)
);
let mut directive_writes = 0_u8;
let termination_writes = 0_u8;
let launch_writes = 0_u8;
let outcome =
actuate_workspace_coverage_recovery_if_alive(disappeared.pop_front().unwrap(), || {
directive_writes += 1;
Ok(())
})?;
assert!(matches!(
outcome,
WorkspaceCoverageRecoveryActuation::Terminal(
WorkspaceCoverageProcessLifecycleObservation::Missing
)
));
assert_eq!(directive_writes, 0);
assert_eq!(termination_writes, 0);
assert_eq!(launch_writes, 0);
let mut stayed_alive = std::collections::VecDeque::from([
WorkspaceCoverageProcessLifecycleObservation::ExactAlive,
WorkspaceCoverageProcessLifecycleObservation::ExactAlive,
]);
assert_eq!(
stayed_alive.pop_front(),
Some(WorkspaceCoverageProcessLifecycleObservation::ExactAlive)
);
let outcome = actuate_workspace_coverage_recovery_if_alive(
stayed_alive.pop_front().unwrap(),
|| {
directive_writes += 1;
Ok("directive")
},
)?;
assert!(matches!(
outcome,
WorkspaceCoverageRecoveryActuation::Written("directive")
));
assert_eq!(directive_writes, 1);
Ok(())
}
#[test]
fn reserved_projector_policy_has_no_generic_or_command_override_path() {
let source = include_str!("epiphany-daemon-supervisor.rs");

View file

@ -1207,6 +1207,7 @@ pub use workspace_coverage_process_documents::{
WORKSPACE_COVERAGE_RECOVERY_DIRECTIVE_TYPE, WORKSPACE_COVERAGE_TERMINAL_SIGHT_SCHEMA_VERSION,
WORKSPACE_COVERAGE_TERMINAL_SIGHT_TYPE, WorkspaceCoverageAdvancementSightEntry,
WorkspaceCoverageClaimSightEntry, WorkspaceCoverageManagedProcessLaunchEntry,
WorkspaceCoverageProcessLifecycleObservation,
WorkspaceCoverageProcessTerminationObservationEntry, WorkspaceCoverageProviderHeartbeatEntry,
WorkspaceCoverageRecoveryDirectiveEntry, WorkspaceCoverageTerminalSightEntry,
authenticate_current_workspace_coverage_advancement_sight,
@ -1221,11 +1222,12 @@ pub use workspace_coverage_process_documents::{
load_workspace_coverage_managed_process_launch,
load_workspace_coverage_managed_process_launch_with_digest,
load_workspace_coverage_process_termination_observation,
load_workspace_coverage_provider_heartbeat, process_identity_from_workspace_coverage_launch,
sign_workspace_coverage_heartbeat, sign_workspace_coverage_launch,
sign_workspace_coverage_termination, workspace_coverage_heartbeat_statement,
workspace_coverage_host_identity_record_digest, workspace_coverage_launch_statement,
workspace_coverage_termination_statement, write_workspace_coverage_managed_process_launch,
load_workspace_coverage_provider_heartbeat, observe_workspace_coverage_managed_process,
process_identity_from_workspace_coverage_launch, sign_workspace_coverage_heartbeat,
sign_workspace_coverage_launch, sign_workspace_coverage_termination,
workspace_coverage_heartbeat_statement, workspace_coverage_host_identity_record_digest,
workspace_coverage_launch_statement, workspace_coverage_termination_statement,
write_workspace_coverage_managed_process_launch,
write_workspace_coverage_process_termination_observation,
write_workspace_coverage_provider_heartbeat, write_workspace_coverage_recovery_directive,
};

View file

@ -530,6 +530,56 @@ impl WorkspaceCoverageProcessObservationSource for NativeWorkspaceCoverageProces
}
}
/// A typed, non-mutating observation of the exact process incarnation named by
/// a workspace-coverage launch. Reconciliation must branch on this value;
/// errors and uncertain observations are never evidence of termination.
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum WorkspaceCoverageProcessLifecycleObservation {
ExactAlive,
BootSuperseded { observed_boot_identity: String },
ExactExited { exit_code: Option<u32> },
Missing,
Replaced { observed: ProcessInstanceIdentity },
Inaccessible,
Indeterminate { reason: String },
}
fn observe_workspace_coverage_process_with_source(
launch: &WorkspaceCoverageManagedProcessLaunchEntry,
source: &dyn WorkspaceCoverageProcessObservationSource,
) -> WorkspaceCoverageProcessLifecycleObservation {
let Some(observed_boot_identity) = source.boot_identity() else {
return WorkspaceCoverageProcessLifecycleObservation::Indeterminate {
reason: "current boot identity is unavailable".to_string(),
};
};
if observed_boot_identity != launch.boot_identity {
return WorkspaceCoverageProcessLifecycleObservation::BootSuperseded {
observed_boot_identity,
};
}
match source.observe(&process_identity_from_workspace_coverage_launch(launch)) {
ProcessInstanceObservation::ExactAlive => {
WorkspaceCoverageProcessLifecycleObservation::ExactAlive
}
ProcessInstanceObservation::ExactExited { exit_code } => {
WorkspaceCoverageProcessLifecycleObservation::ExactExited { exit_code }
}
ProcessInstanceObservation::Missing => {
WorkspaceCoverageProcessLifecycleObservation::Missing
}
ProcessInstanceObservation::Replaced { observed } => {
WorkspaceCoverageProcessLifecycleObservation::Replaced { observed }
}
ProcessInstanceObservation::Inaccessible => {
WorkspaceCoverageProcessLifecycleObservation::Inaccessible
}
ProcessInstanceObservation::Indeterminate { reason } => {
WorkspaceCoverageProcessLifecycleObservation::Indeterminate { reason }
}
}
}
#[derive(Serialize)]
struct LaunchStatement<'a> {
schema_version: &'a str,
@ -1146,6 +1196,41 @@ pub(crate) fn authenticate_workspace_coverage_managed_process_launch_with_envelo
Ok((launch, envelope_digest(&envelope)))
}
pub fn observe_workspace_coverage_managed_process(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
launch_id: &str,
host_identity: &HostIncarnationIdentityEntry,
) -> Result<WorkspaceCoverageProcessLifecycleObservation> {
let store_path = store_path.as_ref();
let runtime_id = runtime_id.into();
let launch = authenticate_workspace_coverage_managed_process_launch(
store_path,
runtime_id.clone(),
launch_id,
host_identity,
)?;
let policy_envelope = open_epiphany_cultmesh_node(store_path, runtime_id)?
.cache()
.get_envelope::<EpiphanyCultMeshManagedServicePolicyEntry>(&managed_policy_key())?
.ok_or_else(|| anyhow!("workspace coverage managed policy is absent"))?;
let policy: EpiphanyCultMeshManagedServicePolicyEntry =
rmp_serde::from_slice(&policy_envelope.payload)?;
validate_workspace_coverage_projector_managed_service_policy(&policy)?;
if launch.policy_id != policy.policy_id
|| launch.policy_envelope_digest != envelope_digest(&policy_envelope)
|| launch.command != policy.command
|| launch.args != policy.args
|| launch.cwd != policy.cwd
{
bail!("workspace coverage observed launch disagrees with current managed policy");
}
Ok(observe_workspace_coverage_process_with_source(
&launch,
&NativeWorkspaceCoverageProcessObservationSource,
))
}
pub(crate) fn authenticate_workspace_coverage_provider_heartbeat_with_envelope_digest(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
@ -1249,29 +1334,34 @@ fn write_workspace_coverage_process_termination_observation_with_source(
None
};
let observed_boot_identity = source
.boot_identity()
.ok_or_else(|| anyhow!("current boot identity is unavailable; termination is unproved"))?;
let (outcome, exit_code, replacement) = if observed_boot_identity != launch.boot_identity {
("boot_superseded", None, None)
} else {
match source.observe(&process_identity_from_workspace_coverage_launch(&launch)) {
ProcessInstanceObservation::ExactExited { exit_code } => {
("exact_exited", exit_code, None)
}
ProcessInstanceObservation::Missing => ("process_missing", None, None),
ProcessInstanceObservation::Replaced { observed } => {
("process_replaced", None, Some(observed))
}
ProcessInstanceObservation::ExactAlive => {
bail!("exact workspace coverage process instance is still alive")
}
ProcessInstanceObservation::Inaccessible => {
bail!("workspace coverage process observation is inaccessible")
}
ProcessInstanceObservation::Indeterminate { reason } => {
bail!("workspace coverage process termination is indeterminate: {reason}")
}
let observation = observe_workspace_coverage_process_with_source(&launch, source);
let (observed_boot_identity, outcome, exit_code, replacement) = match observation {
WorkspaceCoverageProcessLifecycleObservation::BootSuperseded {
observed_boot_identity,
} => (observed_boot_identity, "boot_superseded", None, None),
WorkspaceCoverageProcessLifecycleObservation::ExactExited { exit_code } => (
launch.boot_identity.clone(),
"exact_exited",
exit_code,
None,
),
WorkspaceCoverageProcessLifecycleObservation::Missing => {
(launch.boot_identity.clone(), "process_missing", None, None)
}
WorkspaceCoverageProcessLifecycleObservation::Replaced { observed } => (
launch.boot_identity.clone(),
"process_replaced",
None,
Some(observed),
),
WorkspaceCoverageProcessLifecycleObservation::ExactAlive => {
bail!("exact workspace coverage process instance is still alive")
}
WorkspaceCoverageProcessLifecycleObservation::Inaccessible => {
bail!("workspace coverage process observation is inaccessible")
}
WorkspaceCoverageProcessLifecycleObservation::Indeterminate { reason } => {
bail!("workspace coverage process termination is indeterminate: {reason}")
}
};
let observed_at_utc = chrono::Utc::now().to_rfc3339();
@ -3915,6 +4005,86 @@ mod tests {
Ok(())
}
#[test]
fn typed_process_observation_never_writes_termination_state() -> Result<()> {
let cases = vec![
(
ProcessInstanceObservation::ExactAlive,
WorkspaceCoverageProcessLifecycleObservation::ExactAlive,
),
(
ProcessInstanceObservation::Missing,
WorkspaceCoverageProcessLifecycleObservation::Missing,
),
(
ProcessInstanceObservation::Inaccessible,
WorkspaceCoverageProcessLifecycleObservation::Inaccessible,
),
(
ProcessInstanceObservation::Indeterminate {
reason: "ambiguous kernel sight".into(),
},
WorkspaceCoverageProcessLifecycleObservation::Indeterminate {
reason: "ambiguous kernel sight".into(),
},
),
];
for (process, expected) in cases {
let temp = tempfile::tempdir()?;
let (store, _host, launch, _provider) = persisted_chain(temp.path())?;
let observed = observe_workspace_coverage_process_with_source(
&launch,
&FakeObservation {
boot: Some(launch.boot_identity.clone()),
process,
},
);
assert_eq!(observed, expected);
assert!(
load_workspace_coverage_process_termination_observation(
&store,
"local",
&launch.launch_id,
)?
.is_none()
);
}
Ok(())
}
#[test]
fn public_process_observation_refuses_stale_launch_policy_substitution() -> Result<()> {
let temp = tempfile::tempdir()?;
let (store, host, launch, _provider) = persisted_chain(temp.path())?;
let mut moved_policy = policy()?;
moved_policy.updated_at_utc = "2026-07-17T00:00:01Z".into();
write_epiphany_cultmesh_workspace_coverage_projector_service_policy(
&store,
"local",
moved_policy,
)?;
assert!(
observe_workspace_coverage_managed_process(
&store,
"local",
&launch.launch_id,
host.entry(),
)
.expect_err("stale launch must not be observed as current authority")
.to_string()
.contains("disagrees with current managed policy")
);
assert!(
load_workspace_coverage_process_termination_observation(
&store,
"local",
&launch.launch_id,
)?
.is_none()
);
Ok(())
}
#[test]
fn termination_before_first_heartbeat_seals_the_process_evidence_head() -> Result<()> {
let temp = tempfile::tempdir()?;

View file

@ -2490,3 +2490,45 @@ lineage refusal, exact CAS replay, successor sight publication, `cargo check
--bins`, and `git diff --check`. Soul found no remaining P0/P1/P2. This code is
ready to commit and push, then cross Bifrost/Idunn as an exact release while the
host remains braked.
## Live deployment and reconciliation split follow-up (2026-07-18)
Commit `0601e280480cccc28209fbf0630e921f3ef9056d` is pushed, is the sole current
Bifrost release authority, and is running through Idunn on Yggdrasil as release
`sha256-f9fbc9c17cfc4038c49f77dd2a238d487b723600127a982dc4ae2ab98b308a77`.
The detached deployment request remains in progress and `deployment.env` is
absent, so terminal admission is not yet proven. Projector PID `145165` has
remained stable; `body.cc` remained 612,961 bytes; the dedicated coverage store
remained 79,712,256 bytes while its typed state advanced; and the current Qdrant
collection advanced from 193 to 1,621 points. GPU samples show the embedding
model resident and useful intermittent load. Do not interrupt this sole owner
merely because the first full projection is slow.
Live stdout exposed a remaining conceptual substitution: every healthy claim
was routed through the termination writer and projected as
`awaiting-exact-termination`. The writer refused ExactAlive, so private state
remained safe, but alive, inaccessible, and indeterminate sight were collapsed
into dishonest recovery pressure. The local uncommitted correction gives the
supervisor one typed non-mutating process observation before recovery:
ExactAlive reports `observed-alive`; uncertain sight reports
`observation-degraded`; authority drift reports `observation-refused`; only
proven terminal sight reaches termination, replacement, readiness, and
directive.
The cut also seals the restart timeline. Claim sight is re-read after immutable
termination to close the pre-first-claim race. A persisted replacement without
a directive is recognized only through exact old-launch, termination, policy,
and causal replacement bindings. The supervisor observes that exact replacement
alive, selects a fresh signed ready heartbeat under the existing 180-second
lease, then re-observes the process immediately at the directive actuation
boundary. Terminal or uncertain replacement sight produces no directive,
termination write, or second launch. Recovery resumption, newly launched
replacement, and immutable directive replay share the same final gate.
Focused proof passes: ten workspace process-document tests, eight supervisor
workspace-reconciliation tests, all-bin check, diff check, and final Soul audit
with no P0/P1/P2. Behavioral injection proves ExactAlive-to-Missing across the
readiness window performs zero directive/termination/launch writes, while
ExactAlive-to-ExactAlive performs exactly one directive write. Commit and push
this cut next; do not replace the live release until its current projection has
landed terminal proof or a real failure requires recovery.

Binary file not shown.

View file

@ -729,14 +729,14 @@ current_status:
- Historical Windows SCM material in this map is rejected-path evidence, not live authority. Arbitrary console `sc.exe` installation, elevated service execution runbooks/audits, cluster-service install/start/stop/control, `swarm-online-runbook`, service-manager action queues, and their wrapper routes no longer describe deployable physiology or actionable next work. Their receipts may remain sealed historical evidence, but they cannot decide liveness, readiness, recovery, or operator action. The console binaries never implemented the Windows service-control dispatcher and therefore could not honestly own SCM service state.
- Static cluster topology owns declared faculty routing only, not attendance. Explicit bootstrap may persist seven declared faculty routes, desired private-Verse addresses, and daemon/Eve targets. Only persisted provider-authored daemon status creates an observed daemon row. The synthetic `unknown_daemon_status` path is deleted; fresh bootstrap therefore means seven declared targets and zero observed daemons. Topology, liveness, restart-policy, swarm overview/triage, compact swarm output, prompt context, and wrapper summaries distinguish `declared*` counts/routes from `observedDaemonCount`; a heartbeat does not become an agent count. Restart-policy rows may carry `daemonStatus=unobserved` solely for Idunn desired-state reconciliation. Configured ids, routes, topology row counts, and policy targets are forbidden from proving deployed daemons, active private Verses, agent presence, Eve availability, or readiness.
- Native process and host incarnation foundations are now separate authorities. Process identity is PID plus native creation token plus canonical executable, with exact alive/exited/replaced/missing/inaccessible/indeterminate observations and optional proven boot incarnation; the PID-only compatibility projection cannot report death. Host identity is one immutable non-workspace CultCache enrollment with an Ed25519 identity/signing handle, purpose-bound signatures, fail-closed open, and no silent regeneration. Windows protects its seed with CurrentUser DPAPI and honestly labels assurance `os_user_installation_bound_best_effort`; Linux uses 0700/0600 state plus machine-id binding and labels the baseline cloneable. Neither claims physical-chassis identity. These foundations do not themselves authorize service recovery.
- Specialized reserved coverage process documents now exist as typed CultMesh state. Idunn's mandatory host-signed launch binds the exact current specialized policy envelope, enrolled host record digest, proven boot, PID creation token, captured executable path and bytes digest, provider incarnation, and ephemeral provider public key. Provider heartbeats are signed by that ephemeral key, bind the exact launch envelope and repeated host/boot/process tuple, and advance exact per-launch sequence/time under CAS. Hostile tests reject forged signatures, sequence gaps, identity collisions, wrong supervisor/status/runtime, stale policy, and tuple drift. These documents are not operational owners until supervisor and projector migrate and generic writers reject reserved coverage identities.
- Specialized reserved coverage process documents are the live typed CultMesh process authority. Idunn's mandatory host-signed launch binds the exact current specialized policy envelope, enrolled host record digest, proven boot, PID creation token, captured executable path and bytes digest, provider incarnation, and ephemeral provider public key. Provider heartbeats are signed by that ephemeral key, bind the exact launch envelope and repeated host/boot/process tuple, and advance exact per-launch sequence/time under CAS; immutable per-heartbeat evidence remains addressable while the latest pointer advances because termination and recovery documents may cite historical heartbeats. Generic lifecycle writers reject reserved coverage identities. Hostile tests reject forged signatures, sequence gaps, identity collisions, wrong supervisor/status/runtime, stale policy, and tuple drift.
- The live workspace-coverage process path now uses only specialized authority. Supervisor generates a per-launch provider key, spawns with reserved stdin piped and all other child stdin null, captures exact process identity, sends one fixed-size launch-id/seed frame, host-signs and CAS-persists the specialized launch, and kills/waits on any bootstrap or persistence failure. The child requires exact frame plus EOF, authenticates the enrolled host, current policy, boot, its PID creation token/path, launch digest, and provider public key before constructing the service or publishing its signed per-launch heartbeat. Generic lifecycle and generic daemon-heartbeat writers reject the reserved coverage identities; their old authenticator is deleted. Body claim/attempt v1 binds `managed_process_launch_id`; v0 lifecycle semantics cannot deserialize as the new owner. This Windows installation is explicitly enrolled at the default DPAPI CurrentUser host store and status re-open proved identity `17f041421045aa66d4c8ab0488f462dbb5ea1a7d8507dbf75216f5ec368dbb7a` without exposing private state.
- Idunn now has one immutable, host-signed process-termination observation per reserved coverage launch, with no latest/global mirror. Its writer reloads and exact-CAS-preserves the current specialized policy, exact launch, and exact per-launch latest signed heartbeat; it immediately observes the enrolled host's proven boot and exact PID incarnation. A distinct proven boot yields `boot_superseded`; same-boot proof permits only `exact_exited`, `process_missing`, or a complete different `process_replaced` identity. ExactAlive, Inaccessible, Indeterminate, unknown boot, host mismatch, identity collision, and moved source envelopes refuse publication. The injectable observation seam is private to module tests. Recovery-facing authentication reconstructs the entire persisted policy/launch/heartbeat chain rather than trusting the signed termination blob alone. Four hostile document/termination tests and all-target check pass.
- Abandoned workspace-coverage authority now has a complete typed transfer. Recovery derives the Body store from the runtime route, reopens the authenticated Body basis, joins obligation/plan/claim to that basis, authenticates current policy plus exact old launch and immutable termination, requires a signed causal termination-to-replacement edge and the replacement's latest ready heartbeat, then performs one Body CAS over Body authority, plan, old claim/attempt, immutable recovery receipt, failed claim history, and epoch+1 successor. The receipt stores exact termination, launch, and heartbeat envelope digests and can reconstruct both CultMesh evidence and current Body authority after restart. Claim/attempt schema and evidence pairs cannot split; impossible completion-before-start timelines refuse. Idunn's reserved reconciler no longer consults generic lifecycle PID receipts for this service. It persists/reuses termination before spawn, uses the specialized bootstrap launch, waits for signed readiness, and then invokes the recovery CAS. One termination admits one replacement slot; concurrent losers are killed when launch persistence loses CAS.
- Abandoned workspace-coverage authority has one complete typed transfer. The projector publishes Body-scoped provider-signed claim sight before backend work. The supervisor observes the exact managed process through a typed non-mutating classifier: ExactAlive reports observed-alive; inaccessible/indeterminate report degraded; policy, claim/launch, or authentication drift is refused; only proven terminal outcomes admit immutable termination and an exact causal replacement. After fresh signed replacement readiness, the supervisor re-observes the exact replacement at the actuation boundary and publishes an immutable host-signed recovery directive. The replacement projector alone consumes that directive and performs the recovery CAS through its already-held WorkspaceCoverageAuthority. Claim sight, directive, and recovery receipt bind exact Body/store route, claim/attempt, policy, old termination, replacement launch, and heartbeat envelope digests. Recovery is replay-safe across claim publication, launch-to-directive, readiness, directive reissue, CAS-to-sight, and process-death windows. The supervisor never opens or mutates workspace-coverage.cc. One termination admits one replacement slot; concurrent losers are killed when launch persistence loses CAS.
- Workspace-coverage launch, heartbeat, and termination now serialize through one typed per-launch process-evidence head. Launch initializes generation 1 as `launched`; each signed heartbeat exact-CAS advances it to `heartbeat`; host-signed termination exact-CAS seals it as `terminated`. Termination v1 accepts exact launch plus enrolled host/boot/process proof before heartbeat sequence one and records heartbeat id/digest only when the head names current signed heartbeat evidence. A heartbeat cannot advance a terminated head. This removes the pre-readiness death strand without allowing heartbeat/termination split authority.
- The feature-gated native `epiphany-workspace-coverage-recovery-smoke` proves the real packaged supervisor/projector boundary in GUID-scoped repo/runtime/Body/Verse state. It warms local Ollama, derives only its exact fenced Qdrant collection names, publishes reserved policy, launches the initial child through fixed bootstrap, observes epoch 1 claim, kills only after exact native launch-incarnation revalidation, invokes Idunn reconcile, authenticates epoch 2 successor authority plus the immutable recovery receipt through freshly reopened stores, kills the replacement under the same identity fence, and verifies only its owned collections absent before success. Live proof `C:\Users\Meta\AppData\Local\Temp\epiphany-workspace-coverage-a577f820-b0e2-4733-b628-529ee3bdb143\proof.json` passed with receipt `2b44f28f-7c0f-4ad2-aefe-d7c8222e8642` and binds the executed binary, exact embedded smoke source, source head, and tracked-source diff digests. Operator orchestration, not the harness, restored local Qdrant to its prior stopped state. The run also repaired normal-user Windows boot identity and exact recovered-owner claim resumption.
- The 2026-07-16 deployability audit replaced `notes/epiphany-swarm-readiness-plan.md`'s obsolete June queue with the live evidence matrix. Brake, initiative recovery, Persona speech eligibility, memory lifecycle, CultNet-first operation, and branch-local Hands/Soul/Mind gates are landed. The installed after-login host is operational and real Mind/Modeling semantic queries pass against Yggdrasil, but it is not yet deployable as one proven machine: installed binaries predate recovery commit `34802407`; mutable sibling lookup permits mixed build generations; Mind lacks the race-bounded whole-repository readiness join; and reboot/logon lineage remains permission-bound. Health, heartbeat, Task Scheduler state, Qdrant existence, legacy retrieval Ready, and Eve/Gjallar rows cannot substitute for either query admission or repository readiness. Sight surfaces no longer publish the foreign constant `queryAdmission=false`; they report only facts they observe.
- The 2026-07-16 deployability audit is historical evidence for wounds since cut: immutable packaged releases removed mutable sibling generations, repository readiness joined Body/Modeling/Mind authority, and release `0601e280480cccc28209fbf0630e921f3ef9056d` is running on Yggdrasil under Bifrost/Idunn while its first workspace projection advances. The machine is still not an autonomous organizational swarm: the deployed body hosts projectors and supervisor, not the resident coordinator/scheduler, model runtime, tool spine, writable Hands workspace, or Persona/Discord crossing. Health, heartbeat, systemd state, Qdrant existence, and Gjallar/Eve projections cannot substitute for those missing cognition organs or final deployment admission.
- Release `sha256-c94109f94ee42c1257089830f399cb87cd5ad672772c274194371995ce4df923` is the first deployed immutable sibling generation. Native packaging builds from detached exact source commit `dd80f4a51c18425a6665710698a357be61154abf`, initializes pinned submodules, uses the tracked lockfile under `--locked`, and publishes four exact binaries plus a typed CultCache witness/head only after atomic directory publication and byte verification. Task Scheduler pins release id/digest and the witnessed supervisor path; Idunn reauthenticates the complete set and reserved policy role paths. Current-boot proof: reconciler PID 21228 launched direct child 22736; witnessed Mind/Modeling queries ranked semantically; killing that exact-path child caused Idunn to launch PID 19748 with receipt `86a42d51-9930-4b5d-9e61-e74c82a0d808`, ready heartbeat `4fc91977-b635-474b-812b-c364847e2b4b`, and witnessed executable digest `sha256-1060dd64e8c2b520ec8744b67e8306db04a6618d463fc2117c352adf9e30e6b0`. This closes current-boot artifact generation and recurrence, not reboot/logon survival.
- Release `sha256-6f9ab4848207a110e7e3836f41e6a74c0f463369ad4b04ce2d0d3831a6b262ae` packages repository-readiness source commit `360dcb433dda9599fca14282592608d26b8b6cc8`; witnessed Idunn PID 29476 directly owns witnessed projector PID 22840 with launch receipt `50879209-b65f-4411-ae3f-6f647d37bf42` and ready heartbeat `134df620-9e20-4220-ad4e-117ea4ca8188`. Deployment exposed receipt-v2 migration pressure: v1 receipts became correctly ineligible, but the old Succeeded pulse shortcut kept both partitions idle. The shortcut is now cut in source. Valid v2 terminal evidence derives Ready; an exact same-obligation succeeded claim opens Repair only after its consumed grant/recovery authority and exact succeeded attempt are authenticated. Failed repair retries through execute at the next epoch. Forged predecessor authority cannot be laundered by a repair grant.
- Yggdrasil exact-SHA pressure release `586147a751c6eec2d59cd8dc10bd17ce0d02a4d1` proved useful GPU work but failed deployment honestly. GTX 1080 stayed near saturation at 2,419 MiB; bounded four-text requests completed continuously. Mind published 215 vectors, while workspace coverage completed 3,389 Ollama HTTP calls total (about 13.3k workspace chunks after Mind) before Idunn's 50-minute candidate-health deadline at 2026-07-17T01:23:50+02:00. Idunn then stopped the service, published no deployment witness, and reported no exact-candidate daemon-health proof; the Modeling collection remained at the inherited 22 points because the monolithic executor had not yet published its accumulated vectors. This is failure evidence for the execution/deployment contract, not for GPU acceleration. Total wall-time extension is forbidden as the repair.
next_action: "Commit and push the verified workspace-coverage recovery ownership cut, authorize its exact SHA through Bifrost, deploy only through Idunn, and prove Ygg-local exclusive ownership, recovery replay, bounded Body/coverage I/O, Qdrant progress, GPU work, terminal health, and service restart while the host remains braked until admission. Then package the resident organizational swarm (scheduler/coordinator, model runtime, tool spine, Persona), provision its writable domain worktree and local credentials, wire VoidBot/Bifrost Discord feedback and separately authenticated operations, and complete a Starfire-offline rehearsal before 2026-07-22. Ordinary Persona conversation may create typed feedback pressure but cannot adopt Mind state, invoke Hands, authorize release, or deploy. No host reboot is authorized."
next_action: "Commit and push the verified typed live-vs-recovery reconciliation split, then let exact Yggdrasil release 0601e280480cccc28209fbf0630e921f3ef9056d finish its detached checkpointed first projection and record terminal Idunn deployment admission without interrupting its sole store owner. Its current collection advanced from 193 to 1621 points while body.cc remained 612961 bytes and projector PID 145165 remained stable; deployment.env is still absent, so admission is pending. After terminal proof, authorize and Idunn-deploy the reconciliation commit and run exact kill/recovery replay. Then package the resident organizational swarm (scheduler/coordinator, model runtime, tool spine, Persona), provision its writable domain worktree and local credentials, wire VoidBot/Bifrost Discord feedback and separately authenticated operations, and complete a Starfire-offline rehearsal before 2026-07-22. Ordinary Persona conversation may create typed feedback pressure but cannot adopt Mind state, invoke Hands, authorize release, or deploy. No host reboot is authorized."