Prove repo work service lifecycle plan

This commit is contained in:
Meta Vens 2026-06-20 20:02:23 +01:00
commit 9b32576a44
5 changed files with 406 additions and 7 deletions

View file

@ -0,0 +1,375 @@
use anyhow::Context;
use anyhow::Result;
use anyhow::anyhow;
use chrono::Utc;
use serde_json::Value;
use serde_json::json;
use sha2::Digest;
use sha2::Sha256;
use std::env;
use std::fs;
use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
fn main() -> Result<()> {
let args = Args::parse()?;
let result = run_smoke(args)?;
println!("{}", serde_json::to_string_pretty(&result)?);
Ok(())
}
#[derive(Clone, Debug)]
struct Args {
root: PathBuf,
smoke_root: PathBuf,
}
impl Args {
fn parse() -> Result<Self> {
let mut root = env::current_dir().context("failed to resolve current directory")?;
let mut smoke_root = root.join(".epiphany-smoke");
let mut args = env::args().skip(1).peekable();
while let Some(arg) = args.next() {
match arg.as_str() {
"--root" => root = take_path(&mut args, "--root")?,
"--smoke-root" => smoke_root = take_path(&mut args, "--smoke-root")?,
other => return Err(anyhow!("unexpected argument {other:?}")),
}
}
Ok(Self { root, smoke_root })
}
}
fn run_smoke(args: Args) -> Result<Value> {
let root = args
.root
.canonicalize()
.with_context(|| format!("failed to resolve {}", args.root.display()))?;
let manifest = root.join("epiphany-core").join("Cargo.toml");
if !manifest.exists() {
return Err(anyhow!(
"could not find epiphany-core manifest at {}",
manifest.display()
));
}
fs::create_dir_all(&args.smoke_root)
.with_context(|| format!("failed to create {}", args.smoke_root.display()))?;
let stamp = Utc::now().format("%Y%m%d-%H%M%S").to_string();
let smoke_dir = args
.smoke_root
.join(format!("repo-work-service-lifecycle-{stamp}"));
if smoke_dir.exists() {
fs::remove_dir_all(&smoke_dir)
.with_context(|| format!("failed to clear {}", smoke_dir.display()))?;
}
fs::create_dir_all(&smoke_dir)
.with_context(|| format!("failed to create {}", smoke_dir.display()))?;
let repo = smoke_dir.join("repo-body");
fs::create_dir_all(&repo).with_context(|| format!("failed to create {}", repo.display()))?;
let local_verse = repo.join(".epiphany").join("local-verse.ccmp");
let runbook_path = smoke_dir.join("epiphany-repo-work-queue-runner.ps1");
let service_id = "epiphany-repo-work-queue-runner";
let scheduler_id = "epiphany-repo-work-queue-runner";
let runtime_id = "epiphany-local";
let daemon_id = "epiphany-daemon-self";
let repo_work_runtime_id = "repo-work-service-lifecycle-smoke";
let epiphany_work_bin = root
.join("epiphany-core")
.join("target")
.join("debug")
.join(if cfg!(windows) {
"epiphany-work.exe"
} else {
"epiphany-work"
});
let service_args = vec![
"queue-run".to_string(),
"--workspace".to_string(),
path_string(&repo)?,
"--epiphany-root".to_string(),
path_string(&root)?,
"--local-verse-store".to_string(),
path_string(&local_verse)?,
"--runtime-id".to_string(),
repo_work_runtime_id.to_string(),
"--max-items".to_string(),
"1".to_string(),
"--dry-run".to_string(),
];
let plan = daemon_supervisor(
&manifest,
&root,
&local_verse,
&[
"service-plan",
"--store",
path_str(&local_verse)?,
"--runtime-id",
runtime_id,
"--daemon-id",
daemon_id,
"--scheduler-id",
scheduler_id,
"--service-id",
service_id,
"--service-command",
path_str(&epiphany_work_bin)?,
"--reason",
"Idunn-owned lifecycle artifact for Self-owned repo work queue-run pulse.",
"--cwd",
path_str(&root)?,
],
&service_args,
)?;
let runbook = daemon_supervisor(
&manifest,
&root,
&local_verse,
&[
"service-runbook",
"--store",
path_str(&local_verse)?,
"--runtime-id",
runtime_id,
"--daemon-id",
daemon_id,
"--scheduler-id",
scheduler_id,
"--service-id",
service_id,
"--service-command",
path_str(&epiphany_work_bin)?,
"--reason",
"Idunn-owned lifecycle artifact for Self-owned repo work queue-run pulse.",
"--cwd",
path_str(&root)?,
"--runbook-path",
path_str(&runbook_path)?,
],
&service_args,
)?;
require_eq(&plan, &["status"], "planned")?;
require_eq(&runbook, &["status"], "written")?;
require_eq(&plan, &["serviceId"], service_id)?;
require_eq(&runbook, &["serviceId"], service_id)?;
require_bool(&plan, &["privateStateExposed"], false)?;
require_bool(&runbook, &["privateStateExposed"], false)?;
require_text_array_contains(&plan, &["args"], "queue-run")?;
require_text_array_contains(&plan, &["args"], "--dry-run")?;
require_text_array_contains(&plan, &["args"], path_str(&repo)?)?;
require_text_array_contains(&runbook, &["args"], "queue-run")?;
require_text_array_contains(&runbook, &["args"], "--dry-run")?;
let runbook_text = fs::read_to_string(&runbook_path)
.with_context(|| format!("failed to read {}", runbook_path.display()))?;
require_text(
&runbook_text,
"Generated by epiphany-daemon-supervisor service-runbook",
)?;
require_text(&runbook_text, "Start-Process")?;
require_text(&runbook_text, "-WindowStyle Hidden")?;
require_text(&runbook_text, "queue-run")?;
require_text(&runbook_text, "--dry-run")?;
let runbook_sha256 = sha256_file(&runbook_path)?;
let receipts = cargo_json(
&manifest,
"epiphany-verse-query",
&[
"receipt-directory",
"--store",
path_str(&local_verse)?,
"--runtime-id",
runtime_id,
],
&root,
)?;
let receipt_rows = receipts
.get("rows")
.and_then(Value::as_array)
.cloned()
.unwrap_or_default();
let service_row = receipt_rows.iter().find(|row| {
row.get("family").and_then(Value::as_str) == Some("service-lifecycle")
&& row.get("serviceId").and_then(Value::as_str) == Some(service_id)
});
let Some(service_row) = service_row else {
return Err(anyhow!(
"receipt directory did not expose service-lifecycle row for {service_id}"
));
};
require_eq(service_row, &["status"], "written")?;
require_eq(service_row, &["artifactStatus"], "present")?;
require_eq(
service_row,
&["serviceRoute"],
"epiphany-repo-work-queue-runner::runbook",
)?;
let summary = json!({
"schemaVersion": "epiphany.repo_work_service_lifecycle_smoke.v0",
"status": "ok",
"smokeDir": smoke_dir,
"repo": repo,
"localVerseStore": local_verse,
"serviceId": service_id,
"schedulerId": scheduler_id,
"daemonId": daemon_id,
"planStatus": plan["status"],
"planReceiptId": plan["receiptId"],
"runbookStatus": runbook["status"],
"runbookReceiptId": runbook["receiptId"],
"runbookPath": runbook_path,
"runbookSha256": runbook_sha256,
"serviceCommand": plan["command"],
"serviceArgs": plan["args"],
"lifecycleOwner": "Idunn",
"hostedBody": "repo-work",
"mutatesServiceManager": false,
"launchesService": false,
"requiresElevatedAuthority": false,
"privateStateExposed": false,
});
write_json(&smoke_dir.join("summary.json"), &summary)?;
Ok(summary)
}
fn daemon_supervisor(
manifest: &Path,
cwd: &Path,
_store: &Path,
base_args: &[&str],
service_args: &[String],
) -> Result<Value> {
let mut args = base_args
.iter()
.map(|arg| (*arg).to_string())
.collect::<Vec<_>>();
for service_arg in service_args {
args.push("--service-arg".to_string());
args.push(service_arg.clone());
}
let arg_refs = args.iter().map(String::as_str).collect::<Vec<_>>();
cargo_json(manifest, "epiphany-daemon-supervisor", &arg_refs, cwd)
}
fn cargo_json(manifest: &Path, bin: &str, args: &[&str], cwd: &Path) -> Result<Value> {
let output = Command::new("cargo")
.arg("run")
.arg("--quiet")
.arg("--manifest-path")
.arg(manifest)
.arg("--bin")
.arg(bin)
.arg("--")
.args(args)
.current_dir(cwd)
.output()
.with_context(|| format!("failed to run cargo bin {bin}"))?;
if !output.status.success() {
return Err(anyhow!(
"{bin} failed with status {:?}\nstdout:\n{}\nstderr:\n{}",
output.status.code(),
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
));
}
serde_json::from_slice(&output.stdout).with_context(|| {
format!(
"{bin} did not emit JSON on stdout:\n{}",
String::from_utf8_lossy(&output.stdout)
)
})
}
fn write_json(path: &Path, value: &Value) -> Result<()> {
if let Some(parent) = path.parent() {
fs::create_dir_all(parent)
.with_context(|| format!("failed to create {}", parent.display()))?;
}
fs::write(path, serde_json::to_vec_pretty(value)?)
.with_context(|| format!("failed to write {}", path.display()))
}
fn sha256_file(path: &Path) -> Result<String> {
let bytes = fs::read(path).with_context(|| format!("failed to read {}", path.display()))?;
Ok(format!("{:x}", Sha256::digest(bytes)))
}
fn require_eq(value: &Value, path: &[&str], expected: &str) -> Result<()> {
let actual = path
.iter()
.try_fold(value, |current, key| current.get(*key))
.and_then(Value::as_str)
.unwrap_or("<missing>");
if actual == expected {
Ok(())
} else {
Err(anyhow!(
"expected {} to be {expected:?}, got {actual:?}",
path.join(".")
))
}
}
fn require_bool(value: &Value, path: &[&str], expected: bool) -> Result<()> {
let actual = path
.iter()
.try_fold(value, |current, key| current.get(*key))
.and_then(Value::as_bool);
if actual == Some(expected) {
Ok(())
} else {
Err(anyhow!(
"expected {} to be {expected}, got {:?}",
path.join("."),
actual
))
}
}
fn require_text_array_contains(value: &Value, path: &[&str], expected: &str) -> Result<()> {
let values = path
.iter()
.try_fold(value, |current, key| current.get(*key))
.and_then(Value::as_array)
.ok_or_else(|| anyhow!("expected {} to be an array", path.join(".")))?;
if values.iter().any(|value| value.as_str() == Some(expected)) {
Ok(())
} else {
Err(anyhow!(
"expected {} to contain {expected:?}, got {:?}",
path.join("."),
values
))
}
}
fn require_text(haystack: &str, needle: &str) -> Result<()> {
if haystack.contains(needle) {
Ok(())
} else {
Err(anyhow!("expected text to contain {needle:?}"))
}
}
fn take_path(
args: &mut std::iter::Peekable<impl Iterator<Item = String>>,
flag: &str,
) -> Result<PathBuf> {
args.next()
.map(PathBuf::from)
.with_context(|| format!("missing value for {flag}"))
}
fn path_str(path: &Path) -> Result<&str> {
path.to_str()
.ok_or_else(|| anyhow!("path is not valid UTF-8: {}", path.display()))
}
fn path_string(path: &Path) -> Result<String> {
Ok(path_str(path)?.to_string())
}

