From 60bbf07c128c5123e478b26c46c5c2c518a6abdb Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 15 Jul 2026 20:04:59 +0100 Subject: [PATCH] Delete the local Bifrost ledger oracle --- epiphany-core/src/bin/epiphany-verse-query.rs | 1153 +---------------- ...onceptual-substitution-audit-2026-07-12.md | 22 +- notes/epiphany-current-algorithmic-map.md | 6 +- notes/epiphany-repo-swarm-mvp-contract.md | 251 +--- notes/fresh-workspace-handoff.md | 9 + state/ledgers.msgpack | Bin 507626 -> 508653 bytes state/map.yaml | 12 +- tools/epiphany_local_run.ps1 | 40 +- 8 files changed, 117 insertions(+), 1376 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index f9767af4..c93906ab 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -8,13 +8,6 @@ use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID; use epiphany_core::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION; use epiphany_core::EpiphanyAgentStateSoaEntry; use epiphany_core::EpiphanyCultMeshAgentStateSoaSummaryEntry; -use epiphany_core::EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry; -use epiphany_core::EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry; -use epiphany_core::EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry; -use epiphany_core::EpiphanyCultMeshBifrostCollaborationFeedbackEntry; -use epiphany_core::EpiphanyCultMeshBifrostGithubPublicationReceiptEntry; -use epiphany_core::EpiphanyCultMeshBifrostMetricsReceiptEntry; -use epiphany_core::EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry; use epiphany_core::EpiphanyCultMeshClusterTopologyEntry; use epiphany_core::EpiphanyCultMeshDaemonPokeReceiptEntry; use epiphany_core::EpiphanyCultMeshDaemonRestartPolicyEntry; @@ -24,7 +17,6 @@ use epiphany_core::EpiphanyCultMeshDaemonToolCapabilityEntry; use epiphany_core::EpiphanyCultMeshEveSurfaceStateEntry; use epiphany_core::EpiphanyCultMeshIdunnAftercareAuditReceiptEntry; use epiphany_core::EpiphanyCultMeshIdunnDeploymentReceiptEntry; -use epiphany_core::EpiphanyCultMeshImaginationConsensusReceiptEntry; use epiphany_core::EpiphanyCultMeshManagedServicePolicyEntry; use epiphany_core::EpiphanyCultMeshOdinAdvertisementEntry; use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry; @@ -47,13 +39,8 @@ use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_intent_from_capabili use epiphany_core::epiphany_cultmesh_eve_connection_intent_from_advertisement; use epiphany_core::epiphany_service_execution_audit_report; use epiphany_core::load_agent_state_soa_entry; -use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt; use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent; -use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt; use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback; -use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt; -use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_metrics_receipt; -use epiphany_core::load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt; use epiphany_core::load_epiphany_cultmesh_cluster_topology; use epiphany_core::load_epiphany_cultmesh_daemon_liveness; use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy_directory; @@ -75,7 +62,6 @@ use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_intent; use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_receipt; use epiphany_core::load_latest_epiphany_cultmesh_idunn_aftercare_audit_receipt; use epiphany_core::load_latest_epiphany_cultmesh_idunn_deployment_receipt; -use epiphany_core::load_latest_epiphany_cultmesh_imagination_consensus_receipt; use epiphany_core::load_latest_epiphany_cultmesh_repo_work_map_entry; use epiphany_core::load_latest_epiphany_cultmesh_repo_work_overview; use epiphany_core::load_latest_epiphany_cultmesh_repo_work_public_proof; @@ -114,10 +100,6 @@ const WRAPPER_COLLABORATION_FEEDBACK_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode collaboration-feedback"; const WRAPPER_BIFROST_PUBLICATION_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode bifrost-publication"; -const WRAPPER_BIFROST_ARTIFACT_ACCEPTANCE_COMMAND: &str = - "tools/epiphany_local_run.ps1 -Mode bifrost-artifact-acceptance"; -const WRAPPER_BIFROST_METRICS_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode bifrost-metrics"; -const WRAPPER_BIFROST_LEDGER_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode bifrost-ledger"; const WRAPPER_RECEIPT_DIRECTORY_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode receipt-directory"; const DIRECT_IDUNN_DEPLOYMENT_AFTERCARE_AUDIT_COMMAND: &str = "epiphany-work deployment-aftercare-audit --workspace --local-verse-store --idunn-deployment-receipt-ref latest --aftercare-audit-receipt-ref latest"; @@ -346,8 +328,6 @@ fn run_cli() -> Result<()> { "wrapperSwarmOnlineRunbook": WRAPPER_SWARM_ONLINE_RUNBOOK_COMMAND, "tools": "epiphany-verse-query tool-directory", "wrapperTools": "tools/epiphany_local_run.ps1 -Mode tool-directory", - "bifrostLedger": "epiphany-verse-query bifrost-ledger", - "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, "receiptDirectory": "epiphany-verse-query receipt-directory", "wrapperReceiptDirectory": WRAPPER_RECEIPT_DIRECTORY_COMMAND, "wrapperServiceTick": WRAPPER_SERVICE_TICK_COMMAND, @@ -833,8 +813,6 @@ fn run_cli() -> Result<()> { "wrapperReceipts": WRAPPER_RECEIPT_DIRECTORY_COMMAND, "wrapperRestartPolicies": WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND, "wrapperPokeNonReady": WRAPPER_POKE_NON_READY_COMMAND, - "bifrostLedger": "epiphany-verse-query bifrost-ledger", - "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, }); println!( "{}", @@ -975,7 +953,6 @@ fn run_cli() -> Result<()> { "swarmOverview": WRAPPER_OVERVIEW_COMMAND, "toolDirectory": "tools/epiphany_local_run.ps1 -Mode tool-directory", "bifrostPublication": WRAPPER_BIFROST_PUBLICATION_COMMAND, - "bifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND }, "privateStateIncluded": written_intent.private_state_included, "privateStateExposed": false, @@ -1034,9 +1011,7 @@ fn run_cli() -> Result<()> { "reviewReceiptIds": [], "responseOwner": "Bifrost", "commands": { - "swarmOverview": WRAPPER_OVERVIEW_COMMAND, - "bifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, - "bifrostPublicProof": "epiphany-verse-query bifrost-public-proof --public-proof-id --ledger-entry-id --review-receipt --credit-receipt " + "swarmOverview": WRAPPER_OVERVIEW_COMMAND }, "privateStateExposed": false, }))? @@ -1048,50 +1023,6 @@ fn run_cli() -> Result<()> { "bifrost-metrics" | "metrics-receipt" => { anyhow::bail!("historical-only: canonical frontier workflow required") } - "bifrost-ledger" | "publication-ledger" => { - let report = load_bifrost_ledger_report(&args)?; - println!( - "{}", - serde_json::to_string_pretty(&json!({ - "schemaVersion": "epiphany.local_verse_bifrost_ledger_report.v0", - "status": report.status, - "store": args.store, - "runtimeId": args.runtime_id, - "rowCount": report.rows.len(), - "publicationChainCount": report.publication_chain_count, - "publicProofPublicationCount": report.public_proof_publication_count, - "artifactAcceptanceReceiptCount": report.artifact_acceptance_receipt_count, - "metricsReceiptCount": report.metrics_receipt_count, - "collaborationChainCount": report.collaboration_chain_count, - "repoWorkAccountingRequestCount": report.repo_work_accounting_request_count, - "accountingRowCount": report.accounting_rows.len(), - "closedAccountingRowCount": report.closed_accounting_row_count, - "attentionAccountingRowCount": report.attention_accounting_row_count, - "arrivalLatestBifrostPublicationIntent": report.arrival_latest_publication_intent_id, - "arrivalLatestBifrostPublicationReceipt": report.arrival_latest_publication_receipt_id, - "arrivalLatestBifrostGithubReceipt": report.arrival_latest_github_receipt_id, - "arrivalLatestBifrostPublicProofPublicationReceipt": report.arrival_latest_public_proof_publication_receipt_id, - "arrivalLatestBifrostArtifactAcceptanceReceipt": report.arrival_latest_artifact_acceptance_receipt_id, - "arrivalLatestBifrostMetricsReceipt": report.arrival_latest_metrics_receipt_id, - "arrivalLatestBifrostCollaborationFeedback": report.arrival_latest_feedback_id, - "latestImaginationConsensusReceipt": report.latest_consensus_receipt_id, - "accountingTuiRows": report.accounting_tui_rows, - "accountingRows": report.accounting_rows, - "tuiRows": report.tui_rows, - "rows": report.rows, - "commands": { - "swarmOverview": WRAPPER_OVERVIEW_COMMAND, - "toolDirectory": "tools/epiphany_local_run.ps1 -Mode tool-directory", - "collaborationFeedback": WRAPPER_COLLABORATION_FEEDBACK_COMMAND, - "bifrostArtifactAcceptance": WRAPPER_BIFROST_ARTIFACT_ACCEPTANCE_COMMAND, - "bifrostMetrics": WRAPPER_BIFROST_METRICS_COMMAND, - "bifrostPublication": WRAPPER_BIFROST_PUBLICATION_COMMAND, - "bifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND - }, - "privateStateExposed": report.private_state_exposed, - }))? - ); - } "collaboration-feedback" | "persona-feedback" => { if args.receipt_id.is_some() || args.receipt_status.is_some() @@ -1195,7 +1126,6 @@ fn run_cli() -> Result<()> { "commands": { "bifrostPublication": DIRECT_BIFROST_PUBLICATION_COMMAND, "wrapperBifrostPublication": WRAPPER_BIFROST_PUBLICATION_COMMAND, - "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, "wrapperCollaborationFeedback": WRAPPER_COLLABORATION_FEEDBACK_COMMAND }, "publicDiscussionRefs": written_feedback.public_discussion_refs, @@ -1472,8 +1402,7 @@ fn run_cli() -> Result<()> { }) { anyhow::bail!("local Verse query smoke lost swarm overview topology row"); } - if !WRAPPER_BIFROST_LEDGER_COMMAND.contains("-Mode bifrost-ledger") - || !WRAPPER_RECEIPT_DIRECTORY_COMMAND.contains("-Mode receipt-directory") + if !WRAPPER_RECEIPT_DIRECTORY_COMMAND.contains("-Mode receipt-directory") || !WRAPPER_SWARM_ONLINE_RUNBOOK_COMMAND.contains("-Mode swarm-online-runbook") || !WRAPPER_SERVICE_TICK_COMMAND.contains("-Mode service-tick") || !WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND @@ -1809,7 +1738,6 @@ fn run_cli() -> Result<()> { )?; if !WRAPPER_COLLABORATION_FEEDBACK_COMMAND.contains("-Mode collaboration-feedback") || !WRAPPER_BIFROST_PUBLICATION_COMMAND.contains("-Mode bifrost-publication") - || !WRAPPER_BIFROST_LEDGER_COMMAND.contains("-Mode bifrost-ledger") || !DIRECT_BIFROST_PUBLICATION_COMMAND.contains("bifrost-publication") || !DIRECT_BIFROST_PUBLICATION_COMMAND.contains("--changed-path ") { @@ -1817,24 +1745,6 @@ fn run_cli() -> Result<()> { "local Verse query smoke lost collaboration/publication command hints" ); } - let bifrost_ledger_report = load_bifrost_ledger_report(&args)?; - if bifrost_ledger_report - .arrival_latest_publication_intent_id - .is_none() - || bifrost_ledger_report - .arrival_latest_publication_receipt_id - .is_some() - || bifrost_ledger_report - .arrival_latest_github_receipt_id - .is_some() - || bifrost_ledger_report.arrival_latest_feedback_id.is_none() - || bifrost_ledger_report.latest_consensus_receipt_id.is_some() - || bifrost_ledger_report.private_state_exposed - { - anyhow::bail!( - "local Verse query smoke must preserve pending requester state without manufacturing Bifrost, GitHub, or Imagination responses" - ); - } write_epiphany_cultmesh_work_loop_telemetry( &args.store, EpiphanyCultMeshWorkLoopTelemetryEntry { @@ -2050,7 +1960,7 @@ fn run_cli() -> Result<()> { || !receipt_directory.rows.iter().any(|row| { row.family == "bifrost-publication" && !row.present - && row.follow_up_command == WRAPPER_BIFROST_LEDGER_COMMAND + && row.follow_up_command == "none" }) || !receipt_directory .rows @@ -2292,7 +2202,7 @@ fn run_cli() -> Result<()> { ); } other => anyhow::bail!( - "unknown command {other:?}; use seed, query, semantic-health, tools, tool-directory, restart-policy-directory, swarm-brake, swarm-status, swarm-overview, swarm-triage, managed-services, cluster-topology, eve-surfaces, agent-state, agent-state-report, poke-daemon, poke-down-daemons, bifrost-publication, bifrost-public-proof, bifrost-artifact-acceptance, bifrost-metrics, bifrost-ledger, collaboration-feedback, or smoke; provider invoke/connect commands remain unavailable until a provenance-bearing provider contract exists" + "unknown command {other:?}; use seed, query, semantic-health, tools, tool-directory, restart-policy-directory, swarm-brake, swarm-status, swarm-overview, swarm-triage, managed-services, cluster-topology, eve-surfaces, agent-state, agent-state-report, poke-daemon, poke-down-daemons, bifrost-publication, bifrost-public-proof, bifrost-artifact-acceptance, bifrost-metrics, collaboration-feedback, or smoke; provider invoke/connect commands remain unavailable until a provenance-bearing provider contract exists" ), } Ok(()) @@ -3640,8 +3550,6 @@ impl SwarmTriageOutput { "repoWorkMap": "epiphany-verse-query swarm-overview", "idunnDeploymentAftercareAudit": DIRECT_IDUNN_DEPLOYMENT_AFTERCARE_AUDIT_COMMAND, "wrapperRestartPolicies": WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND, - "bifrostLedger": "epiphany-verse-query bifrost-ledger", - "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, }), topology_tui_rows: report.topology_report.tui_rows, daemon_tui_rows: report.daemon_report.tui_rows, @@ -3650,31 +3558,6 @@ impl SwarmTriageOutput { } } -struct BifrostLedgerReport { - status: String, - rows: Vec, - tui_rows: Vec, - accounting_rows: Vec, - accounting_tui_rows: Vec, - publication_chain_count: usize, - public_proof_publication_count: usize, - artifact_acceptance_receipt_count: usize, - metrics_receipt_count: usize, - collaboration_chain_count: usize, - closed_accounting_row_count: usize, - attention_accounting_row_count: usize, - arrival_latest_publication_intent_id: Option, - arrival_latest_publication_receipt_id: Option, - arrival_latest_github_receipt_id: Option, - arrival_latest_public_proof_publication_receipt_id: Option, - arrival_latest_artifact_acceptance_receipt_id: Option, - arrival_latest_metrics_receipt_id: Option, - arrival_latest_feedback_id: Option, - latest_consensus_receipt_id: Option, - repo_work_accounting_request_count: usize, - private_state_exposed: bool, -} - struct ReceiptDirectoryReport { status: String, rows: Vec, @@ -3711,36 +3594,6 @@ struct ReceiptDirectoryRow { private_state_exposed: bool, } -#[derive(Serialize)] -#[serde(rename_all = "camelCase")] -struct BifrostLedgerRow { - document_kind: String, - owner: String, - id: String, - status: String, - route: String, - summary: String, - public_ref: String, - private_state_included: bool, - private_state_exposed: bool, -} - -#[derive(Serialize)] -#[serde(rename_all = "camelCase")] -struct BifrostAccountingRow { - lane: String, - owner: String, - status: String, - closure: String, - ledger_entry_id: String, - latest_receipt_id: String, - public_ref: String, - review_receipt_count: usize, - credit_receipt_count: usize, - public_artifact_count: usize, - private_state_exposed: bool, -} - #[derive(Clone, Serialize)] #[serde(rename_all = "camelCase")] struct DaemonToolDirectoryRow { @@ -5053,8 +4906,8 @@ fn repo_work_public_proof_action_row( operator_artifact_sha256: proof.public_proof_sha256.clone(), operator_artifact_execution_command: "none".to_string(), operator_aftercare_command: "none".to_string(), - completion_audit_wrapper_mode: "bifrost-ledger".to_string(), - completion_audit_wrapper_command: WRAPPER_BIFROST_LEDGER_COMMAND.to_string(), + completion_audit_wrapper_mode: "none".to_string(), + completion_audit_wrapper_command: "none".to_string(), authority_gate: "repo.work.public_proof_readback".to_string(), effect_class: "repo-work-public-proof-readback".to_string(), mutates_state: false, @@ -6228,7 +6081,7 @@ fn receipt_directory_report( .unwrap_or_else(|| "none".to_string()), service_id: "none".to_string(), service_route: "none".to_string(), - follow_up_command: WRAPPER_BIFROST_LEDGER_COMMAND.to_string(), + follow_up_command: "none".to_string(), artifact_ref: "none".to_string(), artifact_status: "none".to_string(), artifact_sha256: "none".to_string(), @@ -6266,7 +6119,7 @@ fn receipt_directory_report( .unwrap_or_else(|| "none".to_string()), service_id: "none".to_string(), service_route: "none".to_string(), - follow_up_command: WRAPPER_BIFROST_LEDGER_COMMAND.to_string(), + follow_up_command: "none".to_string(), artifact_ref: context .arrival_latest_bifrost_public_proof_publication_receipt .as_ref() @@ -7102,712 +6955,6 @@ fn service_lifecycle_receipt_sort_key( ) } -fn load_bifrost_ledger_report(args: &Args) -> Result { - let arrival_latest_intent = - load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_intent( - &args.store, - args.runtime_id.clone(), - )?; - let arrival_latest_publication = - load_arrival_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt( - &args.store, - args.runtime_id.clone(), - )?; - let arrival_latest_github = - load_arrival_latest_epiphany_cultmesh_bifrost_github_publication_receipt( - &args.store, - args.runtime_id.clone(), - )?; - let arrival_latest_public_proof_publication = - load_arrival_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt( - &args.store, - args.runtime_id.clone(), - )?; - let arrival_latest_artifact_acceptance = - load_arrival_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt( - &args.store, - args.runtime_id.clone(), - )?; - let arrival_latest_metrics = load_arrival_latest_epiphany_cultmesh_bifrost_metrics_receipt( - &args.store, - args.runtime_id.clone(), - )?; - let arrival_latest_feedback = - load_arrival_latest_epiphany_cultmesh_bifrost_collaboration_feedback( - &args.store, - args.runtime_id.clone(), - )?; - let latest_consensus = load_latest_epiphany_cultmesh_imagination_consensus_receipt( - &args.store, - args.runtime_id.clone(), - )?; - Ok(bifrost_ledger_report( - arrival_latest_intent.as_ref(), - arrival_latest_publication.as_ref(), - arrival_latest_github.as_ref(), - arrival_latest_public_proof_publication.as_ref(), - arrival_latest_artifact_acceptance.as_ref(), - arrival_latest_metrics.as_ref(), - arrival_latest_feedback.as_ref(), - latest_consensus.as_ref(), - &[], - )) -} - -fn bifrost_ledger_report( - arrival_latest_intent: Option<&EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry>, - arrival_latest_publication: Option<&EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry>, - arrival_latest_github: Option<&EpiphanyCultMeshBifrostGithubPublicationReceiptEntry>, - arrival_latest_public_proof_publication: Option< - &EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry, - >, - arrival_latest_artifact_acceptance: Option< - &EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry, - >, - arrival_latest_metrics: Option<&EpiphanyCultMeshBifrostMetricsReceiptEntry>, - arrival_latest_feedback: Option<&EpiphanyCultMeshBifrostCollaborationFeedbackEntry>, - latest_consensus: Option<&EpiphanyCultMeshImaginationConsensusReceiptEntry>, - _repo_work_map_entries: &[EpiphanyCultMeshRepoWorkMapEntry], -) -> BifrostLedgerReport { - let mut rows = Vec::new(); - let mut tui_rows = Vec::new(); - - if let Some(intent) = arrival_latest_intent { - let status = if intent.github_publication_requested { - "github-publication-requested" - } else { - "publication-requested" - }; - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "body-change-intent".to_string(), - owner: intent.source_agent_id.clone(), - id: intent.intent_id.clone(), - status: status.to_string(), - route: intent.target_repository.clone(), - summary: intent.change_summary.clone(), - public_ref: intent.target_branch.clone(), - private_state_included: intent.private_state_included, - private_state_exposed: false, - }, - ); - } - if let Some(receipt) = arrival_latest_publication { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "bifrost-publication-receipt".to_string(), - owner: "Bifrost".to_string(), - id: receipt.receipt_id.clone(), - status: receipt.status.clone(), - route: receipt.bifrost_ledger_entry_id.clone(), - summary: receipt.accepted_changed_paths.join(", "), - public_ref: receipt.publication_url.clone(), - private_state_included: false, - private_state_exposed: receipt.private_state_exposed, - }, - ); - } - if let Some(receipt) = arrival_latest_github { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "github-publication-receipt".to_string(), - owner: "GitHub".to_string(), - id: receipt.receipt_id.clone(), - status: receipt.publication_status.clone(), - route: receipt.ledger_entry_id.clone(), - summary: receipt.changed_paths.join(", "), - public_ref: receipt.pull_request_url.clone(), - private_state_included: false, - private_state_exposed: receipt.private_state_exposed, - }, - ); - } - if let Some(receipt) = arrival_latest_public_proof_publication { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "public-proof-publication-receipt".to_string(), - owner: "Bifrost".to_string(), - id: receipt.receipt_id.clone(), - status: receipt.status.clone(), - route: receipt.bifrost_ledger_entry_id.clone(), - summary: receipt.public_proof_sha256.clone(), - public_ref: receipt.publication_url.clone(), - private_state_included: false, - private_state_exposed: receipt.private_state_exposed, - }, - ); - } - if let Some(receipt) = arrival_latest_artifact_acceptance { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "artifact-acceptance-receipt".to_string(), - owner: "Maintainer".to_string(), - id: receipt.receipt_id.clone(), - status: receipt.status.clone(), - route: receipt.bifrost_ledger_entry_id.clone(), - summary: receipt.artifact_ref.clone(), - public_ref: receipt.public_proof_ref.clone(), - private_state_included: false, - private_state_exposed: receipt.private_state_exposed, - }, - ); - } - if let Some(receipt) = arrival_latest_metrics { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "metrics-receipt".to_string(), - owner: "Bifrost".to_string(), - id: receipt.receipt_id.clone(), - status: receipt.status.clone(), - route: receipt.artifact_acceptance_receipt_id.clone(), - summary: receipt.metrics_summary.clone(), - public_ref: receipt.public_proof_ref.clone(), - private_state_included: false, - private_state_exposed: receipt.private_state_exposed, - }, - ); - } - if let Some(feedback) = arrival_latest_feedback { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "collaboration-feedback".to_string(), - owner: feedback.source_persona_id.clone(), - id: feedback.feedback_id.clone(), - status: "queued-for-imagination".to_string(), - route: feedback.requested_consensus_route.clone(), - summary: feedback.collaboration_topic.clone(), - public_ref: feedback.public_room_id.clone(), - private_state_included: feedback.private_state_included, - private_state_exposed: false, - }, - ); - } - if let Some(receipt) = latest_consensus { - push_bifrost_ledger_row( - &mut rows, - &mut tui_rows, - BifrostLedgerRow { - document_kind: "imagination-consensus-receipt".to_string(), - owner: "Imagination".to_string(), - id: receipt.receipt_id.clone(), - status: receipt.status.clone(), - route: receipt.adoption_gate.clone(), - summary: receipt.consensus_packet_ref.clone(), - public_ref: receipt.public_feedback_refs.join(", "), - private_state_included: false, - private_state_exposed: receipt.private_state_exposed, - }, - ); - } - - let publication_chain_count = usize::from(arrival_latest_intent.is_some()) - + usize::from(arrival_latest_publication.is_some()) - + usize::from(arrival_latest_github.is_some()); - let public_proof_publication_count = - usize::from(arrival_latest_public_proof_publication.is_some()); - let artifact_acceptance_receipt_count = - usize::from(arrival_latest_artifact_acceptance.is_some()); - let metrics_receipt_count = usize::from(arrival_latest_metrics.is_some()); - let collaboration_chain_count = - usize::from(arrival_latest_feedback.is_some()) + usize::from(latest_consensus.is_some()); - let (accounting_rows, accounting_tui_rows) = bifrost_accounting_rows( - arrival_latest_intent, - arrival_latest_publication, - arrival_latest_github, - arrival_latest_public_proof_publication, - arrival_latest_artifact_acceptance, - arrival_latest_metrics, - arrival_latest_feedback, - latest_consensus, - ); - let closed_accounting_row_count = accounting_rows - .iter() - .filter(|row| row.status == "closed") - .count(); - let attention_accounting_row_count = accounting_rows - .iter() - .filter(|row| row.status == "attention" || row.private_state_exposed) - .count(); - let private_state_exposed = rows.iter().any(|row| row.private_state_exposed) - || accounting_rows.iter().any(|row| row.private_state_exposed); - let status = if rows.is_empty() { - "empty" - } else if private_state_exposed { - "attention" - } else { - "ok" - } - .to_string(); - - BifrostLedgerReport { - status, - rows, - tui_rows, - accounting_rows, - accounting_tui_rows, - publication_chain_count, - public_proof_publication_count, - artifact_acceptance_receipt_count, - metrics_receipt_count, - collaboration_chain_count, - closed_accounting_row_count, - attention_accounting_row_count, - arrival_latest_publication_intent_id: arrival_latest_intent - .map(|intent| intent.intent_id.clone()), - arrival_latest_publication_receipt_id: arrival_latest_publication - .map(|receipt| receipt.receipt_id.clone()), - arrival_latest_github_receipt_id: arrival_latest_github - .map(|receipt| receipt.receipt_id.clone()), - arrival_latest_public_proof_publication_receipt_id: arrival_latest_public_proof_publication - .map(|receipt| receipt.receipt_id.clone()), - arrival_latest_artifact_acceptance_receipt_id: arrival_latest_artifact_acceptance - .map(|receipt| receipt.receipt_id.clone()), - arrival_latest_metrics_receipt_id: arrival_latest_metrics - .map(|receipt| receipt.receipt_id.clone()), - arrival_latest_feedback_id: arrival_latest_feedback - .map(|feedback| feedback.feedback_id.clone()), - latest_consensus_receipt_id: latest_consensus.map(|receipt| receipt.receipt_id.clone()), - repo_work_accounting_request_count: 0, - private_state_exposed, - } -} - -fn push_bifrost_ledger_row( - rows: &mut Vec, - tui_rows: &mut Vec, - row: BifrostLedgerRow, -) { - let compact_status = if row.private_state_exposed { - "ATTN" - } else { - "OK" - }; - let private = if row.private_state_exposed { - "private=true" - } else { - "private=false" - }; - tui_rows.push(format!( - "{compact_status} | {} | owner={} | {} | {} | {} | public={} | {private}", - row.document_kind, row.owner, row.id, row.status, row.route, row.public_ref - )); - rows.push(row); -} - -fn bifrost_accounting_rows( - arrival_latest_intent: Option<&EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry>, - arrival_latest_publication: Option<&EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry>, - arrival_latest_github: Option<&EpiphanyCultMeshBifrostGithubPublicationReceiptEntry>, - arrival_latest_public_proof_publication: Option< - &EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry, - >, - arrival_latest_artifact_acceptance: Option< - &EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry, - >, - arrival_latest_metrics: Option<&EpiphanyCultMeshBifrostMetricsReceiptEntry>, - arrival_latest_feedback: Option<&EpiphanyCultMeshBifrostCollaborationFeedbackEntry>, - latest_consensus: Option<&EpiphanyCultMeshImaginationConsensusReceiptEntry>, -) -> (Vec, Vec) { - let mut rows = Vec::new(); - let mut tui_rows = Vec::new(); - - let body_publication = arrival_latest_intent.and_then(|intent| { - arrival_latest_publication.filter(|receipt| receipt.intent_id == intent.intent_id) - }); - let body_github = body_publication.and_then(|publication| { - arrival_latest_github - .filter(|receipt| receipt.bifrost_publication_receipt_id == publication.receipt_id) - }); - - let body_private = arrival_latest_intent - .map(|intent| intent.private_state_included) - .unwrap_or(false) - || body_publication - .map(|receipt| receipt.private_state_exposed) - .unwrap_or(false) - || body_github - .map(|receipt| receipt.private_state_exposed) - .unwrap_or(false); - let body_review_count = body_publication - .map(|receipt| receipt.reviewer_ids.len()) - .or_else(|| arrival_latest_intent.map(|intent| intent.review_receipt_ids.len())) - .unwrap_or(0); - let body_credit_count = body_github - .map(|receipt| receipt.credit_receipt_ids.len()) - .or_else(|| body_publication.map(|receipt| receipt.credit_receipt_ids.len())) - .or_else(|| arrival_latest_intent.map(|intent| intent.credit_subjects.len())) - .unwrap_or(0); - let body_chain_closed = arrival_latest_intent.is_some() - && body_publication.is_some() - && body_github.is_some() - && body_review_count > 0 - && body_credit_count > 0 - && !body_private; - push_bifrost_accounting_row( - &mut rows, - &mut tui_rows, - BifrostAccountingRow { - lane: "body-change-publication".to_string(), - owner: "Bifrost".to_string(), - status: bifrost_accounting_status( - body_chain_closed, - arrival_latest_intent.is_some() - || arrival_latest_publication.is_some() - || arrival_latest_github.is_some(), - body_private, - ), - closure: format!( - "intent={} publication={} github={} review={} credit={}", - present_word(arrival_latest_intent.is_some()), - present_word(body_publication.is_some()), - present_word(body_github.is_some()), - body_review_count, - body_credit_count - ), - ledger_entry_id: body_publication - .map(|receipt| receipt.bifrost_ledger_entry_id.clone()) - .or_else(|| body_github.map(|receipt| receipt.ledger_entry_id.clone())) - .unwrap_or_else(|| "none".to_string()), - latest_receipt_id: body_github - .map(|receipt| receipt.receipt_id.clone()) - .or_else(|| body_publication.map(|receipt| receipt.receipt_id.clone())) - .or_else(|| arrival_latest_intent.map(|intent| intent.intent_id.clone())) - .unwrap_or_else(|| "none".to_string()), - public_ref: body_github - .map(|receipt| receipt.pull_request_url.clone()) - .or_else(|| body_publication.map(|receipt| receipt.publication_url.clone())) - .or_else(|| arrival_latest_intent.map(|intent| intent.target_branch.clone())) - .unwrap_or_else(|| "none".to_string()), - review_receipt_count: body_review_count, - credit_receipt_count: body_credit_count, - public_artifact_count: usize::from(body_github.is_some()), - private_state_exposed: body_private, - }, - ); - - let proof_private = arrival_latest_public_proof_publication - .map(|receipt| receipt.private_state_exposed) - .unwrap_or(false); - let proof_review_count = arrival_latest_public_proof_publication - .map(|receipt| receipt.reviewer_ids.len()) - .unwrap_or(0); - let proof_credit_count = arrival_latest_public_proof_publication - .map(|receipt| receipt.credit_receipt_ids.len()) - .unwrap_or(0); - let proof_closed = arrival_latest_public_proof_publication.is_some() - && proof_review_count > 0 - && proof_credit_count > 0 - && !proof_private; - push_bifrost_accounting_row( - &mut rows, - &mut tui_rows, - BifrostAccountingRow { - lane: "public-proof-publication".to_string(), - owner: "Bifrost".to_string(), - status: bifrost_accounting_status( - proof_closed, - arrival_latest_public_proof_publication.is_some(), - proof_private, - ), - closure: format!( - "proof={} review={} credit={}", - present_word(arrival_latest_public_proof_publication.is_some()), - proof_review_count, - proof_credit_count - ), - ledger_entry_id: arrival_latest_public_proof_publication - .map(|receipt| receipt.bifrost_ledger_entry_id.clone()) - .unwrap_or_else(|| "none".to_string()), - latest_receipt_id: arrival_latest_public_proof_publication - .map(|receipt| receipt.receipt_id.clone()) - .unwrap_or_else(|| "none".to_string()), - public_ref: arrival_latest_public_proof_publication - .map(|receipt| receipt.publication_url.clone()) - .unwrap_or_else(|| "none".to_string()), - review_receipt_count: proof_review_count, - credit_receipt_count: proof_credit_count, - public_artifact_count: usize::from(arrival_latest_public_proof_publication.is_some()), - private_state_exposed: proof_private, - }, - ); - - push_artifact_acceptance_accounting_row( - &mut rows, - &mut tui_rows, - arrival_latest_artifact_acceptance, - ); - push_metrics_accounting_row(&mut rows, &mut tui_rows, arrival_latest_metrics); - - let matching_consensus = arrival_latest_feedback.and_then(|feedback| { - latest_consensus.filter(|receipt| receipt.feedback_id == feedback.feedback_id) - }); - let collaboration_private = arrival_latest_feedback - .map(|feedback| feedback.private_state_included) - .unwrap_or(false) - || matching_consensus - .map(|receipt| receipt.private_state_exposed) - .unwrap_or(false); - let collaboration_public_count = arrival_latest_feedback - .map(|feedback| feedback.public_discussion_refs.len()) - .unwrap_or(0) - + matching_consensus - .map(|receipt| receipt.public_feedback_refs.len()) - .unwrap_or(0); - let collaboration_closed = - arrival_latest_feedback.is_some() && matching_consensus.is_some() && !collaboration_private; - push_bifrost_accounting_row( - &mut rows, - &mut tui_rows, - BifrostAccountingRow { - lane: "collaboration-consensus".to_string(), - owner: "Bifrost".to_string(), - status: bifrost_accounting_status( - collaboration_closed, - arrival_latest_feedback.is_some() || latest_consensus.is_some(), - collaboration_private, - ), - closure: format!( - "feedback={} consensus={} publicRefs={}", - present_word(arrival_latest_feedback.is_some()), - present_word(matching_consensus.is_some()), - collaboration_public_count - ), - ledger_entry_id: "none".to_string(), - latest_receipt_id: matching_consensus - .map(|receipt| receipt.receipt_id.clone()) - .or_else(|| arrival_latest_feedback.map(|feedback| feedback.feedback_id.clone())) - .unwrap_or_else(|| "none".to_string()), - public_ref: arrival_latest_feedback - .map(|feedback| feedback.public_room_id.clone()) - .unwrap_or_else(|| "none".to_string()), - review_receipt_count: 0, - credit_receipt_count: 0, - public_artifact_count: collaboration_public_count, - private_state_exposed: collaboration_private, - }, - ); - - (rows, tui_rows) -} - -fn push_artifact_acceptance_accounting_row( - rows: &mut Vec, - tui_rows: &mut Vec, - latest_receipt: Option<&EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry>, -) { - let receipt_private = latest_receipt - .map(|receipt| receipt.private_state_exposed) - .unwrap_or(false); - let review_receipt_count = latest_receipt - .map(|receipt| receipt.maintainer_review_receipt_ids.len()) - .unwrap_or(0); - let public_artifact_count = latest_receipt - .map(|receipt| receipt.changed_paths.len()) - .unwrap_or(0); - let private = receipt_private; - let receipt_proof_complete = latest_receipt - .map(|receipt| { - !receipt.artifact_ref.trim().is_empty() - && !receipt.public_proof_ref.trim().is_empty() - && !receipt.bifrost_ledger_entry_id.trim().is_empty() - && !receipt.commit_sha.trim().is_empty() - && review_receipt_count > 0 - && public_artifact_count > 0 - && !receipt.private_state_exposed - }) - .unwrap_or(false); - push_bifrost_accounting_row( - rows, - tui_rows, - BifrostAccountingRow { - lane: "artifact-acceptance-request".to_string(), - owner: "Bifrost".to_string(), - status: bifrost_accounting_status( - receipt_proof_complete, - latest_receipt.is_some(), - private, - ), - closure: format!( - "acceptance={} receiptProof={} review={} artifacts={}", - present_word(latest_receipt.is_some()), - if receipt_proof_complete { - "complete" - } else { - "incomplete" - }, - review_receipt_count, - public_artifact_count - ), - ledger_entry_id: latest_receipt - .map(|receipt| receipt.bifrost_ledger_entry_id.clone()) - .unwrap_or_else(|| "none".to_string()), - latest_receipt_id: latest_receipt - .map(|receipt| receipt.receipt_id.clone()) - .unwrap_or_else(|| "none".to_string()), - public_ref: latest_receipt - .map(|receipt| receipt.public_proof_ref.clone()) - .unwrap_or_else(|| "none".to_string()), - review_receipt_count, - credit_receipt_count: 0, - public_artifact_count, - private_state_exposed: private, - }, - ); -} - -fn push_metrics_accounting_row( - rows: &mut Vec, - tui_rows: &mut Vec, - latest_receipt: Option<&EpiphanyCultMeshBifrostMetricsReceiptEntry>, -) { - let receipt_private = latest_receipt - .map(|receipt| receipt.private_state_exposed) - .unwrap_or(false); - let model_spend_count = latest_receipt - .map(|receipt| receipt.model_spend_receipt_ids.len()) - .unwrap_or(0); - let review_load_count = latest_receipt - .map(|receipt| receipt.review_load_receipt_ids.len()) - .unwrap_or(0); - let credit_count = latest_receipt - .map(|receipt| receipt.credit_readback_receipt_ids.len()) - .unwrap_or(0); - let public_artifact_count = latest_receipt.map(|_| 1).unwrap_or(0); - let review_receipt_count = model_spend_count + review_load_count; - let private = receipt_private; - let receipt_proof_complete = latest_receipt - .map(|receipt| { - !receipt.artifact_acceptance_receipt_id.trim().is_empty() - && model_spend_count > 0 - && review_load_count > 0 - && credit_count > 0 - && !receipt.public_proof_ref.trim().is_empty() - && !receipt.metrics_summary.trim().is_empty() - && !receipt - .token_summary_ref - .as_deref() - .unwrap_or_default() - .trim() - .is_empty() - && matches!( - receipt.cost_availability_status.as_deref(), - Some("known" | "unavailable") - ) - && ((receipt.cost_availability_status.as_deref() == Some("known") - && !receipt - .cost_summary_ref - .as_deref() - .unwrap_or_default() - .trim() - .is_empty()) - || (receipt.cost_availability_status.as_deref() == Some("unavailable") - && !receipt - .cost_unavailable_reason - .as_deref() - .unwrap_or_default() - .trim() - .is_empty())) - && receipt.review_duration_ms.unwrap_or_default() > 0 - && receipt.review_event_count.unwrap_or_default() > 0 - && !receipt.private_state_exposed - }) - .unwrap_or(false); - push_bifrost_accounting_row( - rows, - tui_rows, - BifrostAccountingRow { - lane: "metrics-request".to_string(), - owner: "Bifrost".to_string(), - status: bifrost_accounting_status( - receipt_proof_complete, - latest_receipt.is_some(), - private, - ), - closure: format!( - "metrics={} receiptProof={} modelSpend={} reviewLoad={} credit={}", - present_word(latest_receipt.is_some()), - if receipt_proof_complete { - "complete" - } else { - "incomplete" - }, - model_spend_count, - review_load_count, - credit_count - ), - ledger_entry_id: latest_receipt - .map(|receipt| receipt.artifact_acceptance_receipt_id.clone()) - .unwrap_or_else(|| "none".to_string()), - latest_receipt_id: latest_receipt - .map(|receipt| receipt.receipt_id.clone()) - .unwrap_or_else(|| "none".to_string()), - public_ref: latest_receipt - .map(|receipt| receipt.public_proof_ref.clone()) - .unwrap_or_else(|| "none".to_string()), - review_receipt_count, - credit_receipt_count: credit_count, - public_artifact_count, - private_state_exposed: private, - }, - ); -} - -fn push_bifrost_accounting_row( - rows: &mut Vec, - tui_rows: &mut Vec, - row: BifrostAccountingRow, -) { - let private = if row.private_state_exposed { - "private=true" - } else { - "private=false" - }; - tui_rows.push(format!( - "BIFROST-ACCOUNTING | {} | owner={} | status={} | {} | ledger={} | receipt={} | public={} | review={} | credit={} | artifacts={} | {private}", - row.lane, - row.owner, - row.status, - row.closure, - row.ledger_entry_id, - row.latest_receipt_id, - row.public_ref, - row.review_receipt_count, - row.credit_receipt_count, - row.public_artifact_count - )); - rows.push(row); -} - -fn bifrost_accounting_status(closed: bool, present: bool, private_state_exposed: bool) -> String { - if private_state_exposed { - "attention".to_string() - } else if closed { - "closed".to_string() - } else if present { - "open".to_string() - } else { - "missing".to_string() - } -} - -fn present_word(present: bool) -> &'static str { - if present { "present" } else { "missing" } -} - fn compact_tui_list(values: &[String]) -> String { if values.is_empty() { "none".to_string() @@ -8812,191 +7959,6 @@ mod lifecycle_projection_tests { assert_eq!(receipt_directory_row_service_id(&missing), None); } - fn bifrost_intent(id: &str) -> EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry { - EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry { - schema_version: epiphany_core::EPIPHANY_CULTMESH_BIFROST_BODY_CHANGE_PUBLICATION_INTENT_SCHEMA_VERSION.to_string(), - intent_id: id.to_string(), - source_cluster_id: "hands".to_string(), - source_agent_id: "epiphany.Hands".to_string(), - body_domain: "repo:test".to_string(), - target_repository: "test/repo".to_string(), - target_branch: "main".to_string(), - change_summary: "test".to_string(), - justification: "test".to_string(), - changed_paths: vec!["src/lib.rs".to_string()], - verification_receipt_ids: vec!["verify-1".to_string()], - review_receipt_ids: vec!["review-1".to_string()], - authorship_agent_ids: vec!["epiphany.Hands".to_string()], - credit_subjects: vec!["epiphany.Hands".to_string()], - github_publication_requested: true, - private_state_included: false, - notes: Vec::new(), - } - } - - fn bifrost_publication( - id: &str, - intent_id: &str, - ) -> EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry { - EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry { - schema_version: epiphany_core::EPIPHANY_CULTMESH_BIFROST_BODY_CHANGE_PUBLICATION_RECEIPT_SCHEMA_VERSION.to_string(), - receipt_id: id.to_string(), - intent_id: intent_id.to_string(), - status: "accepted".to_string(), - bifrost_ledger_entry_id: "ledger-1".to_string(), - github_publication_receipt_id: "github-1".to_string(), - credit_receipt_ids: vec!["credit-1".to_string()], - accepted_changed_paths: vec!["src/lib.rs".to_string()], - reviewer_ids: vec!["reviewer-1".to_string()], - publication_url: "https://example.invalid/publication".to_string(), - private_state_exposed: false, - notes: Vec::new(), - } - } - - fn github_publication( - publication_id: &str, - ) -> EpiphanyCultMeshBifrostGithubPublicationReceiptEntry { - EpiphanyCultMeshBifrostGithubPublicationReceiptEntry { - schema_version: - epiphany_core::EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_SCHEMA_VERSION - .to_string(), - receipt_id: "github-1".to_string(), - bifrost_publication_receipt_id: publication_id.to_string(), - hands_pr_receipt_id: "hands-pr-1".to_string(), - target_repository: "test/repo".to_string(), - target_branch: "main".to_string(), - pull_request_url: "https://example.invalid/pr/1".to_string(), - pull_request_number: "1".to_string(), - commit_sha: "abc123".to_string(), - changed_paths: vec!["src/lib.rs".to_string()], - ledger_entry_id: "ledger-1".to_string(), - credit_receipt_ids: vec!["credit-1".to_string()], - published_by_agent_id: "epiphany.Hands".to_string(), - publication_status: "published".to_string(), - private_state_exposed: false, - notes: Vec::new(), - } - } - - fn collaboration_feedback(id: &str) -> EpiphanyCultMeshBifrostCollaborationFeedbackEntry { - EpiphanyCultMeshBifrostCollaborationFeedbackEntry { - schema_version: - epiphany_core::EPIPHANY_CULTMESH_BIFROST_COLLABORATION_FEEDBACK_SCHEMA_VERSION - .to_string(), - feedback_id: id.to_string(), - source_persona_id: "persona-1".to_string(), - source_cluster_id: "persona".to_string(), - public_room_id: "room-1".to_string(), - eve_connection_receipt_id: "eve-1".to_string(), - collaboration_topic: "test".to_string(), - feedback_summary: "test".to_string(), - public_discussion_refs: vec!["discussion-1".to_string()], - requested_consensus_route: "imagination.consensus".to_string(), - candidate_action_refs: Vec::new(), - private_state_included: false, - notes: Vec::new(), - } - } - - fn consensus(feedback_id: &str) -> EpiphanyCultMeshImaginationConsensusReceiptEntry { - EpiphanyCultMeshImaginationConsensusReceiptEntry { - schema_version: - epiphany_core::EPIPHANY_CULTMESH_IMAGINATION_CONSENSUS_RECEIPT_SCHEMA_VERSION - .to_string(), - receipt_id: "consensus-1".to_string(), - feedback_id: feedback_id.to_string(), - source_persona_id: "persona-1".to_string(), - consensus_route: "imagination.consensus".to_string(), - status: "accepted".to_string(), - imagination_agent_ids: vec!["imagination-1".to_string()], - consensus_packet_ref: "packet-1".to_string(), - adoption_gate: "mind-review".to_string(), - public_feedback_refs: vec!["public-feedback-1".to_string()], - private_state_exposed: false, - notes: Vec::new(), - } - } - - fn repo_request(family: &str, id: &str, private: bool) -> EpiphanyCultMeshRepoWorkMapEntry { - EpiphanyCultMeshRepoWorkMapEntry { - schema_version: epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION - .to_string(), - runtime_id: "test".to_string(), - verse_id: "gamecult-local".to_string(), - map_entry_id: id.to_string(), - admitted_at: "2026-07-13T00:00:00Z".to_string(), - mirrored_at: "2026-07-13T00:00:01Z".to_string(), - workspace: "E:/test".to_string(), - item: "test-item".to_string(), - branch: "main".to_string(), - changed_paths: vec!["src/lib.rs".to_string()], - commit_sha: "abc123".to_string(), - safe_action_family: family.to_string(), - modeling_summary: "modeled".to_string(), - soul_verdict_receipt_id: "soul-1".to_string(), - mind_gateway_review_id: "mind-review-1".to_string(), - mind_state_commit_receipt_id: "mind-commit-1".to_string(), - publication_gate: "bifrost".to_string(), - durable_state_admitted: true, - source_store_path: "state/thread.cc".to_string(), - tui_rows: Vec::new(), - private_state_exposed: private, - notes: Vec::new(), - modeling_finding_receipt_id: "modeling-1".to_string(), - modeling_route_id: "route-1".to_string(), - modeling_generation: 1, - } - } - - fn artifact_receipt() -> EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry { - EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry { - schema_version: - epiphany_core::EPIPHANY_CULTMESH_BIFROST_ARTIFACT_ACCEPTANCE_RECEIPT_SCHEMA_VERSION - .to_string(), - receipt_id: "artifact-receipt-1".to_string(), - item: "test-item".to_string(), - source_workspace: "E:/test".to_string(), - source_branch: "main".to_string(), - commit_sha: "abc123".to_string(), - changed_paths: vec!["src/lib.rs".to_string()], - artifact_ref: "artifact://1".to_string(), - public_proof_ref: "proof://1".to_string(), - maintainer_review_receipt_ids: vec!["review-1".to_string()], - bifrost_ledger_entry_id: "ledger-1".to_string(), - status: "accepted".to_string(), - accepted_by: "maintainer-1".to_string(), - private_state_exposed: false, - notes: Vec::new(), - } - } - - fn metrics_receipt() -> EpiphanyCultMeshBifrostMetricsReceiptEntry { - EpiphanyCultMeshBifrostMetricsReceiptEntry { - schema_version: epiphany_core::EPIPHANY_CULTMESH_BIFROST_METRICS_RECEIPT_SCHEMA_VERSION - .to_string(), - receipt_id: "metrics-receipt-1".to_string(), - item: "test-item".to_string(), - source_workspace: "E:/test".to_string(), - source_branch: "main".to_string(), - artifact_acceptance_receipt_id: "artifact-receipt-1".to_string(), - model_spend_receipt_ids: vec!["spend-1".to_string()], - review_load_receipt_ids: vec!["load-1".to_string()], - credit_readback_receipt_ids: vec!["credit-1".to_string()], - public_proof_ref: "proof://1".to_string(), - metrics_summary: "complete metrics".to_string(), - status: "complete".to_string(), - private_state_exposed: false, - token_summary_ref: Some("metrics://tokens/1".to_string()), - cost_availability_status: Some("known".to_string()), - cost_summary_ref: Some("metrics://cost/1".to_string()), - cost_unavailable_reason: None, - review_duration_ms: Some(1_000), - review_event_count: Some(1), - notes: Vec::new(), - } - } - fn receipt( id: &str, status: &str, @@ -9055,103 +8017,4 @@ mod lifecycle_projection_tests { assert_eq!(selected.receipt_id, "new-failure"); assert!(service_lifecycle_status_needs_attention(&selected.status)); } - - #[test] - fn bifrost_accounting_closes_only_a_typed_identity_chain() { - let intent = bifrost_intent("intent-1"); - let publication = bifrost_publication("publication-1", "intent-1"); - let github = github_publication("publication-1"); - let (matching, _) = bifrost_accounting_rows( - Some(&intent), - Some(&publication), - Some(&github), - None, - None, - None, - None, - None, - ); - assert_eq!(matching[0].status, "closed"); - - let unrelated_publication = bifrost_publication("publication-2", "another-intent"); - let unrelated_github = github_publication("another-publication"); - let (mismatched, _) = bifrost_accounting_rows( - Some(&intent), - Some(&unrelated_publication), - Some(&unrelated_github), - None, - None, - None, - None, - None, - ); - assert_eq!(mismatched[0].status, "open"); - assert!(mismatched[0].closure.contains("publication=missing")); - assert!(mismatched[0].closure.contains("github=missing")); - } - - #[test] - fn collaboration_accounting_closes_only_matching_feedback_consensus() { - let feedback = collaboration_feedback("feedback-1"); - let matching_consensus = consensus("feedback-1"); - let (matching, _) = bifrost_accounting_rows( - None, - None, - None, - None, - None, - None, - Some(&feedback), - Some(&matching_consensus), - ); - assert_eq!(matching.last().unwrap().status, "closed"); - - let unrelated_consensus = consensus("another-feedback"); - let (mismatched, _) = bifrost_accounting_rows( - None, - None, - None, - None, - None, - None, - Some(&feedback), - Some(&unrelated_consensus), - ); - let row = mismatched.last().unwrap(); - assert_eq!(row.status, "open"); - assert!(row.closure.contains("consensus=missing")); - assert_eq!(row.public_artifact_count, 1); - } - - #[test] - fn receipt_accounting_ignores_historical_repo_work_requests() { - let historical = repo_request("repo.artifact_acceptance_request", "old", true); - let artifact = artifact_receipt(); - let metrics = metrics_receipt(); - let (rows, _) = bifrost_accounting_rows( - None, - None, - None, - None, - Some(&artifact), - Some(&metrics), - None, - None, - ); - assert_eq!(rows.iter().filter(|row| row.status == "closed").count(), 2); - assert!( - rows.iter() - .any(|row| row.lane == "artifact-acceptance-request") - ); - assert!(rows.iter().any(|row| row.lane == "metrics-request")); - assert!(historical.private_state_exposed); - - let mut incomplete_metrics = metrics_receipt(); - incomplete_metrics.token_summary_ref = None; - let mut rows = Vec::new(); - let mut tui = Vec::new(); - push_metrics_accounting_row(&mut rows, &mut tui, Some(&incomplete_metrics)); - assert_eq!(rows[0].status, "open"); - assert!(rows[0].closure.contains("receiptProof=incomplete")); - } } diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 088eb302..05f091c8 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -30,9 +30,8 @@ A substitution is confirmed when all three are true: ## Plausible risks requiring a later focused audit -- `bifrost-ledger` is presently a local aggregation over locally writable - Bifrost-shaped receipts. Its report logic is harmless only after receipt - provenance is repaired; until then the name overstates its authority. +- The former `bifrost-ledger` local aggregation was confirmed corrupt and has + been deleted; see the resolution below. - Static cluster topology equates seven logical faculties with seven deployed daemons and private Verses. This may be an intended deployment model, but current source proves the topology declaration, not seven running bodies. @@ -95,6 +94,23 @@ does not prove an agent exists, so the overview carries no derived agent count. Negative proof is now structural: seven declared targets plus no heartbeat produce zero observed daemons; one status document produces one observed daemon. +## Local Bifrost ledger deletion + +The local `bifrost-ledger` report was not Bifrost sight. It loaded response-shaped +documents from a shared local store, assigned owners such as Bifrost, GitHub, +Maintainer, and Imagination from their type names, then marked accounting lanes +closed when strings and lists were populated. No signature, provider identity, +transport/session witness, payload-hash admission, or target-runtime binding +proved that any named body participated. + +The command, wrapper mode, report/row/accounting types, five closure algorithms, +tests, command hints, audit action, and receipt follow-ups are deleted. Pending +requester intents and Persona feedback remain owned by their requesters. Missing +provider responses now have no local closure command. A future provider ingress +must bind provider identity and contract, source transport/session, exact payload +hash and document id, correlation id, admitted-at time, target runtime/Verse, and +verification result before any consumer may claim provider-authored closure. + ## Bootstrap/provider split The later non-receipt pass found one surviving writer from the same original diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index cd88fa03..212b84de 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -24,10 +24,14 @@ - Owner: the calling Hands/requester owns the body-change intent. - Inputs: repository, branch, change summary, justification, changed paths, verification/review receipt references, authors, and credit subjects. - Output: one persisted `gamecult.bifrost.body_change_publication_intent`; command status is `pending-bifrost`. -- Derived sight: the Bifrost ledger shows the open request and attributes the intent row to `source_agent_id`. +- Derived sight: requester-owned receipt-directory and publication surfaces show the pending intent and the absence of a provider response. There is no local Bifrost ledger or closure oracle. - Forbidden writers: the requester CLI no longer constructs or writes Bifrost acceptance, ledger attribution, GitHub publication, PR, commit, publication URL, or credit receipts. - Response owners: Bifrost may answer with its publication receipt; the GitHub publication adapter may answer only after real substrate evidence exists. - Negative proof: after request submission, latest intent is present while latest Bifrost publication and GitHub publication receipts are absent. +- There is no Epiphany-local `bifrost-ledger` or accounting closure surface. + Missing provider response remains missing with no local follow-up command. + Provider closure requires a future authenticated provider ingress/admission + witness; typed local document presence is insufficient. ## Daemon tool request path (2026-07-12) diff --git a/notes/epiphany-repo-swarm-mvp-contract.md b/notes/epiphany-repo-swarm-mvp-contract.md index 44e6d29e..5619d70f 100644 --- a/notes/epiphany-repo-swarm-mvp-contract.md +++ b/notes/epiphany-repo-swarm-mvp-contract.md @@ -172,8 +172,6 @@ epiphany-work overview --workspace --item epiphany-work readiness --workspace --item epiphany-work tick --workspace --item epiphany-work serve --workspace --item --max-iterations -epiphany-work publish --workspace --closure-receipt -epiphany-work sync --workspace --item --upstream-ref origin/main --merge-receipt ``` And produce a proof bundle showing: @@ -1091,73 +1089,22 @@ The execute receipt produced a real branch-local commit on `epiphany/smoke/execute`, Hands patch/command/commit receipts, `publicationAuthorized=false`, and `privateStateExposed=false`. -### Landed Work Publication Gate +### Publication Boundary -The ninth front door exists as native Rust: +`epiphany-work` has no `publish` command. Repo-local work may produce reviewed +Hands commit and closure receipts, but it cannot mint Bifrost publication, +GitHub publication, pull-request, merge, or upstream-sync proof. Publication is +requested through the requester-owned Bifrost intent surface and remains +pending until authenticated provider ingress admits a response bound to the +exact request and substrate evidence. Old publication smoke artifacts are +historical rejected-path evidence, not a supported front door. -```powershell -cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- publish --workspace --item --change-summary --justification --verification-receipt --review-receipt --ledger-entry-id --pull-request-url --pull-request-title -``` +### Upstream Sync Boundary -It reads the named or latest work-adopt receipt, requires the Hands review to -be approved, finds or accepts a Hands commit receipt for the adopted gate, then -requires Soul verification refs and Mind or maintainer review refs before -routing publication through Bifrost. The command writes Bifrost body-change -publication intent, Bifrost publication receipt, Bifrost GitHub publication -receipt, and a matching Hands PR receipt into the repo-local stores. - -This is publication routing, not merge authority: -`publicationAuthorized=true`, `upstreamMainSynced=false`, and -`mergeAuthorized=false`. Upstream main is not considered synced until a later -merge/sync receipt proves it. - -The first smoke proved the publication sequence: - -```powershell -epiphany-repo init --workspace -epiphany-swarm online --workspace -epiphany-work accept --workspace --from persona --item first-request -epiphany-work run --workspace --item first-request -epiphany-work adopt --workspace --item first-request --plan-summary '...' --adoption-evidence-ref 'imagination-consensus:repo-work-consensus-first-request' -epiphany-work execute --workspace --item first-request --command '...' --changed-path README.md --commit-message '...' -epiphany-work publish --workspace --item first-request --change-summary '...' --justification '...' --verification-receipt 'soul-verdict:...' --review-receipt 'mind-review:...' --ledger-entry-id 'bifrost-ledger:...' --pull-request-url 'https://...' --pull-request-title '...' -``` - -The publish receipt produced a Hands PR receipt, Bifrost publication receipt, -GitHub publication receipt, `privateStateExposed=false`, and an explicit -`upstreamMainSynced=false` guard. - -### Landed Upstream Sync Proof Gate - -The tenth front door exists as native Rust: - -```powershell -cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- sync --workspace --item --upstream-ref origin/main --merge-receipt -``` - -It reads the named or latest work-publish receipt, requires at least one -explicit maintainer or Bifrost merge/sync receipt, resolves the published Hands -commit and the configured upstream ref, and asks git whether the published -commit is an ancestor of upstream main. It does not perform a merge. It writes -`.epiphany/work/work-sync-.json` with `upstreamMainSynced=true` only when -git ancestry proves the published commit is contained by the upstream ref. - -The first smoke proved both sides of the gate: - -```powershell -epiphany-work sync --workspace --item first-request --upstream-ref main --merge-receipt maintainer-merge:sync-smoke-pre -# status: upstream-main-not-synced - -git switch main -git merge --ff-only epiphany/smoke/sync - -epiphany-work sync --workspace --item first-request --upstream-ref main --merge-receipt maintainer-merge:sync-smoke-post -# status: upstream-main-synced -``` - -The synced receipt produced `publicationAuthorized=true`, -`upstreamMainSynced=true`, `mergeAuthorized=true`, -`mergeAuthorityReceipts=[...]`, and `privateStateExposed=false`. +`epiphany-work` has no `sync` command. It cannot mint merge authority or infer +upstream publication truth from local git ancestry. Upstream synchronization +requires authenticated provider/maintainer evidence admitted through a future +typed ingress; old sync smoke artifacts are historical rejected-path evidence. ### Landed Work Scheduler Pulse @@ -1324,19 +1271,17 @@ service lifecycle, or private-state authority. The final `privateStateExposed=false`. It still does not grant publication, merge, service lifecycle, cross-repo mutation, or private-state exposure authority. -`epiphany-work publish --closure-receipt ` can consume the -Soul verdict and Mind state-commit ids from that closure receipt when explicit -verification/review refs are not supplied. `epiphany-work tick` also recognizes -an existing close receipt and no-ops before Bifrost publication authority, so -Self cannot smuggle a local commit into public consequence. +No repo-local command consumes that closure to mint publication receipts. +`epiphany-work tick` recognizes an existing close receipt and no-ops before +Bifrost publication authority, so Self cannot smuggle a local commit into +public consequence. A fifth smoke proved the closure chain on a disposable fresh repo Body: `execute` recorded `branch-local-commit-recorded`, `close` returned `closed:passed`, Mind wrote `repo-work-close-close-request-mind-commit`, -`publish --closure-receipt` consumed the Soul verdict and Mind commit ids, the next tick returned `noop:none`, and every receipt summary reported -`privateStateExposed=false`. +`privateStateExposed=false`; publication remained an external provider concern. A richer closure-review smoke proved the typed Soul/Modeling bridge: `.epiphany-smoke\closure-review-20260620-135009` ran init -> online -> accept @@ -1549,15 +1494,15 @@ blocker, and next safe action, and writes agent-friendly rows plus an operator-safe proof bundle. The proof bundle is `epiphany.repo_work_proof_bundle.v0`; it carries bundle id, generated time, workspace, item, branch, current gate, blocker, next safe move, changed paths, -commit SHA, Soul verdict, Mind state-commit id, Bifrost/GitHub publication ids -when present, upstream-main sync status, compact TUI rows, and +commit SHA, Soul verdict, Mind state-commit id, admitted external publication +evidence when present, upstream-main sync status, compact TUI rows, and `privateStateExposed=false`. Its `artifactRows` enumerate the expected accept, -plan, run, adopt, execute, close, publish, and sync receipts with expected path, +plan, run, adopt, execute, close, externally admitted publication, and sync receipts with expected path, present/missing status, document schema, document status, SHA-256 hash when present, and private-state seal. Its `publicationRows` lift publication-stage proof into compact rows: Bifrost intent/publication/GitHub/ledger/credit/PR -fields, Hands commit/PR fields, and upstream-main ancestry fields when publish -or sync receipts exist. When the accept receipt names a local Verse store, +fields, Hands commit/PR fields, and upstream-main ancestry fields when admitted +provider or sync receipts exist. When the accept receipt names a local Verse store, overview also mirrors the compact overview rows as `epiphany.cultmesh.repo_work_overview.v0` under `gamecult-local/repo-work-overview/latest`, so Eve/Gjallar/Odin sight can read @@ -1732,77 +1677,16 @@ repo-local Verse target. This is public-proof indexing only: it grants no durable-state commit, publication, PR, merge, upstream sync, deployment, service lifecycle, Hands action, cross-body mutation, or private-state authority. -Bifrost public-proof publication transport is now the closure after local -proof sight. `epiphany-verse-query bifrost-public-proof --public-proof-id ---ledger-entry-id --review-receipt --credit-receipt ` selects an -existing redacted `epiphany.cultmesh.repo_work_public_proof.v0` row, writes -`gamecult.bifrost.public_proof_publication_receipt.v0`, requires the global -public Verse target, public room, ledger, review, credit, public proof ref, and -SHA-256, and refuses private-state exposure. `bifrost-ledger` now reports -`publicProofPublicationCount` plus compact `public-proof-publication-receipt` -rows, while `receipt-directory` exposes the same Bifrost-owned row with proof -artifact ref/SHA. Disposable proof -`.epiphany-smoke\checklist-note-20260620-031347\21-bifrost-public-proof-publication.json` -published `repo-work-public-proof-checklist-request` to -`cultmesh://epiphany-global/repo-work/public-proofs/repo-work-public-proof-checklist-request`; -`22-bifrost-ledger-after-public-proof-publication.json` reported -`publicProofPublicationCount=1`, latest receipt -`bifrost-public-proof-publication-checklist-request`, `status=ok`, and -`privateStateExposed=false`. - -Bifrost ledger readback now also emits derived external-work accounting rows -without creating a rival ledger. `epiphany-verse-query bifrost-ledger` returns -`accountingRows` and `accountingTuiRows` for `body-change-publication`, -`public-proof-publication`, `repo-work-readiness-review`, -`artifact-acceptance-request`, `metrics-request`, and -`collaboration-consensus`, carrying closure status, ledger/receipt/public refs, -review and credit receipt counts, artifact count, and the private-state seal. -The readiness-review lane closes only when latest -`epiphany.cultmesh.repo_work_readiness_review.v0` has four Maintainer/Soul/Mind/ -Bifrost review refs, `status=readiness-approved`, zero missing required rows, a -present review artifact, readiness approval true, and durable-state, -publication, PR, merge, upstream-sync, deployment, service lifecycle, Hands, and -private-state authority all false. The accepted-artifact and metrics request -lanes derive from Mind-admitted `epiphany.cultmesh.repo_work_map_entry.v0` -branch work for safe families `repo.artifact_acceptance_request` and -`repo.metrics_request`; they become `open` request-accounting sight with the -latest Mind commit receipt, Bifrost gate, commit ref, closure review count, and -changed-path artifact count, but they do not close final artifact acceptance, -metrics, credit, publication, merge, upstream sync, deployment, service -lifecycle, Hands, or private-state authority. Wrapper proof -`local-20260621-091019-297-aaf2ad07` reported `accountingRows=3`, -`closedAccounting=2`, `attentionAccounting=0`, closed body-change and -collaboration rows, a visible missing public-proof-publication row, and -`privateStateExposed=False`. -Native proof `.epiphany-smoke\repo-work-readiness-20260621-120755` reported -`bifrostReadinessReviewAccountingRow.status=closed`, `reviewReceiptCount=4`, -`publicArtifactCount=1`, latest receipt -`repo-work-readiness-review-repo-work-readiness`, and `privateStateExposed=false`; -wrapper proof `local-20260621-131113-240-be2b19f2` printed the same closed -`BIFROST-ACCOUNTING | repo-work-readiness-review` row from the explicit -repo-local Verse target after the wrapper read path was corrected to use -`-LocalVerseStore` / `-LocalVerseRuntimeId`. -Focused request proofs -`.epiphany-smoke\repo-artifact-acceptance-request-family-20260621-122343` and -`.epiphany-smoke\repo-metrics-request-family-20260621-122503` reported -`accountingRowCount=6`, an open `artifact-acceptance-request` or -`metrics-request` row with `reviewReceiptCount=3`, `publicArtifactCount=1`, -and `privateStateExposed=false`; wrapper proof -`local-20260621-132626-365-878a1113` printed the open metrics request row from -the repo-local Verse target. - -Wrapper mode `tools/epiphany_local_run.ps1 -Mode bifrost-public-proof` now -exposes the same Bifrost mouth for operators and agents. It reads the latest -repo-local public proof row from `\.epiphany\local-verse.ccmp` when -`-BifrostPublicProofId` is omitted, then writes the Bifrost receipt with -explicit ledger/review/credit/public-room inputs and prints a compact summary. -Wrapper proof `local-20260620-132418-144-62ba9369` against -`.epiphany-smoke\checklist-note-20260620-031347` wrote -`bifrost-public-proof-publication-wrapper-checklist`; ledger artifact -`24-bifrost-ledger-after-wrapper-public-proof.json` reported -`publicProofPublicationCount=1`, latest receipt -`bifrost-public-proof-publication-wrapper-checklist`, and -`privateStateExposed=false`. +`epiphany-verse-query bifrost-public-proof --public-proof-id ` selects an +existing redacted `epiphany.cultmesh.repo_work_public_proof.v0` row and records +only the requester-owned pending publication intent. It does not accept or +write Bifrost ledger, review, credit, publication, or receipt claims. Provider +absence remains missing. Epiphany has no local `bifrost-ledger`, accounting +closure, or wrapper mode that can convert document presence into provider +acceptance. A future provider ingress must authenticate provider identity and +contract, bind transport/session and correlation to the exact payload hash and +document id, identify the target Verse/runtime, and persist an admission and +verification witness before any provider response can close the request. The first Verse projection smoke proved the local CultMesh sight path: overview mirrored `repo-work-overview-verse-overview-request` into the repo-local Verse, @@ -1908,18 +1792,17 @@ a receipt that says what happened without lying about who had authority. ## Full Migration Plan To Repo Swarm MVP -This plan starts from the current state: seventeen native front doors exist, -but the work loop is not yet a full physiology. `epiphany-repo init`, +This plan starts from the current state: native front doors cover the +branch-local loop, but it is not yet a full physiology. `epiphany-repo init`, `epiphany-swarm online`, `epiphany-swarm run`, `epiphany-work accept`, `epiphany-work persona-intake`, `epiphany-work derive-plan`, `epiphany-work plan`, `epiphany-work run`, `epiphany-work adopt`, `epiphany-work execute`, `epiphany-work close`, `epiphany-work overview`, `epiphany-work export-proof`, `epiphany-work tick`, -`epiphany-work queue-run`, `epiphany-work publish`, and -`epiphany-work sync` prove the typed path from repo birth to branch-local -scheduler pulse, typed queue selection, Bifrost/GitHub publication receipts, -redacted public proof export, compact proof-bundle sight, and upstream-main -sync proof. +`epiphany-work queue-run` proves the typed path from repo birth to branch-local +scheduler pulse, typed queue selection, redacted public proof export, and +compact proof-bundle sight. Publication and upstream sync are not repo-local +commands or receipt-writing authorities. `tick` now also proves brake refusal, active-turn refusal, completion-anchored cooldown refusal, and stale active-turn recovery through typed scheduler receipts; `serve` now proves bounded cadence around that same @@ -1982,9 +1865,9 @@ Yes: the machine is headed toward a functional repo swarm, and the current front doors are no longer decorative. They already prove repo birth, online local Verse projection, Persona/Bifrost intake, Imagination action-item receipts, branch-local Hands execution, deterministic Soul/Modeling/Mind -closure, Gjallar-visible proof rows, Bifrost/GitHub publication receipts, -redacted public-proof export, and upstream-main ancestry proof after explicit -merge authority. +closure, Gjallar-visible proof rows, pending publication intent, redacted +public-proof export, and upstream-main ancestry proof after explicit merge +authority and admitted external provider evidence. No: the machine is not yet Epiphany Online in the full MVP sense. The remaining gap is not "more permission prompts." The remaining gap is to make the @@ -2018,9 +1901,9 @@ temptation wearing clean robes. | Self scheduling | `tick` and `serve` prove one-step branch-local advancement, brake refusal, active-turn refusal, cooldown, and stale-turn recovery; `tick` now routes executed branch-local work through the existing Soul/Modeling/Mind `close` gate; `queue-run` selects tick-actionable rows from the typed repo-work queue and delegates to `tick`; `epiphany-swarm run` is the bounded operator mouth over that queue/tick physiology; `repo-work-service-plan`, `repo-work-service-runbook`, `repo-work-service-launch`, and `repo-work-service-audit` write Idunn lifecycle receipts/artifacts for the same queue-run command and prove non-mutating launch/readiness closure. | Keep any future queue-run service install/start mutation behind Idunn and explicit elevated operator authority. | | Branch-local Hands work | `adopt` and `execute` create approved Hands gates, run planned commands, stage declared paths, commit on `epiphany/*`, and write receipts. | Keep mutation branch-contained and receipt-backed; broaden only through typed plan families, not ad hoc shell freedom. | | Soul/Modeling/Mind closure | `close` verifies the Hands commit, writes `epiphany.repo_work_closure_review.v0`, refuses path-scope mismatches, refuses missing/tampered/non-affirmative Mind adoption proof, runs known safe-family content assertions, optionally gates on model-authored closure verdicts, can require verification output to cite declared changed paths with `--require-source-grounding`, writes Soul/Modeling/Mind receipts, admits a compact typed repo map entry into `.epiphany/state/repo-work-map.msgpack`, and mirrors that admitted fact into local Verse as `epiphany.cultmesh.repo_work_map_entry.v0`. | Keep extending closure toward source-grounded semantic review and richer semantic map lenses, while preserving deterministic local closure for simple mechanical work. | -| Repo work sight/review | `overview` emits compact proof rows, an `epiphany.repo_work_intake_consensus_readback.v0` from the accept/plan chain, and typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; `readiness` now emits `epiphany.repo_work_readiness_report.v0` and mirrors `epiphany.cultmesh.repo_work_readiness.v0` over the MVP proof rows, including Soul's safe-family planning matrix readback, Idunn repo-work service audit validation, Odin/Gjallar tool-directory validation, Bifrost/GitHub publication receipt-chain validation, and upstream-main sync receipt plus git ancestry validation while still granting no readiness approval; `readiness-review` consumes that ready sight receipt and four Maintainer/Soul/Mind/Bifrost review refs to write `epiphany.repo_work_readiness_review_receipt.v0` with readiness approval only, not action authority, mirrors `epiphany.cultmesh.repo_work_readiness_review.v0`, and is indexed by `receipt-directory` as `repo-work-readiness-review` with review artifact status/SHA-256 and private-state seal; `bifrost-ledger` now derives six accounting lanes, including open `artifact-acceptance-request` and `metrics-request` rows from Mind-admitted map entries without closing final Bifrost/maintainer acceptance or metrics authority; the CultMesh TUI rows include compact `CONSENSUS`, `REPO-WORK-READINESS`, readiness-review, and Bifrost accounting readbacks showing Persona/public feedback ids, Imagination consensus route, public/candidate ref counts, safe family, readiness gaps, readiness approval, request accounting, and authority denials without private payloads; `close` mirrors Mind-admitted map facts as `epiphany.cultmesh.repo_work_map_entry.v0`; Gjallar enumerates overview history, readiness rows, readiness-review rows, map rows, semantic rows, closure rows, family lens rows, path lens rows, branch lens rows, stage lens rows, gate lens rows, and public-proof rows without private-state exposure; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue for branch-local scheduler pulses. | Next useful cuts are final accepted-artifact/metrics ledger receipts, another repo-owned safe family, or explicit elevated Idunn execution only under operator authority. | -| Publication | `publish` routes Bifrost/GitHub receipts from closure or explicit Soul/Mind refs. | Keep publication Bifrost-owned; do not let scheduler publish. | -| Upstream main sync | `sync` proves the published commit is contained by upstream main after explicit merge/sync authority. | Treat upstream-main sync as a required final proof for published work. | +| Repo work sight/review | `overview` emits compact proof rows, an `epiphany.repo_work_intake_consensus_readback.v0`, and typed `epiphany.cultmesh.repo_work_overview.v0` documents; `readiness` emits `epiphany.repo_work_readiness_report.v0` and mirrors typed readiness sight without granting approval; `readiness-review` records requester/reviewer evidence without impersonating provider closure; `receipt-directory` exposes pending intents and missing provider responses; `close` mirrors Mind-admitted map facts; Gjallar enumerates repo-work projections without private-state exposure; Persona's Eve surface exposes peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue. Epiphany has no local Bifrost ledger or accounting closure. | Add authenticated provider ingress before treating Bifrost/GitHub responses as accepted; otherwise extend repo-owned safe families or explicit elevated Idunn execution under operator authority. | +| Publication | Requester-owned intents remain pending; no local command routes or mints Bifrost/GitHub receipts. | Add authenticated provider ingress without moving publication authority into the scheduler. | +| Upstream main sync | No local command mints upstream-sync or merge truth. | Admit authenticated provider/maintainer sync evidence and verify substrate ancestry without treating ancestry alone as authority. | | Daemon survival | Idunn service lifecycle receipts and runbooks exist outside repo-work tick authority. | Preserve Idunn as lifecycle owner; repo swarm may request or inspect service state, not impersonate daemon keeping. | | Global tools | The daemon tool directory exposes globally invokable typed capabilities with host-owned execution receipts. | Ensure any agent can discover and request any authorized daemon-hosted tool through CultMesh without moving execution ownership into the caller. | @@ -2188,7 +2071,8 @@ upstream-complete state only when: - The Hands commit being published is known. - The configured upstream ref, normally `origin/main`, resolves. - Git ancestry proves the Hands commit is contained by upstream main. -- `epiphany-work sync` writes a receipt with `upstreamMainSynced=true`. +- Authenticated provider/maintainer ingress admits a sync witness bound to the + exact commit and target ref; ancestry then verifies substrate containment. Until that proof exists, the compact gate should say publication or sync is still blocking. Do not let cheerful PR-shaped artifacts impersonate mainline @@ -2208,7 +2092,7 @@ repo birth -> plan-backed branch-local execution and commit -> deterministic Soul/Modeling/Mind closure -> compact repo work overview/proof bundle - -> Bifrost/GitHub publication receipts + -> pending publication intent and authenticated provider ingress -> upstream-main ancestry proof after explicit merge receipt ``` @@ -2242,12 +2126,11 @@ The chain is typed and sealed enough to be useful: Eyes/Gjallar-owned sight rows plus a proof bundle for current gate, blocker, next safe action, branch, changed paths, commit, closure, publication, sync, and private-state seal. -- `epiphany-work publish` requires Hands commit proof plus Soul and Mind/review - refs, or consumes those refs from a closure receipt, before routing - Bifrost/GitHub publication receipts; it does not claim merge or upstream sync. -- `epiphany-work sync` requires an explicit maintainer/Bifrost merge receipt - and writes `upstreamMainSynced=true` only after git proves the published - commit is contained by upstream main. +- Publication requests remain pending outside `epiphany-work`; only + authenticated provider ingress may admit Bifrost/GitHub publication receipts. +- Upstream sync remains external until authenticated provider/maintainer + evidence is admitted and git proves the named commit is contained by the + named upstream ref. - `epiphany-work tick` is the first Self-owned scheduler pulse: it advances one safe branch-local step across plan-backed `run`, `adopt`, `execute`, or deterministic Soul/Modeling/Mind `close`, refuses under local Verse brake, @@ -2578,9 +2461,9 @@ The intended MVP runbook is: epiphany-repo init --workspace --switch-branch epiphany-swarm online --workspace epiphany-persona intake --workspace --persona --message -epiphany-swarm run --workspace --until blocked-or-published -epiphany-work publish --workspace --item ... -epiphany-work sync --workspace --item --upstream-ref origin/main --merge-receipt +epiphany-swarm run --workspace --until blocked +# submit a requester-owned Bifrost publication intent; await authenticated provider ingress +# await authenticated provider/maintainer sync admission and verify ancestry ``` Under that short operator surface, the swarm must still emit the same typed @@ -2626,9 +2509,10 @@ epiphany-repo init --switch-branch -> epiphany-work derive-plan --action-family repo-status-section -> epiphany-work overview -> epiphany-swarm run --max-iterations 4 - -> epiphany-work publish --closure-receipt + -> requester-owned Bifrost publication intent + -> authenticated external publication admission -> maintainer merge simulated by pushing the Epiphany branch to disposable origin/main - -> epiphany-work sync --upstream-ref origin/main + -> authenticated provider/maintainer sync admission plus ancestry verification -> epiphany-work overview -> epiphany-work export-proof ``` @@ -2689,12 +2573,13 @@ Required cuts: MVP exit proof: ```powershell -epiphany-work publish --workspace --item ... -epiphany-work sync --workspace --item --upstream-ref origin/main --merge-receipt +# authenticated provider publication admission is already present +# future authenticated sync-ingress command, followed by ancestry verification ``` -The proof bundle shows publication authorized, upstream main synced, merge -authority traced to Bifrost or maintainer review, and no private-state exposure. +The proof bundle shows admitted provider publication evidence, upstream main +synced, merge authority traced to Bifrost or maintainer review, and no +private-state exposure. ### Phase 2: Replace Operator Commands With Imagination Plans @@ -2868,16 +2753,16 @@ epiphany-swarm online --workspace epiphany-persona intake --workspace --persona --message epiphany-work accept --workspace --item epiphany-work adopt --workspace --item --from-plan -epiphany-swarm run --workspace --until blocked-or-published -epiphany-work publish --workspace --item ... -epiphany-work sync --workspace --item --upstream-ref origin/main --merge-receipt +epiphany-swarm run --workspace --until blocked +# requester publication intent, followed by authenticated provider admission +# authenticated provider/maintainer sync admission plus ancestry verification ``` MVP exit proof: - The repo has an Epiphany branch with real commits. - The branch has Hands, Soul, Modeling, and Mind receipts. -- The work item has Bifrost publication and upstream sync proof. +- The work item has authenticated external Bifrost publication admission and upstream sync proof. - The repo Persona remains the human-facing surface. - The proof bundle says `privateStateExposed=false`. - Ambient daemon/tool availability is visible through Gjallar/Odin, while diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 16dc7f6f..13b1ce12 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -543,6 +543,15 @@ daemon heartbeat sight never claims an agent count. Restart-policy rows may say body. Prompt context names these as declared routes/targets. The deleted `unknown_daemon_status` constructor cannot put seven empty helmets on the roll. +The Epiphany-local `bifrost-ledger` mouth is deleted. It assigned external owners +and accounting closure from response-shaped documents found in a shared local +store without authenticated provider ingress. Requester-owned publication and +public-proof intents plus Persona feedback remain. Provider response absence now +has no local closure or audit route. Do not restore a ledger projection until an +ingress receipt binds provider identity/contract, transport session, exact +payload hash/document id, correlation, target runtime/Verse, admission time, and +verification result. + ## Authority map - Request owners write intents and requests. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 2114ee0ab75def50c38e2a3fdf54b2bcce7b2389..73bc24cc1449d0c4f189bb18622ef66da45cf1c8 100644 GIT binary patch delta 971 zcmb_aziSjh6n3L#3$YL+5J7!lnY-kI3B(IFq8JMym>AG*Zuaf%nAw@Vnb|uJiz`Iz z1d(tSRwCAlg^f)b3mbd!FA&7PK=7MOFlTQuJG--Q-ur(2_lG9h(t(Erb z^8L@p()}+VE+xGr*?+t@^K@?}!HWBFtP@x#v1UK+&7^lfjp<%`DqY=PUTd$eyy!hY zKl*x|H3!Zp6il@dHFgt}6!GjvrK&=hVN+WvG+k4k{b57ouVss8C=ARnGQR#*Xj+oG@%qaKiY?y3n9X47C+mvk<;$04Ry9Q~+g7yg2H! z5k>;~9q!fafsvF6=;I?1p-{yp1IKlmTm#v^^BiM_@qk(g5HR)-t<=`n4oUzWI&Xlg zr#?HCM_nABSwd&C2wekB$>DhBT5QoW^b{CRBqfI+tw^gv#WAkiw zegyLltzT%h+O5`G$9=_v*LL??@_ozJIts~Ev@eU+Mxr+VANG>S1CJc#wsuq?2ud^L z^$=iMzN+r%L!L_q?@cIX^QD|Q>j=3^(w5~!6UPr&P8kS6YaI{=)|p>F5?XXT!=&iQ z0xa=Io=9P=!8A>!s3v;d-r2+eg9OO&ub0W(=0DkO&`lLK>P~}hm7=T6#14ccVvhMJ z*>!mm6F)Q(0i8GrdUeeGkxk=QRXTrl+N+5WS!2pCXag&86m85@o|7yX^baZ*{{RH* BW0(K{ delta 63 zcmaFcD*x)Q+y*g5UJEN@b1OrmsACN5dyj8cW-Mf6+}}KvseLLFBM^gVW*}w(Vpbq# L+dh?vJ#-HM!F3ej diff --git a/state/map.yaml b/state/map.yaml index 32afa56a..1ccaf407 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -75,7 +75,7 @@ active_subgoals: - Idunn owns managed-service reconciliation and projector child lifecycle. On this workstation, Task Scheduler owns only current-user after-login presence of the Idunn reconciler; `gamecult-ops` owns only current-user after-login presence and configuration of the foreground Yggdrasil tunnel. Self, wrappers, diagnostic projections, lifecycle receipts, Task Scheduler, and the service manager are forbidden from becoming alternate projector, semantic-readiness, or recovery owners. Historical `swarm-online-runbook` and SCM service-control routes are rejected-path evidence, not current operator actions. - Use `notes/epiphany-cultmesh-dreaming-roadmap.md` as the design authority for distributed Epiphany dreaming. Public dreams are separately authored typed documents distributed through CultMesh/CultNet; private state remains local and cannot be shared by flipping a visibility flag. Foreign dreams are external thought weather until a reviewed local adoption receipt digests them into memory, planning, doctrine, or governance. - CultMesh is now the preferred ergonomic Rust abstraction over CultCache and CultNet for Epiphany-owned local database surfaces. The Rust substrate is repo-contained under `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`; the old `E:\Projects\CultLib\crates\*` path is dead in this checkout and must not be reintroduced as a compile-time dependency. Future local Verse/dream/status work should start at CultMesh unless it is explicitly polishing CultMesh internals. `CultMeshNode::get_all_with_keys()` now exposes typed document enumeration through the mesh organ, and `CultMeshNode::soa()` exposes CultCache's typed SoA table projection without bypassing the mesh organ. Compact audits can scan local Verse receipt families, and agent-state summary documents now prove SoA readback through CultMesh columns. `epiphany-verse-query agent-state` explicitly mirrors the persisted seven-row agent-state SoA into an existing bootstrapped local Verse; `agent-state-report` reads it without mutation; wrapper `-Mode agent-state-soa` visibly composes sync then report. Compact SoA rows now include each standing faculty's role id, agent id, profile kind, portable contract, memory/goal/value counts, and `private=false`; wrapper proof `local-20260618-175913-074-b22ff01c` printed all seven faculties in one sealed line. Preserve the three-Verse boundary: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult project sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Persona posts. - - Use `notes/epiphany-verse-architecture.md` as the source note for local Verse/Odin/Yggdrasil prompt-context architecture. Odin is the all-seer discovery/coordinator surface for advertised Verse metadata, not a trust-boundary bypass. Yggdrasil is the hosting spine for important trusted GameCult Verses such as Bifrost. The first native local Verse query surface is `epiphany-verse-query`, which seeds/queries compact CultMesh policy/status/contract context for dynamic prompt assembly and operator inspection; `epiphany-prompt-context-smoke` proves that compact local Verse context plus a semantic memory graph context cut can render a bounded dynamic prompt packet, omit unrelated private-looking text, and preserve the packet inside a role worker launch document. Live bridge role/reorient launch paths now feed `dynamicPromptContext` from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, refreshing the memory graph from current typed thread-state repo graphs when absent; the bridge launch-context test proves that packet survives into a persisted runtime-spine worker launch request. `tools/epiphany_local_run.ps1 -Mode status` now uses `.epiphany-run/cultmesh/local-verse.ccmp` as the shared local operator Verse store for run intent, operator snapshot, run receipt, and final `local-verse-context.json`, so the read path sees the latest operator witnesses instead of a policy-only seed packet. Local runs also refresh persisted `epiphany.agent_state_soa.v0` from `state/agents.msgpack` and mirror it into local Verse as sealed `epiphany.cultmesh.agent_state_soa_summary.v0`, preserving seven-faculty row/column shape and contract/count metadata without exposing memory text. `epiphany-verse-query poke-daemon --daemon-id ` now records an operator-safe `epiphany.cultmesh.daemon_poke_intent.v0` plus `epiphany.cultmesh.daemon_poke_receipt.v0` in local Verse, so a down daemon has a typed lifecycle intervention path without private Verse rummaging; follow-up daemon status remains the liveness authority. `epiphany-verse-query connect-eve` now selects an Odin advertisement by id or target cluster through the narrow Eve surface directory, records Eve connection intent/receipt documents, and verifies latest receipts through narrow CultMesh loaders; `tools/epiphany_local_run.ps1 -Mode eve-connect` wraps the same receipt path, defaulting to the Persona public discussion surface without full local Verse serialization. `epiphany-verse-query bifrost-publication` now records the Bifrost body-change publication intent, Bifrost publication receipt, and GitHub publication receipt from explicit changed path, verification, review, authorship, credit, ledger, Hands PR, and publication URL inputs, verifies the latest chain through narrow CultMesh loaders, and is wrapped by `tools/epiphany_local_run.ps1 -Mode bifrost-publication` for non-mutating operator proof defaults. `epiphany-verse-query collaboration-feedback` now records public Persona/peer collaboration feedback plus an Imagination consensus-discovery receipt from explicit public refs, Eve receipt, topic, summary, and candidate action refs, verifies latest feedback/consensus through narrow CultMesh loaders, and is wrapped by `tools/epiphany_local_run.ps1 -Mode collaboration-feedback`, which first records the prerequisite Eve receipt; adoption still requires Mind/Bifrost gates. `-Mode mvp` now seeds the same local Verse, routes Persona front-door `bubble` speech audits into that store, and writes final `local-verse-context.json` so the Persona mouth-edge witness is visible beside operator run witnesses. `epiphany-operator-snapshot from-status` now also distills the latest native status `tools.invocations[]` row into local Verse daemon-tool invocation intent/receipt mirrors, so operator-safe runtime tool calls become discoverable as `epiphany.cultmesh.daemon_tool_invocation_*` while runtime-spine remains lifecycle owner and raw MCP JSON stays quarantined behind typed tool documents. Plan/run/MVP coordinator summaries can now mirror their runtime-spine `epiphany.coordinator_run_receipt.v0` into local Verse as `epiphany.cultmesh.coordinator_run_receipt.v0`, referencing sealed artifacts by path only while keeping runtime-spine as lifecycle owner. When that summary contains a `finalAction.handsActionGate`, the same distillation pass writes `epiphany.cultmesh.hands_action_gate.v0` into local Verse with the Hands intent/review ids, Substrate Gate grant id, requested paths, required receipt types, and record-pass command template; runtime-spine Hands/Substrate Gate receipts remain the only action owners. When coordinator steps contain `roleAccept` or `roleFailureReview`, the same pass writes the latest operator-safe `epiphany.cultmesh.role_review_event.v0` mirror with surface, role id, status, source coordinator receipt id, and any exposed acceptance receipt/result/job ids; thread-state acceptance receipts remain the review owner. + - Use `notes/epiphany-verse-architecture.md` for local Verse/Odin/Yggdrasil prompt-context architecture. Odin coordinates advertised metadata without bypassing trust boundaries. Local requester commands persist Bifrost publication intents and Persona collaboration feedback only; they reject provider-shaped Bifrost/GitHub publication receipts and Imagination consensus. Provider responses require authenticated ingress and admission before they can affect local truth. - The active priority is Codex starvation and CultNet liberation. Use `notes/codex-starvation-and-cultnet-liberation-plan.md` as the directive and `notes/codex-auth-spine-inventory.md` as the source-grounded keeper list for the retained OpenAI subscription auth/model transport bridge. Classify all Epiphany-relevant JSON contamination, define the native CultNet runtime boundary, keep worker launch/result/selfPatch cargo as typed documents, evacuate Epiphany operator/state/process authority from Codex JSON-RPC, wrap MCP's unavoidable JSON protocol edge in typed Epiphany intent/result/receipt documents, and keep cutting until Epiphany can run its own state and processes without `codex_message_processor.rs` except for bridge compatibility. - Use `notes/epiphany-anatomy.md` as the canonical anatomy map. Embodied sub-agents are Self, Persona, Imagination, Eyes, Modeling, Hands, and Soul. Body is substrate, Mind is persistent state/state admission, Continuity is recovery/compaction/sleep protocol machinery, and Substrate Gate is substrate access protocol. - Organ state now has a hard profile split: resident Epiphany sub-agents use lean `work_organ` state, public/person-shaped agents use portable `persona` state, and heartbeat/swarm machinery owns scheduling/coordination physiology. Persona is the Epiphany organ; Persona is the shared GameCult contract for Epiphany Persona, VoidBot repo Personas, and Ghostlight characters. Persona documents carry provenance, required public presentation metadata, `date-time` timestamps, typed `candidateActions`, strict anchored thoughts with non-authoritative extensions, custom enum companion labels, and typed affect subrecords for bonds/status reads/doctrine stances. Work organs must not inherit Persona affect/social-bond/status-read machinery just because the old Ghostlight-derived shape had room for it. @@ -688,9 +688,9 @@ current_status: - `epiphany-verse-query swarm-status` and `tools/epiphany_local_run.ps1 -Mode swarm-status` provide the compact read-only liveness sight organ over local Verse daemon rows. It uses a narrow CultMesh daemon-liveness loader instead of serializing the full local Verse context, returns seven agent-friendly TUI rows with `READY`/`POKE`, daemon id, body domain, private Verse id, Eve surface, `followUp=tools/epiphany_local_run.ps1 -Mode swarm-poke-down`, and `private=false`, and exposes no private state. Live wrapper proof `local-20260618-210235-584-110d1120` printed all seven Rust-owned `READY` rows in `statusRows` with body domain, private Verse ids, Eve surfaces, batch poke follow-up, and `private=false`; source smoke also proves degraded Hands returns a `POKE` row with `privateVerse=epiphany.cluster.hands.private` plus the same follow-up command. - `epiphany-verse-query eve-surfaces` and `tools/epiphany_local_run.ps1 -Mode eve-surfaces` provide the compact read-only Odin/Eve surface directory over local Verse rows. Odin reads cluster topology, default advertisements, and daemon-owned Eve surface states through a narrow CultMesh loader; it returns seven agent-friendly TUI rows, one Persona public discussion surface, a `connect-eve` command hint, and `privateStateExposed=false` without serializing the full local Verse. The compact TUI rows expose stable `cluster=` identity beside surface id, daemon id, body domain, private Verse id, public-discussion flag, supported actions, exposed document types, advertisement id, and `private=false`; wrapper proof `local-20260618-225347-287-ea5d7476` prints all seven rows in `surfaceRows`, including Persona's public discussion surface and all local organ surfaces, plus `privateStateExposed=False`. - `epiphany-verse-query connect-eve` and `tools/epiphany_local_run.ps1 -Mode eve-connect` provide the compact Odin-to-Eve collaboration receipt. The command selects the daemon-published surface through the narrow Eve directory, writes connection intent/receipt documents, verifies latest receipt keys through narrow CultMesh loaders, defaults the wrapper target to `epiphany.cluster.persona`, and exposes no private state. - - `epiphany-verse-query collaboration-feedback` and `tools/epiphany_local_run.ps1 -Mode collaboration-feedback` provide the public Persona feedback to Imagination consensus receipt path. The wrapper records the prerequisite Eve connection receipt, writes feedback plus Imagination consensus receipt documents, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for wrapper feedback, Eve connection, direct Bifrost publication, and wrapper Bifrost publication, and exposes no private state. The command returns compact TUI rows for the feedback and Imagination consensus receipt with explicit `owner=Persona->Imagination` / `owner=Imagination`, `public=`, candidate action refs, consensus packet ref, adoption gate, and `private=false`; wrapper proof `local-20260618-224207-941-2ca01b41` prints both rows in `feedbackRows`, including Persona public discussion feedback routed to Imagination consensus discovery before Mind/Bifrost adoption. - - `epiphany-verse-query bifrost-publication` and `tools/epiphany_local_run.ps1 -Mode bifrost-publication` provide the non-mutating Bifrost body-change publication proof path. It writes Bifrost intent, Bifrost publication receipt, and GitHub publication receipt documents from explicit review/verification/credit inputs, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for swarm overview, tool directory, and wrapper Bifrost publication readback, and exposes no private state. - - `epiphany-verse-query bifrost-ledger` is read-only Bifrost sight over typed requester and provider documents. Artifact-acceptance and metrics request rows remain open until genuine Bifrost/Maintainer receipts are ingested. The stale response-closing family smokes, accounting bundle wrapper, and aggregate green gate are deleted; no local query command may close provider accounting. + - `epiphany-verse-query collaboration-feedback` and wrapper mode `collaboration-feedback` record public, bounded Persona feedback after the prerequisite Eve receipt. They reject caller-supplied Imagination consensus fields and return pending consensus sight; Imagination remains the response owner. Candidate actions are requests, not Mind adoption or Bifrost authority. + - `epiphany-verse-query bifrost-publication` and wrapper mode `bifrost-publication` record requester-owned body-change publication intents. They reject caller-supplied Bifrost/GitHub provider result fields, report `pending-bifrost`, and expose no private state. Provider acceptance and GitHub publication remain absent until authenticated provider ingress admits them. + - Epiphany has no local `bifrost-ledger` or provider-accounting closure surface. The former report assigned Bifrost/GitHub/Maintainer/Imagination ownership and `closed` accounting from response-shaped documents in a shared local store without authenticating provider participation; its command, wrapper, reports, closure algorithms, tests, hints, audit action, and follow-ups are deleted. Requester-owned publication/public-proof intents and Persona feedback remain pending. Missing provider response has no local closure command. Future closure requires a provider ingress/admission receipt binding provider identity/contract, transport session, exact payload hash/document id, correlation, admitted-at time, target runtime/Verse, and verification result. - `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` provide the compact latest-witness directory over local Verse. It indexes operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA witness families from typed local Verse projections; returns agent-friendly `OK`/`ABSENT`/`ATTN` TUI rows with owner, family, status, route, latest id, follow-up command, `presentRowCount`, and `absentRowCount`; preserves `missingRowCount` as compatibility for absent witnesses; flags sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as attention without exposing receipt payloads; routes service lifecycle receipts by their typed receipt action through `service_execution_check_follow_up_command` (readiness to readiness, install to install execute, start/stop to control execute, status/reconcile to their readback rites, audit to audit), while cluster/single execution-runbook witnesses route to their runbook regeneration wrappers; and exposes no private state or receipt payload previews. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and exposes `service-id::action` route values such as `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit`, so agents can see the owning lifecycle action without opening raw audit JSON. Compact receipt TUI rows append `followUp=`, artifact status, and SHA-256; wrapper proof `local-20260618-205920-451-383b0da7` now prints all seventeen compact rows in `receiptRows`, including missing Hands/role/work-loop gates, runbook hashes, scheduler follow-up, Bifrost/Imagination witnesses, and the active service lifecycle attention rows. It also exposes `cluster-service-execution-runbook` plus `service-execution-runbook` as display-only rows, so newer harmless planned/runbook lifecycle receipts cannot hide the active seven-service cluster wound. Receipt-directory JSON now carries Rust-owned `attentionRouteRows` derived from the same policy predicate as `attentionRowCount`, and the wrapper prints that field instead of rebuilding attention from ad hoc status strings; source smoke now proves a `cluster-windows-service-execution-readiness` receipt routes to `cluster-service-execution-readiness` and wrapper mode `cluster-service-execution-readiness` instead of laundering the row through audit. Live proof `local-20260618-212134-758-c7c56240` left the old degraded Hands daemon-poke receipt as an `OK` historical witness while attention routes named only the cluster and single-service lifecycle wounds. Daemon-poke rows now resolve historical receipt status against current daemon liveness: source smoke proves degraded remains degraded before heartbeat recovery and becomes `resolved` after current status returns ready, while live wrapper proof `local-20260618-212649-563-48647018` printed the old Hands poke receipt as `OK | Self | daemon-poke | resolved`. - `tools/epiphany_local_run.ps1 -Mode service-tick` is the wrapper-owned daemon scheduler pulse rite. It runs `epiphany-daemon-supervisor tick` through the same local Verse store, operator run intent/receipt, agent-state SoA refresh, and swarm-brake preflight as other service lifecycle modes, but leaves restart authority inside durable daemon restart policies. The receipt directory scheduler row now follows up with `tools/epiphany_local_run.ps1 -Mode service-tick` instead of passive service status. Proof seeded one disabled Persona restart policy as inert policy metadata, then the wrapper wrote `daemon-scheduler-receipt-epiphany-daemon-supervisor-0` with `status=tickComplete`, `outcomeCount=1`, `skippedCount=1`, `restartedCount=0`, `refusedCount=0`, and `privateStateExposed=false`; the follow-up receipt-directory proof reported the scheduler row as present with route `*`, follow-up command `service-tick`, and no private-state exposure. - `epiphany-cluster-daemon` is the first real per-cluster daemon heartbeat body. It runs as a narrow Rust binary parameterized by daemon id, publishes typed `epiphany.cultmesh.daemon_status.v0` heartbeats into the shared local Verse, can run once or loop, and exposes no private state. Durable restart policies for Self, Hands, Persona, Imagination, Eyes, Modeling, and Soul now invoke `epiphany-cluster-daemon heartbeat`, not the generic query/debug writer. A degraded proof showed `service-tick` invoking all seven daemon bodies through the supervisor and restoring ready liveness with sealed scheduler/poke receipts; a fresh tick no-ops when all heartbeats are current. `epiphany-daemon-supervisor cluster-service-runbook` and wrapper `-Mode cluster-service-runbook` write a non-mutating service runbook plus `daemon_service_lifecycle` receipt for all seven organ daemon `epiphany-cluster-daemon serve` commands. Direct `service-runbook` and `cluster-service-runbook` wrapper summaries now print local artifact SHA-256 plus follow-up/aftercare wrapper routes; live proofs `local-20260618-232133-314-4e55120e` and `local-20260618-232146-541-982dd60b` showed hashes `85a956f768e584a9d098f13a9bf03fc3560915821a2ae7eaab94889dd9ecda85` and `40616423a9210101486949d07291bf795175579a39e99de5e5a759f8e0d7a78c` without service mutation. Wrapper `service-plan` and `service-launch` now expose the native daemon-supervisor service lifecycle surfaces under the same brake gate; `service-launch` silences child stdout/stderr so the parent lifecycle receipt remains the only stdout JSON. Live proof `local-20260618-232935-349-7e3901c8` completed a bounded one-iteration launch with `exitCode=0` and no private-state exposure. `epiphany-daemon-supervisor cluster-service-install-plan` and wrapper `-Mode cluster-service-install-plan` write a non-mutating Windows install script plus lifecycle receipt for seven distinct per-organ Windows services. Wrapper `-Mode cluster-service-install-execute` requests execution through the same typed path and, in non-elevated shells, writes `execution-refused-not-elevated` with `executed=false` instead of mutating services. Direct cluster install wrapper summaries now include `artifactSha256=` and `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-install-execute`; live proofs `local-20260618-230937-335-71c4fdaa` and `local-20260618-230937-313-cb288388` showed the planned and non-elevated-refused cluster install artifact hash `c6b697e173eb319073da341fc90c2963bcd6bee63d804349205b6309c88df764`. `epiphany-daemon-supervisor cluster-service-audit` and wrapper `-Mode cluster-service-audit` read Windows service-manager state for those seven expected service names, writing an incomplete audit receipt when they are missing; direct audit summaries now point missing cluster services to `cluster-service-install-plan` plus `cluster-service-execution-audit` aftercare, with live proof `local-20260618-232200-992-b842ae01` reporting seven missing services and no mutation. `epiphany-daemon-supervisor cluster-service-start`/`cluster-service-stop` and wrapper `-Mode cluster-service-start-plan`, `cluster-service-stop-plan`, `cluster-service-start-execute`, and `cluster-service-stop-execute` record cluster lifecycle receipts for all seven services: plan modes emit seven `*-planned` rows without mutation, and explicit execute modes refuse as `execution-refused-not-elevated` with seven refused rows when the shell lacks service authority. The cluster install/audit/control wrapper summaries now print compact `serviceRows` for all seven daemon-owned Windows service names with daemon id, status or observed status, cluster id, executed flag, exit code, start type, and `private=false`; live proofs `local-20260618-211051-126-2a89d61c`, `local-20260618-211051-125-cd687ee2`, `local-20260618-211051-063-f0ff980d`, and `local-20260618-211118-108-df5cb8cd` show seven missing audit rows, seven ready/demand install-plan rows, seven start-planned rows, and seven stop-planned rows without service mutation. `cluster-service-execution-runbook` writes an admin-gated wrapper sequence for cluster-native readiness, cluster install, cluster start, cluster audit, cluster stop, and final cluster audit; the artifact now uses `Invoke-EpiphanyRunbookStep` to reset `$LASTEXITCODE`, catch thrown/nonzero failures, continue gathering receipts after a failed step, and always runs `cluster-service-execution-audit` from `finally`; generated child execution runbooks no longer use `Invoke-Expression`, and each step invokes the known wrapper `ScriptPath` with an explicit `Arguments` array. The wrapper calls `epiphany-daemon-supervisor cluster-service-execution-runbook` after artifact generation, so the runbook itself has a typed `daemon_service_lifecycle` receipt with action `cluster-windows-service-execution-runbook`, status `written`, artifact path, final-audit metadata, step-failure policy metadata, and `privateStateExposed=false`. Its wrapper JSON and typed receipt args expose `runbookTryModes`, `finalAuditMode=cluster-service-execution-audit`, `finalAuditRunsInFinally=true`, `stepFailurePolicy=continue-after-step-failure`, `continueAfterStepFailure=true`, `nonzeroExitFailsStep=true`, and `exitsNonzeroAfterFinalAudit=true`; direct wrapper summaries now print the exact `elevatedCommand=Start-Process PowerShell -Verb RunAs -Wait ...` invocation, `artifactSha256=`, and `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`. Live proof `local-20260619-010940-407-b0744f08` generated the robust cluster artifact and printed hash `bf116ed4fd5bb2c9dc77f5032d19e792b012941a60b109389b79e5fcb0a2a5f6` without service mutation. `cluster-service-execution-audit` first requires the sealed `cluster-windows-service-execution-runbook` receipt, then checks the latest cluster-native readiness plus cluster install/start/audit/stop lifecycle receipts by receipt timestamp and reports `complete` only when the runbook and elevated effect receipts are sealed and successful. Audit check rows retain lifecycle `operatorArtifactRef`; wrapper summaries now print OK runbook witnesses with SHA-256 before compact failed-check anatomy. Live proof `local-20260618-170322-330-e6cb2117` printed `cluster-windows-service-execution-runbook=...\epiphany-cluster-daemon-services-execution-runbook.ps1:sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0` and the expected five failed checks without mutating Windows services. @@ -700,8 +700,8 @@ current_status: - `tools/epiphany_local_run.ps1` now uses collision-resistant local run ids (`local-YYYYMMDD-HHMMSS-fff-`) 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 eighteen globally available daemon-hosted capabilities, host readiness counts, direct `invocationCommand`, wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId `, and the invariants `availableToAllAgents=true`, `requiresReceipt=true`, `privateStateExposed=false`. Agent-friendly TUI rows now carry the same contract bits, authority gate, and advertised payload/review contract types, 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`; wrapper proof `local-20260619-032243-566-545b148c` prints all eighteen rows in the one-line `toolRows` summary, including Self `service-health` as `readServiceLifecycleStatus` and Self `swarm-online-runbook` as `prepareSwarmOnlineRunbook`, both under `authority=daemon.service_lifecycle` with private-state-sealed lifecycle receipt contracts, plus Eve connection tools, Hands `repo-action`, and Soul `verify`. `invoke-tool` runs through a smaller extracted command handler and emits compact invocation rows with requester/host display names, requesting/host private Verses and Eve surfaces, host daemon id, tool operation, capability id, intent id, receipt id/status, authority gate, `allAgents=true`, `receiptRequired=true`, and `private=false`; status invocation embeds `daemonStatusReadback` with compact topology/liveness/tool-count fields, Eve connection invocation embeds `eveConnectionReadback` with compact CultMesh surface routing and collaboration commands, service-health invocation embeds `serviceHealthReadback` with Idunn lifecycle attention/action/failed-check rows plus swarm-online preflight proof, and swarm-online-runbook invocation embeds `swarmOnlineRunbookReadback` with `ready-for-elevated-operator`, two present child runbooks, two verified hashes, zero missing artifacts, eleven failed checks, zero missing checks, and `operatorRequired=True`. This makes the Idunn handoff globally discoverable without opening full local Verse state or taking over Idunn's daemon-keeper role; live invocation proof `local-20260619-032244-273-acb3c6a4` returned `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 | cluster=epiphany.cluster.persona | role=Persona | privateVerse=epiphany.cluster.persona.private | body=repo:E:/Projects/EpiphanyAgent | bodyKind=repository | daemon=epiphany-daemon-persona | surface=eve://epiphany/persona`, and `privateStateExposed=false`; `epiphany-verse-query smoke` source-proves the compact topology invariants, and wrapper proof `local-20260618-225347-337-cea74491` prints all seven standing-faculty rows in the one-line `topologyRows` summary. - - `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, nineteen 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/swarm-online-runbook/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, wrapper command, mutation flag, elevation flag, sealed `operatorArtifactRef`, `operatorArtifactStatus`, `operatorArtifactSha256`, `operatorArtifactExecutionCommand`, `operatorAftercareCommand`, and `completionAuditWrapper*` for operator-runbook rows. Compact action TUI rows now also render `aftercare=`, so the Rust-owned row itself names the post-run audit command instead of relying on wrapper compatibility summaries. Current live swarm overview proof `local-20260619-035353-171-34fb0d31` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `tools=19`, `recommendedWrapperMode=swarm-online-runbook`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, exact `swarmOnlineTool=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook -ToolRequestingAgentId -ToolRequestingClusterId `, non-mutating service lifecycle readback rows, elevated service authority rows with aftercare audit commands, present runbook artifacts, SHA-256 provenance, failed/missing check counts, and `privateStateExposed=false`. `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now prints and stores the swarm-level elevated command for its generated Idunn-owned artifact, and the generated parent runbook verifies each child runbook artifact exists and matches its advertised SHA-256 before launching it elevated, then runs aftercare audits through the known wrapper `ScriptPath` plus explicit argument arrays instead of string evaluation. The operator sees the exact `Start-Process PowerShell -Verb RunAs -Wait ...` command, parent artifact hash, child hash guard, aftercare, owner, hosted body, and private-state seal before granting service mutation authority; the wrapper JSON also carries structured `childRunbookRows` and `aftercareRows` with service ids, routes, SHA-256s, audit modes, authority gates, failed-check counts, and private-state seals. Live proof `local-20260619-013021-159-c93088be` generated the parent artifact with two child rows, two aftercare rows, `usesExplicitAftercareArguments=true`, no `Invoke-Expression`, child hash guards, and wrapper-path aftercare calls. If a local runbook 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`, `operatorArtifactSha256=none`, `operatorArtifactExecutionCommand=none`, `operatorAftercareCommand=none`, `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` defaults to the shared `.epiphany-run\cultmesh\local-verse.ccmp` store for live query/readback, while bare `epiphany-verse-query smoke` now uses a disposable `.epiphany-smoke\verse-query-default\local-verse.ccmp` fixture unless an explicit `--store` is provided. - - `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. + - `epiphany-verse-query swarm-overview` and wrapper mode `swarm-overview` provide renderer-neutral compact sight over declared topology, observed liveness, tools, receipts, and Idunn-owned lifecycle attention. It exposes only live command routes; the deleted Bifrost ledger is not advertised. The overview owns no lifecycle, provider, publication, composition, or mutation authority. + - `epiphany-verse-query swarm-triage` and wrapper mode `swarm-triage` compose compact overview with brake-aware daemon poke receipts. Triage owns daemon-liveness attention only; Idunn lifecycle wounds, blocked tool hosts, and ordered action rows remain sealed readback. Current command hints expose live topology, liveness, tool, receipt, and service-policy routes; the deleted local Bifrost ledger is not advertised. Source smoke proves incomplete service audits remain visible without granting Windows service mutation. - Compact `swarmActionTuiRows` now match the JSON service-execution queue including local runbook SHA-256 provenance: live artifact `local-20260618-164403-238-dba797ce` shows `050 | service-execution-authority | operator-authority-required | operator-elevated-runbook | operator.elevated_windows_service_control | mutates=true | elevated=true | artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0 | audit=cluster-service-execution-audit`, while the readback row stays `artifact=none | sha256=none | audit=none`. Source smoke `verse-query-action-tui-audit-smoke` guards this agent-friendly TUI surface. - Receipt directory rows now carry `artifactStatus` and `artifactSha256` beside `artifactRef`, using the same `none` / `external-ref` / `present` / `missing` vocabulary as action rows and hashing present local artifacts at the receipt-directory layer. Live wrapper artifact `local-20260618-165005-139-6188fe30` proves the cluster service execution runbook row reports `artifactStatus=present`, `artifactSha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and TUI `artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`; the per-service execution runbook row reports `artifactSha256=b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`; non-artifact rows report `artifactSha256=none`. Wrapper proof `local-20260618-165319-478-e929d2bd` also prints compact `artifactHashes=cluster-service-execution-runbook:3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0; service-execution-runbook:b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7` in the one-line receipt-directory summary. Source smoke guards present-artifact SHA-256 in receipt-directory JSON/TUI, action-row SHA-256, missing-artifact demotion, and failed-check anatomy. `epiphany-verse-query receipt-directory` also derives compact artifact counts (`artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, `artifactMissingCount`) from rows instead of storing a second truth. Live readback reports `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. - Wrapper `swarm-overview` and `swarm-triage` summaries now forward the Rust-owned compact TUI row families instead of rebuilding the global sight surface in PowerShell: `actionRows`, `daemonRows`, `toolRows` where present, `policyRows` where present, `toolAttentionRows`, `serviceAttentionRows`, and `serviceFailedCheckRows`. The older compatibility summaries still surface lifecycle receipt `artifactStatus`, local runbook `sha256`, operator aftercare command, and compact service execution failed-check anatomy. Live artifacts `local-20260618-210646-478-88b58f07` and `local-20260618-210646-474-2fb504ff` prove overview/triage print seven READY daemon rows, sixteen globally invokable receipt-gated tool rows, seven enabled restart-policy rows, two ordered service action rows, two service lifecycle attention rows, five sealed failed service-execution check rows, and `privateStateExposed=false`. The Rust-owned action queue now enumerates every sealed service-lifecycle attention receipt instead of only the selected global recommendation: live wrapper proof `local-20260618-214044-049-a63d008c` printed priority 40 `cluster-service-execution-audit` and priority 41 `service-execution-audit` non-mutating readback rows with `artifactStatus=external-ref`, `sha256=none`, service-manager artifact refs for cluster execution audit and single-service execution audit, and `privateStateExposed=false`, while leaving the elevated runbook authority rows unchanged. The failed-check anatomy now aggregates cluster and single-service execution audit reports too, carries service identity, and renders `followUp=` for each failed/missing check so the compact row names the receipt-producing or readback route without opening raw audit payloads. Live wrapper proof `local-20260618-224925-221-8e114063` printed cluster readiness/install/start/audit/stop failures with follow-ups such as `cluster-service-execution-readiness`, `cluster-service-install-execute`, and `cluster-service-execution-audit`, plus supervisor-service missing checks with follow-ups such as `service-execution-readiness`, `service-install-execute`, `service-status`, and `service-reconcile`, all sealed with `privateStateExposed=false`. The action queue now carries scoped service-execution wound counters on service-lifecycle readback rows as well as elevated authority rows, so a compact row that says `attention` also says why: live swarm overview proof `local-20260619-012440-577-3f18a143` printed priority 40 `cluster-service-execution-audit` with `failedChecks=5` and priority 41 `service-execution-audit` with `failedChecks=6`, while both rows stayed non-mutating, non-elevated, Idunn-owned, and `privateStateExposed=false`. Source smoke seeds both cluster and single-service runbook witnesses and proves distinct authority rows. Live overview/triage proofs `local-20260618-221339-826-b1981064` and `local-20260618-221340-099-4b4baba8` printed priority 50 `cluster-service-execution-runbook` with `failedChecks=5`, `missingChecks=0`, SHA-256 `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and aftercare `cluster-service-execution-audit`, plus priority 51 `service-execution-runbook` with `failedChecks=6`, `missingChecks=6`, SHA-256 `b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`, and aftercare `service-execution-audit`, with `privateStateExposed=false`. `SwarmActionRow` now exposes explicit `serviceId` and `serviceRoute` fields so agents can identify the body/action without parsing artifact paths or prose; Rust TUI and wrapper action queues render `service=` and `route=` for service lifecycle and service authority rows, while non-service rows render `none`. Source smoke guards both fields, and live overview/triage proofs `local-20260618-221912-231-805389bf` and `local-20260618-221912-282-a79ba8bd` showed the cluster and supervisor-service identities on readback and elevated runbook rows with `privateStateExposed=false`. `ReceiptDirectoryRow` now owns the same explicit `serviceId`/`serviceRoute` fields, so action rows consume typed service identity from the receipt-directory organ instead of parsing `route`; non-service receipt families carry `none`, while service lifecycle/runbook rows carry the typed body and route. Source smoke guards the fields, and live receipt-directory proof `local-20260618-222641-218-60106c79` printed `service=epiphany-cluster-daemon-services` and `service=epiphany-daemon-supervisor-service` on service attention/readiness rows and runbook witnesses with no private-state exposure. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index e109784b..73998120 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -1,5 +1,5 @@ param( - [ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "persona-discord", "persona-reddit", "persona-other", "daemon-survival-rehearsal", "repo-livefire-closure", "bifrost-publication", "bifrost-public-proof", "bifrost-artifact-acceptance", "bifrost-metrics", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-public-proof", "repo-work-readiness", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "service-tick", "managed-service-task-plan", "managed-service-task-install", "managed-service-task-status", "managed-service-task-start", "managed-service-task-stop", "managed-service-task-uninstall")] + [ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "persona-discord", "persona-reddit", "persona-other", "daemon-survival-rehearsal", "repo-livefire-closure", "bifrost-publication", "bifrost-public-proof", "bifrost-artifact-acceptance", "bifrost-metrics", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-public-proof", "repo-work-readiness", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "service-tick", "managed-service-task-plan", "managed-service-task-install", "managed-service-task-status", "managed-service-task-start", "managed-service-task-stop", "managed-service-task-uninstall")] [string]$Mode = "smoke", [string]$Root = (Resolve-Path ".").Path, [string]$Workspace = "", @@ -32,7 +32,6 @@ param( [string]$BifrostReviewReceipt = "review-receipt-local-proof", [string]$BifrostAuthorAgent = "epiphany.Hands", [string]$BifrostCreditSubject = "epiphany.swarm", - [string]$BifrostLedgerEntryId = "bifrost-ledger-local-proof", [string]$BifrostPublicProofId = "", [string]$BifrostPublicProofPublicationReceiptId = "bifrost-public-proof-publication-local-proof", [string]$BifrostPublicProofReviewReceipt = "public-proof-review-local-proof", @@ -582,7 +581,7 @@ Invoke-Checked ` -StdoutPath (Join-Path $artifactRoot "operator-run-intent.stdout.json") ` -StderrPath (Join-Path $artifactRoot "operator-run-intent.stderr.log") -$compactOperatorContextModes = @("agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "daemon-survival-rehearsal", "repo-livefire-closure", "bifrost-publication", "bifrost-public-proof", "bifrost-artifact-acceptance", "bifrost-metrics", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "service-policy-directory") +$compactOperatorContextModes = @("agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "daemon-survival-rehearsal", "repo-livefire-closure", "bifrost-publication", "bifrost-public-proof", "bifrost-artifact-acceptance", "bifrost-metrics", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "service-policy-directory") $usesCompactOperatorContext = $compactOperatorContextModes -contains $Mode $shouldReadLocalVerse = $Mode -ne "smoke" -and -not $usesCompactOperatorContext if ($shouldReadLocalVerse -and $Mode -ne "status" -and $Mode -ne "mvp") { @@ -1016,21 +1015,6 @@ if ($Mode -eq "repo-livefire-closure") { -StderrPath (Join-Path $artifactRoot "repo-livefire-closure.stderr.log") } -if ($Mode -eq "bifrost-ledger") { - $resultPath = Join-Path $artifactRoot "bifrost-ledger.stdout.json" - Invoke-Checked ` - -Label "read compact Bifrost ledger report" ` - -FilePath $verseQueryExe ` - -Arguments @( - "bifrost-ledger", - "--store", $localVerseReadStore, - "--runtime-id", $LocalVerseRuntimeId - ) ` - -WorkingDirectory $Root ` - -StdoutPath $resultPath ` - -StderrPath (Join-Path $artifactRoot "bifrost-ledger.stderr.log") -} - if ($Mode -eq "receipt-directory") { $resultPath = Join-Path $artifactRoot "receipt-directory.stdout.json" Invoke-Checked ` @@ -1856,26 +1840,6 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { $changedPaths = ($result.changedPaths -join ",") } Write-Host "Repo live-fire closure: status=$($result.status), item=$($result.item), branch=$($result.branch), commit=$($result.commitSha), family=$($result.safeActionFamily), paths=$changedPaths, gate=$($result.currentGate), blocker=$($result.blocker), publicationGate=$($result.publicationGate), soul=$($result.soulVerdict), mindCommit=$($result.mindStateCommitReceiptId), privateStateExposed=$($result.privateStateExposed)" - } elseif ($Mode -eq "bifrost-ledger") { - $ledgerRows = "none" - if ($null -ne $result.tuiRows -and $result.tuiRows.Count -gt 0) { - $ledgerRows = ($result.tuiRows -join "; ") - } - $accountingRows = "none" - if ($null -ne $result.accountingTuiRows -and $result.accountingTuiRows.Count -gt 0) { - $accountingRows = ($result.accountingTuiRows -join "; ") - } - $publicRefs = "none" - if ($null -ne $result.rows -and $result.rows.Count -gt 0) { - $publicRefs = (($result.rows | ForEach-Object { - $publicRef = $_.publicRef - if ($null -eq $publicRef -or $publicRef -eq "") { - $publicRef = "none" - } - "$($_.documentKind)=${publicRef}" - }) -join "; ") - } - Write-Host "Bifrost ledger: status=$($result.status), rows=$($result.rowCount), publicationChain=$($result.publicationChainCount), publicProofPublications=$($result.publicProofPublicationCount), artifactAcceptance=$($result.artifactAcceptanceReceiptCount), metrics=$($result.metricsReceiptCount), collaborationChain=$($result.collaborationChainCount), accountingRows=$($result.accountingRowCount), closedAccounting=$($result.closedAccountingRowCount), attentionAccounting=$($result.attentionAccountingRowCount), publicRefs=$publicRefs, accounting=$accountingRows, ledgerRows=$ledgerRows, privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "receipt-directory") { $artifactHashes = "none" $attentionRoutes = "none"