From 9b32576a44f69031e812e1590377dce7be8aff34 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 20 Jun 2026 20:02:23 +0100 Subject: [PATCH] Prove repo work service lifecycle plan --- ...phany-repo-work-service-lifecycle-smoke.rs | 375 ++++++++++++++++++ notes/epiphany-repo-swarm-mvp-contract.md | 33 +- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 348143 -> 348713 bytes state/map.yaml | 4 +- 5 files changed, 406 insertions(+), 7 deletions(-) create mode 100644 epiphany-core/src/bin/epiphany-repo-work-service-lifecycle-smoke.rs diff --git a/epiphany-core/src/bin/epiphany-repo-work-service-lifecycle-smoke.rs b/epiphany-core/src/bin/epiphany-repo-work-service-lifecycle-smoke.rs new file mode 100644 index 00000000..ff728370 --- /dev/null +++ b/epiphany-core/src/bin/epiphany-repo-work-service-lifecycle-smoke.rs @@ -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 { + 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 { + 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 { + let mut args = base_args + .iter() + .map(|arg| (*arg).to_string()) + .collect::>(); + 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::>(); + cargo_json(manifest, "epiphany-daemon-supervisor", &arg_refs, cwd) +} + +fn cargo_json(manifest: &Path, bin: &str, args: &[&str], cwd: &Path) -> Result { + 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 { + 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(""); + 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>, + flag: &str, +) -> Result { + 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 { + Ok(path_str(path)?.to_string()) +} diff --git a/notes/epiphany-repo-swarm-mvp-contract.md b/notes/epiphany-repo-swarm-mvp-contract.md index 2b15be17..19a00106 100644 --- a/notes/epiphany-repo-swarm-mvp-contract.md +++ b/notes/epiphany-repo-swarm-mvp-contract.md @@ -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 --local-verse-store \.epiphany\local-verse.ccmp --runtime-id --max-items `. 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, diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 75ad8f22..7178b58d 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -105,6 +105,7 @@ remembers doctrine; the branch remembers the blade. - `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance. `epiphany-verse-query swarm-brake --brake-status engaged|released` can now write the local Verse brake document, and `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when that brake is engaged while keeping `status` readable. `epiphany-mvp-coordinator` also checks `--local-verse-store` before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when passed `--local-verse-store`. Daemon tool invocation, daemon lifecycle poke, and `epiphany-daemon-supervisor` restart/tick/serve/service-plan/service-launch/service-runbook/windows-service-install/windows-service-status/windows-service-reconcile/windows-service-execution-readiness/start/stop attempts now fail closed under a matching engaged brake; supervisor restart now has durable per-daemon policy with cooldown/backoff, explicit scheduled tick pulses, latest scheduler receipts, typed service lifecycle plan/launch/runbook/install/status/reconcile/readiness/start/stop receipts, and local operator wrapper modes that write runbook/install/status/reconcile/readiness/control-plan/execution artifacts plus operator run receipts. The installed-service read path, read-only service-policy reconciliation path, execution-readiness path, non-mutating start/stop control-plan path, and non-elevated execution refusal path have been proved against real Windows `EventLog` service-manager state or safe missing-service targets through local Verse receipts, including explicit wrapper install/start/stop execution modes. The next cut is actual elevated install/start/stop execution proof under operator authority. - `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live seventeen-front-door chain from `epiphany-repo init` through `epiphany-swarm run`, `epiphany-work persona-intake`, `derive-plan`, `close`, `overview`, `export-proof`, `tick`, `queue-run`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs as deeper interpreter/adoption semantics, more useful repo-owned configuration/action families, and Idunn-owned queue-run service lifecycle under explicit operator authority. Autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, Idunn owns daemon lifecycle, and `epiphany-work tick` may only advance one safe receipt-backed branch-local step per pulse before stopping at publication gates. `epiphany-work derive-plan` now consumes accepted Persona/Bifrost pressure, writes typed Imagination action-item receipts, then lowers allowlisted safe families into Imagination/Self action plans: `append-worklog` appends to `EPIPHANY_WORKLOG.md`, `planning-note` creates a contained markdown note under `notes/epiphany-work/.md`, `checklist-note` creates a contained checklist, `section-note` / `repo.markdown_managed_section` creates or replaces one marker-bounded markdown section, `repo-status-section` / `repo.status_section` updates a marker-bounded operator-safe status section in `README.md` by default, and `task-card` / `repo.task_card` writes a structured TOML task card under `notes/epiphany-work/-task-card.toml`; the receipts carry `operatorAuthoredShellDetails=false`, authority seals, and no private-state exposure. Disposable smokes proved append-worklog, planning-note, checklist-note, section-note, task-card, and repo-status-section routes through branch-local Hands commits; `.epiphany-smoke\repo-status-section-20260620-140245` reached close with `repo.status_section`, `modelAuthored=true`, a committed `README.md` status section bounded by Epiphany status markers, Soul `passed`, `pathScopeMatched=true`, and `privateStateExposed=false`. Native repeatable smoke `epiphany-repo-swarm-mvp-smoke` now proves a fresh repo from disposable origin through init, online, Persona intake, model-authored repo-status plan, overview queue projection, `epiphany-swarm run`, Soul close, Bifrost publication receipts, disposable maintainer merge to `origin/main`, upstream-main sync, overview, and public-proof export; `.epiphany-smoke\fresh-repo-mvp-20260620-133452` reported branch `epiphany/fresh-repo-smoke/mvp-proof`, Hands commit `76f8d5ebb023951a513864bdf8555a524d89c5dc`, Soul `passed`, `familyAssertions.status=passed`, `publishStatus=publication-receipts-recorded`, `syncStatus=upstream-main-synced`, `upstreamMainSynced=true`, `publicProofStatus=public-proof-exported`, and `privateStateExposed=false`. `epiphany-work overview` now reads the repo work receipt chain and writes an Eyes/Gjallar-owned sight/proof bundle with current gate, blocker, next safe action, branch, changed paths, commit SHA, Soul verdict, compact rows, and private-state seal; it also mirrors a typed `epiphany.cultmesh.repo_work_overview.v0` document into the repo-local Verse when a local Verse store is known. `epiphany-work export-proof` mirrors redacted public proofs into local Verse, and `epiphany-verse-query bifrost-public-proof` plus wrapper `tools/epiphany_local_run.ps1 -Mode bifrost-public-proof` now publish an existing redacted proof row as `gamecult.bifrost.public_proof_publication_receipt.v0` with public Verse target, public room, ledger, review, credit, proof ref/SHA, and `privateStateExposed=false`; smoke `.epiphany-smoke\checklist-note-20260620-031347` plus wrapper artifact `local-20260620-132418-144-62ba9369` proved latest `bifrost-public-proof-publication-wrapper-checklist` in `bifrost-ledger` and `receipt-directory`. The tick pulse reads the repo-local CultMesh swarm brake and writes `refused-by-swarm-brake` without creating run/adopt/execute receipts when the brake is engaged. It also writes active-turn and last-completed scheduler receipts, refuses live duplicate pulses as `refused-active-turn`, refuses explicit completion-anchored cooldown as `refused-by-cooldown`, clears stale active markers after `--active-timeout-seconds`, and records `physiology.recoveredActiveTurn.recovered=true` when recovery proceeds. `epiphany-work queue-run` reads the repo-local typed overview queue, selects tick-actionable rows for the current repo Body through `awaiting-closure`, delegates to `tick`, refreshes overview after real advancement, and is wrapped by `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run`; `epiphany-swarm run` is the bounded operator mouth over that same queue/tick artery. `epiphany-work serve` wraps the item-scoped tick artery in Self-owned cadence: bounded `--max-iterations` proof mode writes `work-scheduler-serve-.json`, unbounded service mode relies on per-pulse tick receipts, and unbounded zero-second polling is refused. `epiphany-work close` consumes branch-local execute receipts, verifies the Hands commit, writes `epiphany.repo_work_closure_review.v0` with verification command/exit code, declared-vs-actual git changed paths, commit stat, optional model-review provenance, optional/required model-authored closure verdicts, committed-content assertions for known safe families, and authority seals; Soul refuses path-scope mismatches, safe-family assertion failures, and supplied or required model verdicts that do not pass before Modeling/Mind closure, even when the changed path list and family assertions match. Focused smoke `.epiphany-smoke\closure-model-gate-20260620-135103` proved a passing required model verdict closes and a `needs-work` model verdict blocks closure with `familyAssertions.status=passed`, `pathScopeMatched=true`, and `privateStateExposed=false`. The close receipt still grants no publication, merge, service lifecycle, cross-repo mutation, or private-state exposure; tick now calls deterministic close after execution unless a caller explicitly supplies the model verdict gate. `epiphany-work publish --closure-receipt` can consume the closure's Soul/Mind ids, while tick no-ops once closure exists before Bifrost publication authority. - 2026-06-20: The same repo-swarm note now carries the explicit migration thesis, MVP status board, Epiphany Online cut order, authority matrix, local CultMesh tool availability doctrine, and upstream-main sync doctrine. `tools/epiphany_local_run.ps1 -Mode repo-work-service-plan` and `-Mode repo-work-service-runbook` now write Idunn-owned non-mutating lifecycle receipts/artifacts for the real `epiphany-work queue-run` command; proofs `local-20260620-021415-094-58439baf` and `local-20260620-021415-147-067c36b0` planned/wrote the queue-run command vector with `privateStateExposed=false` and no service launch/install. Use that note when answering "are we headed toward a functional swarm?" The answer is yes, and the remaining cuts must preserve typed organ ownership: deeper model-authored closure review, further non-planning action classes, and Idunn-owned queue-run service lifecycle under explicit operator authority. Persona is the mouth, Imagination plans, Self schedules, Hands acts, Soul verifies, Modeling maps, Mind admits, Gjallar sees, Odin discovers, Idunn keeps daemon physiology alive, Bifrost publishes and credits, and Eve/CultUI renders without becoming truth. +- 2026-06-20: Native repo-work queue-run service lifecycle proof is now landed. Smoke `.epiphany-smoke\repo-work-service-lifecycle-20260620-185853` proves Idunn can write non-mutating `service-plan` and `service-runbook` receipts for exact service id `epiphany-repo-work-queue-runner`, with service args including `queue-run --dry-run`, runbook SHA-256 `f2ec67c4f8243a3ebc2f9e915b6b9f5ae2ac2d99d2cdb86905b54667adc456f8`, receipt-directory `service-lifecycle` readback present, `lifecycleOwner=Idunn`, `hostedBody=repo-work`, `mutatesServiceManager=false`, `launchesService=false`, `requiresElevatedAuthority=false`, and `privateStateExposed=false`. The remaining scar is elevated install/start execution and complete aftercare audit under explicit operator authority, not basic plan/runbook proof. - 2026-06-20: The first repo Persona intake mouth is live. `epiphany-work persona-intake` requires a repo-swarm online receipt, records a Persona bubble/speech-audit witness into repo-local CultMesh, creates public discussion and candidate action refs, delegates to `accept`, and seals `work-persona-intake-.json` without Hands, durable-state, publication, service lifecycle, cross-repo, elevation, or private-state authority. Wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-persona-intake -RepoWorkItem -PersonaInput ''` exposes the operator surface. Disposable proof `.epiphany-smoke\persona-intake-20260620-022500` wrote direct item `persona-request` with speech audit `persona-speech-audit-cdcd20a7`, feedback `repo-work-feedback-persona-request`, consensus `repo-work-consensus-persona-request`, and `privateStateExposed=false`; wrapper artifact `local-20260620-022551-566-5576908e` wrote item `persona-wrapper`, speech audit `persona-speech-audit-55f74218`, feedback `repo-work-feedback-persona-wrapper`, consensus `repo-work-consensus-persona-wrapper`, and candidate action `candidate-action://repo-swarm-local/persona-wrapper/persona-speech-audit-55f74218`. The next cut is deeper model-authored closure review, further non-planning action classes, or Idunn-owned queue-run service execution; not another intake/display surface. - 2026-06-20: Typed Imagination action-item receipts are live in `epiphany-work derive-plan`. The command now writes `work-action-items-.json` with schema `epiphany.repo_work_imagination_action_items_receipt.v0` before writing `work-plan-.json`; the receipt carries model provenance, safe action family, requested paths, verification asks, stop conditions, escalation reasons, rollback hints, public/candidate refs, `operatorAuthoredShellDetails=false`, and no Hands/durable-state/publication/service/cross-repo authority. The plan derivation cites the action-item receipt, while command text remains deterministic safe-family lowering. Disposable proof `.epiphany-smoke\action-items-20260620-023240` wrote action receipt `repo-work-action-items-action-items-request` with `modelAuthored=true`, `safeActionFamily=repo.markdown_planning_note`, requested path `notes/epiphany-work/action-items-request.md`, plan citation present, and `privateStateExposed=false`. The next cut is deeper model-authored closure review, further non-planning action classes, or Idunn-owned queue-run service execution; not another basic action-item schema. - 2026-06-20: The first richer model-authored safe family is live. `epiphany-work derive-plan --action-family checklist-note` lowers accepted Persona/Bifrost pressure into a contained markdown checklist under `notes/epiphany-work/-checklist.md` with safe family `repo.checklist_note`, model provenance, candidate/public refs, branch-local checklist items, verification asks, rollback hints, and authority seals forbidding publication, merge, service lifecycle, cross-repo mutation, durable-state admission, and private-state exposure. Disposable proof `.epiphany-smoke\checklist-note-20260620-031347` ran accept -> derive-plan with `--model-ref smoke-imagination-v0 --model-authored` -> run -> adopt -> execute on an `epiphany/*` branch; the derivation and action-item receipt both reported `modelAuthored=true`, Hands created a branch-local commit, overview reported `awaiting-closure`, and `privateStateExposed=false`. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 73a5a59cd379ea4c7d7e87fd446f54f43bc8bc23..d636c5a507cb8ed6db5c70e960e24c8906001316 100644 GIT binary patch delta 468 zcmYLFziSjh7ypR;?7Zj@-*qghV?8fRuNGudWz#`r3%(uDaaxdm(