View file

@ -1427,7 +1427,12 @@ Build the remaining MVP in this order:
pulse. The first cut should be non-mutating plan/runbook receipts. Only the
operator may grant service mutation. Self must not become the daemon keeper.
This first cut is landed through `tools/epiphany_local_run.ps1 -Mode
repo-work-service-plan` and `-Mode repo-work-service-runbook`.
repo-work-service-plan` and `-Mode repo-work-service-runbook`, and now has a
native repeatable smoke at
`.epiphany-smoke\repo-work-service-lifecycle-20260620-185853` proving the
exact queue-run command vector with `--dry-run`, a written runbook receipt,
receipt-directory readback, no service-manager mutation, no launch, no
elevation, and `privateStateExposed=false`.
2. **Persona-to-Imagination action items.** The first repo Persona intake mouth
is landed: `epiphany-work persona-intake` routes work-shaped speech through
the Persona bubble speech-audit path, records public discussion refs and
@ -1633,7 +1638,22 @@ The chain is typed and sealed enough to be useful:
--epiphany-root <root> --local-verse-store <repo>\.epiphany\local-verse.ccmp
--runtime-id <id> --max-items <n>`. The receipts and runbook describe the
real queue-run command, but do not launch, install, publish, merge, cross repo
boundaries, or expose private state.
boundaries, or expose private state. Native smoke
`.epiphany-smoke\repo-work-service-lifecycle-20260620-185853` now proves the
same Idunn plan/runbook artery without wrapper trust: plan status `planned`,
runbook status `written`, service id `epiphany-repo-work-queue-runner`,
plan/runbook receipt ids
`daemon-service-lifecycle-receipt-epiphany-repo-work-queue-runner-install-plan`
and
`daemon-service-lifecycle-receipt-epiphany-repo-work-queue-runner-runbook`,
runbook SHA-256
`f2ec67c4f8243a3ebc2f9e915b6b9f5ae2ac2d99d2cdb86905b54667adc456f8`,
service args containing `queue-run` and `--dry-run`, a latest
receipt-directory `service-lifecycle` row with `artifactStatus=present` and
route `epiphany-repo-work-queue-runner::runbook`, plus
`lifecycleOwner=Idunn`, `hostedBody=repo-work`,
`mutatesServiceManager=false`, `launchesService=false`,
`requiresElevatedAuthority=false`, and `privateStateExposed=false`.
- `epiphany-work persona-intake` is the first repo Persona mouth over accepted
work pressure. It requires an online repo swarm receipt, writes a Persona
bubble plus speech-audit witness into the repo-local Verse, records public
@ -1825,9 +1845,12 @@ Required organs before MVP:
`authority-gated` / Bifrost / `awaiting-publication` for the publication
blocker, and `authority-gated` / Bifrost/GitHub /
`awaiting-upstream-sync` for the upstream-main sync blocker. All stop
packets are non-mutating, non-elevated, and private-state sealed. Remaining
work is service lifecycle stop depth and richer closure depth rather than
basic safe-family planning cargo.
packets are non-mutating, non-elevated, and private-state sealed. Native
service lifecycle plan/runbook proof for the queue-run pulse now exists at
`.epiphany-smoke\repo-work-service-lifecycle-20260620-185853`; remaining
service lifecycle work is optional elevated install/start execution proof
under explicit operator authority plus richer closure depth rather than basic
safe-family planning cargo.
- Proof bundle depth: maintainers and future agents can inspect local
operator-safe receipt chains, artifact schema/status rows, SHA-256 receipt
hashes, compact TUI rows, commit refs, verification verdicts, map admission,

