Route service lifecycle follow-ups by receipt action
This commit is contained in:
parent
d60a2f89e7
commit
4e87082aca
4 changed files with 82 additions and 16 deletions
|
|
@ -2851,6 +2851,46 @@ fn run_cli() -> Result<()> {
|
|||
"local Verse query smoke did not expose sealed service lifecycle readback plus cluster and service execution failed-check anatomy"
|
||||
);
|
||||
}
|
||||
let readiness_follow_up_receipt = EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry {
|
||||
schema_version: EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION
|
||||
.to_string(),
|
||||
receipt_id: "daemon-service-lifecycle-receipt-smoke-cluster-readiness-follow-up"
|
||||
.to_string(),
|
||||
service_id: "epiphany-cluster-daemon-services".to_string(),
|
||||
scheduler_id: "epiphany-daemon-supervisor".to_string(),
|
||||
runtime_id: args.runtime_id.clone(),
|
||||
daemon_selector: "epiphany-cluster".to_string(),
|
||||
action: "cluster-windows-service-execution-readiness".to_string(),
|
||||
status: "not-elevated".to_string(),
|
||||
command: "smoke-service-lifecycle".to_string(),
|
||||
args: vec!["cluster-windows-service-execution-readiness".to_string()],
|
||||
cwd: Some("E:/Projects/EpiphanyAgent".to_string()),
|
||||
process_id: None,
|
||||
exit_code: Some(0),
|
||||
started_at_utc: service_smoke_started_at.clone(),
|
||||
completed_at_utc: Some(Utc::now().to_rfc3339()),
|
||||
operator_artifact_ref:
|
||||
"smoke://verse-query/cluster-windows-service-execution-readiness".to_string(),
|
||||
private_state_exposed: false,
|
||||
notes: vec![
|
||||
"Synthetic verse-query smoke receipt for lifecycle follow-up routing."
|
||||
.to_string(),
|
||||
],
|
||||
};
|
||||
let readiness_follow_up_row = receipt_directory_service_lifecycle_row(
|
||||
"cluster-service-lifecycle",
|
||||
Some(&readiness_follow_up_receipt),
|
||||
WRAPPER_CLUSTER_SERVICE_EXECUTION_AUDIT_COMMAND,
|
||||
);
|
||||
if readiness_follow_up_row.follow_up_command
|
||||
!= WRAPPER_CLUSTER_SERVICE_EXECUTION_READINESS_COMMAND
|
||||
|| service_lifecycle_wrapper_mode_for_row(&readiness_follow_up_row)
|
||||
!= "cluster-service-execution-readiness"
|
||||
{
|
||||
anyhow::bail!(
|
||||
"local Verse query smoke did not route cluster readiness lifecycle receipts to the readiness wrapper"
|
||||
);
|
||||
}
|
||||
let missing_runbook_row = ReceiptDirectoryRow {
|
||||
family: "cluster-service-execution-runbook".to_string(),
|
||||
owner: "daemon-supervisor".to_string(),
|
||||
|
|
@ -4068,10 +4108,38 @@ fn swarm_action_tui_row(row: &SwarmActionRow) -> String {
|
|||
}
|
||||
|
||||
fn service_lifecycle_wrapper_mode_for_row(row: &ReceiptDirectoryRow) -> &'static str {
|
||||
if row.follow_up_command == WRAPPER_CLUSTER_SERVICE_EXECUTION_AUDIT_COMMAND {
|
||||
service_lifecycle_wrapper_mode_for_command(&row.follow_up_command)
|
||||
}
|
||||
|
||||
fn service_lifecycle_wrapper_mode_for_command(command: &str) -> &'static str {
|
||||
if command == WRAPPER_CLUSTER_SERVICE_EXECUTION_AUDIT_COMMAND {
|
||||
"cluster-service-execution-audit"
|
||||
} else if row.follow_up_command == WRAPPER_SERVICE_EXECUTION_AUDIT_COMMAND {
|
||||
} else if command == WRAPPER_CLUSTER_SERVICE_EXECUTION_READINESS_COMMAND {
|
||||
"cluster-service-execution-readiness"
|
||||
} else if command == WRAPPER_CLUSTER_SERVICE_EXECUTION_RUNBOOK_COMMAND {
|
||||
"cluster-service-execution-runbook"
|
||||
} else if command == WRAPPER_CLUSTER_SERVICE_INSTALL_EXECUTE_COMMAND {
|
||||
"cluster-service-install-execute"
|
||||
} else if command == WRAPPER_CLUSTER_SERVICE_START_EXECUTE_COMMAND {
|
||||
"cluster-service-start-execute"
|
||||
} else if command == WRAPPER_CLUSTER_SERVICE_STOP_EXECUTE_COMMAND {
|
||||
"cluster-service-stop-execute"
|
||||
} else if command == WRAPPER_SERVICE_EXECUTION_AUDIT_COMMAND {
|
||||
"service-execution-audit"
|
||||
} else if command == WRAPPER_SERVICE_EXECUTION_READINESS_COMMAND {
|
||||
"service-execution-readiness"
|
||||
} else if command == WRAPPER_SERVICE_EXECUTION_RUNBOOK_COMMAND {
|
||||
"service-execution-runbook"
|
||||
} else if command == WRAPPER_SERVICE_INSTALL_EXECUTE_COMMAND {
|
||||
"service-install-execute"
|
||||
} else if command == WRAPPER_SERVICE_START_EXECUTE_COMMAND {
|
||||
"service-start-execute"
|
||||
} else if command == WRAPPER_SERVICE_STOP_EXECUTE_COMMAND {
|
||||
"service-stop-execute"
|
||||
} else if command == WRAPPER_SERVICE_STATUS_COMMAND {
|
||||
"service-status"
|
||||
} else if command == WRAPPER_SERVICE_RECONCILE_COMMAND {
|
||||
"service-reconcile"
|
||||
} else {
|
||||
"receipt-directory"
|
||||
}
|
||||
|
|
@ -4516,18 +4584,14 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
(
|
||||
"epiphany-verse-query receipt-directory cluster-service-lifecycle follow-up"
|
||||
.to_string(),
|
||||
"cluster-service-execution-audit".to_string(),
|
||||
service_lifecycle_wrapper_mode_for_row(row).to_string(),
|
||||
row.follow_up_command.clone(),
|
||||
)
|
||||
} else if let Some(row) = service_lifecycle_attention {
|
||||
(
|
||||
"epiphany-verse-query receipt-directory service-lifecycle follow-up"
|
||||
.to_string(),
|
||||
if row.follow_up_command == WRAPPER_CLUSTER_SERVICE_EXECUTION_AUDIT_COMMAND {
|
||||
"cluster-service-execution-audit".to_string()
|
||||
} else {
|
||||
"service-execution-audit".to_string()
|
||||
},
|
||||
service_lifecycle_wrapper_mode_for_row(row).to_string(),
|
||||
row.follow_up_command.clone(),
|
||||
)
|
||||
} else {
|
||||
|
|
@ -4544,17 +4608,13 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
(
|
||||
"epiphany-verse-query receipt-directory cluster-service-lifecycle follow-up"
|
||||
.to_string(),
|
||||
"cluster-service-execution-audit".to_string(),
|
||||
service_lifecycle_wrapper_mode_for_row(row).to_string(),
|
||||
row.follow_up_command.clone(),
|
||||
)
|
||||
} else if let Some(row) = service_lifecycle_attention {
|
||||
(
|
||||
"epiphany-verse-query receipt-directory service-lifecycle follow-up".to_string(),
|
||||
if row.follow_up_command == WRAPPER_CLUSTER_SERVICE_EXECUTION_AUDIT_COMMAND {
|
||||
"cluster-service-execution-audit".to_string()
|
||||
} else {
|
||||
"service-execution-audit".to_string()
|
||||
},
|
||||
service_lifecycle_wrapper_mode_for_row(row).to_string(),
|
||||
row.follow_up_command.clone(),
|
||||
)
|
||||
} else {
|
||||
|
|
@ -5403,6 +5463,11 @@ fn receipt_directory_service_lifecycle_row(
|
|||
} else {
|
||||
"none".to_string()
|
||||
};
|
||||
let follow_up_command = receipt
|
||||
.map(|receipt| service_execution_check_follow_up_command(&receipt.action))
|
||||
.filter(|command| *command != "none")
|
||||
.unwrap_or(follow_up_command)
|
||||
.to_string();
|
||||
ReceiptDirectoryRow {
|
||||
family: family.to_string(),
|
||||
owner: "daemon-supervisor".to_string(),
|
||||
|
|
@ -5416,7 +5481,7 @@ fn receipt_directory_service_lifecycle_row(
|
|||
route,
|
||||
service_id,
|
||||
service_route,
|
||||
follow_up_command: follow_up_command.to_string(),
|
||||
follow_up_command,
|
||||
artifact_ref,
|
||||
artifact_status,
|
||||
artifact_sha256,
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- `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>`. TUI rows expose the global-tool contract directly, e.g. `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands | authority=hands | input=epiphany.hands.action_intent | receiptType=epiphany.hands.action_review | allAgents=true | receipt=true | private=false`. Verified: fresh proof store returned sixteen globally available, receipt-gated, private-state-sealed tools with `hostReadyCount=16`, `hostAttentionCount=0`; smoke source-proves the compact Hands contract row and command hints; wrapper proof `local-20260618-223557-260-7acb1cd1` printed all sixteen rows in the one-line `toolRows` summary with authority gates and advertised input/receipt contract types, including Hands `repo-action` and Soul `verify`, with `privateStateExposed=False`.
|
||||
- 2026-06-18: Tool-directory TUI rows now render the advertised capability `authorityGate` as `authority=<gate>`, matching the JSON surface and invocation receipt row. Source smoke guards the Hands `repo-action` row with `authority=hands`; live wrapper proof `local-20260618-223032-345-74d9bdb2` printed all sixteen tool rows with authority gates, including `authority=imagination.consensus_discovery` for Eve connection tools, `authority=hands` for Hands repo-action, `authority=soul` for Soul verify, and `authority=none` for read-only status.
|
||||
- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` are the one-command compact global-agent sight rite; `epiphany-verse-query gjallar` and `tools/epiphany_local_run.ps1 -Mode gjallar` are the first named Gjallar herald aliases over the same sealed whole-Verse report. The report 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, seventeen 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 Idunn/Epiphany lifecycle ownership on daemon/service physiology rows, authority/effect/wrapper-command/mutation/elevation metadata plus sealed `operatorArtifactRef`, `operatorArtifactStatus`, `operatorArtifactSha256`, `operatorArtifactExecutionCommand`, `operatorAftercareCommand`, 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. Compact action TUI rows and wrapper `actionQueue` now include `owner=Idunn`, `hostedBody=Epiphany`, and `aftercare=<command>` so Gjallar remains sight while Idunn remains daemon keeper. Live `epiphany-verse-query` defaults to `.epiphany-run\cultmesh\local-verse.ccmp`, matching the wrapper and daemon supervisor; bare `epiphany-verse-query smoke` uses disposable `.epiphany-smoke\verse-query-default\local-verse.ccmp` unless an explicit `--store` is provided. The previous Windows debug stack-overflow wound is cut by running the CLI body on a larger worker-thread stack; broad `epiphany-verse-query smoke` now returns `status=ok`. Verified focused proof: live Gjallar artifact `local-20260619-004932-667-64b7f2c5` returned `recommended=swarm-online-runbook`, `serviceRecommended=cluster-service-execution-audit`, and four action rows whose non-mutating service readback plus elevated cluster/single-service runbook rows all carried `owner=Idunn`, `hostedBody=Epiphany`, aftercare, artifact hashes where present, failed/missing check counts, and `privateStateExposed=False`.
|
||||
- 2026-06-19: Service lifecycle readback follow-ups are now derived from the typed receipt action instead of hardcoding audit as the only compact action-row wrapper. `cluster-windows-service-execution-readiness` routes to `cluster-service-execution-readiness`; install/start/stop/status/reconcile route to their receipt-producing wrappers; audit still routes to audit. Source smoke now includes a synthetic readiness receipt guard, and live Gjallar proof `local-20260619-005713-795-96fd5370` still shows the current latest audit receipts as audit rows while failed-check anatomy preserves readiness/install/start/stop follow-ups, `owner=Idunn`, `hostedBody=Epiphany`, and `privateStateExposed=False`.
|
||||
- `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. Current overview routing means liveness-ready service execution attention recommends `swarm-online-runbook` globally while preserving `serviceRecommended=cluster-service-execution-audit` for readback. Live triage artifact `local-20260619-004523-003-a44ad06d` proved the no-poke path still prints Idunn/Epiphany ownership on service readback and elevated service-control action rows while `poked=0`. The older degraded Hands proof still 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 and artifact-provenance visibility as JSON rows. Fresh source smoke `verse-query-action-tui-audit-smoke` and live artifact `local-20260618-164403-238-dba797ce` prove the compact rows include `artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0 | audit=cluster-service-execution-audit` on the `service-execution-authority` row and `artifact=none | sha256=none | audit=none` on the readback row, while service mutation still requires explicit elevated operator authority and private state remains sealed.
|
||||
- Receipt directory rows now classify and hash their artifact refs. `ReceiptDirectoryRow` includes `artifactStatus` plus `artifactSha256`, receipt TUI rows append `artifact=<status> | sha256=<digest-or-none>`, and wrapper `receipt-directory` prints compact `artifactHashes=<family>:<sha256>; ...` for present local artifacts. Fresh smoke guards present-artifact SHA-256 in receipt-directory JSON/TUI; live wrapper artifacts `local-20260618-165005-139-6188fe30` and `local-20260618-165319-478-e929d2bd` prove the cluster execution runbook hash `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, the per-service execution runbook hash `b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`, and non-artifact rows `artifactSha256=none`.
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in a new issue