Expose service execution audit anatomy

This commit is contained in:
Meta Vens 2026-06-18 16:01:21 +01:00
commit fc993b7be4
9 changed files with 284 additions and 194 deletions

View file

@ -11,8 +11,10 @@ use epiphany_core::EpiphanyCultMeshDaemonSchedulerReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonStatusEntry;
use epiphany_core::EpiphanyLocalVerseContext;
use epiphany_core::epiphany_cluster_service_execution_audit_report;
use epiphany_core::epiphany_cultmesh_daemon_poke_intent_from_status;
use epiphany_core::epiphany_cultmesh_daemon_poke_receipt_for_intent;
use epiphany_core::epiphany_service_execution_audit_report;
use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy;
use epiphany_core::load_epiphany_cultmesh_daemon_service_lifecycle_receipts;
use epiphany_core::query_epiphany_local_verse_context;
@ -1087,7 +1089,7 @@ fn windows_service_execution_audit(args: Args) -> Result<()> {
.into_iter()
.filter(|receipt| receipt.service_id == args.service_id)
.collect::<Vec<_>>();
let report = service_execution_audit_report(&receipts);
let report = epiphany_service_execution_audit_report(&receipts);
let receipt = service_lifecycle_receipt(
&args,
"windows-service-execution-audit",
@ -1168,7 +1170,7 @@ fn windows_service_execution_audit_smoke(args: Args) -> Result<()> {
.into_iter()
.filter(|receipt| receipt.service_id == args.service_id)
.collect::<Vec<_>>();
let complete_report = service_execution_audit_report(&receipts);
let complete_report = epiphany_service_execution_audit_report(&receipts);
if complete_report.status != "complete"
|| complete_report.missing_count != 0
|| complete_report.failed_count != 0
@ -1200,7 +1202,7 @@ fn windows_service_execution_audit_smoke(args: Args) -> Result<()> {
.into_iter()
.filter(|receipt| receipt.service_id == args.service_id)
.collect::<Vec<_>>();
let incomplete_report = service_execution_audit_report(&receipts);
let incomplete_report = epiphany_service_execution_audit_report(&receipts);
if incomplete_report.status != "incomplete" || incomplete_report.failed_count == 0 {
anyhow::bail!("service execution audit smoke failed to reject drifted reconcile receipt");
}
@ -1316,7 +1318,7 @@ fn cluster_windows_service_execution_audit(args: Args) -> Result<()> {
.into_iter()
.filter(|receipt| receipt.service_id == args.service_id)
.collect::<Vec<_>>();
let report = cluster_service_execution_audit_report(&receipts);
let report = epiphany_cluster_service_execution_audit_report(&receipts);
let receipt = service_lifecycle_receipt(
&args,
"cluster-windows-service-execution-audit",
@ -1370,7 +1372,7 @@ fn cluster_windows_service_execution_audit_smoke(args: Args) -> Result<()> {
),
("cluster-windows-service-install", "installed"),
("cluster-windows-service-start", "start-requested"),
("cluster-windows-service-audit", "complete"),
("cluster-windows-service-execution-audit", "complete"),
("cluster-windows-service-stop", "stop-requested"),
] {
let receipt = service_lifecycle_receipt(
@ -1398,7 +1400,7 @@ fn cluster_windows_service_execution_audit_smoke(args: Args) -> Result<()> {
.into_iter()
.filter(|receipt| receipt.service_id == args.service_id)
.collect::<Vec<_>>();
let complete_report = cluster_service_execution_audit_report(&receipts);
let complete_report = epiphany_cluster_service_execution_audit_report(&receipts);
if complete_report.status != "complete"
|| complete_report.missing_count != 0
|| complete_report.failed_count != 0
@ -1410,10 +1412,10 @@ fn cluster_windows_service_execution_audit_smoke(args: Args) -> Result<()> {
}
let incomplete = service_lifecycle_receipt(
&args,
"cluster-windows-service-audit",
"cluster-windows-service-execution-audit",
"incomplete",
"smoke".to_string(),
vec!["cluster-windows-service-audit".to_string()],
vec!["cluster-windows-service-execution-audit".to_string()],
None,
Some(0),
started_at,
@ -1432,7 +1434,7 @@ fn cluster_windows_service_execution_audit_smoke(args: Args) -> Result<()> {
.into_iter()
.filter(|receipt| receipt.service_id == args.service_id)
.collect::<Vec<_>>();
let incomplete_report = cluster_service_execution_audit_report(&receipts);
let incomplete_report = epiphany_cluster_service_execution_audit_report(&receipts);
if incomplete_report.status != "incomplete" || incomplete_report.failed_count == 0 {
anyhow::bail!(
"cluster service execution audit smoke failed to reject incomplete audit receipt"
@ -2711,182 +2713,6 @@ fn service_lifecycle_receipt(
}
}
fn service_execution_audit_report(
receipts: &[EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
) -> ServiceExecutionAuditReport {
let expected = [
("windows-service-execution-runbook", &["written"][..]),
(
"windows-service-execution-readiness",
&["elevated-ready"][..],
),
("windows-service-install", &["installed"][..]),
("windows-service-start", &["start-requested"][..]),
(
"windows-service-status",
&["running", "present", "stopped"][..],
),
("windows-service-reconcile", &["in-sync"][..]),
("windows-service-stop", &["stop-requested"][..]),
];
let mut checks = Vec::new();
let mut missing_count = 0_usize;
let mut failed_count = 0_usize;
let mut private_state_exposed = false;
for (action, allowed_statuses) in expected {
let receipt = latest_lifecycle_receipt_for_action(receipts, action);
let (receipt_id, observed_status, ok, sealed) = match receipt {
Some(receipt) => {
let status_ok = allowed_statuses
.iter()
.any(|allowed| *allowed == receipt.status);
(
Some(receipt.receipt_id.clone()),
Some(receipt.status.clone()),
status_ok,
!receipt.private_state_exposed,
)
}
None => {
missing_count += 1;
(None, None, false, true)
}
};
if !ok {
failed_count += 1;
}
if !sealed {
private_state_exposed = true;
}
checks.push(json!({
"action": action,
"allowedStatuses": allowed_statuses,
"receiptId": receipt_id,
"observedStatus": observed_status,
"ok": ok,
"privateStateSealed": sealed,
}));
}
let status = if missing_count == 0 && failed_count == 0 && !private_state_exposed {
"complete"
} else {
"incomplete"
}
.to_string();
ServiceExecutionAuditReport {
status,
receipt_count: receipts.len(),
missing_count,
failed_count,
private_state_exposed,
checks,
}
}
fn cluster_service_execution_audit_report(
receipts: &[EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
) -> ServiceExecutionAuditReport {
let expected = [
(
"cluster-windows-service-execution-runbook",
&["written"][..],
),
(
"cluster-windows-service-execution-readiness",
&["elevated-ready"][..],
),
("cluster-windows-service-install", &["installed"][..]),
("cluster-windows-service-start", &["start-requested"][..]),
("cluster-windows-service-audit", &["complete"][..]),
("cluster-windows-service-stop", &["stop-requested"][..]),
];
let mut checks = Vec::new();
let mut missing_count = 0_usize;
let mut failed_count = 0_usize;
let mut private_state_exposed = false;
for (action, allowed_statuses) in expected {
let receipt = latest_lifecycle_receipt_for_action(receipts, action);
let (receipt_id, observed_status, ok, sealed) = match receipt {
Some(receipt) => {
let status_ok = allowed_statuses
.iter()
.any(|allowed| *allowed == receipt.status);
(
Some(receipt.receipt_id.clone()),
Some(receipt.status.clone()),
status_ok,
!receipt.private_state_exposed,
)
}
None => {
missing_count += 1;
(None, None, false, true)
}
};
if !ok {
failed_count += 1;
}
if !sealed {
private_state_exposed = true;
}
checks.push(json!({
"action": action,
"allowedStatuses": allowed_statuses,
"receiptId": receipt_id,
"observedStatus": observed_status,
"ok": ok,
"privateStateSealed": sealed,
}));
}
let status = if missing_count == 0 && failed_count == 0 && !private_state_exposed {
"complete"
} else {
"incomplete"
}
.to_string();
ServiceExecutionAuditReport {
status,
receipt_count: receipts.len(),
missing_count,
failed_count,
private_state_exposed,
checks,
}
}
fn latest_lifecycle_receipt_for_action<'a>(
receipts: &'a [EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
action: &str,
) -> Option<&'a EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry> {
receipts
.iter()
.filter(|receipt| receipt.action == action)
.max_by(|left, right| {
lifecycle_receipt_sort_key(left).cmp(&lifecycle_receipt_sort_key(right))
})
}
fn lifecycle_receipt_sort_key(
receipt: &EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry,
) -> (&str, &str) {
(
receipt
.completed_at_utc
.as_deref()
.unwrap_or(receipt.started_at_utc.as_str()),
receipt.receipt_id.as_str(),
)
}
struct ServiceExecutionAuditReport {
status: String,
receipt_count: usize,
missing_count: usize,
failed_count: usize,
private_state_exposed: bool,
checks: Vec<Value>,
}
fn run_restart_command(policy: &EpiphanyCultMeshDaemonRestartPolicyEntry) -> Result<RestartOutput> {
let mut command = Command::new(&policy.restart_command);
command.args(&policy.restart_args);

View file

@ -22,7 +22,9 @@ use epiphany_core::EpiphanyCultMeshOdinAdvertisementEntry;
use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry;
use epiphany_core::EpiphanyCultMeshWorkLoopTelemetryEntry;
use epiphany_core::EpiphanyLocalVerseContext;
use epiphany_core::EpiphanyServiceExecutionAuditCheck;
use epiphany_core::default_epiphany_cultmesh_swarm_brake;
use epiphany_core::epiphany_cluster_service_execution_audit_report;
use epiphany_core::epiphany_cultmesh_agent_state_soa_summary_from_entry;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent;
@ -2413,9 +2415,33 @@ fn main() -> Result<()> {
.service_lifecycle_attention_tui_rows
.iter()
.any(|row| row.contains("artifact=external-ref"))
|| service_overview.service_execution_failed_check_count == 0
|| service_overview.service_execution_missing_check_count == 0
|| !service_overview
.service_execution_failed_check_rows
.iter()
.any(|check| {
check.action == "cluster-windows-service-execution-readiness"
&& check.observed_status.is_none()
&& !check.ok
&& check.private_state_sealed
})
|| !service_overview
.service_execution_failed_check_rows
.iter()
.any(|check| {
check.action == "cluster-windows-service-execution-audit"
&& check.observed_status.as_deref() == Some("incomplete")
&& !check.ok
&& check.private_state_sealed
})
|| !service_overview
.service_execution_failed_check_tui_rows
.iter()
.any(|row| row.contains("cluster-windows-service-execution-audit=incomplete"))
{
anyhow::bail!(
"local Verse query smoke did not expose sealed service lifecycle readback plus elevated operator runbook action rows"
"local Verse query smoke did not expose sealed service lifecycle readback plus service execution failed-check anatomy"
);
}
let missing_runbook_row = ReceiptDirectoryRow {
@ -2800,6 +2826,10 @@ struct SwarmOverviewReport {
tool_host_attention_tui_rows: Vec<String>,
service_lifecycle_attention_rows: Vec<ReceiptDirectoryRow>,
service_lifecycle_attention_tui_rows: Vec<String>,
service_execution_failed_check_count: usize,
service_execution_missing_check_count: usize,
service_execution_failed_check_rows: Vec<EpiphanyServiceExecutionAuditCheck>,
service_execution_failed_check_tui_rows: Vec<String>,
topology_report: ClusterTopologyReport,
daemon_report: DaemonLivenessReport,
surface_report: EveSurfaceReport,
@ -2863,6 +2893,10 @@ struct SwarmOverviewOutput {
tool_host_attention_tui_rows: Vec<String>,
service_lifecycle_attention_count: usize,
service_lifecycle_attention_rows: Vec<ReceiptDirectoryRow>,
service_execution_failed_check_count: usize,
service_execution_missing_check_count: usize,
service_execution_failed_check_rows: Vec<EpiphanyServiceExecutionAuditCheck>,
service_execution_failed_check_tui_rows: Vec<String>,
policy_covered_count: usize,
policy_enabled_count: usize,
policy_disabled_count: usize,
@ -2919,6 +2953,10 @@ impl SwarmOverviewOutput {
tool_host_attention_tui_rows: report.tool_host_attention_tui_rows,
service_lifecycle_attention_count: report.service_lifecycle_attention_rows.len(),
service_lifecycle_attention_rows: report.service_lifecycle_attention_rows,
service_execution_failed_check_count: report.service_execution_failed_check_count,
service_execution_missing_check_count: report.service_execution_missing_check_count,
service_execution_failed_check_rows: report.service_execution_failed_check_rows,
service_execution_failed_check_tui_rows: report.service_execution_failed_check_tui_rows,
policy_covered_count: report.policy_report.covered_count,
policy_enabled_count: report.policy_report.enabled_count,
policy_disabled_count: report.policy_report.disabled_count,
@ -2967,6 +3005,10 @@ struct SwarmTriageOutput {
service_lifecycle_attention_count: usize,
service_lifecycle_attention_rows: Vec<ReceiptDirectoryRow>,
service_lifecycle_attention_tui_rows: Vec<String>,
service_execution_failed_check_count: usize,
service_execution_missing_check_count: usize,
service_execution_failed_check_rows: Vec<EpiphanyServiceExecutionAuditCheck>,
service_execution_failed_check_tui_rows: Vec<String>,
poked_daemon_count: usize,
pokes: Vec<serde_json::Value>,
commands: serde_json::Value,
@ -3018,6 +3060,10 @@ impl SwarmTriageOutput {
service_lifecycle_attention_count: report.service_lifecycle_attention_rows.len(),
service_lifecycle_attention_rows: report.service_lifecycle_attention_rows,
service_lifecycle_attention_tui_rows: report.service_lifecycle_attention_tui_rows,
service_execution_failed_check_count: report.service_execution_failed_check_count,
service_execution_missing_check_count: report.service_execution_missing_check_count,
service_execution_failed_check_rows: report.service_execution_failed_check_rows,
service_execution_failed_check_tui_rows: report.service_execution_failed_check_tui_rows,
poked_daemon_count,
pokes,
commands: json!({
@ -3646,6 +3692,23 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
.iter()
.map(receipt_directory_tui_row)
.collect::<Vec<_>>();
let cluster_lifecycle_receipts = lifecycle_receipts
.iter()
.filter(|receipt| receipt.service_id == "epiphany-cluster-daemon-services")
.cloned()
.collect::<Vec<_>>();
let service_execution_audit =
epiphany_cluster_service_execution_audit_report(&cluster_lifecycle_receipts);
let service_execution_failed_check_rows = service_execution_audit
.checks
.iter()
.filter(|check| !check.ok || !check.private_state_sealed)
.cloned()
.collect::<Vec<_>>();
let service_execution_failed_check_tui_rows = service_execution_failed_check_rows
.iter()
.map(service_execution_audit_check_tui_row)
.collect::<Vec<_>>();
let liveness_status =
if daemon_report.non_ready_count == 0 && tool_report.host_attention_count == 0 {
"ready".to_string()
@ -3770,6 +3833,7 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
.any(|row| row.private_state_exposed)
|| tool_report.rows.iter().any(|row| row.private_state_exposed)
|| policy_report.private_state_exposed
|| service_execution_audit.private_state_exposed
|| service_lifecycle_rows
.iter()
.any(|row| row.private_state_exposed);
@ -3791,6 +3855,10 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
tool_host_attention_tui_rows,
service_lifecycle_attention_rows,
service_lifecycle_attention_tui_rows,
service_execution_failed_check_count: service_execution_audit.failed_count,
service_execution_missing_check_count: service_execution_audit.missing_count,
service_execution_failed_check_rows,
service_execution_failed_check_tui_rows,
topology_report,
daemon_report,
surface_report,
@ -4316,6 +4384,21 @@ fn receipt_directory_tui_row(row: &ReceiptDirectoryRow) -> String {
)
}
fn service_execution_audit_check_tui_row(check: &EpiphanyServiceExecutionAuditCheck) -> String {
let observed_status = check.observed_status.as_deref().unwrap_or("missing");
let receipt_id = check.receipt_id.as_deref().unwrap_or("missing");
let allowed_statuses = check.allowed_statuses.join("|");
let seal_status = if check.private_state_sealed {
"sealed"
} else {
"private-state-exposed"
};
format!(
"{}={} | allowed={} | receipt={} | {}",
check.action, observed_status, allowed_statuses, receipt_id, seal_status
)
}
fn receipt_directory_row_needs_attention(row: &ReceiptDirectoryRow) -> bool {
if row.private_state_exposed {
return true;

View file

@ -1117,6 +1117,163 @@ pub struct EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry {
pub notes: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EpiphanyServiceExecutionAuditCheck {
pub action: String,
pub allowed_statuses: Vec<String>,
pub receipt_id: Option<String>,
pub observed_status: Option<String>,
pub ok: bool,
pub private_state_sealed: bool,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EpiphanyServiceExecutionAuditReport {
pub status: String,
pub receipt_count: usize,
pub missing_count: usize,
pub failed_count: usize,
pub private_state_exposed: bool,
pub checks: Vec<EpiphanyServiceExecutionAuditCheck>,
}
pub fn epiphany_service_execution_audit_report(
receipts: &[EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
) -> EpiphanyServiceExecutionAuditReport {
epiphany_service_execution_audit_report_for_expected(
receipts,
&[
("windows-service-execution-runbook", &["written"][..]),
(
"windows-service-execution-readiness",
&["elevated-ready"][..],
),
("windows-service-install", &["installed"][..]),
("windows-service-start", &["start-requested"][..]),
(
"windows-service-status",
&["running", "present", "stopped"][..],
),
("windows-service-reconcile", &["in-sync"][..]),
("windows-service-stop", &["stop-requested"][..]),
],
)
}
pub fn epiphany_cluster_service_execution_audit_report(
receipts: &[EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
) -> EpiphanyServiceExecutionAuditReport {
epiphany_service_execution_audit_report_for_expected(
receipts,
&[
(
"cluster-windows-service-execution-runbook",
&["written"][..],
),
(
"cluster-windows-service-execution-readiness",
&["elevated-ready"][..],
),
("cluster-windows-service-install", &["installed"][..]),
("cluster-windows-service-start", &["start-requested"][..]),
("cluster-windows-service-execution-audit", &["complete"][..]),
("cluster-windows-service-stop", &["stop-requested"][..]),
],
)
}
fn epiphany_service_execution_audit_report_for_expected(
receipts: &[EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
expected: &[(&str, &[&str])],
) -> EpiphanyServiceExecutionAuditReport {
let mut checks = Vec::new();
let mut missing_count = 0_usize;
let mut failed_count = 0_usize;
let mut private_state_exposed = false;
for (action, allowed_statuses) in expected {
let receipt = latest_lifecycle_receipt_for_action(receipts, action);
let (receipt_id, observed_status, ok, sealed) = match receipt {
Some(receipt) => {
let status_ok = allowed_statuses
.iter()
.any(|allowed| *allowed == receipt.status);
(
Some(receipt.receipt_id.clone()),
Some(receipt.status.clone()),
status_ok,
!receipt.private_state_exposed,
)
}
None => {
missing_count += 1;
(None, None, false, true)
}
};
if !ok {
failed_count += 1;
}
if !sealed {
private_state_exposed = true;
}
checks.push(EpiphanyServiceExecutionAuditCheck {
action: (*action).to_string(),
allowed_statuses: allowed_statuses
.iter()
.map(|status| (*status).to_string())
.collect(),
receipt_id,
observed_status,
ok,
private_state_sealed: sealed,
});
}
let status = if missing_count == 0 && failed_count == 0 && !private_state_exposed {
"complete"
} else {
"incomplete"
}
.to_string();
EpiphanyServiceExecutionAuditReport {
status,
receipt_count: receipts.len(),
missing_count,
failed_count,
private_state_exposed,
checks,
}
}
fn latest_lifecycle_receipt_for_action<'a>(
receipts: &'a [EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry],
action: &str,
) -> Option<&'a EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry> {
receipts
.iter()
.filter(|receipt| receipt.action == action)
.max_by(|left, right| {
lifecycle_receipt_sort_key(left).cmp(&lifecycle_receipt_sort_key(right))
})
}
fn lifecycle_receipt_sort_key(
receipt: &EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry,
) -> (&str, &str) {
(
receipt
.completed_at_utc
.as_deref()
.unwrap_or(receipt.started_at_utc.as_str()),
receipt.receipt_id.as_str(),
)
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "epiphany.cultmesh.swarm_brake",

View file

@ -265,8 +265,11 @@ pub use cultmesh_integration::EpiphanyCultMeshWorkLoopTelemetryEntry;
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::default_epiphany_cultmesh_operator_status;
pub use cultmesh_integration::default_epiphany_cultmesh_swarm_brake;
pub use cultmesh_integration::epiphany_cluster_service_execution_audit_report;
pub use cultmesh_integration::epiphany_cultmesh_agent_state_soa_summary_from_entry;
pub use cultmesh_integration::epiphany_cultmesh_bifrost_body_change_publication_intent;
pub use cultmesh_integration::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent;
@ -297,6 +300,7 @@ pub use cultmesh_integration::epiphany_cultmesh_soul_contracts;
pub use cultmesh_integration::epiphany_cultmesh_substrate_gate_contracts;
pub use cultmesh_integration::epiphany_cultmesh_verse_policies;
pub use cultmesh_integration::epiphany_local_verse_work_loop_summary;
pub use cultmesh_integration::epiphany_service_execution_audit_report;
pub use cultmesh_integration::load_epiphany_cultmesh_cluster_topology;
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_liveness;
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_restart_policy;

View file

@ -61,12 +61,12 @@ remembers doctrine; the branch remembers the blade.
- Public doctrine source `https://gamecult.org/Blog/purge-the-heretek-from-our-daemonic-swarm` sharpens the current swarm audit: Odin sees but must not own, Gjallar-like surface publishers must produce their own witnesses, Idunn-like ledgers must advance instead of freezing old wounds, and Bifrost is the ledger gate for cross-repo purification receipts rather than transcript archaeology.
- `tools/epiphany_local_run.ps1` now stamps local run ids as `local-YYYYMMDD-HHMMSS-fff-<guid8>` instead of second-resolution ids, so concurrent operator rites get separate artifact roots and run receipts. Verified: `collaboration-feedback` and `bifrost-publication` launched in parallel in the same second and completed as `local-20260618-064814-171-dc0b8dd9` and `local-20260618-064814-149-2946d675`.
- `epiphany-verse-query tool-directory` and `tools/epiphany_local_run.ps1 -Mode tool-directory` are the compact read-only daemon tool directory. The report reads the same local Verse capability records used by `invoke-tool`, annotates them with host daemon readiness, and returns TUI rows plus direct `invocationCommand` and wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId <capability> -ToolRequestingAgentId <agent> -ToolRequestingClusterId <cluster>`. Verified: fresh proof store returned sixteen globally available, receipt-gated, private-state-sealed tools with `hostReadyCount=16`, `hostAttentionCount=0`, including `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands`; smoke source-proves the compact Hands row and command hints; wrapper mode produced `tools=16`, `hostReady=16`, `hostAttention=0`, `privateStateExposed=False`.
- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` are the one-command compact global-agent sight rite. It composes narrow cluster topology, liveness, Odin/Eve surface, daemon tool, restart-policy coverage, and receipt-directory service-lifecycle attention loaders; returns seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, sixteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/invoke/Bifrost-ledger/service-policy-directory/service-execution-audit, sealed `toolHostAttentionRows`/TUI rows for blocked daemon-hosted capabilities, sealed `serviceLifecycleAttentionRows`/TUI rows copied from the receipt directory, explicit `serviceLifecycleRecommended*` fields for service-manager follow-up, ordered `swarmActionRows`/TUI rows with authority/effect/mutation/elevation metadata plus sealed `operatorArtifactRef`, `operatorArtifactStatus`, and `completionAuditWrapper*` pointers for operator-runbook rows, and `privateStateExposed=false`; and avoids full local Verse serialization. `epiphany-verse-query` now defaults to `.epiphany-run\cultmesh\local-verse.ccmp`, matching the wrapper and daemon supervisor. Verified: live overview artifact `local-20260618-150015-783-ec94079f` returned `status=attention`, `liveness=ready`, `recovery=attention`, `agents=7`, `clusters=7`, `privateVerses=7`, `surfaces=7`, `tools=16`, `nonReady=0`, `toolHostAttentionCount=0`, `policyMissing=0`, `recommended=cluster-service-execution-audit`, `serviceRecommended=cluster-service-execution-audit`, `swarmActionCount=2`, readback row `40:service-lifecycle:cluster-service-execution-audit:attention:mutates=False:elevated=False:artifactStatus=none:audit=none:artifact=none`, elevated row `50:service-execution-authority:operator-elevated-runbook:operator-authority-required:mutates=True:elevated=True:artifactStatus=present:audit=cluster-service-execution-audit:artifact=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, typed `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, `serviceLifecycleAttentionCount=2`, lifecycle routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, and `privateStateExposed=False`. Fresh source smoke `verse-query-completion-audit-row-smoke` passes, including present-artifact and missing-artifact branches proving the audit command remains machine-readable.
- `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` are the compact "see the swarm, then poke only if liveness attention exists" rite. It reads the compact overview first, writes no poke receipt when liveness is ready, routes non-ready daemons through the existing brake-aware `poke-down-daemons` receipt writer, carries overview's sealed service lifecycle attention rows, explicit service lifecycle recommendation, and ordered/effect-classified action queue with sealed runbook artifact and audit pointers without treating service-manager wounds as daemon-poke authority, and carries sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised tools are blocked by a sick host daemon. Verified: live wrapper artifact `local-20260618-150015-844-aba20563` produced `status=noop`, `overview=attention`, `liveness=ready`, `recovery=attention`, `clusters=7`, `privateVerses=7`, `recommended=cluster-service-execution-audit`, `serviceRecommended=cluster-service-execution-audit`, service readback row `artifactStatus=none`, elevated service authority row `artifactStatus=present`, `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, artifact `E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, `attention=none`, `serviceLifecycleAttention=cluster-service-lifecycle:epiphany-cluster-daemon-services::cluster-windows-service-execution-audit:incomplete; service-lifecycle:epiphany-daemon-supervisor-service::windows-service-execution-audit:incomplete`, `serviceLifecycleAttentionCount=2`, `poked=0`, and `privateStateExposed=False`; degraded Hands proof routes through the topology-aware poke path and exposes blocked Hands tool-host rows plus liveness/tool-host action rows; source smoke `verse-query-completion-audit-row-smoke` proves the degraded single-poke triage path without a post-receipt full-context readback.
- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` are the one-command compact global-agent sight rite. It composes narrow cluster topology, liveness, Odin/Eve surface, daemon tool, restart-policy coverage, receipt-directory service-lifecycle attention, and the shared core service-execution audit report; returns seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, sixteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/invoke/Bifrost-ledger/service-policy-directory/service-execution-audit, sealed `toolHostAttentionRows`/TUI rows for blocked daemon-hosted capabilities, sealed `serviceLifecycleAttentionRows`/TUI rows copied from the receipt directory, explicit `serviceLifecycleRecommended*` fields for service-manager follow-up, ordered `swarmActionRows`/TUI rows with authority/effect/mutation/elevation metadata plus sealed `operatorArtifactRef`, `operatorArtifactStatus`, and `completionAuditWrapper*` pointers for operator-runbook rows, `serviceExecutionFailedCheckRows`/TUI rows naming the failed sealed execution checks, and `privateStateExposed=false`; and avoids full local Verse serialization. `epiphany-verse-query` now defaults to `.epiphany-run\cultmesh\local-verse.ccmp`, matching the wrapper and daemon supervisor. Verified: live overview artifact `local-20260618-155606-611-19701102` returned `status=attention`, `liveness=ready`, `recovery=attention`, `agents=7`, `clusters=7`, `privateVerses=7`, `surfaces=7`, `tools=16`, `nonReady=0`, `toolHostAttentionCount=0`, `policyMissing=0`, `recommended=cluster-service-execution-audit`, `serviceRecommended=cluster-service-execution-audit`, `swarmActionCount=2`, readback row `40:service-lifecycle:cluster-service-execution-audit:attention:mutates=False:elevated=False:artifactStatus=none:audit=none:artifact=none`, elevated row `50:service-execution-authority:operator-elevated-runbook:operator-authority-required:mutates=True:elevated=True:artifactStatus=present:audit=cluster-service-execution-audit:artifact=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, lifecycle routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, and `serviceExecutionFailedChecks=cluster-windows-service-execution-readiness=not-elevated; cluster-windows-service-install=planned; cluster-windows-service-start=execution-refused-not-elevated; cluster-windows-service-execution-audit=incomplete; cluster-windows-service-stop=execution-refused-not-elevated` with `privateStateExposed=False`. Fresh source smoke `verse-query-service-execution-failed-checks-clean` passes, including present-artifact, missing-artifact, and failed-check anatomy branches.
- `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` are the compact "see the swarm, then poke only if liveness attention exists" rite. It reads the compact overview first, writes no poke receipt when liveness is ready, routes non-ready daemons through the existing brake-aware `poke-down-daemons` receipt writer, carries overview's sealed service lifecycle attention rows, failed service-execution check rows, explicit service lifecycle recommendation, and ordered/effect-classified action queue with sealed runbook artifact and audit pointers without treating service-manager wounds as daemon-poke authority, and carries sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised tools are blocked by a sick host daemon. Verified: live wrapper artifact `local-20260618-150015-844-aba20563` produced `status=noop`, `overview=attention`, `liveness=ready`, `recovery=attention`, `clusters=7`, `privateVerses=7`, `recommended=cluster-service-execution-audit`, `serviceRecommended=cluster-service-execution-audit`, service readback row `artifactStatus=none`, elevated service authority row `artifactStatus=present`, `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, artifact `E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, `attention=none`, `serviceLifecycleAttention=cluster-service-lifecycle:epiphany-cluster-daemon-services::cluster-windows-service-execution-audit:incomplete; service-lifecycle:epiphany-daemon-supervisor-service::windows-service-execution-audit:incomplete`, `serviceLifecycleAttentionCount=2`, `poked=0`, and `privateStateExposed=False`; degraded Hands proof routes through the topology-aware poke path and exposes blocked Hands tool-host rows plus liveness/tool-host action rows; source smoke `verse-query-completion-audit-row-smoke` proves the degraded single-poke triage path without a post-receipt full-context readback.
- `swarmActionTuiRows` now carry the same audit visibility as JSON rows. Fresh source smoke `verse-query-action-tui-audit-smoke` and live artifacts `local-20260618-150449-420-0371c76a` / `local-20260618-150450-027-74d864da` prove the compact rows include `artifact=present | audit=cluster-service-execution-audit` on the `service-execution-authority` row and `artifact=none | audit=none` on the readback row, while triage remains `poked=0` and private state remains sealed.
- Receipt directory rows now classify their artifact refs too. `ReceiptDirectoryRow` includes `artifactStatus`, and receipt TUI rows append `artifact=<status>`. Fresh smoke `verse-query-receipt-artifact-status-smoke` plus live overview/triage artifacts `local-20260618-150837-267-7fbf22bb` / `local-20260618-150837-466-a6a55086` prove service-manager lifecycle attention refs report `artifactStatus=external-ref` and TUI `artifact=external-ref`, while local runbook action rows still report `artifactStatus=present`.
- `epiphany-verse-query receipt-directory` now also derives compact artifact status counts: `artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, and `artifactMissingCount`. Live direct readback against `.epiphany-run\cultmesh\local-verse.ccmp` and wrapper artifact `local-20260618-151656-688-a041afcc` both reported `artifactNone=13`, `artifactExternalRef=2`, `artifactPresent=2`, `artifactMissing=0`, and `privateStateExposed=false`. A clean direct empty-store readback reported all 17 rows as `artifactNone`. The earlier all-in-one `epiphany-verse-query smoke` Windows stack overflow was fixed by cutting full `query_epiphany_local_verse_context` out of `load_swarm_overview_report`; overview now reads daemon service lifecycle rows through narrow history/latest loaders. Fresh proof `verse-query-overview-slim-context-clean` passed the full smoke without stack overflow.
- Wrapper `swarm-overview` and `swarm-triage` one-line summaries now include service lifecycle receipt `artifactStatus`. Live artifacts `local-20260618-151040-034-5a69face` and `local-20260618-151040-315-fea033ef` show both lifecycle attention rows as `artifactStatus=external-ref`, matching the typed JSON rows, with `poked=0` and `privateStateExposed=False`.
- Wrapper `swarm-overview` and `swarm-triage` one-line summaries now include service lifecycle receipt `artifactStatus` plus compact `serviceExecutionFailedChecks`. Live artifacts `local-20260618-151040-034-5a69face` and `local-20260618-151040-315-fea033ef` show both lifecycle attention rows as `artifactStatus=external-ref`; live artifact `local-20260618-155606-611-19701102` additionally names readiness/install/start/audit/stop failed checks, with private state sealed.
- Full service lifecycle history now excludes the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror entry. Latest remains readable through the dedicated latest loader; history contains only real per-receipt events. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two writes load as exactly two history receipts while latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage artifacts `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove the compact swarm sights still report service lifecycle attention and the present elevated runbook artifact without daemon pokes or service mutation. A broad unscoped `cargo test service_lifecycle_receipt_history_excludes_latest_mirror` was abandoned after the Windows test harness fanned out across bin targets and hit a broken pipe; use `cargo test --lib service_lifecycle_receipt_history_excludes_latest_mirror` for this check.
- The operator snapshot distills typed fields such as thread id, state status, coordinator action, CRRC action, reorient action, available actions, and artifact refs; it does not preserve the raw JSON status blob as internal state. JSON remains display/evidence at the edge.
- Local MVP Persona front-door bubbles now route their `epiphany.cultmesh.persona_speech_audit.v0` witness into the same `.epiphany-run/cultmesh/local-verse.ccmp` store and write a final `local-verse-context.json` for MVP mode too. `Persona-bubble.stdout.json` remains display; the local Verse carries the mouth-edge eligibility receipt.

Binary file not shown.

Binary file not shown.

View file

@ -617,11 +617,11 @@ current_status:
- `tools/epiphany_local_run.ps1` now uses collision-resistant local run ids (`local-YYYYMMDD-HHMMSS-fff-<guid8>`) for artifact roots and operator run receipts. Same-second parallel compact wrapper proofs for `collaboration-feedback` and `bifrost-publication` produce separate artifact drawers and both complete, so operator rites no longer collide on second-resolution run ids.
- `epiphany-verse-query tool-directory` and `tools/epiphany_local_run.ps1 -Mode tool-directory` provide the compact daemon tool sight organ over the same local Verse capability records used by `invoke-tool`. It returns sixteen globally available daemon-hosted capabilities, host readiness counts, agent-friendly TUI rows such as `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands`, direct `invocationCommand`, wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId <capability> -ToolRequestingAgentId <agent> -ToolRequestingClusterId <cluster>`, and the invariants `availableToAllAgents=true`, `requiresReceipt=true`, `privateStateExposed=false`.
- `epiphany-verse-query cluster-topology` and `tools/epiphany_local_run.ps1 -Mode cluster-topology` provide the compact cluster/body/private-Verse/daemon sight organ over local Verse topology rows through a narrow CultMesh loader. The report returns seven clusters, seven private Verse ids, seven daemon ids, one public Persona discussion cluster, agent-friendly TUI rows such as `PUBLIC | Persona | epiphany.cluster.persona.private | repo:E:/Projects/EpiphanyAgent | epiphany-daemon-persona | eve://epiphany/persona`, and `privateStateExposed=false`; `epiphany-verse-query smoke` now source-proves the compact topology invariants.
- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` provide the one-command compact global-agent sight rite. It composes narrow cluster topology, liveness, Odin/Eve surface, daemon tool, restart-policy coverage, and receipt-directory service-lifecycle attention without full local Verse serialization, returning seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, sixteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/invoke/Bifrost-ledger/restart-policy coverage, wrapper command hints for overview/receipts/poke/connect/tool-invoke/Bifrost-ledger/service-policy-directory/service-execution-audit, sealed `toolHostAttentionRows`/TUI rows for blocked daemon-hosted capabilities, sealed `serviceLifecycleAttentionRows`/TUI rows copied from the receipt directory, explicit `serviceLifecycleRecommended*` fields so service-manager follow-up remains visible even when global `recommendedWrapperMode` is occupied by liveness or policy, and ordered `swarmActionRows`/TUI rows with authority gates, effect class, mutation flag, elevation flag, sealed `operatorArtifactRef`, `operatorArtifactStatus`, and `completionAuditWrapper*` for operator-runbook rows. Current live overview `local-20260618-150015-783-ec94079f` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `toolHostAttentionCount=0`, `serviceLifecycleAttentionCount=2`, `swarmActionCount=2`, a non-mutating/non-elevated `priority=40` service lifecycle readback row, and a mutating/elevated `priority=50`, `family=service-execution-authority`, `status=operator-authority-required`, `effectClass=elevated-service-control`, `wrapperMode=operator-elevated-runbook`, `authorityGate=operator.elevated_windows_service_control`, `operatorArtifactStatus=present`, `operatorArtifactRef=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, `completionAuditWrapperMode=cluster-service-execution-audit`, `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, `privateStateExposed=false` row because a sealed cluster service execution runbook witness exists on disk and must be audited after operator execution. If that local artifact is missing, source smoke proves the same row is demoted to `status=runbook-artifact-missing`, `wrapperMode=cluster-service-execution-runbook`, `effectClass=service-lifecycle-runbook-regeneration`, `mutatesState=false`, and `requiresElevatedAuthority=false` instead of pretending elevated service authority is actionable. The wrapper one-line summary now separates daemon liveness `attention=none`, blocked tool-host sight `toolHostAttention=none`, global `recommended=cluster-service-execution-audit`, service-specific `serviceRecommended=cluster-service-execution-audit`, `actionQueue=40:service-lifecycle:cluster-service-execution-audit:attention:mutates=False:elevated=False:artifactStatus=none:audit=none:artifact=none; 50:service-execution-authority:operator-elevated-runbook:operator-authority-required:mutates=True:elevated=True:artifactStatus=present:audit=cluster-service-execution-audit:artifact=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, and service lifecycle attention rows. Degraded daemon overview still routes global recommendation to `swarm-poke-down` first while independent action rows preserve the liveness/tool-host duties; liveness action rows are explicitly mutating typed lifecycle pokes but do not require elevation, while service execution authority rows make the operator grant boundary visible. `epiphany-verse-query` now defaults to the same shared `.epiphany-run\cultmesh\local-verse.ccmp` store as the wrapper and daemon supervisor, so direct and wrapper sights read the same body.
- `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` compose the compact swarm overview with the existing brake-aware daemon poke receipt writer. Triage pokes only daemon liveness attention; service-manager lifecycle wounds are reflected from overview as sealed `serviceLifecycleAttentionRows`/TUI rows, explicit `serviceLifecycleRecommended*` fields, and ordered `swarmActionRows`, but do not cause daemon poke receipts, while blocked daemon-hosted tools ride as sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised capabilities are unavailable because their host body is sick. Current live triage `local-20260618-150015-844-aba20563` returns `status=noop`, `overviewStatus=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `clusterCount=7`, `privateVerseCount=7`, `pokedDaemonCount=0`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `swarmActionCount=2`, the same sealed service readback plus operator-elevated runbook rows, including `operatorArtifactStatus=present`, `operatorArtifactRef=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, and `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit` on the elevated row, empty daemon/tool-host attention arrays, `serviceLifecycleAttentionCount=2`, routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, direct and wrapper command hints including `wrapperInvokeTool` and `wrapperBifrostLedger=tools/epiphany_local_run.ps1 -Mode bifrost-ledger`, and `privateStateExposed=false`; degraded Hands proof returns `status=ok`, `overviewStatus=attention`, topology and daemon TUI rows, blocked Hands-hosted tool rows, one sealed topology-aware poke receipt for `epiphany-daemon-hands` with `bodyDomain=repo:E:/Projects/EpiphanyAgent`, `privateVerseId=epiphany.cluster.hands.private`, `eveSurfaceId=eve://epiphany/hands`, `observedStatus=degraded`, `attentionDaemonIds=[epiphany-daemon-hands]`, `attentionToolHostDaemonIds=[epiphany-daemon-hands]`, and liveness/tool-host action rows with no private-state exposure. Source smoke `verse-query-completion-audit-row-smoke` proves a physical synthetic written runbook plus incomplete service audit receipts expose both service lifecycle readback and elevated operator runbook rows with `operatorArtifactStatus=present`, that missing local runbook artifacts demote to non-elevated regeneration, and that the post-execution audit command remains machine-readable without touching Windows services.
- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` provide the one-command compact global-agent sight rite. It composes narrow cluster topology, liveness, Odin/Eve surface, daemon tool, restart-policy coverage, receipt-directory service-lifecycle attention, and the shared core service-execution audit report without full local Verse serialization, returning seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, sixteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/invoke/Bifrost-ledger/restart-policy coverage, wrapper command hints for overview/receipts/poke/connect/tool-invoke/Bifrost-ledger/service-policy-directory/service-execution-audit, sealed `toolHostAttentionRows`/TUI rows for blocked daemon-hosted capabilities, sealed `serviceLifecycleAttentionRows`/TUI rows copied from the receipt directory, `serviceExecutionFailedCheckRows`/TUI rows naming failed sealed execution checks, explicit `serviceLifecycleRecommended*` fields so service-manager follow-up remains visible even when global `recommendedWrapperMode` is occupied by liveness or policy, and ordered `swarmActionRows`/TUI rows with authority gates, effect class, mutation flag, elevation flag, sealed `operatorArtifactRef`, `operatorArtifactStatus`, and `completionAuditWrapper*` for operator-runbook rows. Current live overview `local-20260618-155606-611-19701102` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `toolHostAttentionCount=0`, `serviceLifecycleAttentionCount=2`, `swarmActionCount=2`, a non-mutating/non-elevated `priority=40` service lifecycle readback row, and a mutating/elevated `priority=50`, `family=service-execution-authority`, `status=operator-authority-required`, `effectClass=elevated-service-control`, `wrapperMode=operator-elevated-runbook`, `authorityGate=operator.elevated_windows_service_control`, `operatorArtifactStatus=present`, `operatorArtifactRef=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, `completionAuditWrapperMode=cluster-service-execution-audit`, `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`, `privateStateExposed=false`, and compact `serviceExecutionFailedChecks=cluster-windows-service-execution-readiness=not-elevated; cluster-windows-service-install=planned; cluster-windows-service-start=execution-refused-not-elevated; cluster-windows-service-execution-audit=incomplete; cluster-windows-service-stop=execution-refused-not-elevated`. If that local artifact is missing, source smoke proves the same row is demoted to `status=runbook-artifact-missing`, `wrapperMode=cluster-service-execution-runbook`, `effectClass=service-lifecycle-runbook-regeneration`, `mutatesState=false`, and `requiresElevatedAuthority=false` instead of pretending elevated service authority is actionable. Degraded daemon overview still routes global recommendation to `swarm-poke-down` first while independent action rows preserve the liveness/tool-host duties; liveness action rows are explicitly mutating typed lifecycle pokes but do not require elevation, while service execution authority rows make the operator grant boundary visible. `epiphany-verse-query` now defaults to the same shared `.epiphany-run\cultmesh\local-verse.ccmp` store as the wrapper and daemon supervisor, so direct and wrapper sights read the same body.
- `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` compose the compact swarm overview with the existing brake-aware daemon poke receipt writer. Triage pokes only daemon liveness attention; service-manager lifecycle wounds are reflected from overview as sealed `serviceLifecycleAttentionRows`/TUI rows, `serviceExecutionFailedCheckRows`/TUI rows, explicit `serviceLifecycleRecommended*` fields, and ordered `swarmActionRows`, but do not cause daemon poke receipts, while blocked daemon-hosted tools ride as sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised capabilities are unavailable because their host body is sick. Current live triage `local-20260618-150015-844-aba20563` returns `status=noop`, `overviewStatus=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `clusterCount=7`, `privateVerseCount=7`, `pokedDaemonCount=0`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `swarmActionCount=2`, the same sealed service readback plus operator-elevated runbook rows, including `operatorArtifactStatus=present`, `operatorArtifactRef=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, and `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit` on the elevated row, empty daemon/tool-host attention arrays, `serviceLifecycleAttentionCount=2`, routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, direct and wrapper command hints including `wrapperInvokeTool` and `wrapperBifrostLedger=tools/epiphany_local_run.ps1 -Mode bifrost-ledger`, and `privateStateExposed=false`; degraded Hands proof returns `status=ok`, `overviewStatus=attention`, topology and daemon TUI rows, blocked Hands-hosted tool rows, one sealed topology-aware poke receipt for `epiphany-daemon-hands` with `bodyDomain=repo:E:/Projects/EpiphanyAgent`, `privateVerseId=epiphany.cluster.hands.private`, `eveSurfaceId=eve://epiphany/hands`, `observedStatus=degraded`, `attentionDaemonIds=[epiphany-daemon-hands]`, `attentionToolHostDaemonIds=[epiphany-daemon-hands]`, and liveness/tool-host action rows with no private-state exposure. Source smoke `verse-query-service-execution-failed-checks-clean` proves a physical synthetic written runbook plus incomplete service audit receipts expose both service lifecycle readback and failed-check anatomy with no Windows service mutation.
- Compact `swarmActionTuiRows` now match the JSON service-execution queue: live artifacts `local-20260618-150449-420-0371c76a` and `local-20260618-150450-027-74d864da` show `050 | service-execution-authority | operator-authority-required | operator-elevated-runbook | operator.elevated_windows_service_control | mutates=true | elevated=true | artifact=present | audit=cluster-service-execution-audit`, while the readback row stays `artifact=none | audit=none`. Source smoke `verse-query-action-tui-audit-smoke` guards this agent-friendly TUI surface.
- Receipt directory rows now carry `artifactStatus` beside `artifactRef`, using the same `none` / `external-ref` / `present` / `missing` vocabulary as action rows. Live overview/triage artifacts `local-20260618-150837-267-7fbf22bb` and `local-20260618-150837-466-a6a55086` prove service-manager lifecycle attention refs classify as `external-ref` in JSON and `artifact=external-ref` in service lifecycle TUI rows; source smoke `verse-query-receipt-artifact-status-smoke` guards the compact surface. `epiphany-verse-query receipt-directory` also derives compact artifact counts (`artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, `artifactMissingCount`) from rows instead of storing a second truth. Live direct readback against `.epiphany-run\cultmesh\local-verse.ccmp` and wrapper artifact `local-20260618-151656-688-a041afcc` both reported `artifactNone=13`, `artifactExternalRef=2`, `artifactPresent=2`, `artifactMissing=0`, and `privateStateExposed=false`; a clean direct empty-store readback reported all 17 rows as `artifactNone`. The earlier all-in-one `epiphany-verse-query smoke` Windows stack overflow was fixed by cutting full `query_epiphany_local_verse_context` out of `load_swarm_overview_report`; overview now reads daemon service lifecycle rows through narrow history/latest loaders. Fresh proof `verse-query-overview-slim-context-clean` passed the full smoke without stack overflow.
- Wrapper `swarm-overview` and `swarm-triage` summaries now surface lifecycle receipt `artifactStatus` instead of hiding it inside JSON. Live artifacts `local-20260618-151040-034-5a69face` and `local-20260618-151040-315-fea033ef` show both service lifecycle attention rows as `artifactStatus=external-ref`, matching typed rows, while triage remains `poked=0` and private state stays sealed.
- Wrapper `swarm-overview` and `swarm-triage` summaries now surface lifecycle receipt `artifactStatus` plus compact service execution failed-check anatomy instead of hiding either inside JSON. Live artifact `local-20260618-155606-611-19701102` shows both service lifecycle attention rows, the operator-elevated runbook row, and `serviceExecutionFailedChecks` naming readiness/install/start/audit/stop status, while private state stays sealed.
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
next_action: Continue the swarm-readiness cuts toward elevated operator install/start execution and completed audit/readiness for the seven installed services. Run generated service execution/install/control runbooks only when the operator grants that authority. The current local Verse proves liveness readiness, scheduler-policy coverage, daemon-body invocation, per-organ launch artifact generation, per-organ install-plan generation, non-elevated install/start/stop execution refusal, read-only installed-service audit, cluster-wide service control planning, service-lifecycle attention surfacing, and cluster execution audit acceptance criteria: `swarm-overview` now reports `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, and `recommendedWrapperMode=cluster-service-execution-audit` when the latest sealed cluster service lifecycle receipt is `not-elevated`; `service-tick` can refresh all seven daemon heartbeats through sealed scheduler receipts; `cluster-service-runbook` writes seven explicit `epiphany-cluster-daemon serve` commands with `privateStateExposed=false`; `cluster-service-install-plan` writes seven distinct Windows service install commands with `privateStateExposed=false`; `cluster-service-install-execute`, `cluster-service-start-execute`, and `cluster-service-stop-execute` refuse as `execution-refused-not-elevated` with `executed=false` when the shell lacks service authority; `cluster-service-start-plan` and `cluster-service-stop-plan` emit seven non-mutating planned rows; `cluster-service-audit` currently reports `incomplete` with seven missing services in this non-installed environment; `service-execution-runbook` and `cluster-service-execution-runbook` write the exact elevated wrapper sequences and seal typed runbook receipts; and `service-execution-audit` plus `cluster-service-execution-audit` now require those runbook witnesses before considering elevated-ready/install/start/audit/status/reconcile/stop effect receipts. Preserve the existing typed local Verse surfaces: `service-plan`, `service-launch`, `service-runbook`, `cluster-service-runbook`, `cluster-service-install-plan`, `cluster-service-install-execute`, `cluster-service-audit`, `cluster-service-start-plan`, `cluster-service-stop-plan`, `cluster-service-start-execute`, `cluster-service-stop-execute`, `cluster-service-execution-readiness`, `cluster-service-execution-runbook`, `cluster-service-execution-audit`, `service-execution-runbook`, `service-execution-audit`, `service-tick`, `service-policy-directory`, `agent-state-soa`, `swarm-status`, `swarm-poke-down`, `swarm-triage`, `cluster-topology`, `eve-surfaces`, `eve-connect`, `collaboration-feedback`, `bifrost-publication`, `bifrost-ledger`, `receipt-directory`, `tool-directory`, `tool-invoke`, `swarm-overview`, `seed-compact`, service manager status/reconcile/readiness/control wrappers, compact daemon scheduler/policy receipt rows, daemon liveness-gated tool routing, Bifrost/Imagination chains, coordinator-run receipts, Hands gates, role review mirrors, and sealed agent-state SoA summary. Keep the seven-standing-faculty SoA, stale-turn repair, memory lifecycle, shared local Verse witnesses, and typed CultMesh Persona speech gate intact.

View file

@ -1592,7 +1592,17 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
"$($_.priority):$($_.family):$($_.wrapperMode):$($_.status):mutates=$($_.mutatesState):elevated=$($_.requiresElevatedAuthority):artifactStatus=${artifactStatus}:audit=${audit}:artifact=$artifact"
}) -join "; ")
}
Write-Host "Swarm overview: status=$($result.status), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), agents=$($result.agentCount), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), surfaces=$($result.surfaceCount), tools=$($result.toolCount), nonReady=$($result.nonReadyDaemonCount), policyMissing=$($result.policyMissingCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), actionQueue=$actionQueue, attention=$attention, toolHostAttention=$toolHostAttention, serviceLifecycleAttention=$serviceLifecycleAttention, privateStateExposed=$($result.privateStateExposed)"
$serviceExecutionFailedChecks = "none"
if ($null -ne $result.serviceExecutionFailedCheckRows -and $result.serviceExecutionFailedCheckRows.Count -gt 0) {
$serviceExecutionFailedChecks = (($result.serviceExecutionFailedCheckRows | ForEach-Object {
$observed = $_.observedStatus
if ($null -eq $observed -or $observed -eq "") {
$observed = "missing"
}
"$($_.action)=${observed}"
}) -join "; ")
}
Write-Host "Swarm overview: status=$($result.status), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), agents=$($result.agentCount), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), surfaces=$($result.surfaceCount), tools=$($result.toolCount), nonReady=$($result.nonReadyDaemonCount), policyMissing=$($result.policyMissingCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), actionQueue=$actionQueue, attention=$attention, toolHostAttention=$toolHostAttention, serviceLifecycleAttention=$serviceLifecycleAttention, serviceExecutionFailedChecks=$serviceExecutionFailedChecks, privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "service-policy-directory") {
Write-Host "Service policy directory: status=$($result.status), daemons=$($result.daemonCount), covered=$($result.coveredCount), enabled=$($result.enabledCount), disabled=$($result.disabledCount), missing=$($result.missingCount), attention=$($result.attentionCount), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "swarm-poke-down") {
@ -1636,7 +1646,17 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
"$($_.priority):$($_.family):$($_.wrapperMode):$($_.status):mutates=$($_.mutatesState):elevated=$($_.requiresElevatedAuthority):artifactStatus=${artifactStatus}:audit=${audit}:artifact=$artifact"
}) -join "; ")
}
Write-Host "Swarm triage: status=$($result.status), overview=$($result.overviewStatus), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), actionQueue=$actionQueue, attention=$attention, toolHostAttention=$toolHostAttention, serviceLifecycleAttention=$serviceLifecycleAttention, poked=$($result.pokedDaemonCount), privateStateExposed=$($result.privateStateExposed)"
$serviceExecutionFailedChecks = "none"
if ($null -ne $result.serviceExecutionFailedCheckRows -and $result.serviceExecutionFailedCheckRows.Count -gt 0) {
$serviceExecutionFailedChecks = (($result.serviceExecutionFailedCheckRows | ForEach-Object {
$observed = $_.observedStatus
if ($null -eq $observed -or $observed -eq "") {
$observed = "missing"
}
"$($_.action)=${observed}"
}) -join "; ")
}
Write-Host "Swarm triage: status=$($result.status), overview=$($result.overviewStatus), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), actionQueue=$actionQueue, attention=$attention, toolHostAttention=$toolHostAttention, serviceLifecycleAttention=$serviceLifecycleAttention, serviceExecutionFailedChecks=$serviceExecutionFailedChecks, poked=$($result.pokedDaemonCount), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "service-runbook") {
Write-Host "Service runbook: service=$($result.serviceId), receipt=$($result.receiptId), path=$($result.runbookPath)"
} elseif ($Mode -eq "cluster-service-runbook") {