File diff suppressed because one or more lines are too long

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 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 requests, action-item receipts, Mind adoption interpretation/decision receipts, overview/public-proof/Gjallar/Eve readbacks, typed swarm-run stop classification, Idunn non-mutating queue-run lifecycle receipts, and fresh-repo upstream-main proof. 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`.
- 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 requests, action-item receipts, Mind adoption interpretation/decision receipts, overview/public-proof/Gjallar/Eve readbacks, typed swarm-run stop classification, Idunn non-mutating queue-run lifecycle receipts, and fresh-repo upstream-main proof. 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`.
- 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`, `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`, and `repo-metrics-request` / `repo.metrics_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 before branch-local Hands authority, 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, 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` and `.epiphany-smoke\swarm-stop-classification-20260620-184717` 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, 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 interpreter semantics beyond the first Mind decision packet, more useful repo-owned config/action families, service lifecycle stop depth, or Idunn-owned queue-run service lifecycle under explicit operator authority. 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`, `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`, and `repo-metrics-request` / `repo.metrics_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 before branch-local Hands authority, 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` and `.epiphany-smoke\swarm-stop-classification-20260620-184717` 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, 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 interpreter semantics beyond the first Mind decision packet, more useful repo-owned config/action families, optional elevated queue-run service install/start execution plus complete aftercare audit under explicit operator authority, or richer closure depth. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start execution still requires explicit elevated operator authority.