Add Bifrost public proof publication receipts

This commit is contained in:
Meta Vens 2026-06-20 13:17:17 +01:00
commit 228c9ad6c7
7 changed files with 607 additions and 10 deletions

View file

@ -3,6 +3,7 @@ use anyhow::Result;
use chrono::Utc;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_RESTART_POLICY_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_GLOBAL_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION;
use epiphany_core::EpiphanyAgentStateSoaEntry;
@ -11,6 +12,7 @@ use epiphany_core::EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry;
use epiphany_core::EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry;
use epiphany_core::EpiphanyCultMeshBifrostCollaborationFeedbackEntry;
use epiphany_core::EpiphanyCultMeshBifrostGithubPublicationReceiptEntry;
use epiphany_core::EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry;
use epiphany_core::EpiphanyCultMeshClusterTopologyEntry;
use epiphany_core::EpiphanyCultMeshDaemonPokeReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonRestartPolicyEntry;
@ -33,6 +35,7 @@ use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::epiphany_cultmesh_bifrost_github_publication_receipt_for_publication;
use epiphany_core::epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof;
use epiphany_core::epiphany_cultmesh_daemon_poke_intent_from_status;
use epiphany_core::epiphany_cultmesh_daemon_poke_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_intent_from_capability;
@ -56,6 +59,7 @@ use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_github_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_intent;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_receipt;
@ -72,6 +76,7 @@ use epiphany_core::write_epiphany_cultmesh_bifrost_body_change_publication_inten
use epiphany_core::write_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::write_epiphany_cultmesh_bifrost_github_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_bifrost_public_proof_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_poke_intent;
use epiphany_core::write_epiphany_cultmesh_daemon_poke_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_restart_policy;
@ -1071,6 +1076,114 @@ fn run_cli() -> Result<()> {
}))?
);
}
"bifrost-public-proof" | "publish-public-proof" | "public-proof-publication" => {
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
let (latest_public_proof, public_proofs) = load_repo_work_public_proofs(&args)?;
let selected_public_proof = if let Some(public_proof_id) = args.public_proof_id.as_ref()
{
public_proofs
.iter()
.find(|proof| proof.public_proof_id == *public_proof_id)
.cloned()
.with_context(|| {
format!("bifrost-public-proof could not find --public-proof-id {public_proof_id}")
})?
} else {
latest_public_proof
.context("bifrost-public-proof requires a repo work public proof in local Verse or --public-proof-id")?
};
let ledger_entry_id = args
.ledger_entry_id
.clone()
.context("bifrost-public-proof requires --ledger-entry-id")?;
let review_receipts = required_list(
&args.review_receipts,
"bifrost-public-proof requires --review-receipt",
)?;
let credit_receipts = required_list(
&args.credit_receipt_ids,
"bifrost-public-proof requires --credit-receipt",
)?;
let public_room_id = args
.public_room_id
.clone()
.unwrap_or_else(|| "epiphany-global/repo-work/public-proofs".to_string());
let publication_url = args.publication_url.clone().unwrap_or_else(|| {
format!(
"cultmesh://{public_room_id}/{}",
selected_public_proof.public_proof_id
)
});
let receipt_id = args.receipt_id.clone().unwrap_or_else(|| {
format!(
"bifrost-public-proof-publication-{}",
selected_public_proof.public_proof_id
)
});
let receipt_status = args
.receipt_status
.clone()
.unwrap_or_else(|| "published-to-public-verse".to_string());
let receipt = epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof(
receipt_id,
&selected_public_proof,
receipt_status,
EPIPHANY_CULTMESH_GLOBAL_VERSE_ID,
public_room_id,
ledger_entry_id,
credit_receipts,
review_receipts,
publication_url,
);
let written = write_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&args.store,
args.runtime_id.clone(),
receipt,
)?;
let latest = load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&args.store,
args.runtime_id.clone(),
)?;
if latest.as_ref().map(|receipt| receipt.receipt_id.as_str())
!= Some(written.receipt_id.as_str())
{
anyhow::bail!(
"local Verse query lost Bifrost public proof publication receipt after write"
);
}
println!(
"{}",
serde_json::to_string_pretty(&json!({
"schemaVersion": "epiphany.local_verse_bifrost_public_proof_publication.v0",
"status": "ok",
"store": args.store,
"runtimeId": args.runtime_id,
"receiptId": written.receipt_id,
"publicProofId": written.public_proof_id,
"publicProofRef": written.public_proof_ref,
"publicProofSha256": written.public_proof_sha256,
"item": written.item,
"sourceWorkspace": written.source_workspace,
"sourceBranch": written.source_branch,
"targetPublicVerseId": written.target_public_verse_id,
"publicRoomId": written.public_room_id,
"publicationUrl": written.publication_url,
"ledgerEntryId": written.bifrost_ledger_entry_id,
"creditReceiptIds": written.credit_receipt_ids,
"reviewReceiptIds": written.reviewer_ids,
"commands": {
"swarmOverview": WRAPPER_OVERVIEW_COMMAND,
"bifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND,
"bifrostPublicProof": "epiphany-verse-query bifrost-public-proof --public-proof-id <id> --ledger-entry-id <id> --review-receipt <id> --credit-receipt <id>"
},
"privateStateExposed": written.private_state_exposed,
}))?
);
}
"bifrost-ledger" | "publication-ledger" => {
seed_epiphany_local_verse_context(
&args.store,
@ -1087,10 +1200,12 @@ fn run_cli() -> Result<()> {
"runtimeId": args.runtime_id,
"rowCount": report.rows.len(),
"publicationChainCount": report.publication_chain_count,
"publicProofPublicationCount": report.public_proof_publication_count,
"collaborationChainCount": report.collaboration_chain_count,
"latestBifrostPublicationIntent": report.latest_publication_intent_id,
"latestBifrostPublicationReceipt": report.latest_publication_receipt_id,
"latestBifrostGithubReceipt": report.latest_github_receipt_id,
"latestBifrostPublicProofPublicationReceipt": report.latest_public_proof_publication_receipt_id,
"latestBifrostCollaborationFeedback": report.latest_feedback_id,
"latestImaginationConsensusReceipt": report.latest_consensus_receipt_id,
"tuiRows": report.tui_rows,
@ -3555,7 +3670,7 @@ fn run_cli() -> Result<()> {
);
}
other => anyhow::bail!(
"unknown command {other:?}; use seed, query, tools, tool-directory, invoke-tool, restart-policy-directory, swarm-brake, swarm-status, cluster-topology, eve-surfaces, daemon-status, agent-state, agent-state-report, poke-daemon, poke-down-daemons, bifrost-publication, bifrost-ledger, collaboration-feedback, connect-eve, or smoke"
"unknown command {other:?}; use seed, query, tools, tool-directory, invoke-tool, restart-policy-directory, swarm-brake, swarm-status, cluster-topology, eve-surfaces, daemon-status, agent-state, agent-state-report, poke-daemon, poke-down-daemons, bifrost-publication, bifrost-public-proof, bifrost-ledger, collaboration-feedback, connect-eve, or smoke"
),
}
Ok(())
@ -4330,10 +4445,12 @@ struct BifrostLedgerReport {
rows: Vec<BifrostLedgerRow>,
tui_rows: Vec<String>,
publication_chain_count: usize,
public_proof_publication_count: usize,
collaboration_chain_count: usize,
latest_publication_intent_id: Option<String>,
latest_publication_receipt_id: Option<String>,
latest_github_receipt_id: Option<String>,
latest_public_proof_publication_receipt_id: Option<String>,
latest_feedback_id: Option<String>,
latest_consensus_receipt_id: Option<String>,
private_state_exposed: bool,
@ -5901,6 +6018,62 @@ fn receipt_directory_report(
.unwrap_or(false),
},
);
push_receipt_directory_row(
&mut rows,
&mut tui_rows,
ReceiptDirectoryRow {
family: "bifrost-public-proof-publication".to_string(),
owner: "Bifrost".to_string(),
document_kind: "gamecult.bifrost.public_proof_publication_receipt.v0".to_string(),
latest_id: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| receipt.receipt_id.clone())
.unwrap_or_else(|| "missing".to_string()),
status: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| receipt.status.clone())
.unwrap_or_else(|| "missing".to_string()),
route: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| receipt.publication_url.clone())
.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(),
artifact_ref: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| receipt.public_proof_ref.clone())
.unwrap_or_else(|| "none".to_string()),
artifact_status: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| {
if receipt.public_proof_ref == "none" {
"none".to_string()
} else {
"external-ref".to_string()
}
})
.unwrap_or_else(|| "none".to_string()),
artifact_sha256: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| receipt.public_proof_sha256.clone())
.unwrap_or_else(|| "none".to_string()),
present: context
.latest_bifrost_public_proof_publication_receipt
.is_some(),
private_state_exposed: context
.latest_bifrost_public_proof_publication_receipt
.as_ref()
.map(|receipt| receipt.private_state_exposed)
.unwrap_or(false),
},
);
push_receipt_directory_row(
&mut rows,
&mut tui_rows,
@ -6600,6 +6773,11 @@ fn load_bifrost_ledger_report(args: &Args) -> Result<BifrostLedgerReport> {
&args.store,
args.runtime_id.clone(),
)?;
let latest_public_proof_publication =
load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&args.store,
args.runtime_id.clone(),
)?;
let latest_feedback = load_latest_epiphany_cultmesh_bifrost_collaboration_feedback(
&args.store,
args.runtime_id.clone(),
@ -6612,6 +6790,7 @@ fn load_bifrost_ledger_report(args: &Args) -> Result<BifrostLedgerReport> {
latest_intent.as_ref(),
latest_publication.as_ref(),
latest_github.as_ref(),
latest_public_proof_publication.as_ref(),
latest_feedback.as_ref(),
latest_consensus.as_ref(),
))
@ -6621,6 +6800,9 @@ fn bifrost_ledger_report(
latest_intent: Option<&EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry>,
latest_publication: Option<&EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry>,
latest_github: Option<&EpiphanyCultMeshBifrostGithubPublicationReceiptEntry>,
latest_public_proof_publication: Option<
&EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry,
>,
latest_feedback: Option<&EpiphanyCultMeshBifrostCollaborationFeedbackEntry>,
latest_consensus: Option<&EpiphanyCultMeshImaginationConsensusReceiptEntry>,
) -> BifrostLedgerReport {
@ -6683,6 +6865,23 @@ fn bifrost_ledger_report(
},
);
}
if let Some(receipt) = 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(feedback) = latest_feedback {
push_bifrost_ledger_row(
&mut rows,
@ -6721,6 +6920,7 @@ fn bifrost_ledger_report(
let publication_chain_count = usize::from(latest_intent.is_some())
+ usize::from(latest_publication.is_some())
+ usize::from(latest_github.is_some());
let public_proof_publication_count = usize::from(latest_public_proof_publication.is_some());
let collaboration_chain_count =
usize::from(latest_feedback.is_some()) + usize::from(latest_consensus.is_some());
let private_state_exposed = rows.iter().any(|row| row.private_state_exposed);
@ -6738,10 +6938,13 @@ fn bifrost_ledger_report(
rows,
tui_rows,
publication_chain_count,
public_proof_publication_count,
collaboration_chain_count,
latest_publication_intent_id: latest_intent.map(|intent| intent.intent_id.clone()),
latest_publication_receipt_id: latest_publication.map(|receipt| receipt.receipt_id.clone()),
latest_github_receipt_id: latest_github.map(|receipt| receipt.receipt_id.clone()),
latest_public_proof_publication_receipt_id: latest_public_proof_publication
.map(|receipt| receipt.receipt_id.clone()),
latest_feedback_id: latest_feedback.map(|feedback| feedback.feedback_id.clone()),
latest_consensus_receipt_id: latest_consensus.map(|receipt| receipt.receipt_id.clone()),
private_state_exposed,
@ -7881,6 +8084,7 @@ struct Args {
ledger_entry_id: Option<String>,
hands_pr_receipt_id: Option<String>,
publication_url: Option<String>,
public_proof_id: Option<String>,
pull_request_number: Option<String>,
commit_sha: Option<String>,
source_cluster_id: Option<String>,
@ -7944,6 +8148,7 @@ impl Args {
let mut ledger_entry_id = None;
let mut hands_pr_receipt_id = None;
let mut publication_url = None;
let mut public_proof_id = None;
let mut pull_request_number = None;
let mut commit_sha = None;
let mut source_cluster_id = None;
@ -8123,6 +8328,10 @@ impl Args {
publication_url =
Some(values.next().context("missing --publication-url value")?);
}
"--public-proof-id" => {
public_proof_id =
Some(values.next().context("missing --public-proof-id value")?);
}
"--pull-request-number" => {
pull_request_number = Some(
values
@ -8269,6 +8478,7 @@ impl Args {
ledger_entry_id,
hands_pr_receipt_id,
publication_url,
public_proof_id,
pull_request_number,
commit_sha,
source_cluster_id,

View file

@ -204,6 +204,12 @@ pub const EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_SCHEMA_VERSION: &
"gamecult.bifrost.github_publication_receipt.v0";
pub const EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_LATEST_KEY: &str =
"gamecult-local/bifrost/github-publication-receipt/latest";
pub const EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_TYPE: &str =
"gamecult.bifrost.public_proof_publication_receipt";
pub const EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_SCHEMA_VERSION: &str =
"gamecult.bifrost.public_proof_publication_receipt.v0";
pub const EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_LATEST_KEY: &str =
"gamecult-local/bifrost/public-proof-publication-receipt/latest";
pub const EPIPHANY_CULTMESH_BIFROST_COLLABORATION_FEEDBACK_TYPE: &str =
"gamecult.bifrost.collaboration_feedback";
pub const EPIPHANY_CULTMESH_BIFROST_COLLABORATION_FEEDBACK_SCHEMA_VERSION: &str =
@ -1926,6 +1932,48 @@ pub struct EpiphanyCultMeshBifrostGithubPublicationReceiptEntry {
pub notes: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "gamecult.bifrost.public_proof_publication_receipt",
schema = "EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry"
)]
pub struct EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry {
#[cultcache(key = 0)]
pub schema_version: String,
#[cultcache(key = 1)]
pub receipt_id: String,
#[cultcache(key = 2)]
pub public_proof_id: String,
#[cultcache(key = 3)]
pub public_proof_ref: String,
#[cultcache(key = 4)]
pub public_proof_sha256: String,
#[cultcache(key = 5)]
pub item: String,
#[cultcache(key = 6)]
pub source_workspace: String,
#[cultcache(key = 7)]
pub source_branch: String,
#[cultcache(key = 8)]
pub target_public_verse_id: String,
#[cultcache(key = 9)]
pub public_room_id: String,
#[cultcache(key = 10)]
pub status: String,
#[cultcache(key = 11)]
pub bifrost_ledger_entry_id: String,
#[cultcache(key = 12)]
pub credit_receipt_ids: Vec<String>,
#[cultcache(key = 13)]
pub reviewer_ids: Vec<String>,
#[cultcache(key = 14)]
pub publication_url: String,
#[cultcache(key = 15)]
pub private_state_exposed: bool,
#[cultcache(key = 16)]
pub notes: Vec<String>,
}
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
#[cultcache(
type = "gamecult.bifrost.collaboration_feedback",
@ -2027,6 +2075,8 @@ pub struct EpiphanyLocalVerseContext {
Option<EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry>,
pub latest_bifrost_github_publication_receipt:
Option<EpiphanyCultMeshBifrostGithubPublicationReceiptEntry>,
pub latest_bifrost_public_proof_publication_receipt:
Option<EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry>,
pub latest_bifrost_collaboration_feedback:
Option<EpiphanyCultMeshBifrostCollaborationFeedbackEntry>,
pub latest_imagination_consensus_receipt:
@ -2121,6 +2171,7 @@ cultmesh_documents!(EpiphanyCultMeshDocuments {
EpiphanyCultMeshBifrostBodyChangePublicationIntentEntry => EPIPHANY_CULTMESH_BIFROST_BODY_CHANGE_PUBLICATION_INTENT_SCHEMA_VERSION,
EpiphanyCultMeshBifrostBodyChangePublicationReceiptEntry => EPIPHANY_CULTMESH_BIFROST_BODY_CHANGE_PUBLICATION_RECEIPT_SCHEMA_VERSION,
EpiphanyCultMeshBifrostGithubPublicationReceiptEntry => EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_SCHEMA_VERSION,
EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry => EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_SCHEMA_VERSION,
EpiphanyCultMeshBifrostCollaborationFeedbackEntry => EPIPHANY_CULTMESH_BIFROST_COLLABORATION_FEEDBACK_SCHEMA_VERSION,
EpiphanyCultMeshImaginationConsensusReceiptEntry => EPIPHANY_CULTMESH_IMAGINATION_CONSENSUS_RECEIPT_SCHEMA_VERSION,
});
@ -3756,6 +3807,70 @@ pub fn load_latest_epiphany_cultmesh_bifrost_github_publication_receipt(
node.get(EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_LATEST_KEY)
}
#[allow(clippy::too_many_arguments)]
pub fn epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof(
receipt_id: impl Into<String>,
proof: &EpiphanyCultMeshRepoWorkPublicProofEntry,
status: impl Into<String>,
target_public_verse_id: impl Into<String>,
public_room_id: impl Into<String>,
bifrost_ledger_entry_id: impl Into<String>,
credit_receipt_ids: Vec<String>,
reviewer_ids: Vec<String>,
publication_url: impl Into<String>,
) -> EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry {
EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry {
schema_version:
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_SCHEMA_VERSION.to_string(),
receipt_id: receipt_id.into(),
public_proof_id: proof.public_proof_id.clone(),
public_proof_ref: proof.public_proof_ref.clone(),
public_proof_sha256: proof.public_proof_sha256.clone(),
item: proof.item.clone(),
source_workspace: proof.workspace.clone(),
source_branch: proof.branch.clone(),
target_public_verse_id: target_public_verse_id.into(),
public_room_id: public_room_id.into(),
status: status.into(),
bifrost_ledger_entry_id: bifrost_ledger_entry_id.into(),
credit_receipt_ids,
reviewer_ids,
publication_url: publication_url.into(),
private_state_exposed: false,
notes: vec![
"Bifrost public-proof publication receipt binds a redacted repo-work proof bundle to a public Verse room.".to_string(),
"The receipt carries only proof refs, hashes, ledger, review, and credit ids; private worker/operator/agent state remains sealed.".to_string(),
"Gjallar may read this closure, but Bifrost owns public publication authority.".to_string(),
],
}
}
pub fn write_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
receipt: EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry,
) -> Result<EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry> {
validate_bifrost_public_proof_publication_receipt(&receipt)?;
let mut node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
let receipt_key =
epiphany_cultmesh_bifrost_public_proof_publication_receipt_key(&receipt.receipt_id);
let written = node.put(receipt_key.as_str(), &receipt)?;
node.put(
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_LATEST_KEY,
&written,
)?;
node.flush()?;
Ok(written)
}
pub fn load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
store_path: impl AsRef<Path>,
runtime_id: impl Into<String>,
) -> Result<Option<EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry>> {
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
node.get(EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_LATEST_KEY)
}
pub fn epiphany_cultmesh_bifrost_collaboration_feedback(
feedback_id: impl Into<String>,
source_persona_id: impl Into<String>,
@ -3979,6 +4094,58 @@ fn validate_bifrost_github_publication_receipt(
Ok(())
}
fn validate_bifrost_public_proof_publication_receipt(
receipt: &EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry,
) -> Result<()> {
if receipt.schema_version
!= EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_SCHEMA_VERSION
{
return Err(anyhow!(
"Bifrost public proof publication receipts require schema version {}",
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_SCHEMA_VERSION
));
}
if receipt.private_state_exposed {
return Err(anyhow!(
"Bifrost public proof publication receipts must not expose private state"
));
}
if receipt.public_proof_id.trim().is_empty()
|| receipt.public_proof_ref.trim().is_empty()
|| receipt.public_proof_sha256.trim().is_empty()
{
return Err(anyhow!(
"Bifrost public proof publication receipts require proof id, ref, and SHA-256"
));
}
if receipt.target_public_verse_id != EPIPHANY_CULTMESH_GLOBAL_VERSE_ID {
return Err(anyhow!(
"Bifrost public proof publication receipts must target the global public Verse"
));
}
if receipt.public_room_id.trim().is_empty() || receipt.publication_url.trim().is_empty() {
return Err(anyhow!(
"Bifrost public proof publication receipts require a public room and publication URL"
));
}
if receipt.bifrost_ledger_entry_id.trim().is_empty() {
return Err(anyhow!(
"Bifrost public proof publication receipts require a ledger entry"
));
}
if receipt.credit_receipt_ids.is_empty() {
return Err(anyhow!(
"Bifrost public proof publication receipts require credit receipts"
));
}
if receipt.reviewer_ids.is_empty() {
return Err(anyhow!(
"Bifrost public proof publication receipts require reviewer receipts"
));
}
Ok(())
}
fn validate_bifrost_collaboration_feedback(
feedback: &EpiphanyCultMeshBifrostCollaborationFeedbackEntry,
) -> Result<()> {
@ -4557,6 +4724,8 @@ pub fn query_epiphany_local_verse_context(
.get(EPIPHANY_CULTMESH_BIFROST_BODY_CHANGE_PUBLICATION_RECEIPT_LATEST_KEY)?,
latest_bifrost_github_publication_receipt: node
.get(EPIPHANY_CULTMESH_BIFROST_GITHUB_PUBLICATION_RECEIPT_LATEST_KEY)?,
latest_bifrost_public_proof_publication_receipt: node
.get(EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_LATEST_KEY)?,
latest_bifrost_collaboration_feedback: node
.get(EPIPHANY_CULTMESH_BIFROST_COLLABORATION_FEEDBACK_LATEST_KEY)?,
latest_imagination_consensus_receipt: node
@ -4920,6 +5089,10 @@ fn epiphany_cultmesh_bifrost_github_publication_receipt_key(receipt_id: &str) ->
format!("gamecult-local/bifrost/github-publication-receipt/{receipt_id}")
}
fn epiphany_cultmesh_bifrost_public_proof_publication_receipt_key(receipt_id: &str) -> String {
format!("gamecult-local/bifrost/public-proof-publication-receipt/{receipt_id}")
}
fn epiphany_cultmesh_bifrost_collaboration_feedback_key(feedback_id: &str) -> String {
format!("gamecult-local/bifrost/collaboration-feedback/{feedback_id}")
}
@ -5730,6 +5903,36 @@ pub fn epiphany_cultmesh_bifrost_contracts() -> Vec<EpiphanyCultMeshBifrostContr
"Public Persona discussion is thought weather until reviewed local adoption and Bifrost/GameCult receipts bind it to implementation.".to_string(),
],
},
EpiphanyCultMeshBifrostContractEntry {
schema_version: EPIPHANY_CULTMESH_BIFROST_CONTRACT_SCHEMA_VERSION.to_string(),
contract_id: "gamecult.bifrost.public_proof.publication".to_string(),
verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(),
document_type:
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_TYPE.to_string(),
payload_schema_version:
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_SCHEMA_VERSION
.to_string(),
authority: "bifrost".to_string(),
operations: vec![
"publishRedactedProof".to_string(),
"receiptWatch".to_string(),
"snapshot".to_string(),
],
intent_document_types: vec![
EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_TYPE.to_string(),
],
receipt_document_types: vec![
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_TYPE.to_string(),
"gamecult.bifrost.credit_receipt".to_string(),
],
notes: vec![
format!(
"CultMesh advertises this Bifrost contract as {EPIPHANY_CULTMESH_BIFROST_CONTRACT_TYPE}."
),
"Repo-work public proof bundles are redacted evidence packets, not body changes; Bifrost publishes them into public Verse rooms after review and credit receipts exist.".to_string(),
"Gjallar reads the published proof closure, but Bifrost owns public publication authority and ledger attribution.".to_string(),
],
},
]
}
@ -7458,6 +7661,144 @@ mod tests {
Ok(())
}
#[test]
fn bifrost_public_proof_publication_receipt_round_trips() -> Result<()> {
let temp = tempfile::tempdir()?;
let store = temp
.path()
.join("epiphany-bifrost-public-proof-publication.ccmp");
let proof = EpiphanyCultMeshRepoWorkPublicProofEntry {
schema_version: EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION.to_string(),
runtime_id: "epiphany-test".to_string(),
verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(),
public_proof_id: "repo-work-public-proof-test".to_string(),
generated_at: "2026-06-20T12:00:00Z".to_string(),
workspace: "E:/Projects/EpiphanyAgent".to_string(),
item: "test-item".to_string(),
branch: "codex/test-item".to_string(),
current_gate: "awaiting-publication".to_string(),
blocker: "bifrost-publication-missing".to_string(),
next_safe_move: "publish-redacted-proof".to_string(),
changed_paths: vec!["notes/test.md".to_string()],
commit_sha: "abc123".to_string(),
soul_verdict: "passed".to_string(),
upstream_main_synced: true,
artifact_row_count: 3,
publication_row_count: 5,
public_proof_ref: "public-proof.json".to_string(),
public_proof_sha256: "0123456789abcdef".to_string(),
tui_rows: vec!["proof row".to_string()],
private_state_exposed: false,
notes: vec!["redacted proof".to_string()],
};
let receipt = epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof(
"bifrost-public-proof-publication-test",
&proof,
"published-to-public-verse",
EPIPHANY_CULTMESH_GLOBAL_VERSE_ID,
"epiphany-global/repo-work/public-proofs",
"bifrost-ledger-public-proof-test",
vec!["credit-receipt-test".to_string()],
vec!["maintainer-review-test".to_string()],
"cultmesh://epiphany-global/repo-work/public-proofs/repo-work-public-proof-test",
);
write_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&store,
"epiphany-test",
receipt.clone(),
)?;
assert_eq!(
load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&store,
"epiphany-test"
)?,
Some(receipt.clone())
);
assert_eq!(receipt.public_proof_id, proof.public_proof_id);
assert_eq!(receipt.public_proof_sha256, proof.public_proof_sha256);
assert_eq!(
receipt.target_public_verse_id,
EPIPHANY_CULTMESH_GLOBAL_VERSE_ID
);
assert_eq!(receipt.credit_receipt_ids, vec!["credit-receipt-test"]);
assert_eq!(receipt.reviewer_ids, vec!["maintainer-review-test"]);
assert!(!receipt.private_state_exposed);
Ok(())
}
#[test]
fn bifrost_public_proof_publication_refuses_private_or_wrong_verse() -> Result<()> {
let temp = tempfile::tempdir()?;
let store = temp
.path()
.join("epiphany-bifrost-public-proof-publication-refusal.ccmp");
let proof = EpiphanyCultMeshRepoWorkPublicProofEntry {
schema_version: EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION.to_string(),
runtime_id: "epiphany-test".to_string(),
verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(),
public_proof_id: "repo-work-public-proof-test".to_string(),
generated_at: "2026-06-20T12:00:00Z".to_string(),
workspace: "E:/Projects/EpiphanyAgent".to_string(),
item: "test-item".to_string(),
branch: "codex/test-item".to_string(),
current_gate: "awaiting-publication".to_string(),
blocker: "bifrost-publication-missing".to_string(),
next_safe_move: "publish-redacted-proof".to_string(),
changed_paths: vec!["notes/test.md".to_string()],
commit_sha: "abc123".to_string(),
soul_verdict: "passed".to_string(),
upstream_main_synced: true,
artifact_row_count: 3,
publication_row_count: 5,
public_proof_ref: "public-proof.json".to_string(),
public_proof_sha256: "0123456789abcdef".to_string(),
tui_rows: vec!["proof row".to_string()],
private_state_exposed: false,
notes: vec!["redacted proof".to_string()],
};
let mut receipt = epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof(
"bifrost-public-proof-publication-private-test",
&proof,
"published-to-public-verse",
EPIPHANY_CULTMESH_GLOBAL_VERSE_ID,
"epiphany-global/repo-work/public-proofs",
"bifrost-ledger-public-proof-test",
vec!["credit-receipt-test".to_string()],
vec!["maintainer-review-test".to_string()],
"cultmesh://epiphany-global/repo-work/public-proofs/repo-work-public-proof-test",
);
receipt.private_state_exposed = true;
let error = write_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&store,
"epiphany-test",
receipt,
)
.expect_err("private proof publication receipts must be refused");
assert!(error.to_string().contains("must not expose private state"));
let wrong_verse = epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof(
"bifrost-public-proof-publication-wrong-verse-test",
&proof,
"published-to-public-verse",
EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID,
"gamecult-local/repo-work/public-proofs",
"bifrost-ledger-public-proof-test",
vec!["credit-receipt-test".to_string()],
vec!["maintainer-review-test".to_string()],
"cultmesh://gamecult-local/repo-work/public-proofs/repo-work-public-proof-test",
);
let error = write_epiphany_cultmesh_bifrost_public_proof_publication_receipt(
&store,
"epiphany-test",
wrong_verse,
)
.expect_err("non-public Verse proof publication receipts must be refused");
assert!(error.to_string().contains("global public Verse"));
Ok(())
}
#[test]
fn collaboration_feedback_routes_to_imagination_consensus() -> Result<()> {
let temp = tempfile::tempdir()?;
@ -7796,7 +8137,7 @@ mod tests {
let temp = tempfile::tempdir()?;
let store = temp.path().join("epiphany-bifrost-contracts.ccmp");
let written = write_epiphany_cultmesh_bifrost_contracts(&store, "epiphany-test")?;
assert_eq!(written.len(), 2);
assert_eq!(written.len(), 3);
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
let publication = node.get_required::<EpiphanyCultMeshBifrostContractEntry>(
@ -7805,6 +8146,9 @@ mod tests {
let feedback = node.get_required::<EpiphanyCultMeshBifrostContractEntry>(
"gamecult.bifrost.collaboration.feedback",
)?;
let public_proof = node.get_required::<EpiphanyCultMeshBifrostContractEntry>(
"gamecult.bifrost.public_proof.publication",
)?;
assert_eq!(publication.verse_id, EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID);
assert_eq!(publication.authority, "bifrost");
@ -7833,6 +8177,24 @@ mod tests {
.iter()
.any(|note| note.contains("thought weather"))
);
assert_eq!(public_proof.authority, "bifrost");
assert_eq!(
public_proof.document_type,
EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_TYPE
);
assert!(
public_proof
.intent_document_types
.iter()
.any(|intent| intent == EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_TYPE)
);
assert!(
public_proof
.receipt_document_types
.iter()
.any(|receipt| receipt
== EPIPHANY_CULTMESH_BIFROST_PUBLIC_PROOF_PUBLICATION_RECEIPT_TYPE)
);
Ok(())
}
}

View file

@ -233,6 +233,7 @@ pub use cultmesh_integration::EpiphanyCultMeshBifrostBodyChangePublicationReceip
pub use cultmesh_integration::EpiphanyCultMeshBifrostCollaborationFeedbackEntry;
pub use cultmesh_integration::EpiphanyCultMeshBifrostContractEntry;
pub use cultmesh_integration::EpiphanyCultMeshBifrostGithubPublicationReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshBifrostPublicProofPublicationReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshClusterTopologyEntry;
pub use cultmesh_integration::EpiphanyCultMeshContinuityContractEntry;
pub use cultmesh_integration::EpiphanyCultMeshCoordinatorRunReceiptEntry;
@ -284,6 +285,7 @@ pub use cultmesh_integration::epiphany_cultmesh_bifrost_body_change_publication_
pub use cultmesh_integration::epiphany_cultmesh_bifrost_collaboration_feedback;
pub use cultmesh_integration::epiphany_cultmesh_bifrost_contracts;
pub use cultmesh_integration::epiphany_cultmesh_bifrost_github_publication_receipt_for_publication;
pub use cultmesh_integration::epiphany_cultmesh_bifrost_public_proof_publication_receipt_for_proof;
pub use cultmesh_integration::epiphany_cultmesh_continuity_contracts;
pub use cultmesh_integration::epiphany_cultmesh_coordinator_run_receipt_from_summary_json;
pub use cultmesh_integration::epiphany_cultmesh_daemon_poke_intent_from_status;
@ -327,6 +329,7 @@ pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_body_change_
pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_collaboration_feedback;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_github_publication_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_coordinator_run_receipt;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_poke_intent;
pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_poke_receipt;
@ -355,6 +358,7 @@ pub use cultmesh_integration::write_epiphany_cultmesh_bifrost_body_change_public
pub use cultmesh_integration::write_epiphany_cultmesh_bifrost_collaboration_feedback;
pub use cultmesh_integration::write_epiphany_cultmesh_bifrost_contracts;
pub use cultmesh_integration::write_epiphany_cultmesh_bifrost_github_publication_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_bifrost_public_proof_publication_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_continuity_contracts;
pub use cultmesh_integration::write_epiphany_cultmesh_coordinator_run_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_poke_intent;

View file

@ -750,6 +750,24 @@ and `15-swarm-overview-public-proof.json` proved latest
public proof row, one public proof action row, no mutation/elevation, and
`private=false`.
Bifrost public-proof publication transport is now the closure after local
proof sight. `epiphany-verse-query bifrost-public-proof --public-proof-id <id>
--ledger-entry-id <id> --review-receipt <id> --credit-receipt <id>` 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`.
The first Verse projection smoke proved the local CultMesh sight path: overview
mirrored `repo-work-overview-verse-overview-request` into the repo-local Verse,
`epiphany-verse-query smoke --store <local-verse> --runtime-id repo-swarm-local`
@ -1255,10 +1273,13 @@ Required organs before MVP:
`epiphany.repo_work_public_proof_bundle.v0` artifact under
`.epiphany/public/proof-bundles/` with local paths and raw receipt bodies
removed, and mirrors an `epiphany.cultmesh.repo_work_public_proof.v0` row
into local Verse for Gjallar/Odin sight. Remaining work is Bifrost public
publication/credit transport beyond local Verse plus UX polish, not basic
local public-proof export, local CultMesh readback, or Bifrost/GitHub/sync
row visibility.
into local Verse for Gjallar/Odin sight. Bifrost can now publish that
redacted proof row through
`gamecult.bifrost.public_proof_publication_receipt.v0` with public Verse
target, public room, ledger, review, credit, proof ref, and SHA-256 readback.
Remaining work is UX polish around this mouth plus richer safe-family and
closure depth, not basic local public-proof export, local CultMesh readback,
Bifrost/GitHub/sync row visibility, or public-proof publication closure.
Scheduler authority is intentionally narrow. It may advance
`accept -> plan -> run -> adopt -> execute` only when each upstream receipt

View file

@ -103,7 +103,7 @@ remembers doctrine; the branch remembers the blade.
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
- Hands now has a first executable action receipt spine. `epiphany-core::hands_gateway` owns `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt`; runtime-spine can persist/reread them; `runtime_spine_persists_mind_gateway_review_receipts` includes the Hands chain beside Mind/Eyes/Substrate/Soul/Continuity proofs and proves the post-timestamp Hands receipt-chain detector; `epiphany-hands-action-smoke` emits intent/review/patch/command/commit receipt ids from `.epiphany-smoke\runtime-spine\hands-action-smoke.msgpack`; and the repo-action launch proof profile now requires action intent, action review, and patch receipt together. `epiphany-mvp-coordinator` now turns `continueImplementation` into a persisted Substrate Gate grant plus Hands intent/review gate and includes the receipt ids in the operator step. `epiphany-hands-action` is the native consequence recorder for that gate: `record-patch`, `record-command`, `record-commit`, and turn-level `record-pass` load the stored intent/review or `finalAction.handsActionGate` from `coordinator-summary.json`, require an approved matching review, enforce allowed operations, and keep patch/commit changed paths inside the requested scope. `epiphany-mvp-coordinator-smoke` includes the deterministic Hands pass proof. The coordinator now treats a complete Hands receipt chain after an accepted Soul result as new implementation evidence, launches Soul again, and routes a passing accepted Soul result to Modeling/modeling before another Hands turn. Work-loop telemetry is now typed internal CultMesh state: Verification role launches write `epiphany.cultmesh.work_loop_telemetry.v0` beside runtime-spine, render that packet for Soul with resolved receipt bodies, commit diff preview, source proof notes, verification assertions, and stdout/stderr previews, and Modeling launches read/enrich the latest packet with Soul acceptance receipt ids before Modeling updates the map. Local Verse prompt context now exposes only a sealed `latest_work_loop_summary` digest with telemetry id, Hands receipt ids, path/source/assertion counts, and Soul receipt ids; receipt payload previews, artifact previews, and commit diff previews remain internal telemetry and are leak-guarded by tests plus `epiphany-verse-query -- smoke`.
- `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance. `epiphany-verse-query swarm-brake --brake-status engaged|released` can now write the local Verse brake document, and `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when that brake is engaged while keeping `status` readable. `epiphany-mvp-coordinator` also checks `--local-verse-store` before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when passed `--local-verse-store`. Daemon tool invocation, daemon lifecycle poke, and `epiphany-daemon-supervisor` restart/tick/serve/service-plan/service-launch/service-runbook/windows-service-install/windows-service-status/windows-service-reconcile/windows-service-execution-readiness/start/stop attempts now fail closed under a matching engaged brake; supervisor restart now has durable per-daemon policy with cooldown/backoff, explicit scheduled tick pulses, latest scheduler receipts, typed service lifecycle plan/launch/runbook/install/status/reconcile/readiness/start/stop receipts, and local operator wrapper modes that write runbook/install/status/reconcile/readiness/control-plan/execution artifacts plus operator run receipts. The installed-service read path, read-only service-policy reconciliation path, execution-readiness path, non-mutating start/stop control-plan path, and non-elevated execution refusal path have been proved against real Windows `EventLog` service-manager state or safe missing-service targets through local Verse receipts, including explicit wrapper install/start/stop execution modes. The next cut is actual elevated install/start/stop execution proof under operator authority.
- `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live seventeen-front-door chain from `epiphany-repo init` through `epiphany-swarm run`, `epiphany-work persona-intake`, `derive-plan`, `close`, `overview`, `export-proof`, `tick`, `queue-run`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs: richer model-authored safe families, Bifrost/public Verse transport for public proof, and richer model-authored closure. Autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, Idunn owns daemon lifecycle, and `epiphany-work tick` may only advance one safe receipt-backed branch-local step per pulse before stopping at publication gates. `epiphany-work derive-plan` now consumes accepted Persona/Bifrost pressure, writes typed Imagination action-item receipts, then lowers allowlisted safe families into Imagination/Self action plans: `append-worklog` appends to `EPIPHANY_WORKLOG.md`, `planning-note` creates a contained markdown note under `notes/epiphany-work/<item>.md`, `checklist-note` creates a contained checklist, and `section-note` / `repo.markdown_managed_section` creates or replaces one marker-bounded markdown section; the receipts carry `operatorAuthoredShellDetails=false`, authority seals, and no private-state exposure. Disposable smokes proved append-worklog, planning-note, checklist-note, and section-note routes through branch-local Hands commits; `.epiphany-smoke\section-note-20260620-124416` reached `awaiting-publication` with Soul `passed`, commit `cce53ae6bd86da51fc8651780743fa861e6ca225`, both section markers present, and `privateStateExposed=false`. `epiphany-work overview` now reads the repo work receipt chain and writes an Eyes/Gjallar-owned sight/proof bundle with current gate, blocker, next safe action, branch, changed paths, commit SHA, Soul verdict, compact rows, and private-state seal; it also mirrors a typed `epiphany.cultmesh.repo_work_overview.v0` document into the repo-local Verse when a local Verse store is known. Disposable smokes proved pre-plan `awaiting-plan`/`plan-receipt-missing`, post-close `awaiting-publication`/`bifrost-publication-missing`, and latest-key CultMesh readback through `epiphany-verse-query smoke` as `latestRepoWorkOverview=repo-work-overview-verse-overview-request`, `latestRepoWorkGate=awaiting-publication`, `latestRepoWorkBlocker=bifrost-publication-missing`, with no private-state exposure. The tick pulse reads the repo-local CultMesh swarm brake and writes `refused-by-swarm-brake` without creating run/adopt/execute receipts when the brake is engaged. It also writes active-turn and last-completed scheduler receipts, refuses live duplicate pulses as `refused-active-turn`, refuses explicit completion-anchored cooldown as `refused-by-cooldown`, clears stale active markers after `--active-timeout-seconds`, and records `physiology.recoveredActiveTurn.recovered=true` when recovery proceeds. `epiphany-work queue-run` reads the repo-local typed overview queue, selects tick-actionable rows for the current repo Body through `awaiting-closure`, delegates to `tick`, refreshes overview after real advancement, and is wrapped by `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run`; `epiphany-swarm run` is the bounded operator mouth over that same queue/tick artery. `epiphany-work serve` wraps the item-scoped tick artery in Self-owned cadence: bounded `--max-iterations` proof mode writes `work-scheduler-serve-<item>.json`, unbounded service mode relies on per-pulse tick receipts, and unbounded zero-second polling is refused. `epiphany-work close` consumes branch-local execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, and seals `work-close-<item>.json` without granting publication, merge, service lifecycle, cross-repo mutation, or private-state exposure; tick now calls that same close gate after execution. `epiphany-work publish --closure-receipt` can consume the closure's Soul/Mind ids, while tick no-ops once closure exists before Bifrost publication authority.
- `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live seventeen-front-door chain from `epiphany-repo init` through `epiphany-swarm run`, `epiphany-work persona-intake`, `derive-plan`, `close`, `overview`, `export-proof`, `tick`, `queue-run`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs as richer model-authored safe families, richer model-authored closure, and UX polish around the now-live Bifrost public-proof publication mouth. Autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, Idunn owns daemon lifecycle, and `epiphany-work tick` may only advance one safe receipt-backed branch-local step per pulse before stopping at publication gates. `epiphany-work derive-plan` now consumes accepted Persona/Bifrost pressure, writes typed Imagination action-item receipts, then lowers allowlisted safe families into Imagination/Self action plans: `append-worklog` appends to `EPIPHANY_WORKLOG.md`, `planning-note` creates a contained markdown note under `notes/epiphany-work/<item>.md`, `checklist-note` creates a contained checklist, and `section-note` / `repo.markdown_managed_section` creates or replaces one marker-bounded markdown section; the receipts carry `operatorAuthoredShellDetails=false`, authority seals, and no private-state exposure. Disposable smokes proved append-worklog, planning-note, checklist-note, and section-note routes through branch-local Hands commits; `.epiphany-smoke\section-note-20260620-124416` reached `awaiting-publication` with Soul `passed`, commit `cce53ae6bd86da51fc8651780743fa861e6ca225`, both section markers present, and `privateStateExposed=false`. `epiphany-work overview` now reads the repo work receipt chain and writes an Eyes/Gjallar-owned sight/proof bundle with current gate, blocker, next safe action, branch, changed paths, commit SHA, Soul verdict, compact rows, and private-state seal; it also mirrors a typed `epiphany.cultmesh.repo_work_overview.v0` document into the repo-local Verse when a local Verse store is known. `epiphany-work export-proof` mirrors redacted public proofs into local Verse, and `epiphany-verse-query bifrost-public-proof` now publishes an existing redacted proof row as `gamecult.bifrost.public_proof_publication_receipt.v0` with public Verse target, public room, ledger, review, credit, proof ref/SHA, and `privateStateExposed=false`; smoke `.epiphany-smoke\checklist-note-20260620-031347` proved latest `bifrost-public-proof-publication-checklist-request` in `bifrost-ledger` and `receipt-directory`. The tick pulse reads the repo-local CultMesh swarm brake and writes `refused-by-swarm-brake` without creating run/adopt/execute receipts when the brake is engaged. It also writes active-turn and last-completed scheduler receipts, refuses live duplicate pulses as `refused-active-turn`, refuses explicit completion-anchored cooldown as `refused-by-cooldown`, clears stale active markers after `--active-timeout-seconds`, and records `physiology.recoveredActiveTurn.recovered=true` when recovery proceeds. `epiphany-work queue-run` reads the repo-local typed overview queue, selects tick-actionable rows for the current repo Body through `awaiting-closure`, delegates to `tick`, refreshes overview after real advancement, and is wrapped by `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run`; `epiphany-swarm run` is the bounded operator mouth over that same queue/tick artery. `epiphany-work serve` wraps the item-scoped tick artery in Self-owned cadence: bounded `--max-iterations` proof mode writes `work-scheduler-serve-<item>.json`, unbounded service mode relies on per-pulse tick receipts, and unbounded zero-second polling is refused. `epiphany-work close` consumes branch-local execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, and seals `work-close-<item>.json` without granting publication, merge, service lifecycle, cross-repo mutation, or private-state exposure; tick now calls that same close gate after execution. `epiphany-work publish --closure-receipt` can consume the closure's Soul/Mind ids, while tick no-ops once closure exists before Bifrost publication authority.
- 2026-06-20: The same repo-swarm note now carries the explicit migration thesis, MVP status board, Epiphany Online cut order, authority matrix, local CultMesh tool availability doctrine, and upstream-main sync doctrine. `tools/epiphany_local_run.ps1 -Mode repo-work-service-plan` and `-Mode repo-work-service-runbook` now write Idunn-owned non-mutating lifecycle receipts/artifacts for the real `epiphany-work queue-run` command; proofs `local-20260620-021415-094-58439baf` and `local-20260620-021415-147-067c36b0` planned/wrote the queue-run command vector with `privateStateExposed=false` and no service launch/install. Use that note when answering "are we headed toward a functional swarm?" The answer is yes, but only if the remaining cuts preserve typed organ ownership: richer model-authored safe families, proof bundles, and a fresh-repo acceptance run. Persona is the mouth, Imagination plans, Self schedules, Hands acts, Soul verifies, Modeling maps, Mind admits, Gjallar sees, Odin discovers, Idunn keeps daemon physiology alive, Bifrost publishes and credits, and Eve/CultUI renders without becoming truth.
- 2026-06-20: The first repo Persona intake mouth is live. `epiphany-work persona-intake` requires a repo-swarm online receipt, records a Persona bubble/speech-audit witness into repo-local CultMesh, creates public discussion and candidate action refs, delegates to `accept`, and seals `work-persona-intake-<item>.json` without Hands, durable-state, publication, service lifecycle, cross-repo, elevation, or private-state authority. Wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-persona-intake -RepoWorkItem <id> -PersonaInput '<request>'` exposes the operator surface. Disposable proof `.epiphany-smoke\persona-intake-20260620-022500` wrote direct item `persona-request` with speech audit `persona-speech-audit-cdcd20a7`, feedback `repo-work-feedback-persona-request`, consensus `repo-work-consensus-persona-request`, and `privateStateExposed=false`; wrapper artifact `local-20260620-022551-566-5576908e` wrote item `persona-wrapper`, speech audit `persona-speech-audit-55f74218`, feedback `repo-work-feedback-persona-wrapper`, consensus `repo-work-consensus-persona-wrapper`, and candidate action `candidate-action://repo-swarm-local/persona-wrapper/persona-speech-audit-55f74218`. The next cut is typed Imagination action-item receipts over allowlisted safe families, not another intake/display surface.
- 2026-06-20: Typed Imagination action-item receipts are live in `epiphany-work derive-plan`. The command now writes `work-action-items-<item>.json` with schema `epiphany.repo_work_imagination_action_items_receipt.v0` before writing `work-plan-<item>.json`; the receipt carries model provenance, safe action family, requested paths, verification asks, stop conditions, escalation reasons, rollback hints, public/candidate refs, `operatorAuthoredShellDetails=false`, and no Hands/durable-state/publication/service/cross-repo authority. The plan derivation cites the action-item receipt, while command text remains deterministic safe-family lowering. Disposable proof `.epiphany-smoke\action-items-20260620-023240` wrote action receipt `repo-work-action-items-action-items-request` with `modelAuthored=true`, `safeActionFamily=repo.markdown_planning_note`, requested path `notes/epiphany-work/action-items-request.md`, plan citation present, and `privateStateExposed=false`. The next cut is richer model-authored safe families or proof-bundle packaging, not another basic action-item schema.
@ -113,7 +113,7 @@ remembers doctrine; the branch remembers the blade.
- 2026-06-20: Local proof-bundle packaging is live. `epiphany-work overview` now embeds `epiphany.repo_work_proof_bundle.v0` with generated time, gate/blocker/next-safe-move, compact TUI rows, expected artifact paths, present/missing artifact status, document schema/status, SHA-256 receipt hashes, and `privateStateExposed=false`. Disposable proof `.epiphany-smoke\tick-close-20260620-025526\08-overview-proof-bundle.json` reported six present artifacts from accept through close with hashes, missing publish/sync rows, `awaiting-publication` / `bifrost-publication-missing`, and no private-state exposure. The next cut is richer model-authored safe families or published/credited proof-bundle depth, not another local proof-bundle wrapper.
- 2026-06-20: Published/credited proof-bundle rows are live. `epiphany-work overview` now adds `publicationRows` to `epiphany.repo_work_proof_bundle.v0`, lifting Bifrost intent/publication/GitHub/ledger/credit/PR fields, Hands commit/PR fields, and upstream-main ancestry fields from publish/sync receipts without granting publication, merge, scheduler, service lifecycle, cross-repo, or private-state authority. Disposable proof `.epiphany-smoke\checklist-note-20260620-031347\12-overview-published-proof.json` ran close -> publish -> sync -> overview after the checklist safe-family proof; overview reported `complete-or-awaiting-new-work`, `upstreamMainSynced=true` from `authority.upstreamMainSynced`, three publication rows, and `privateStateExposed=false`. The next cut is richer public/export packaging outside the local bundle or model-authored closure, not basic Bifrost/GitHub/sync row visibility.
- 2026-06-20: Public proof export is live. `epiphany-work export-proof` calls overview, distills the local `epiphany.repo_work_proof_bundle.v0` into redacted `epiphany.repo_work_public_proof_bundle.v0`, and writes `.epiphany/public/proof-bundles/repo-work-public-proof-<item>.json` by default without raw receipt bodies, local receipt paths, expected paths, worker thought, publication authority, or private Verse exposure. Disposable proof `.epiphany-smoke\checklist-note-20260620-031347\13-export-proof.json` reported eight artifact rows, three publication rows, zero artifact path fields, `rawReceiptBodies=false`, and `private=false`. The next cut is Bifrost/public Verse transport for exported proof, richer model-authored safe-family breadth, or richer model-authored closure; not another local public-proof export wrapper.
- 2026-06-20: Public proof local Verse transport is live. `epiphany-work export-proof --local-verse-store <repo>\.epiphany\local-verse.ccmp` now mirrors each redacted export as `epiphany.cultmesh.repo_work_public_proof.v0` under `gamecult-local/repo-work-public-proof/latest`, with compact `PUBLIC-PROOF` TUI rows, artifact/publication row counts, public proof artifact ref, SHA-256, upstream-main sync truth, and `privateStateExposed=false`. `epiphany-verse-query swarm-overview` reads those rows as `repoWorkPublicProofRows` / `repoWorkPublicProofTuiRows`, exposes `latestRepoWorkPublicProof`, and adds non-mutating/non-elevated `repo-work-public-proof` action rows owned by Gjallar sight while Bifrost still owns publication/credit consequence. Disposable proofs `.epiphany-smoke\checklist-note-20260620-031347\14-export-proof-verse.json` and `15-swarm-overview-public-proof.json` reported latest `repo-work-public-proof-checklist-request`, one public proof row, one action row, SHA-256 `e781e09c2ba340c8818d3ef95e54085ccd0c92c6a3b5f73cc4878fb224e49dff`, `mutates=false`, `elevated=false`, and `private=false`. The next cut is Bifrost/public publication transport beyond local Verse, richer safe-family breadth, or richer model-authored closure.
- 2026-06-20: Public proof local Verse transport and Bifrost publication closure are live. `epiphany-work export-proof --local-verse-store <repo>\.epiphany\local-verse.ccmp` mirrors each redacted export as `epiphany.cultmesh.repo_work_public_proof.v0` under `gamecult-local/repo-work-public-proof/latest`, with compact `PUBLIC-PROOF` TUI rows, artifact/publication row counts, public proof artifact ref, SHA-256, upstream-main sync truth, and `privateStateExposed=false`. `epiphany-verse-query swarm-overview` reads those rows as `repoWorkPublicProofRows` / `repoWorkPublicProofTuiRows`, exposes `latestRepoWorkPublicProof`, and adds non-mutating/non-elevated `repo-work-public-proof` action rows owned by Gjallar sight while Bifrost owns publication/credit consequence. `epiphany-verse-query bifrost-public-proof` now writes `gamecult.bifrost.public_proof_publication_receipt.v0` from an existing redacted proof row with public Verse target, public room, ledger, review, credit, proof ref/SHA, and private-state refusal; `bifrost-ledger` and `receipt-directory` read it back. Disposable proofs `.epiphany-smoke\checklist-note-20260620-031347\14-export-proof-verse.json`, `15-swarm-overview-public-proof.json`, `21-bifrost-public-proof-publication.json`, `22-bifrost-ledger-after-public-proof-publication.json`, and `23-receipt-directory-after-public-proof-publication.json` reported latest `repo-work-public-proof-checklist-request`, publication receipt `bifrost-public-proof-publication-checklist-request`, SHA-256 `e781e09c2ba340c8818d3ef95e54085ccd0c92c6a3b5f73cc4878fb224e49dff`, `publicProofPublicationCount=1`, and `private=false`. The next cut is richer safe-family breadth, richer model-authored closure, or wrapper/UI polish around this mouth.
- 2026-06-20: `notes/epiphany-repo-swarm-mvp-contract.md` now has the explicit functional-swarm answer. The current seventeen front doors are real proof surfaces, not decorative wrapper smoke, but Epiphany is not fully online until the typed artery can run as a living repo organism: richer model-authored safe-family breadth, richer Soul/Modeling closure, Bifrost public-proof publication beyond local Verse, Idunn-owned queue-run service lifecycle under explicit operator authority, and a fresh-repo acceptance run without supervisor contamination. Use that section when answering whether Epiphany is headed toward a functional swarm.
- 2026-06-20: Gjallar/swarm-overview now exposes repo-work overview history as first-class compact sight, Persona's public Eve surface lowers the same queue for peer-readable collaboration, and Self has a first runnable queue surface over it. `SwarmOverviewOutput` and `SwarmTriageOutput` include `repoWorkOverviewCount`, `repoWorkOverviewRows`, `repoWorkOverviewTuiRows`, `latestRepoWorkOverview`, `latestRepoWorkGate`, `latestRepoWorkBlocker`, and `latestRepoWorkNextSafeMove`; the shared `swarmActionRows` queue gets priority 35 `repo-work-overview` rows owned by Gjallar, hosted body `repo-work`, authority gate `repo.work.overview`, effect class `repo-work-readback`, no mutation, no elevation, proof-bundle ref, and private-state seal. `eve-surfaces`, direct `connect-eve`, and the globally invokable Persona `eve-connect` daemon tool readback expose public `REPO-WORK-PEER` rows with item, gate, blocker, next safe move, branch, publication, sync, and `private=false`. `epiphany-work queue-run` reads the same typed queue, selects current-repo rows at `ready-to-run`, `ready-to-adopt`, `ready-to-execute`, or `awaiting-closure`, delegates to `tick`, refreshes overview after real advancement, and wrapper `repo-work-queue-run` exposes the operator surface. Disposable proofs `.epiphany-smoke\gjallar-repo-work-queue-20260620-012027`, `.epiphany-smoke\eve-repo-work-queue-20260620-013322`, `.epiphany-smoke\queue-run-20260620-014314`, and wrapper artifact `local-20260620-014627-174-aada0241` prove two-item queue sight, Eve lowering, direct queue-run advancement, and wrapper dry-run without publication, merge, service lifecycle mutation, elevation, cross-repo mutation, or private-state exposure. The next cut is richer Persona-to-Imagination plan derivation, not another queue display surface.
- `service-execution-runbook` makes that next cut repeatable: it generates the exact elevated wrapper command sequence without mutating the service manager, continues after per-step failure to preserve more receipts, runs `service-execution-audit` in `finally`, exits nonzero if any step failed, and seals a typed runbook lifecycle receipt. Run the generated artifact only with explicit operator authority.

Binary file not shown.

View file

@ -88,7 +88,7 @@ active_subgoals:
- Keep the landed Phase 6 coordinator, limited safe-boundary CRRC automation, and pre-compaction checkpoint intervention ready for the next bridge-equipped dogfood run.
- Preserve the Ghostlight-derived heartbeat initiative seam: every lane, including coordinator/Self and Persona, has a organ-state record and competes for heartbeat slots through readiness/reaction timing; initiative heat can raise or cool global, group, arena, role, and agent tempo through typed heartbeat policy; active thinking freezes initiative until completion, so heat never queues a lane already mid-turn; idle winners ruminate instead of inventing project work, and sleep windows distill the accumulated thought pressure into reviewed self-memory or doctrine.
- Use `notes/epiphany-swarm-readiness-plan.md` as the live-fire direction gate. The local run path is a compass, not launch clearance: before unattended swarm operation, Epiphany needs typed pause/brake enforcement, one initiative scheduler, completion-gated cooldown, stale active-turn recovery receipts, parent-side Persona speech eligibility, memory lifecycle operations, and CultNet-first operator snapshots/intents/receipts. The local Verse brake document exists, `epiphany-verse-query swarm-brake` can engage/release it, `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when the brake is engaged while leaving `status` readable, `epiphany-mvp-coordinator` checks the local Verse brake before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when given `--local-verse-store`. Daemon liveness is now a typed local Verse authority: `epiphany-verse-query daemon-status` writes one daemon status without repainting the table, local Verse seeding preserves existing daemon statuses and swarm brakes, `invoke-tool` refuses when the host daemon is not ready or lacks `submitTypedToolIntent`, and both daemon tool invocation and lifecycle poke fail closed under an engaged matching brake. `epiphany-daemon-supervisor policy` writes durable per-daemon restart policy with command/args/cwd/cooldown/backoff/attempt state plus reconcile cadence and stale-heartbeat threshold; `epiphany-daemon-supervisor reconcile` loads that policy when no override command is supplied, refuses under a matching lifecycle brake, refuses during cooldown/backoff, writes daemon poke intent/receipt, updates daemon status, and updates policy attempt state; `epiphany-daemon-supervisor tick` is an explicit scheduler pulse that scans durable policies, records ready/noop pulses, skips before the configured reconcile interval, marks stale heartbeat status degraded, routes restarts through the same brake/cooldown/poke receipt path, and writes a latest `epiphany.cultmesh.daemon_scheduler_receipt.v0`; `epiphany-daemon-supervisor serve` runs that same pulse on a configurable cadence with bounded `--max-iterations` proof mode or unbounded service mode. `epiphany-daemon-supervisor service-plan`/`install-service` now writes a planned `epiphany.cultmesh.daemon_service_lifecycle_receipt.v0` for the `serve` command, while `service-launch`/`start-service` spawns that `serve` loop through the current executable or `--service-command`, can `--wait-child` for bounded proof, and records command/args/cwd, scheduler id, daemon selector, pid/exit/status, artifact ref, and private-state guard. `service-runbook`, `windows-service-install`/`service-install-plan`, `windows-service-status`, `windows-service-reconcile`, `windows-service-execution-readiness`, and `windows-service-start`/`stop` now record service lifecycle receipts through the same local Verse; the read-only status path has been proved against the real Windows `EventLog` service with receipt `daemon-service-lifecycle-receipt-windows-eventlog-proof-windows-service-status`, status `running`, exit code `0`, and `privateStateExposed=false`; the read-only service-policy reconciliation path has been proved for missing service, real-service drift against `EventLog`, lifecycle-brake refusal, and wrapper/local-Verse receipt `daemon-service-lifecycle-receipt-windows-eventlog-reconcile-proof-windows-service-reconcile`; execution readiness has been proved as a non-mutating `not-elevated` receipt through direct and wrapper paths; start/stop now produce non-mutating `start-planned`/`stop-planned` receipts unless `--execute-control`/`--execute-service-control` is passed, and wrapper `service-start-plan`/`service-stop-plan` proves those receipts against `EventLog`; explicit install/control execution now refuses as `execution-refused-not-elevated` with `executed=false` when the shell lacks Windows administrator authority, and wrapper `service-install-execute`, `service-start-execute`, and `service-stop-execute` prove those refusal receipts without mutation. Service lifecycle actions check the local Verse swarm brake before process launch, artifact writes, service-manager queries, service-policy reconciliation, execution-readiness checks, control planning, elevation-gated execution, or start/stop execution. The local wrapper builds/checks this binary.
- Use `notes/epiphany-repo-swarm-mvp-contract.md` as the authority correction and migration plan for repo-swarm autonomy. Autonomous branch-local work inside an Epiphany-owned repo Body is in scope and desired; the safety boundary is typed authority, branch containment, interruptibility, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Seventeen native repo-swarm front doors are live and documented there: `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 --from-plan`, `epiphany-work execute --from-plan`, `epiphany-work close`, `epiphany-work overview`, `epiphany-work export-proof`, `epiphany-work tick`, `epiphany-work queue-run`, `epiphany-work publish`, and `epiphany-work sync`. Fresh-repo smokes proved the chain with `privateStateExposed=false`, including deterministic Persona/Bifrost pressure-to-plan derivation (`append-worklog`, `planning-note`, `checklist-note`, and `section-note`) into `EPIPHANY_WORKLOG.md`, contained markdown planning notes, contained markdown checklists, or a marker-bounded managed markdown section, typed Imagination action-item receipts (`epiphany.repo_work_imagination_action_items_receipt.v0`) that carry model provenance, safe family, requested paths, verification asks, stop conditions, escalation reasons, and `operatorAuthoredShellDetails=false` before deterministic safe-family command lowering, plan-backed branch-local commit creation, a speech-audited repo Persona intake mouth that records public discussion refs plus candidate action refs before delegating to `accept`, a bounded `epiphany-swarm run` mouth that delegates queue selection to `epiphany-work queue-run` and item actuation to `epiphany-work tick`, a Self-owned tick pulse that advances `run-from-plan -> adopt-from-plan -> execute-from-plan -> close-from-execute` then no-ops before publication gates, local CultMesh swarm-brake refusal that writes `refused-by-swarm-brake` without creating a run/adopt/execute/close receipt, active-turn refusal through `work-tick-active-<item>.json`, explicit completion-anchored cooldown refusal through `work-tick-last-<item>.json`, stale active-turn recovery that records `physiology.recoveredActiveTurn.recovered=true`, Self-owned `epiphany-work serve` cadence that writes `work-scheduler-serve-<item>.json`, bounded serve proof `advanced:run-from-plan -> refused-by-cooldown:none` without adoption, unbounded zero-interval refusal, deterministic `epiphany-work close` proof that consumes execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, scheduler proof `.epiphany-smoke\tick-close-20260620-025526` that `epiphany-swarm run --max-iterations 4` reached `awaiting-publication` through `close-from-execute` with Soul passed and Mind committed, local `epiphany-work overview` proof bundle `epiphany.repo_work_proof_bundle.v0` that reports pre-plan `awaiting-plan`/`plan-receipt-missing` and post-close `awaiting-publication`/`bifrost-publication-missing` with branch, commit, changed paths, Soul verdict, compact TUI rows, expected receipt artifact paths, present/missing artifact statuses, document schemas/statuses, SHA-256 receipt hashes, publication rows for Bifrost/GitHub/credit/PR/upstream-main sync, and private seals, public `epiphany-work export-proof` packaging that writes redacted `epiphany.repo_work_public_proof_bundle.v0` artifacts and mirrors `epiphany.cultmesh.repo_work_public_proof.v0` rows into local Verse for Gjallar/Odin sight without local receipt paths, raw receipt bodies, worker thought, or private Verse exposure, typed local Verse projection as `epiphany.cultmesh.repo_work_overview.v0` with latest-key/event-history readback through Gjallar plus peer-readable Persona Eve lowering, `epiphany-work queue-run` selection over tick-actionable queue rows through `awaiting-closure` with wrapper `repo-work-queue-run`, Idunn-owned non-mutating `repo-work-service-plan`/`repo-work-service-runbook` receipts for the same queue-run command, `publish --closure-receipt` consumption of the close receipt's Soul/Mind refs, post-publication tick `noop:none`, and upstream-main ancestry proof after explicit merge receipt. Remaining MVP organs are deeper model-authored safe-family breadth, Bifrost/public publication transport beyond local Verse, and richer model-authored closure; the scheduler may advance only one safe receipt-backed branch-local step per pulse and must not publish, merge, mutate services, cross repo boundaries, expose private state, or impersonate Idunn.
- Use `notes/epiphany-repo-swarm-mvp-contract.md` as the authority correction and migration plan for repo-swarm autonomy. Autonomous branch-local work inside an Epiphany-owned repo Body is in scope and desired; the safety boundary is typed authority, branch containment, interruptibility, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Seventeen native repo-swarm front doors are live and documented there: `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 --from-plan`, `epiphany-work execute --from-plan`, `epiphany-work close`, `epiphany-work overview`, `epiphany-work export-proof`, `epiphany-work tick`, `epiphany-work queue-run`, `epiphany-work publish`, and `epiphany-work sync`. Fresh-repo smokes proved the chain with `privateStateExposed=false`, including deterministic Persona/Bifrost pressure-to-plan derivation (`append-worklog`, `planning-note`, `checklist-note`, and `section-note`) into `EPIPHANY_WORKLOG.md`, contained markdown planning notes, contained markdown checklists, or a marker-bounded managed markdown section, typed Imagination action-item receipts (`epiphany.repo_work_imagination_action_items_receipt.v0`) that carry model provenance, safe family, requested paths, verification asks, stop conditions, escalation reasons, and `operatorAuthoredShellDetails=false` before deterministic safe-family command lowering, plan-backed branch-local commit creation, a speech-audited repo Persona intake mouth that records public discussion refs plus candidate action refs before delegating to `accept`, a bounded `epiphany-swarm run` mouth that delegates queue selection to `epiphany-work queue-run` and item actuation to `epiphany-work tick`, a Self-owned tick pulse that advances `run-from-plan -> adopt-from-plan -> execute-from-plan -> close-from-execute` then no-ops before publication gates, local CultMesh swarm-brake refusal that writes `refused-by-swarm-brake` without creating a run/adopt/execute/close receipt, active-turn refusal through `work-tick-active-<item>.json`, explicit completion-anchored cooldown refusal through `work-tick-last-<item>.json`, stale active-turn recovery that records `physiology.recoveredActiveTurn.recovered=true`, Self-owned `epiphany-work serve` cadence that writes `work-scheduler-serve-<item>.json`, bounded serve proof `advanced:run-from-plan -> refused-by-cooldown:none` without adoption, unbounded zero-interval refusal, deterministic `epiphany-work close` proof that consumes execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, scheduler proof `.epiphany-smoke\tick-close-20260620-025526` that `epiphany-swarm run --max-iterations 4` reached `awaiting-publication` through `close-from-execute` with Soul passed and Mind committed, local `epiphany-work overview` proof bundle `epiphany.repo_work_proof_bundle.v0` that reports pre-plan `awaiting-plan`/`plan-receipt-missing` and post-close `awaiting-publication`/`bifrost-publication-missing` with branch, commit, changed paths, Soul verdict, compact TUI rows, expected receipt artifact paths, present/missing artifact statuses, document schemas/statuses, SHA-256 receipt hashes, publication rows for Bifrost/GitHub/credit/PR/upstream-main sync, and private seals, public `epiphany-work export-proof` packaging that writes redacted `epiphany.repo_work_public_proof_bundle.v0` artifacts and mirrors `epiphany.cultmesh.repo_work_public_proof.v0` rows into local Verse for Gjallar/Odin sight without local receipt paths, raw receipt bodies, worker thought, or private Verse exposure, Bifrost public-proof publication receipts that bind redacted proof refs/SHA to global public Verse room, ledger, review, and credit readback, typed local Verse projection as `epiphany.cultmesh.repo_work_overview.v0` with latest-key/event-history readback through Gjallar plus peer-readable Persona Eve lowering, `epiphany-work queue-run` selection over tick-actionable queue rows through `awaiting-closure` with wrapper `repo-work-queue-run`, Idunn-owned non-mutating `repo-work-service-plan`/`repo-work-service-runbook` receipts for the same queue-run command, `publish --closure-receipt` consumption of the close receipt's Soul/Mind refs, post-publication tick `noop:none`, and upstream-main ancestry proof after explicit merge receipt. Remaining MVP organs are deeper model-authored safe-family breadth, richer model-authored closure, and wrapper/UI polish around public-proof publication; the scheduler may advance only one safe receipt-backed branch-local step per pulse and must not publish, merge, mutate services, cross repo boundaries, expose private state, or impersonate Idunn.
- Gjallar/swarm-overview now projects typed repo-work overview history into the compact global sight report, Persona's public Eve surface lowers the same queue for peers, and Self has a first runnable queue surface over it. `epiphany-verse-query gjallar` reads all `epiphany.cultmesh.repo_work_overview.v0` event documents from local Verse, excludes the `latest` mirror, preserves latest scalar fields, emits multi-item `repoWorkOverviewRows`/TUI rows, and publishes bounded priority 35-39 non-mutating `repo-work-overview` action rows with `owner=Gjallar`, `hostedBody=repo-work`, `authorityGate=repo.work.overview`, `mutatesState=false`, `requiresElevatedAuthority=false`, proof-bundle refs, current gate/blocker/next-safe-move, and `privateStateExposed=false`. `epiphany-verse-query eve-surfaces`, `connect-eve`, and globally invokable Persona `eve-connect` tool readbacks expose compact `REPO-WORK-PEER` rows with item, gate, blocker, next safe move, branch, publication/sync state, and private seal for the public Persona surface only. `epiphany-work queue-run` selects current-repo rows at `ready-to-run`, `ready-to-adopt`, or `ready-to-execute`, delegates action to `tick`, refreshes overview after real advancement, and writes `epiphany.repo_work_queue_run_receipt.v0`; wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run` exposes the same surface. Disposable proofs `.epiphany-smoke\gjallar-repo-work-queue-20260620-012027`, `.epiphany-smoke\eve-repo-work-queue-20260620-013322`, `.epiphany-smoke\queue-run-20260620-014314`, and wrapper artifact `local-20260620-014627-174-aada0241` showed two-item queues through sight, public Eve, direct queue-run, and wrapper dry-run without publication, merge, service lifecycle mutation, elevation, cross-repo mutation, or private-state exposure.
- Agent memory lifecycle now has a first typed v0 operation surface in `epiphany-core::agent_memory`: `AgentMemoryLifecycleOperation` can revise, retire, crystallize, prune, and merge bounded memory records after role/agent review, and `epiphany-agent-memory-store review-lifecycle|apply-lifecycle` exposes the path at the operator edge. This closes the first explicit lifecycle-operation slice from the swarm-readiness gate; it does not yet make sleep silently mutate identity or project truth.
- Persona public speech now has a parent-side eligibility receipt at the Discord/Aquarium mouth edge. `epiphany.persona_speech_audit.v0` records action kind, content fingerprint, opening/topic keys, recent-window counts, repeated opening/topic counts, channel saturation, and allow/block reasons. `epiphany-persona-discord post` blocks repeated public openings before token/webhook work; draft and bubble still emit audit receipts for operator inspection. The compatibility JSON artifact remains for display, but the durable witness is now `epiphany.cultmesh.persona_speech_audit.v0` in CultMesh with latest-key projection through local Verse context. Local MVP Persona bubbles now write that durable witness to `.epiphany-run/cultmesh/local-verse.ccmp`, not a separate mouth-side store. This is posting-edge policy, not a Persona prompt wish.
@ -634,4 +634,4 @@ current_status:
- `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now emits an explicit Idunn preflight summary before the operator elevation boundary. Its JSON and one-line summary report `preflightStatus`, child artifact present/hash-verified/mismatch/missing counts, aggregate service execution failed/missing check counts, child preflight rows with expected/actual SHA-256s, and private-state exposure. Live proof `local-20260619-025627-410-9724e2f6` generated the non-mutating parent artifact with `preflightStatus=ready-for-elevated-operator`, two child runbooks present, two hashes verified, zero mismatches, zero missing artifacts, eleven failed sealed service checks, zero missing checks, explicit aftercare audits, and `privateStateExposed=false`. The remaining scar is still explicit elevated operator execution followed by complete Idunn audits, not missing parent/child artifact readiness.
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
next_action: Continue repo-swarm MVP work from the documented Epiphany Online cut order in `notes/epiphany-repo-swarm-mvp-contract.md`. Typed Gjallar repo-work history/queue sight, peer-readable Persona Eve lowering, Self-owned `epiphany-work queue-run`, bounded `epiphany-swarm run`, execute-to-close scheduler handoff through `close-from-execute`, deterministic `derive-plan` families `append-worklog`, `planning-note`, `checklist-note`, and `section-note` / `repo.markdown_managed_section`, typed Imagination action-item receipts over allowlisted safe families, hash-backed local proof bundles with Bifrost/GitHub/credit/PR/upstream-main publication rows, redacted `epiphany-work export-proof` public bundles plus local Verse `epiphany.cultmesh.repo_work_public_proof.v0` Gjallar readback, Idunn-hosted non-mutating queue-run lifecycle plan/runbook receipts, and the speech-audited `epiphany-work persona-intake` mouth plus wrapper `repo-persona-intake` are live with `privateStateExposed=false`; the contract note now explicitly answers that Epiphany is headed toward a functional repo swarm but is not fully online until the typed artery runs as a living repo organism. The next cut is Bifrost/public publication transport beyond local Verse, still deeper model-authored safe-family breadth, or richer model-authored closure. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start execution still requires explicit elevated operator authority.
next_action: Continue repo-swarm MVP work from the documented Epiphany Online cut order in `notes/epiphany-repo-swarm-mvp-contract.md`. Typed Gjallar repo-work history/queue sight, peer-readable Persona Eve lowering, Self-owned `epiphany-work queue-run`, bounded `epiphany-swarm run`, execute-to-close scheduler handoff through `close-from-execute`, deterministic `derive-plan` families `append-worklog`, `planning-note`, `checklist-note`, and `section-note` / `repo.markdown_managed_section`, typed Imagination action-item receipts over allowlisted safe families, hash-backed local proof bundles with Bifrost/GitHub/credit/PR/upstream-main publication rows, redacted `epiphany-work export-proof` public bundles plus local Verse `epiphany.cultmesh.repo_work_public_proof.v0` Gjallar readback, Bifrost-owned `gamecult.bifrost.public_proof_publication_receipt.v0` closure for redacted public proofs, Idunn-hosted non-mutating queue-run lifecycle plan/runbook receipts, and the speech-audited `epiphany-work persona-intake` mouth plus wrapper `repo-persona-intake` are live with `privateStateExposed=false`; the contract note now explicitly answers that Epiphany is headed toward a functional repo swarm but is not fully online until the typed artery runs as a living repo organism. The next cut is still deeper model-authored safe-family breadth, richer model-authored closure, or wrapper/UI polish around the Bifrost public-proof publication mouth. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start execution still requires explicit elevated operator authority.