Project repo work map into local Verse
This commit is contained in:
parent
dc69c4d65e
commit
67733f1337
9 changed files with 547 additions and 13 deletions
|
|
@ -369,6 +369,26 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
&["mind", "repoMapEntry", "privateStateExposed"],
|
||||
false,
|
||||
)?;
|
||||
require_bool(
|
||||
&close,
|
||||
&["mind", "repoMapLocalVerseProjection", "projected"],
|
||||
true,
|
||||
)?;
|
||||
require_eq(
|
||||
&close,
|
||||
&["mind", "repoMapLocalVerseProjection", "documentType"],
|
||||
"epiphany.cultmesh.repo_work_map_entry",
|
||||
)?;
|
||||
require_eq(
|
||||
&close,
|
||||
&["mind", "repoMapLocalVerseProjection", "latestKey"],
|
||||
"gamecult-local/repo-work-map/latest",
|
||||
)?;
|
||||
require_bool(
|
||||
&close,
|
||||
&["mind", "repoMapLocalVerseProjection", "privateStateExposed"],
|
||||
false,
|
||||
)?;
|
||||
let map_store = read_repo_work_map_store(&repo_map_path)?;
|
||||
if map_store.schema_version != "epiphany.repo_work_map_store.v0" {
|
||||
return Err(anyhow!(
|
||||
|
|
@ -436,6 +456,53 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
map_entry.private_state_exposed
|
||||
));
|
||||
}
|
||||
let gjallar = cargo_json(
|
||||
&manifest,
|
||||
"epiphany-verse-query",
|
||||
&[
|
||||
"gjallar",
|
||||
"--store",
|
||||
path_str(&local_verse)?,
|
||||
"--runtime-id",
|
||||
"repo-close-mind-adoption-guard-smoke",
|
||||
],
|
||||
&root,
|
||||
)?;
|
||||
require_eq(
|
||||
&gjallar,
|
||||
&["latestRepoWorkMapEntry"],
|
||||
"repo-work-map-repo-close-mind-adoption-guard",
|
||||
)?;
|
||||
require_bool(&gjallar, &["privateStateExposed"], false)?;
|
||||
let map_rows = value_at_path(&gjallar, &["repoWorkMapRows"])
|
||||
.and_then(Value::as_array)
|
||||
.ok_or_else(|| anyhow!("Gjallar output had no repoWorkMapRows array"))?;
|
||||
let gjallar_map_row = map_rows
|
||||
.iter()
|
||||
.find(|row| row.get("item").and_then(Value::as_str) == Some(item))
|
||||
.ok_or_else(|| anyhow!("Gjallar output had no repo work map row for {item}"))?;
|
||||
require_eq_value(
|
||||
gjallar_map_row,
|
||||
&["safeActionFamily"],
|
||||
"repo.markdown_planning_note",
|
||||
)?;
|
||||
require_eq_value(
|
||||
gjallar_map_row,
|
||||
&["mindStateCommitReceiptId"],
|
||||
&map_entry.mind_state_commit_receipt_id,
|
||||
)?;
|
||||
require_bool_value(gjallar_map_row, &["privateStateExposed"], false)?;
|
||||
let map_tui_rows = value_at_path(&gjallar, &["repoWorkMapTuiRows"])
|
||||
.and_then(Value::as_array)
|
||||
.ok_or_else(|| anyhow!("Gjallar output had no repoWorkMapTuiRows array"))?;
|
||||
if !map_tui_rows.iter().any(|row| {
|
||||
row.as_str()
|
||||
.is_some_and(|row| row.contains("REPO-WORK-MAP") && row.contains(item))
|
||||
}) {
|
||||
return Err(anyhow!(
|
||||
"Gjallar TUI rows did not expose compact repo map sight"
|
||||
));
|
||||
}
|
||||
|
||||
let summary = json!({
|
||||
"schemaVersion": "epiphany.repo_close_mind_adoption_guard_smoke.v0",
|
||||
|
|
@ -454,6 +521,8 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
"repoMapStorePath": repo_map_path,
|
||||
"repoMapEntrySchema": map_entry.schema_version,
|
||||
"repoMapDurableStateAdmitted": map_entry.durable_state_admitted,
|
||||
"repoMapLocalVerseProjected": true,
|
||||
"gjallarLatestRepoWorkMapEntry": gjallar["latestRepoWorkMapEntry"],
|
||||
"publicationAuthorized": false,
|
||||
"privateStateExposed": false
|
||||
});
|
||||
|
|
@ -591,6 +660,38 @@ fn require_bool(value: &Value, path: &[&str], expected: bool) -> Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
fn require_eq_value(value: &Value, path: &[&str], expected: &str) -> Result<()> {
|
||||
let actual = value_at_path(value, path)
|
||||
.and_then(Value::as_str)
|
||||
.ok_or_else(|| anyhow!("missing string at {}", path.join(".")))?;
|
||||
if actual == expected {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(anyhow!(
|
||||
"expected {} to be {:?}, got {:?}",
|
||||
path.join("."),
|
||||
expected,
|
||||
actual
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn require_bool_value(value: &Value, path: &[&str], expected: bool) -> Result<()> {
|
||||
let actual = value_at_path(value, path)
|
||||
.and_then(Value::as_bool)
|
||||
.ok_or_else(|| anyhow!("missing bool at {}", path.join(".")))?;
|
||||
if actual == expected {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(anyhow!(
|
||||
"expected {} to be {}, got {}",
|
||||
path.join("."),
|
||||
expected,
|
||||
actual
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn require_assertion(
|
||||
value: &Value,
|
||||
assertions_path: &[&str],
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ use epiphany_core::EpiphanyCultMeshDaemonToolCapabilityEntry;
|
|||
use epiphany_core::EpiphanyCultMeshEveSurfaceStateEntry;
|
||||
use epiphany_core::EpiphanyCultMeshImaginationConsensusReceiptEntry;
|
||||
use epiphany_core::EpiphanyCultMeshOdinAdvertisementEntry;
|
||||
use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry;
|
||||
use epiphany_core::EpiphanyCultMeshRepoWorkOverviewEntry;
|
||||
use epiphany_core::EpiphanyCultMeshRepoWorkPublicProofEntry;
|
||||
use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry;
|
||||
|
|
@ -51,6 +52,7 @@ use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy_directory;
|
|||
use epiphany_core::load_epiphany_cultmesh_daemon_service_lifecycle_receipts;
|
||||
use epiphany_core::load_epiphany_cultmesh_daemon_tool_directory;
|
||||
use epiphany_core::load_epiphany_cultmesh_eve_surface_directory;
|
||||
use epiphany_core::load_epiphany_cultmesh_repo_work_map_entries;
|
||||
use epiphany_core::load_epiphany_cultmesh_repo_work_overviews;
|
||||
use epiphany_core::load_epiphany_cultmesh_repo_work_public_proofs;
|
||||
use epiphany_core::load_epiphany_cultmesh_swarm_brake;
|
||||
|
|
@ -66,6 +68,7 @@ use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_receipt;
|
|||
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_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;
|
||||
use epiphany_core::open_epiphany_cultmesh_node;
|
||||
|
|
@ -758,6 +761,7 @@ fn run_cli() -> Result<()> {
|
|||
"receipts": "epiphany-verse-query receipt-directory",
|
||||
"restartPolicies": "epiphany-verse-query restart-policy-directory",
|
||||
"repoWorkOverview": "epiphany-work overview --workspace <repo> --item <item>",
|
||||
"repoWorkMap": "epiphany-verse-query gjallar",
|
||||
"pokeNonReady": "epiphany-verse-query poke-down-daemons",
|
||||
"gjallar": "epiphany-verse-query gjallar",
|
||||
"wrapperOverview": WRAPPER_OVERVIEW_COMMAND,
|
||||
|
|
@ -4063,11 +4067,14 @@ struct SwarmOverviewReport {
|
|||
service_execution_missing_check_count: usize,
|
||||
service_execution_failed_check_rows: Vec<EpiphanyServiceExecutionAuditCheck>,
|
||||
service_execution_failed_check_tui_rows: Vec<String>,
|
||||
repo_work_map_rows: Vec<RepoWorkMapRow>,
|
||||
repo_work_map_tui_rows: Vec<String>,
|
||||
repo_work_overview_rows: Vec<RepoWorkOverviewRow>,
|
||||
repo_work_overview_tui_rows: Vec<String>,
|
||||
repo_work_public_proof_rows: Vec<RepoWorkPublicProofRow>,
|
||||
repo_work_public_proof_tui_rows: Vec<String>,
|
||||
latest_repo_work_overview_id: Option<String>,
|
||||
latest_repo_work_map_entry: Option<String>,
|
||||
latest_repo_work_gate: Option<String>,
|
||||
latest_repo_work_blocker: Option<String>,
|
||||
latest_repo_work_next_safe_move: Option<String>,
|
||||
|
|
@ -4099,6 +4106,26 @@ struct RepoWorkOverviewRow {
|
|||
private_state_exposed: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct RepoWorkMapRow {
|
||||
map_entry_id: String,
|
||||
workspace: String,
|
||||
item: String,
|
||||
branch: String,
|
||||
changed_path_count: usize,
|
||||
commit_sha: String,
|
||||
safe_action_family: String,
|
||||
modeling_summary: String,
|
||||
soul_verdict_receipt_id: String,
|
||||
mind_gateway_review_id: String,
|
||||
mind_state_commit_receipt_id: String,
|
||||
publication_gate: String,
|
||||
durable_state_admitted: bool,
|
||||
source_store_path: String,
|
||||
private_state_exposed: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct RepoWorkPublicProofRow {
|
||||
|
|
@ -4201,6 +4228,9 @@ struct SwarmOverviewOutput {
|
|||
service_execution_missing_check_count: usize,
|
||||
service_execution_failed_check_rows: Vec<EpiphanyServiceExecutionAuditCheck>,
|
||||
service_execution_failed_check_tui_rows: Vec<String>,
|
||||
repo_work_map_count: usize,
|
||||
repo_work_map_rows: Vec<RepoWorkMapRow>,
|
||||
repo_work_map_tui_rows: Vec<String>,
|
||||
repo_work_overview_count: usize,
|
||||
repo_work_overview_rows: Vec<RepoWorkOverviewRow>,
|
||||
repo_work_overview_tui_rows: Vec<String>,
|
||||
|
|
@ -4208,6 +4238,7 @@ struct SwarmOverviewOutput {
|
|||
repo_work_public_proof_rows: Vec<RepoWorkPublicProofRow>,
|
||||
repo_work_public_proof_tui_rows: Vec<String>,
|
||||
latest_repo_work_overview: Option<String>,
|
||||
latest_repo_work_map_entry: Option<String>,
|
||||
latest_repo_work_gate: Option<String>,
|
||||
latest_repo_work_blocker: Option<String>,
|
||||
latest_repo_work_next_safe_move: Option<String>,
|
||||
|
|
@ -4272,6 +4303,9 @@ impl SwarmOverviewOutput {
|
|||
service_execution_missing_check_count: report.service_execution_missing_check_count,
|
||||
service_execution_failed_check_rows: report.service_execution_failed_check_rows,
|
||||
service_execution_failed_check_tui_rows: report.service_execution_failed_check_tui_rows,
|
||||
repo_work_map_count: report.repo_work_map_rows.len(),
|
||||
repo_work_map_rows: report.repo_work_map_rows,
|
||||
repo_work_map_tui_rows: report.repo_work_map_tui_rows,
|
||||
repo_work_overview_count: report.repo_work_overview_rows.len(),
|
||||
repo_work_overview_rows: report.repo_work_overview_rows,
|
||||
repo_work_overview_tui_rows: report.repo_work_overview_tui_rows,
|
||||
|
|
@ -4279,6 +4313,7 @@ impl SwarmOverviewOutput {
|
|||
repo_work_public_proof_rows: report.repo_work_public_proof_rows,
|
||||
repo_work_public_proof_tui_rows: report.repo_work_public_proof_tui_rows,
|
||||
latest_repo_work_overview: report.latest_repo_work_overview_id,
|
||||
latest_repo_work_map_entry: report.latest_repo_work_map_entry,
|
||||
latest_repo_work_gate: report.latest_repo_work_gate,
|
||||
latest_repo_work_blocker: report.latest_repo_work_blocker,
|
||||
latest_repo_work_next_safe_move: report.latest_repo_work_next_safe_move,
|
||||
|
|
@ -4335,6 +4370,9 @@ struct SwarmTriageOutput {
|
|||
service_execution_missing_check_count: usize,
|
||||
service_execution_failed_check_rows: Vec<EpiphanyServiceExecutionAuditCheck>,
|
||||
service_execution_failed_check_tui_rows: Vec<String>,
|
||||
repo_work_map_count: usize,
|
||||
repo_work_map_rows: Vec<RepoWorkMapRow>,
|
||||
repo_work_map_tui_rows: Vec<String>,
|
||||
repo_work_overview_count: usize,
|
||||
repo_work_overview_rows: Vec<RepoWorkOverviewRow>,
|
||||
repo_work_overview_tui_rows: Vec<String>,
|
||||
|
|
@ -4342,6 +4380,7 @@ struct SwarmTriageOutput {
|
|||
repo_work_public_proof_rows: Vec<RepoWorkPublicProofRow>,
|
||||
repo_work_public_proof_tui_rows: Vec<String>,
|
||||
latest_repo_work_overview: Option<String>,
|
||||
latest_repo_work_map_entry: Option<String>,
|
||||
latest_repo_work_gate: Option<String>,
|
||||
latest_repo_work_blocker: Option<String>,
|
||||
latest_repo_work_next_safe_move: Option<String>,
|
||||
|
|
@ -4401,6 +4440,9 @@ impl SwarmTriageOutput {
|
|||
service_execution_missing_check_count: report.service_execution_missing_check_count,
|
||||
service_execution_failed_check_rows: report.service_execution_failed_check_rows,
|
||||
service_execution_failed_check_tui_rows: report.service_execution_failed_check_tui_rows,
|
||||
repo_work_map_count: report.repo_work_map_rows.len(),
|
||||
repo_work_map_rows: report.repo_work_map_rows,
|
||||
repo_work_map_tui_rows: report.repo_work_map_tui_rows,
|
||||
repo_work_overview_count: report.repo_work_overview_rows.len(),
|
||||
repo_work_overview_rows: report.repo_work_overview_rows,
|
||||
repo_work_overview_tui_rows: report.repo_work_overview_tui_rows,
|
||||
|
|
@ -4408,6 +4450,7 @@ impl SwarmTriageOutput {
|
|||
repo_work_public_proof_rows: report.repo_work_public_proof_rows,
|
||||
repo_work_public_proof_tui_rows: report.repo_work_public_proof_tui_rows,
|
||||
latest_repo_work_overview: report.latest_repo_work_overview_id,
|
||||
latest_repo_work_map_entry: report.latest_repo_work_map_entry,
|
||||
latest_repo_work_gate: report.latest_repo_work_gate,
|
||||
latest_repo_work_blocker: report.latest_repo_work_blocker,
|
||||
latest_repo_work_next_safe_move: report.latest_repo_work_next_safe_move,
|
||||
|
|
@ -4426,6 +4469,7 @@ impl SwarmTriageOutput {
|
|||
"wrapperReceipts": WRAPPER_RECEIPT_DIRECTORY_COMMAND,
|
||||
"restartPolicies": "epiphany-verse-query restart-policy-directory",
|
||||
"repoWorkOverview": "epiphany-work overview --workspace <repo> --item <item>",
|
||||
"repoWorkMap": "epiphany-verse-query gjallar",
|
||||
"wrapperRestartPolicies": WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND,
|
||||
"bifrostLedger": "epiphany-verse-query bifrost-ledger",
|
||||
"wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND,
|
||||
|
|
@ -4952,6 +4996,54 @@ fn repo_work_overview_tui_row(row: &RepoWorkOverviewRow) -> String {
|
|||
)
|
||||
}
|
||||
|
||||
fn repo_work_map_rows(
|
||||
repo_work_map_entries: &[EpiphanyCultMeshRepoWorkMapEntry],
|
||||
) -> (Vec<RepoWorkMapRow>, Vec<String>) {
|
||||
let rows = repo_work_map_entries
|
||||
.iter()
|
||||
.map(repo_work_map_row)
|
||||
.collect::<Vec<_>>();
|
||||
let tui_rows = rows.iter().map(repo_work_map_tui_row).collect::<Vec<_>>();
|
||||
(rows, tui_rows)
|
||||
}
|
||||
|
||||
fn repo_work_map_row(entry: &EpiphanyCultMeshRepoWorkMapEntry) -> RepoWorkMapRow {
|
||||
RepoWorkMapRow {
|
||||
map_entry_id: entry.map_entry_id.clone(),
|
||||
workspace: entry.workspace.clone(),
|
||||
item: entry.item.clone(),
|
||||
branch: entry.branch.clone(),
|
||||
changed_path_count: entry.changed_paths.len(),
|
||||
commit_sha: entry.commit_sha.clone(),
|
||||
safe_action_family: entry.safe_action_family.clone(),
|
||||
modeling_summary: entry.modeling_summary.clone(),
|
||||
soul_verdict_receipt_id: entry.soul_verdict_receipt_id.clone(),
|
||||
mind_gateway_review_id: entry.mind_gateway_review_id.clone(),
|
||||
mind_state_commit_receipt_id: entry.mind_state_commit_receipt_id.clone(),
|
||||
publication_gate: entry.publication_gate.clone(),
|
||||
durable_state_admitted: entry.durable_state_admitted,
|
||||
source_store_path: entry.source_store_path.clone(),
|
||||
private_state_exposed: entry.private_state_exposed,
|
||||
}
|
||||
}
|
||||
|
||||
fn repo_work_map_tui_row(row: &RepoWorkMapRow) -> String {
|
||||
format!(
|
||||
"REPO-WORK-MAP | item={} | branch={} | commit={} | family={} | paths={} | soul={} | mind={} | gate={} | admitted={} | source={} | private={}",
|
||||
row.item,
|
||||
row.branch,
|
||||
short_commit(&row.commit_sha),
|
||||
row.safe_action_family,
|
||||
row.changed_path_count,
|
||||
row.soul_verdict_receipt_id,
|
||||
row.mind_state_commit_receipt_id,
|
||||
row.publication_gate,
|
||||
row.durable_state_admitted,
|
||||
row.source_store_path,
|
||||
row.private_state_exposed
|
||||
)
|
||||
}
|
||||
|
||||
fn repo_work_peer_tui_rows(rows: &[RepoWorkOverviewRow]) -> Vec<String> {
|
||||
rows.iter()
|
||||
.map(|row| {
|
||||
|
|
@ -5023,6 +5115,10 @@ fn repo_work_public_proof_tui_row(row: &RepoWorkPublicProofRow) -> String {
|
|||
)
|
||||
}
|
||||
|
||||
fn short_commit(commit_sha: &str) -> String {
|
||||
commit_sha.chars().take(12).collect::<String>()
|
||||
}
|
||||
|
||||
fn repo_work_overview_action_row(
|
||||
overview: &EpiphanyCultMeshRepoWorkOverviewEntry,
|
||||
priority: u32,
|
||||
|
|
@ -5501,6 +5597,32 @@ fn load_repo_work_overview_queue(
|
|||
Ok((latest_repo_work_overview, repo_work_overviews))
|
||||
}
|
||||
|
||||
fn load_repo_work_map_entries(
|
||||
args: &Args,
|
||||
) -> Result<(
|
||||
Option<EpiphanyCultMeshRepoWorkMapEntry>,
|
||||
Vec<EpiphanyCultMeshRepoWorkMapEntry>,
|
||||
)> {
|
||||
let latest_repo_work_map_entry =
|
||||
load_latest_epiphany_cultmesh_repo_work_map_entry(&args.store, args.runtime_id.clone())?;
|
||||
let mut repo_work_map_entries =
|
||||
load_epiphany_cultmesh_repo_work_map_entries(&args.store, args.runtime_id.clone())?;
|
||||
if let Some(latest) = latest_repo_work_map_entry.as_ref() {
|
||||
if !repo_work_map_entries
|
||||
.iter()
|
||||
.any(|entry| entry.map_entry_id == latest.map_entry_id)
|
||||
{
|
||||
repo_work_map_entries.push(latest.clone());
|
||||
repo_work_map_entries.sort_by(|a, b| {
|
||||
b.admitted_at
|
||||
.cmp(&a.admitted_at)
|
||||
.then_with(|| a.map_entry_id.cmp(&b.map_entry_id))
|
||||
});
|
||||
}
|
||||
}
|
||||
Ok((latest_repo_work_map_entry, repo_work_map_entries))
|
||||
}
|
||||
|
||||
fn load_repo_work_public_proofs(
|
||||
args: &Args,
|
||||
) -> Result<(
|
||||
|
|
@ -5533,6 +5655,7 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
let liveness = load_epiphany_cultmesh_daemon_liveness(&args.store, args.runtime_id.clone())?;
|
||||
let daemon_report = daemon_liveness_report(&liveness);
|
||||
let (latest_repo_work_overview, repo_work_overviews) = load_repo_work_overview_queue(args)?;
|
||||
let (latest_repo_work_map_entry, repo_work_map_entries) = load_repo_work_map_entries(args)?;
|
||||
let (latest_repo_work_public_proof, repo_work_public_proofs) =
|
||||
load_repo_work_public_proofs(args)?;
|
||||
let directory =
|
||||
|
|
@ -5747,6 +5870,7 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
.collect::<Vec<_>>();
|
||||
let (repo_work_overview_rows, repo_work_overview_tui_rows) =
|
||||
repo_work_overview_rows(&repo_work_overviews);
|
||||
let (repo_work_map_rows, repo_work_map_tui_rows) = repo_work_map_rows(&repo_work_map_entries);
|
||||
let (repo_work_public_proof_rows, repo_work_public_proof_tui_rows) =
|
||||
repo_work_public_proof_rows(&repo_work_public_proofs);
|
||||
let (swarm_action_rows, swarm_action_tui_rows) = swarm_action_rows(
|
||||
|
|
@ -5768,6 +5892,9 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
|| repo_work_overviews
|
||||
.iter()
|
||||
.any(|overview| overview.private_state_exposed)
|
||||
|| repo_work_map_entries
|
||||
.iter()
|
||||
.any(|entry| entry.private_state_exposed)
|
||||
|| repo_work_public_proofs
|
||||
.iter()
|
||||
.any(|proof| proof.private_state_exposed)
|
||||
|
|
@ -5778,6 +5905,9 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
let latest_repo_work_overview_id = latest_repo_work_overview
|
||||
.as_ref()
|
||||
.map(|overview| overview.overview_id.clone());
|
||||
let latest_repo_work_map_entry = latest_repo_work_map_entry
|
||||
.as_ref()
|
||||
.map(|entry| entry.map_entry_id.clone());
|
||||
let latest_repo_work_gate = latest_repo_work_overview
|
||||
.as_ref()
|
||||
.map(|overview| overview.current_gate.clone());
|
||||
|
|
@ -5812,11 +5942,14 @@ fn load_swarm_overview_report(args: &Args) -> Result<SwarmOverviewReport> {
|
|||
service_execution_missing_check_count,
|
||||
service_execution_failed_check_rows,
|
||||
service_execution_failed_check_tui_rows,
|
||||
repo_work_map_rows,
|
||||
repo_work_map_tui_rows,
|
||||
repo_work_overview_rows,
|
||||
repo_work_overview_tui_rows,
|
||||
repo_work_public_proof_rows,
|
||||
repo_work_public_proof_tui_rows,
|
||||
latest_repo_work_overview_id,
|
||||
latest_repo_work_map_entry,
|
||||
latest_repo_work_gate,
|
||||
latest_repo_work_blocker,
|
||||
latest_repo_work_next_safe_move,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@ use anyhow::anyhow;
|
|||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use epiphany_core::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID;
|
||||
use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY;
|
||||
use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION;
|
||||
use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION;
|
||||
use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION;
|
||||
use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry;
|
||||
use epiphany_core::EpiphanyCultMeshRepoWorkOverviewEntry;
|
||||
use epiphany_core::EpiphanyCultMeshRepoWorkPublicProofEntry;
|
||||
use epiphany_core::HANDS_ACTION_INTENT_SCHEMA_VERSION;
|
||||
|
|
@ -46,6 +49,7 @@ use epiphany_core::runtime_hands_action_intent;
|
|||
use epiphany_core::runtime_hands_action_review;
|
||||
use epiphany_core::runtime_hands_commit_receipt;
|
||||
use epiphany_core::runtime_latest_hands_receipt_chain_after;
|
||||
use epiphany_core::write_epiphany_cultmesh_repo_work_map_entry;
|
||||
use epiphany_core::write_epiphany_cultmesh_repo_work_overview;
|
||||
use epiphany_core::write_epiphany_cultmesh_repo_work_public_proof;
|
||||
use serde::Deserialize;
|
||||
|
|
@ -7689,6 +7693,105 @@ fn record_repo_work_map_admission(
|
|||
Ok((map_store_path, entry))
|
||||
}
|
||||
|
||||
fn resolve_local_verse_store_from_execute_receipt(
|
||||
workspace: &Path,
|
||||
execute_receipt: &Value,
|
||||
) -> Result<Option<PathBuf>> {
|
||||
if let Some(store) = path_from_json(execute_receipt, &["localVerseStore"])
|
||||
.or_else(|| path_from_json(execute_receipt, &["localVerseStorePath"]))
|
||||
{
|
||||
return Ok(Some(store));
|
||||
}
|
||||
let Some(adopt_receipt_path) = path_from_json(execute_receipt, &["adoptReceiptPath"]) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let adopt_receipt = read_json(&adopt_receipt_path)?;
|
||||
if let Some(store) = path_from_json(&adopt_receipt, &["localVerseStore"])
|
||||
.or_else(|| path_from_json(&adopt_receipt, &["localVerseStorePath"]))
|
||||
{
|
||||
return Ok(Some(store));
|
||||
}
|
||||
let Some(run_receipt_path) = path_from_json(&adopt_receipt, &["runReceiptPath"]) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let run_receipt = read_json(&run_receipt_path)?;
|
||||
if let Some(store) = path_from_json(&run_receipt, &["localVerseStore"])
|
||||
.or_else(|| path_from_json(&run_receipt, &["localVerseStorePath"]))
|
||||
{
|
||||
return Ok(Some(store));
|
||||
}
|
||||
let Some(online_receipt_path) = path_from_json(&run_receipt, &["onlineReceiptPath"]) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let online_receipt = read_json(&online_receipt_path)?;
|
||||
Ok(path_from_json(&online_receipt, &["localVerseStore"])
|
||||
.or_else(|| path_from_json(&online_receipt, &["localVerseStorePath"]))
|
||||
.or_else(|| Some(workspace.join(".epiphany").join("local-verse.ccmp"))))
|
||||
}
|
||||
|
||||
fn project_repo_work_map_entry_to_local_verse(
|
||||
local_verse_store: &Path,
|
||||
runtime_id: &str,
|
||||
workspace: &Path,
|
||||
source_store_path: &Path,
|
||||
entry: &RepoWorkMapEntry,
|
||||
) -> Result<EpiphanyCultMeshRepoWorkMapEntry> {
|
||||
let item_slug = sanitize(&entry.item);
|
||||
let commit_short = short_commit(&entry.commit_sha);
|
||||
let tui_rows = vec![
|
||||
format!("item {}", entry.item),
|
||||
format!("branch {}", entry.branch),
|
||||
format!("commit {}", entry.commit_sha),
|
||||
format!("family {}", entry.safe_action_family),
|
||||
format!("mind {}", entry.mind_state_commit_receipt_id),
|
||||
format!("publicationGate {}", entry.publication_gate),
|
||||
"private false".to_string(),
|
||||
];
|
||||
let map_entry = EpiphanyCultMeshRepoWorkMapEntry {
|
||||
schema_version: EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION.to_string(),
|
||||
runtime_id: runtime_id.to_string(),
|
||||
verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(),
|
||||
map_entry_id: format!("repo-work-map-{item_slug}"),
|
||||
admitted_at: entry.admitted_at.clone(),
|
||||
mirrored_at: Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true),
|
||||
workspace: workspace.display().to_string(),
|
||||
item: entry.item.clone(),
|
||||
branch: entry.branch.clone(),
|
||||
changed_paths: entry.changed_paths.clone(),
|
||||
commit_sha: entry.commit_sha.clone(),
|
||||
safe_action_family: entry.safe_action_family.clone(),
|
||||
modeling_summary: entry.modeling_summary.clone(),
|
||||
soul_verdict_receipt_id: entry.soul_verdict_receipt_id.clone(),
|
||||
mind_gateway_review_id: entry.mind_gateway_review_id.clone(),
|
||||
mind_state_commit_receipt_id: entry.mind_state_commit_receipt_id.clone(),
|
||||
publication_gate: entry.publication_gate.clone(),
|
||||
durable_state_admitted: entry.durable_state_admitted,
|
||||
source_store_path: normalize_path_for_receipt(source_store_path),
|
||||
tui_rows: vec![format!(
|
||||
"REPO-WORK-MAP | item={} | branch={} | commit={} | family={} | mind={} | gate={} | private=false",
|
||||
entry.item,
|
||||
entry.branch,
|
||||
commit_short,
|
||||
entry.safe_action_family,
|
||||
entry.mind_state_commit_receipt_id,
|
||||
entry.publication_gate
|
||||
)]
|
||||
.into_iter()
|
||||
.chain(tui_rows)
|
||||
.collect(),
|
||||
private_state_exposed: false,
|
||||
notes: vec![
|
||||
"Repo work map entry is compact local Verse sight over Mind-admitted durable state; raw worker thoughts and receipt payload bodies remain sealed.".to_string(),
|
||||
"Gjallar may project this row, but it does not own scheduling, publication, merge, service lifecycle, deployment, or cross-repo mutation.".to_string(),
|
||||
],
|
||||
};
|
||||
write_epiphany_cultmesh_repo_work_map_entry(local_verse_store, map_entry)
|
||||
}
|
||||
|
||||
fn short_commit(commit_sha: &str) -> String {
|
||||
commit_sha.chars().take(12).collect::<String>()
|
||||
}
|
||||
|
||||
fn closure_model_review(
|
||||
model_authored: bool,
|
||||
model_ref: Option<&str>,
|
||||
|
|
@ -9074,6 +9177,37 @@ fn run_close(args: CloseArgs) -> Result<Value> {
|
|||
&closure_review_path,
|
||||
&closure_receipt_path,
|
||||
)?;
|
||||
let runtime_id = string_from_json(&execute_receipt, &["runtimeId"])
|
||||
.unwrap_or_else(|| "repo-swarm-local".to_string());
|
||||
let local_verse_store =
|
||||
resolve_local_verse_store_from_execute_receipt(&workspace, &execute_receipt)?;
|
||||
let repo_map_local_verse_projection = if let Some(local_verse_store) =
|
||||
local_verse_store.as_ref()
|
||||
{
|
||||
let written = project_repo_work_map_entry_to_local_verse(
|
||||
local_verse_store,
|
||||
&runtime_id,
|
||||
&workspace,
|
||||
&repo_map_store_path,
|
||||
&repo_map_entry,
|
||||
)?;
|
||||
json!({
|
||||
"projected": true,
|
||||
"localVerseStore": normalize_path_for_receipt(local_verse_store),
|
||||
"documentType": "epiphany.cultmesh.repo_work_map_entry",
|
||||
"schemaVersion": written.schema_version,
|
||||
"mapEntryId": written.map_entry_id,
|
||||
"latestKey": EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY,
|
||||
"tuiRows": written.tui_rows,
|
||||
"privateStateExposed": written.private_state_exposed
|
||||
})
|
||||
} else {
|
||||
json!({
|
||||
"projected": false,
|
||||
"reason": "local Verse store could not be resolved from execute/adopt/run/online receipts",
|
||||
"privateStateExposed": false
|
||||
})
|
||||
};
|
||||
|
||||
let closure_receipt = json!({
|
||||
"schemaVersion": "epiphany.repo_work_closure_receipt.v0",
|
||||
|
|
@ -9112,7 +9246,8 @@ fn run_close(args: CloseArgs) -> Result<Value> {
|
|||
"stateRevision": mind_commit.state_revision,
|
||||
"changedFields": mind_commit.changed_fields,
|
||||
"repoMapStorePath": normalize_path_for_receipt(&repo_map_store_path),
|
||||
"repoMapEntry": repo_map_entry
|
||||
"repoMapEntry": repo_map_entry,
|
||||
"repoMapLocalVerseProjection": repo_map_local_verse_projection
|
||||
},
|
||||
"authority": {
|
||||
"branchLocalOnly": true,
|
||||
|
|
|
|||
|
|
@ -76,6 +76,12 @@ pub const EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION: &str =
|
|||
"epiphany.cultmesh.repo_work_overview.v0";
|
||||
pub const EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_LATEST_KEY: &str =
|
||||
"gamecult-local/repo-work-overview/latest";
|
||||
pub const EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_TYPE: &str =
|
||||
"epiphany.cultmesh.repo_work_map_entry";
|
||||
pub const EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION: &str =
|
||||
"epiphany.cultmesh.repo_work_map_entry.v0";
|
||||
pub const EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY: &str =
|
||||
"gamecult-local/repo-work-map/latest";
|
||||
pub const EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_TYPE: &str =
|
||||
"epiphany.cultmesh.repo_work_public_proof";
|
||||
pub const EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION: &str =
|
||||
|
|
@ -752,6 +758,58 @@ pub struct EpiphanyCultMeshRepoWorkOverviewEntry {
|
|||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(
|
||||
type = "epiphany.cultmesh.repo_work_map_entry",
|
||||
schema = "EpiphanyCultMeshRepoWorkMapEntry"
|
||||
)]
|
||||
pub struct EpiphanyCultMeshRepoWorkMapEntry {
|
||||
#[cultcache(key = 0)]
|
||||
pub schema_version: String,
|
||||
#[cultcache(key = 1)]
|
||||
pub runtime_id: String,
|
||||
#[cultcache(key = 2)]
|
||||
pub verse_id: String,
|
||||
#[cultcache(key = 3)]
|
||||
pub map_entry_id: String,
|
||||
#[cultcache(key = 4)]
|
||||
pub admitted_at: String,
|
||||
#[cultcache(key = 5)]
|
||||
pub mirrored_at: String,
|
||||
#[cultcache(key = 6)]
|
||||
pub workspace: String,
|
||||
#[cultcache(key = 7)]
|
||||
pub item: String,
|
||||
#[cultcache(key = 8)]
|
||||
pub branch: String,
|
||||
#[cultcache(key = 9)]
|
||||
pub changed_paths: Vec<String>,
|
||||
#[cultcache(key = 10)]
|
||||
pub commit_sha: String,
|
||||
#[cultcache(key = 11)]
|
||||
pub safe_action_family: String,
|
||||
#[cultcache(key = 12)]
|
||||
pub modeling_summary: String,
|
||||
#[cultcache(key = 13)]
|
||||
pub soul_verdict_receipt_id: String,
|
||||
#[cultcache(key = 14)]
|
||||
pub mind_gateway_review_id: String,
|
||||
#[cultcache(key = 15)]
|
||||
pub mind_state_commit_receipt_id: String,
|
||||
#[cultcache(key = 16)]
|
||||
pub publication_gate: String,
|
||||
#[cultcache(key = 17)]
|
||||
pub durable_state_admitted: bool,
|
||||
#[cultcache(key = 18)]
|
||||
pub source_store_path: String,
|
||||
#[cultcache(key = 19)]
|
||||
pub tui_rows: Vec<String>,
|
||||
#[cultcache(key = 20)]
|
||||
pub private_state_exposed: bool,
|
||||
#[cultcache(key = 21)]
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(
|
||||
type = "epiphany.cultmesh.repo_work_public_proof",
|
||||
|
|
@ -2091,6 +2149,7 @@ pub struct EpiphanyLocalVerseContext {
|
|||
pub latest_work_loop_summary: Option<EpiphanyLocalVerseWorkLoopSummary>,
|
||||
pub latest_agent_state_soa_summary: Option<EpiphanyCultMeshAgentStateSoaSummaryEntry>,
|
||||
pub latest_repo_work_overview: Option<EpiphanyCultMeshRepoWorkOverviewEntry>,
|
||||
pub latest_repo_work_map_entry: Option<EpiphanyCultMeshRepoWorkMapEntry>,
|
||||
pub latest_eve_connection_intent: Option<EpiphanyCultMeshEveConnectionIntentEntry>,
|
||||
pub latest_eve_connection_receipt: Option<EpiphanyCultMeshEveConnectionReceiptEntry>,
|
||||
pub contract_summaries: Vec<EpiphanyLocalVerseContractSummary>,
|
||||
|
|
@ -2142,6 +2201,7 @@ cultmesh_documents!(EpiphanyCultMeshDocuments {
|
|||
EpiphanyCultMeshWorkLoopTelemetryEntry => EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshAgentStateSoaSummaryEntry => EPIPHANY_CULTMESH_AGENT_STATE_SOA_SUMMARY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshRepoWorkOverviewEntry => EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshRepoWorkMapEntry => EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshRepoWorkPublicProofEntry => EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshVersePolicyEntry => EPIPHANY_CULTMESH_VERSE_POLICY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshGlobalRoomPolicyEntry => EPIPHANY_CULTMESH_GLOBAL_ROOM_POLICY_SCHEMA_VERSION,
|
||||
|
|
@ -4407,6 +4467,45 @@ pub fn load_epiphany_cultmesh_repo_work_overviews(
|
|||
Ok(overviews)
|
||||
}
|
||||
|
||||
pub fn write_epiphany_cultmesh_repo_work_map_entry(
|
||||
store_path: impl AsRef<Path>,
|
||||
map_entry: EpiphanyCultMeshRepoWorkMapEntry,
|
||||
) -> Result<EpiphanyCultMeshRepoWorkMapEntry> {
|
||||
validate_repo_work_map_entry(&map_entry)?;
|
||||
let mut node = open_epiphany_cultmesh_node(&store_path, map_entry.runtime_id.clone())?;
|
||||
let written = node.put(map_entry.map_entry_id.clone(), &map_entry)?;
|
||||
node.put(EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY, &written)?;
|
||||
node.flush()?;
|
||||
Ok(written)
|
||||
}
|
||||
|
||||
pub fn load_latest_epiphany_cultmesh_repo_work_map_entry(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
) -> Result<Option<EpiphanyCultMeshRepoWorkMapEntry>> {
|
||||
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
|
||||
node.get(EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY)
|
||||
}
|
||||
|
||||
pub fn load_epiphany_cultmesh_repo_work_map_entries(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
) -> Result<Vec<EpiphanyCultMeshRepoWorkMapEntry>> {
|
||||
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
|
||||
let mut entries = node
|
||||
.get_all_with_keys::<EpiphanyCultMeshRepoWorkMapEntry>()?
|
||||
.into_iter()
|
||||
.filter(|(key, _)| key != EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY)
|
||||
.map(|(_, entry)| entry)
|
||||
.collect::<Vec<_>>();
|
||||
entries.sort_by(|a, b| {
|
||||
b.admitted_at
|
||||
.cmp(&a.admitted_at)
|
||||
.then_with(|| a.map_entry_id.cmp(&b.map_entry_id))
|
||||
});
|
||||
Ok(entries)
|
||||
}
|
||||
|
||||
pub fn write_epiphany_cultmesh_repo_work_public_proof(
|
||||
store_path: impl AsRef<Path>,
|
||||
proof: EpiphanyCultMeshRepoWorkPublicProofEntry,
|
||||
|
|
@ -4483,6 +4582,47 @@ fn validate_repo_work_overview(overview: &EpiphanyCultMeshRepoWorkOverviewEntry)
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn validate_repo_work_map_entry(entry: &EpiphanyCultMeshRepoWorkMapEntry) -> Result<()> {
|
||||
if entry.private_state_exposed {
|
||||
return Err(anyhow!("repo work map entry must not expose private state"));
|
||||
}
|
||||
if entry.schema_version != EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION {
|
||||
return Err(anyhow!(
|
||||
"repo work map entry schema_version must be {:?}",
|
||||
EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION
|
||||
));
|
||||
}
|
||||
if entry.verse_id != EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID {
|
||||
return Err(anyhow!(
|
||||
"repo work map entry belongs in local-area Verse {:?}",
|
||||
EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID
|
||||
));
|
||||
}
|
||||
if entry.map_entry_id.trim().is_empty() || entry.item.trim().is_empty() {
|
||||
return Err(anyhow!(
|
||||
"repo work map entry requires map_entry_id and item"
|
||||
));
|
||||
}
|
||||
if !entry.durable_state_admitted {
|
||||
return Err(anyhow!(
|
||||
"repo work map entry projection requires admitted durable state"
|
||||
));
|
||||
}
|
||||
if entry.tui_rows.is_empty() {
|
||||
return Err(anyhow!("repo work map entry requires compact TUI rows"));
|
||||
}
|
||||
if entry
|
||||
.tui_rows
|
||||
.iter()
|
||||
.any(|row| row.to_ascii_lowercase().contains("rawresult"))
|
||||
{
|
||||
return Err(anyhow!(
|
||||
"repo work map entry rows must not expose raw worker payload names"
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn validate_repo_work_public_proof(proof: &EpiphanyCultMeshRepoWorkPublicProofEntry) -> Result<()> {
|
||||
if proof.private_state_exposed {
|
||||
return Err(anyhow!(
|
||||
|
|
@ -4747,6 +4887,7 @@ pub fn query_epiphany_local_verse_context(
|
|||
latest_agent_state_soa_summary: node
|
||||
.get(EPIPHANY_CULTMESH_AGENT_STATE_SOA_SUMMARY_LATEST_KEY)?,
|
||||
latest_repo_work_overview: node.get(EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_LATEST_KEY)?,
|
||||
latest_repo_work_map_entry: node.get(EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY)?,
|
||||
latest_eve_connection_intent: node
|
||||
.get(EPIPHANY_CULTMESH_EVE_CONNECTION_INTENT_LATEST_KEY)?,
|
||||
latest_eve_connection_receipt: node
|
||||
|
|
|
|||
|
|
@ -203,6 +203,9 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_STATUS_TYPE;
|
|||
pub use cultmesh_integration::EPIPHANY_CULTMESH_PERSONA_SPEECH_AUDIT_LATEST_KEY;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_PERSONA_SPEECH_AUDIT_SCHEMA_VERSION;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_PERSONA_SPEECH_AUDIT_TYPE;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_TYPE;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_LATEST_KEY;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_TYPE;
|
||||
|
|
@ -262,6 +265,7 @@ pub use cultmesh_integration::EpiphanyCultMeshOperatorRunReceiptEntry;
|
|||
pub use cultmesh_integration::EpiphanyCultMeshOperatorSnapshotEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshOperatorStatusEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshPersonaSpeechAuditEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshRepoWorkMapEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshRepoWorkOverviewEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshRepoWorkPublicProofEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshRoleReviewEventEntry;
|
||||
|
|
@ -320,6 +324,7 @@ pub use cultmesh_integration::load_epiphany_cultmesh_daemon_tool_directory;
|
|||
pub use cultmesh_integration::load_epiphany_cultmesh_eve_surface_directory;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_operator_snapshot;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_operator_status;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_map_entries;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_overviews;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_public_proofs;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_status;
|
||||
|
|
@ -345,6 +350,7 @@ pub use cultmesh_integration::load_latest_epiphany_cultmesh_operator_run_intent;
|
|||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_operator_run_receipt;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_operator_snapshot;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_persona_speech_audit;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_map_entry;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_overview;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_public_proof;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_role_review_event;
|
||||
|
|
@ -385,6 +391,7 @@ pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_receipt;
|
|||
pub use cultmesh_integration::write_epiphany_cultmesh_operator_snapshot;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_operator_status;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_persona_speech_audit;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_map_entry;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_overview;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_public_proof;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_role_review_event;
|
||||
|
|
|
|||
|
|
@ -1082,7 +1082,11 @@ admits a compact latest-per-item repo map entry into
|
|||
`epiphany.repo_work_map_store.v0` / `epiphany.repo_work_map_entry.v0`, carrying
|
||||
the item, branch, changed paths, commit SHA, safe family, Modeling summary,
|
||||
Soul verdict id, Mind review/commit ids, closure refs, Bifrost publication gate,
|
||||
and private-state seal. The final
|
||||
and private-state seal. Closure then mirrors that accepted map fact into the
|
||||
repo local Verse as `epiphany.cultmesh.repo_work_map_entry.v0` under
|
||||
`gamecult-local/repo-work-map/latest`, with compact `REPO-WORK-MAP` TUI rows
|
||||
for Gjallar/Odin sight and no scheduling, publication, merge, deployment,
|
||||
service lifecycle, or private-state authority. The final
|
||||
`.epiphany/work/work-close-<item>.json` receipt is
|
||||
`epiphany.repo_work_closure_receipt.v0` with
|
||||
`durableStateAdmitted=true`, `publicationGateSatisfied=true`, and
|
||||
|
|
@ -1161,6 +1165,16 @@ successful close wrote `epiphany.repo_work_map_store.v0` with an
|
|||
the expected commit SHA, changed path, safe family, Soul verdict id, Mind
|
||||
gateway id, Mind state-commit id, and `privateStateExposed=false`.
|
||||
|
||||
The same smoke now proves the first local Verse projection of that durable map:
|
||||
`.epiphany-smoke\repo-close-mind-adoption-guard-20260620-203717` shows successful
|
||||
close projecting `epiphany.cultmesh.repo_work_map_entry.v0` with latest key
|
||||
`gamecult-local/repo-work-map/latest`; direct Gjallar readback returned
|
||||
`repoWorkMapCount=1`, latest `repo-work-map-repo-close-mind-adoption-guard`, a
|
||||
compact `REPO-WORK-MAP` row with the safe family, Soul/Mind ids, Bifrost gate,
|
||||
source map store ref, and `privateStateExposed=false`. The cargo-run smoke
|
||||
itself completed and wrote `summary.json` after the outer tool timeout, so the
|
||||
independent Gjallar readback is the clean terminal proof.
|
||||
|
||||
`epiphany-work overview` is the first compact repo work sight/proof surface:
|
||||
|
||||
```powershell
|
||||
|
|
@ -1509,8 +1523,8 @@ temptation wearing clean robes.
|
|||
| Imagination planning | `derive-plan` now writes a typed `epiphany.repo_work_imagination_action_items_receipt.v0` before the executable plan receipt. The action-item receipt can carry model provenance, allowed safe family, requested paths, verification asks, stop conditions, escalation reasons, planning facets (assumptions, constraints, non-goals, open questions, decision points, and evidence needs), and private-state seals; command text remains deterministic safe-family lowering for `append-worklog`, `planning-note`, `checklist-note`, `section-note` / `repo.markdown_managed_section`, `repo-status-section` / `repo.status_section`, `task-card` / `repo.task_card`, `repo-manifest` / `repo.body_manifest`, `repo-tool-capabilities` / `repo.tool_capabilities`, `repo-tool-request` / `repo.tool_request`, `repo-eve-surface` / `repo.eve_surface`, `repo-collaboration-policy` / `repo.collaboration_policy`, `repo-collaboration-topic` / `repo.collaboration_topic`, `repo-consensus-brief` / `repo.consensus_brief`, `repo-objective-draft` / `repo.objective_draft`, `repo-adoption-request` / `repo.adoption_request`, `repo-scheduling-request` / `repo.scheduling_request`, `repo-work-order` / `repo.work_order`, `repo-verification-request` / `repo.verification_request`, `repo-publication-request` / `repo.publication_request`, `repo-sync-request` / `repo.sync_request`, `repo-maintainer-review-request` / `repo.maintainer_review_request`, `repo-pr-request` / `repo.pr_request`, `repo-credit-request` / `repo.credit_request`, `repo-artifact-acceptance-request` / `repo.artifact_acceptance_request`, `repo-metrics-request` / `repo.metrics_request`, `repo-doctrine-update-request` / `repo.doctrine_update_request`, `repo-secret-policy-request` / `repo.secret_policy_request`, and `repo-deployment-request` / `repo.deployment_request`. `adopt` now writes `epiphany.repo_work_mind_adoption_decision.v0` before the main adoption receipt cites the decision and grants branch-local Hands authority. `plan` remains manual quarantine scaffolding. | Deepen further interpreter behavior and useful repo-owned configuration/action classes without turning model text into arbitrary shell authority. |
|
||||
| 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` and `repo-work-service-runbook` write Idunn lifecycle receipts/artifacts for the same queue-run command without launching it. | Keep any future queue-run service launch/install behind Idunn and explicit 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, writes Soul/Modeling/Mind receipts, and admits a compact typed repo map entry into `.epiphany/state/repo-work-map.msgpack`. | Keep extending closure toward source-grounded semantic review and richer local Verse map projection, while preserving deterministic local closure for simple mechanical work. |
|
||||
| Repo work sight | `overview` emits compact proof rows and mirrors typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; Gjallar enumerates the history as queue rows and non-mutating action rows; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same queue for branch-local scheduler pulses. | Deepen the Persona-to-plan loop without moving action authority out of Hands/Self/Bifrost. |
|
||||
| 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, 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 | `overview` emits compact proof rows and mirrors typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; `close` mirrors Mind-admitted map facts as `epiphany.cultmesh.repo_work_map_entry.v0`; Gjallar enumerates overview history, map 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. | Deepen the Persona-to-plan loop and semantic map readback without moving action authority out of Hands/Self/Bifrost. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
|
|
@ -2014,12 +2028,12 @@ Required organs before MVP:
|
|||
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 deeper semantic review, local Verse projection of the
|
||||
durable repo map, and richer map updates beyond latest work-item consequence;
|
||||
it is not basic safe-family planning cargo, local public-proof export, local
|
||||
CultMesh readback, Bifrost/GitHub/sync row visibility, public-proof
|
||||
publication closure, Mind-adoption closure proof, first durable repo-map
|
||||
admission, or the standard wrapper mouth for those closures.
|
||||
Remaining work is deeper semantic review and richer map updates/lenses beyond
|
||||
latest work-item consequence; it is not basic safe-family planning cargo,
|
||||
local public-proof export, local CultMesh readback, Bifrost/GitHub/sync row
|
||||
visibility, public-proof publication closure, Mind-adoption closure proof,
|
||||
first durable repo-map admission, first durable repo-map local Verse
|
||||
projection, or the standard wrapper mouth for those closures.
|
||||
|
||||
Scheduler authority is intentionally narrow. It may advance
|
||||
`accept -> plan -> run -> adopt -> execute` only when each upstream receipt
|
||||
|
|
@ -2263,8 +2277,9 @@ Modeling -> Mind part for branch-local repo-work consequences. It writes
|
|||
`.epiphany/state/repo-work-map.msgpack` as a typed MessagePack
|
||||
`epiphany.repo_work_map_store.v0` with latest `epiphany.repo_work_map_entry.v0`
|
||||
rows keyed by item. This is a narrow repo-work map store, not yet the full
|
||||
semantic architecture map; local Verse projection and richer map lenses remain
|
||||
Phase 5 work.
|
||||
semantic architecture map. The first local Verse projection of those accepted
|
||||
rows is live as `epiphany.cultmesh.repo_work_map_entry.v0`; richer semantic map
|
||||
lenses remain Phase 5 work.
|
||||
|
||||
MVP exit proof:
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- 2026-06-20: Public proof local Verse transport, Bifrost publication closure, and the standard wrapper mouth 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` and `tools/epiphany_local_run.ps1 -Mode bifrost-public-proof` now write `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`, `23-receipt-directory-after-public-proof-publication.json`, wrapper artifact `local-20260620-132418-144-62ba9369`, and `24-bifrost-ledger-after-wrapper-public-proof.json` reported latest `repo-work-public-proof-checklist-request`, publication receipt `bifrost-public-proof-publication-wrapper-checklist`, SHA-256 `e781e09c2ba340c8818d3ef95e54085ccd0c92c6a3b5f73cc4878fb224e49dff`, `publicProofPublicationCount=1`, and `private=false`. The next cut is deeper model-authored closure review, further non-planning action classes, or Idunn-owned queue-run service execution.
|
||||
- 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: deeper model-authored closure review, further non-planning action classes, Idunn-owned queue-run service lifecycle under explicit operator authority. 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 deeper model-authored closure review, further non-planning action classes, or Idunn-owned queue-run service execution; not another queue display surface.
|
||||
- 2026-06-20: Durable repo-work map admission now has local Verse/Gjallar sight. `epiphany-work close` still admits the accepted latest-per-item map into `.epiphany/state/repo-work-map.msgpack` only after Soul and Mind pass, then mirrors the accepted fact as `epiphany.cultmesh.repo_work_map_entry.v0` under `gamecult-local/repo-work-map/latest`. `epiphany-verse-query gjallar` now returns `repoWorkMapCount`, `repoWorkMapRows`, `repoWorkMapTuiRows`, and `latestRepoWorkMapEntry`, sealed to safe family, changed-path count, Soul/Mind ids, Bifrost gate, source map store ref, and `privateStateExposed=false`. Proof `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-203717` shows counterfeit Mind adoption refused without map write, successful close projected the map row, and independent Gjallar readback returned one `REPO-WORK-MAP` row. The outer cargo-run smoke timed out just before child return, but `summary.json` is `status=ok` and the direct Gjallar readback is the terminal proof. The next repo-map work is richer semantic review/map lenses, not first projection.
|
||||
- 2026-06-20: Deeper model-authored closure review is now live. `epiphany-work close` accepts `--closure-model-verdict passed|failed|needs-work|blocked`, `--closure-model-finding`, and `--require-closure-model-verdict`; the close review embeds `epiphany.repo_work_model_closure_review.v0` under `modelingReview.closureReview`, records reviewed inputs and gate enforcement, and Soul refuses closure when a supplied or required model verdict does not pass. Focused smoke `.epiphany-smoke\closure-model-gate-20260620-135103` created a disposable repo, ran two `repo.status_section` items through public front doors, closed one with required model verdict `passed`, and blocked one with `needs-work` while `familyAssertions.status=passed`, `pathScopeMatched=true`, and `privateStateExposed=false`. Current remaining repo-swarm MVP organs are deeper interpreter/adoption semantics, more useful repo-owned configuration/action families, and Idunn-owned queue-run service lifecycle under explicit operator authority.
|
||||
- 2026-06-20: Mind adoption/interpreter depth now has a concrete interpretation packet. `epiphany-work adopt` writes `epiphany.repo_work_mind_adoption_decision.v0` before the main adoption receipt, embeds `epiphany.repo_work_mind_interpretation.v0` with input summary, safe-family recognition, requested-path classification, allowed branch-local Hands transition, and forbidden durable-state/publication/service/private transitions, then records Self presentation, Mind evidence review, safe-family requirement, branch-local scope, Bifrost publication gate, Soul closure requirement, and no Hands/durable-state/publication/merge/service/cross-body/private authority inside the Mind decision; the main adoption receipt cites that decision before granting branch-local Hands authority. Focused smoke `.epiphany-smoke\repo-planning-facets-20260620-175503` proves model-authored planning facets survive into Imagination, plan derivation, Mind interpretation, Mind decision, and adoption, while close still passes Soul/family/path checks with `privateStateExposed=false`. Current remaining repo-swarm MVP organs are deeper interpreter semantics beyond the first Mind interpretation packet, more useful repo-owned configuration/action families, and Idunn-owned queue-run service lifecycle under explicit operator authority.
|
||||
- 2026-06-20: `repo-manifest` is now the next non-planning safe family. `epiphany-work derive-plan --action-family repo-manifest` lowers accepted pressure into a structured `epiphany.toml` Body manifest with safe family `repo.body_manifest`, body domain, private/local/public Verse ids, Eve surface id, receipt-required capability hints, arbitrary shell sealed false, and private-state seals. Soul closure assertions now inspect the committed manifest for schema, safe family, summary, body domain, Verse ids, Eve surface, receipt requirement, no arbitrary shell, and private-state seals. Focused smoke `.epiphany-smoke\repo-manifest-family-20260620-141552` ran a disposable repo through init -> online -> accept -> repo-manifest derive-plan -> tick run/adopt/execute/close; Hands committed only `epiphany.toml`, Soul passed with `pathScopeMatched=true`, `familyAssertions.status=passed`, and `privateStateExposed=false`. Current remaining repo-swarm MVP organs are deeper interpreter/adoption semantics, additional useful repo-owned config/action families, and Idunn-owned queue-run service lifecycle under explicit operator authority.
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -89,6 +89,7 @@ active_subgoals:
|
|||
- 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 repo-swarm autonomy authority map. Autonomous branch-local work inside an Epiphany-owned repo Body is in scope and desired; the safety boundary is typed authority, branch containment, interruption, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Current safe-family cargo includes repo manifest, tool capability manifest, daemon-hosted tool request cargo, Eve/CultUI surface contract, repo collaboration policy, collaboration topics, consensus/objective/adoption/scheduling/work-order/verification/publication/sync/review/PR/credit/artifact/metrics/doctrine-update/secret-policy/deployment requests, action-item receipts, Mind adoption interpretation/decision receipts, explicit Mind safe-family refusal proof `.epiphany-smoke\repo-mind-safe-family-guard-20260620-194425`, explicit Mind requested-path/plan changed-path refusal proof `.epiphany-smoke\repo-mind-path-guard-20260620-194239`, overview/public-proof/Gjallar/Eve readbacks, typed swarm-run stop classification, Idunn non-mutating queue-run lifecycle receipts, and fresh-repo upstream-main proof. Latest deployment cargo proof `.epiphany-smoke\repo-deployment-request-family-20260620-195605` shows `repo.deployment_request` closes through Soul while requesting reviewed git-push-observed-by-Idunn deployment with script/host/secret/rollback/aftercare requirements and no deployment/SSH/git-push/service authority. Latest security cargo proof `.epiphany-smoke\repo-secret-policy-request-family-20260620-193046` shows `repo.secret_policy_request` closes through Soul while requesting reviewed secret/write/export/deployment policy without exposing secrets or granting write/deployment/publication authority. Governance proof `.epiphany-smoke\repo-doctrine-update-request-family-20260620-192140` shows `repo.doctrine_update_request` closes through Soul while requesting reviewed `AGENTS.md` doctrine work without mutating doctrine or granting Hands/service/publication authority. Swarm-run stop proofs now include `.epiphany-smoke\fresh-repo-mvp-20260620-180024` for `iteration-limit` / Self / `self.scheduler-iteration-limit` with upstream-main sync and public-proof export, plus `.epiphany-smoke\swarm-stop-classification-20260620-184717` for `queue-empty` / Gjallar / `repo.work.overview`, `dry-run-preview` / Self / `ready-to-run`, `authority-gated` / Bifrost / `awaiting-publication`, and `authority-gated` / Bifrost/GitHub / `awaiting-upstream-sync`; all stop packets are non-mutating, non-elevated, and `privateStateExposed=false`. Native proof `.epiphany-smoke\repo-work-service-lifecycle-20260620-185853` now proves Idunn-owned non-mutating repo-work queue-run service plan/runbook receipts for exact service id `epiphany-repo-work-queue-runner`, receipt-directory readback, runbook SHA-256 `f2ec67c4f8243a3ebc2f9e915b6b9f5ae2ac2d99d2cdb86905b54667adc456f8`, `hostedBody=repo-work`, no service-manager mutation, no launch, no elevation, and `privateStateExposed=false`.
|
||||
- Mind-admitted repo-work map facts now leave local Verse sight. Successful `epiphany-work close` first admits `.epiphany/state/repo-work-map.msgpack` as `epiphany.repo_work_map_store.v0`, then mirrors the accepted item fact into local Verse as `epiphany.cultmesh.repo_work_map_entry.v0` under `gamecult-local/repo-work-map/latest`. `epiphany-verse-query gjallar` exposes `repoWorkMapRows`, `repoWorkMapTuiRows`, and `latestRepoWorkMapEntry` with safe family, changed-path count, Soul verdict id, Mind review/commit ids, Bifrost gate, source map store ref, and `privateStateExposed=false`; proof `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-203717` plus direct Gjallar readback showed one compact `REPO-WORK-MAP` row after counterfeit Mind adoption was refused and the real close passed. This is sight only; Gjallar still does not schedule, publish, merge, deploy, keep daemons alive, or open private state.
|
||||
- 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.
|
||||
|
|
@ -635,4 +636,4 @@ current_status:
|
|||
- 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.
|
||||
last_completed_repo_swarm_cut: Successful repo-work closure now performs the first durable repo-map admission. `epiphany-work close` writes `.epiphany/state/repo-work-map.msgpack` as typed MessagePack `epiphany.repo_work_map_store.v0`, replacing the item's latest `epiphany.repo_work_map_entry.v0` only after Soul passes, Mind writes gateway/state-commit receipts, and closure remains branch-local/Bifrost-gated. Proof `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-202113` showed a counterfeit Mind-adoption close failed without writing the map, while the original chain wrote a map entry with expected commit SHA, changed path, safe family, Soul verdict id, Mind review/commit ids, `durableStateAdmitted=true`, and `privateStateExposed=false`.
|
||||
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`, `section-note` / `repo.markdown_managed_section`, `task-card` / `repo.task_card`, `repo-status-section` / `repo.status_section`, `repo-manifest` / `repo.body_manifest`, `repo-tool-capabilities` / `repo.tool_capabilities`, `repo-tool-request` / `repo.tool_request`, `repo-eve-surface` / `repo.eve_surface`, `repo-collaboration-policy` / `repo.collaboration_policy`, `repo-collaboration-topic` / `repo.collaboration_topic`, `repo-consensus-brief` / `repo.consensus_brief`, `repo-objective-draft` / `repo.objective_draft`, `repo-adoption-request` / `repo.adoption_request`, `repo-scheduling-request` / `repo.scheduling_request`, `repo-work-order` / `repo.work_order`, `repo-verification-request` / `repo.verification_request`, `repo-publication-request` / `repo.publication_request`, `repo-sync-request` / `repo.sync_request`, `repo-maintainer-review-request` / `repo.maintainer_review_request`, `repo-pr-request` / `repo.pr_request`, `repo-credit-request` / `repo.credit_request`, `repo-artifact-acceptance-request` / `repo.artifact_acceptance_request`, `repo-metrics-request` / `repo.metrics_request`, `repo-doctrine-update-request` / `repo.doctrine_update_request`, `repo-secret-policy-request` / `repo.secret_policy_request`, and `repo-deployment-request` / `repo.deployment_request`, typed Imagination action-item receipts over allowlisted safe families, `epiphany.repo_work_mind_interpretation.v0` plus `epiphany.repo_work_mind_adoption_decision.v0` Mind interpreter receipts, explicit safe-family allowlist refusal, explicit requested-path/plan-changed-path mismatch refusal, Soul closure's Mind-adoption proof guard, and durable repo-work map admission before branch-local Hands consequences reach publication gates, 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 plus wrapper `bifrost-public-proof` for redacted public proofs, Idunn-hosted non-mutating queue-run lifecycle plan/runbook receipts including native proof `.epiphany-smoke\repo-work-service-lifecycle-20260620-185853`, and the speech-audited `epiphany-work persona-intake` mouth plus wrapper `repo-persona-intake` are live with `privateStateExposed=false`; proofs `.epiphany-smoke\fresh-repo-mvp-20260620-180024`, `.epiphany-smoke\swarm-stop-classification-20260620-184717`, `.epiphany-smoke\repo-mind-safe-family-guard-20260620-194425`, `.epiphany-smoke\repo-mind-path-guard-20260620-194239`, `.epiphany-smoke\repo-doctrine-update-request-family-20260620-192140`, `.epiphany-smoke\repo-secret-policy-request-family-20260620-193046`, `.epiphany-smoke\repo-deployment-request-family-20260620-195605`, `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-201153`, and `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-202113` show fresh-repo iteration-limit stop classification, empty-queue Gjallar classification, dry-run planning-preview Self classification, Bifrost publication-gate classification, Bifrost/GitHub upstream-sync gate classification, Mind refusal for unsupported safe-family cargo and mismatched requested paths, reviewed doctrine/security/deployment request cargo, closure refusal for counterfeit Mind adoption, durable repo-map admission only after passing closure, closure, publication receipts, upstream-main sync, public-proof export, and private-state sealing. 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 local Verse projection of the durable repo map, deeper semantic review/map lenses, further useful repo-owned config/action request families, or explicit Idunn deployment execution/audit under operator authority. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start/deployment 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`, `section-note` / `repo.markdown_managed_section`, `task-card` / `repo.task_card`, `repo-status-section` / `repo.status_section`, `repo-manifest` / `repo.body_manifest`, `repo-tool-capabilities` / `repo.tool_capabilities`, `repo-tool-request` / `repo.tool_request`, `repo-eve-surface` / `repo.eve_surface`, `repo-collaboration-policy` / `repo.collaboration_policy`, `repo-collaboration-topic` / `repo.collaboration_topic`, `repo-consensus-brief` / `repo.consensus_brief`, `repo-objective-draft` / `repo.objective_draft`, `repo-adoption-request` / `repo.adoption_request`, `repo-scheduling-request` / `repo.scheduling_request`, `repo-work-order` / `repo.work_order`, `repo-verification-request` / `repo.verification_request`, `repo-publication-request` / `repo.publication_request`, `repo-sync-request` / `repo.sync_request`, `repo-maintainer-review-request` / `repo.maintainer_review_request`, `repo-pr-request` / `repo.pr_request`, `repo-credit-request` / `repo.credit_request`, `repo-artifact-acceptance-request` / `repo.artifact_acceptance_request`, `repo-metrics-request` / `repo.metrics_request`, `repo-doctrine-update-request` / `repo.doctrine_update_request`, `repo-secret-policy-request` / `repo.secret_policy_request`, and `repo-deployment-request` / `repo.deployment_request`, typed Imagination action-item receipts over allowlisted safe families, `epiphany.repo_work_mind_interpretation.v0` plus `epiphany.repo_work_mind_adoption_decision.v0` Mind interpreter receipts, explicit safe-family allowlist refusal, explicit requested-path/plan-changed-path mismatch refusal, Soul closure's Mind-adoption proof guard, durable repo-work map admission before branch-local Hands consequences reach publication gates, local Verse `epiphany.cultmesh.repo_work_map_entry.v0` Gjallar readback for Mind-admitted map facts, 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 plus wrapper `bifrost-public-proof` for redacted public proofs, Idunn-hosted non-mutating queue-run lifecycle plan/runbook receipts including native proof `.epiphany-smoke\repo-work-service-lifecycle-20260620-185853`, and the speech-audited `epiphany-work persona-intake` mouth plus wrapper `repo-persona-intake` are live with `privateStateExposed=false`; proofs `.epiphany-smoke\fresh-repo-mvp-20260620-180024`, `.epiphany-smoke\swarm-stop-classification-20260620-184717`, `.epiphany-smoke\repo-mind-safe-family-guard-20260620-194425`, `.epiphany-smoke\repo-mind-path-guard-20260620-194239`, `.epiphany-smoke\repo-doctrine-update-request-family-20260620-192140`, `.epiphany-smoke\repo-secret-policy-request-family-20260620-193046`, `.epiphany-smoke\repo-deployment-request-family-20260620-195605`, `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-201153`, `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-202113`, and `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-203717` show fresh-repo iteration-limit stop classification, empty-queue Gjallar classification, dry-run planning-preview Self classification, Bifrost publication-gate classification, Bifrost/GitHub upstream-sync gate classification, Mind refusal for unsupported safe-family cargo and mismatched requested paths, reviewed doctrine/security/deployment request cargo, closure refusal for counterfeit Mind adoption, durable repo-map admission only after passing closure, local Verse/Gjallar map projection, closure, publication receipts, upstream-main sync, public-proof export, and private-state sealing. 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 deeper semantic review/map lenses, further useful repo-owned config/action request families, or explicit Idunn deployment execution/audit under operator authority. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start/deployment execution still requires explicit elevated operator authority.
|
||||
|
|
|
|||
Reference in a new issue