diff --git a/epiphany-core/src/bin/epiphany-repo-closure-source-grounding-smoke.rs b/epiphany-core/src/bin/epiphany-repo-closure-source-grounding-smoke.rs new file mode 100644 index 00000000..ac069413 --- /dev/null +++ b/epiphany-core/src/bin/epiphany-repo-closure-source-grounding-smoke.rs @@ -0,0 +1,421 @@ +use anyhow::Context; +use anyhow::Result; +use anyhow::anyhow; +use chrono::Utc; +use serde_json::Value; +use serde_json::json; +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-closure-source-grounding-{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()))?; + git(["init"], &repo)?; + git( + ["config", "user.email", "epiphany-smoke@example.invalid"], + &repo, + )?; + git(["config", "user.name", "Epiphany Smoke"], &repo)?; + fs::write( + repo.join("README.md"), + "# Closure Source Grounding Smoke\n\nThis repository proves Soul can require verification output to cite changed paths.\n", + ) + .with_context(|| format!("failed to seed {}", repo.join("README.md").display()))?; + git(["add", "README.md"], &repo)?; + git( + ["commit", "-m", "Seed closure source grounding smoke"], + &repo, + )?; + git(["switch", "-c", "epiphany/closure-source-grounding"], &repo)?; + + let local_verse = repo.join(".epiphany").join("local-verse.ccmp"); + cargo_json( + &manifest, + "epiphany-repo", + &[ + "init", + "--workspace", + path_str(&repo)?, + "--epiphany-root", + path_str(&root)?, + "--swarm-id", + "closure-source-grounding-smoke", + "--topic", + "closure-source-grounding", + ], + &root, + )?; + cargo_json( + &manifest, + "epiphany-swarm", + &[ + "online", + "--workspace", + path_str(&repo)?, + "--epiphany-root", + path_str(&root)?, + "--runtime-id", + "closure-source-grounding-smoke", + "--local-verse-store", + path_str(&local_verse)?, + ], + &root, + )?; + + let good = drive_item( + &manifest, + &root, + &repo, + "closure-source-grounded", + "Prove default closure verification cites the changed path.", + None, + )?; + let bad = drive_item( + &manifest, + &root, + &repo, + "closure-proofless-output", + "Prove source grounding blocks proofless verification output.", + Some("Write-Output 'ok'"), + )?; + + require_eq(&good.close, &["status"], "closed")?; + require_eq(&good.close, &["soul", "verdict"], "passed")?; + require_bool( + &good.close, + &[ + "closureReview", + "verificationSourceGrounding", + "allDeclaredPathsMentionedByVerificationOutput", + ], + true, + )?; + require_bool( + &good.close, + &["closureReview", "verificationSourceGrounding", "required"], + true, + )?; + require_eq(&bad.close, &["status"], "verification-failed")?; + require_eq(&bad.close, &["soul", "verdict"], "failed")?; + require_eq( + &bad.close, + &["closureReview", "verificationSourceGrounding", "status"], + "failed", + )?; + require_bool( + &bad.close, + &[ + "closureReview", + "verificationSourceGrounding", + "allDeclaredPathsMentionedByVerificationOutput", + ], + false, + )?; + require_bool( + &bad.close, + &["closureReview", "sourceGrounding", "pathScopeMatched"], + true, + )?; + require_bool( + &bad.close, + &[ + "closureReview", + "sourceGrounding", + "verificationOutputMentionsChangedPaths", + ], + false, + )?; + require_eq( + &bad.close, + &["closureReview", "familyAssertions", "status"], + "passed", + )?; + require_bool(&good.close, &["privateStateExposed"], false)?; + require_bool(&bad.close, &["privateStateExposed"], false)?; + + let summary = json!({ + "schemaVersion": "epiphany.repo_work_closure_source_grounding_smoke.v0", + "status": "ok", + "smokeDir": smoke_dir, + "repo": repo, + "branch": git_output(["branch", "--show-current"], &repo)?, + "passItem": good.item, + "passCloseStatus": good.close["status"], + "passSourceGroundingStatus": good.close["closureReview"]["verificationSourceGrounding"]["status"], + "passVerificationOutputMentionsChangedPaths": good.close["closureReview"]["sourceGrounding"]["verificationOutputMentionsChangedPaths"], + "blockItem": bad.item, + "blockCloseStatus": bad.close["status"], + "blockSoulVerdict": bad.close["soul"]["verdict"], + "blockSourceGroundingStatus": bad.close["closureReview"]["verificationSourceGrounding"]["status"], + "blockPathScopeMatched": bad.close["closureReview"]["sourceGrounding"]["pathScopeMatched"], + "blockFamilyAssertionsStatus": bad.close["closureReview"]["familyAssertions"]["status"], + "privateStateExposed": false, + }); + write_json(&smoke_dir.join("summary.json"), &summary)?; + Ok(summary) +} + +struct ItemProof { + item: String, + close: Value, +} + +fn drive_item( + manifest: &Path, + root: &Path, + repo: &Path, + item: &str, + summary: &str, + verification_command: Option<&str>, +) -> Result { + cargo_json( + manifest, + "epiphany-work", + &[ + "accept", + "--workspace", + path_str(repo)?, + "--from", + "persona", + "--item", + item, + "--summary", + summary, + ], + root, + )?; + cargo_json( + manifest, + "epiphany-work", + &[ + "derive-plan", + "--workspace", + path_str(repo)?, + "--item", + item, + "--action-family", + "repo-status-section", + "--model-ref", + "closure-source-grounding-smoke-imagination-v1", + "--model-authored", + ], + root, + )?; + for _ in 0..3 { + cargo_json( + manifest, + "epiphany-work", + &[ + "tick", + "--workspace", + path_str(repo)?, + "--epiphany-root", + path_str(root)?, + "--item", + item, + "--cooldown-seconds", + "0", + ], + root, + )?; + } + + let mut close_args = vec![ + "close".to_string(), + "--workspace".to_string(), + path_str(repo)?.to_string(), + "--item".to_string(), + item.to_string(), + "--require-source-grounding".to_string(), + ]; + if let Some(command) = verification_command { + close_args.push("--verification-command".to_string()); + close_args.push(command.to_string()); + } + let close_arg_refs = close_args.iter().map(String::as_str).collect::>(); + let close = cargo_json(manifest, "epiphany-work", &close_arg_refs, root)?; + Ok(ItemProof { + item: item.to_string(), + close, + }) +} + +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 git(args: [&str; N], cwd: &Path) -> Result<()> { + let output = Command::new("git") + .args(args) + .current_dir(cwd) + .output() + .with_context(|| format!("failed to run git in {}", cwd.display()))?; + if output.status.success() { + Ok(()) + } else { + Err(anyhow!( + "git failed in {} with status {:?}\nstdout:\n{}\nstderr:\n{}", + cwd.display(), + output.status.code(), + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + )) + } +} + +fn git_output(args: [&str; N], cwd: &Path) -> Result { + let output = Command::new("git") + .args(args) + .current_dir(cwd) + .output() + .with_context(|| format!("failed to run git in {}", cwd.display()))?; + if output.status.success() { + Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()) + } else { + Err(anyhow!( + "git output failed in {} with status {:?}\nstdout:\n{}\nstderr:\n{}", + cwd.display(), + output.status.code(), + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + )) + } +} + +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 path_str(path: &Path) -> Result<&str> { + path.to_str() + .ok_or_else(|| anyhow!("path is not valid UTF-8: {}", path.display())) +} + +fn take_path(args: &mut impl Iterator, name: &str) -> Result { + Ok(PathBuf::from( + args.next() + .ok_or_else(|| anyhow!("missing value for {name}"))?, + )) +} + +fn require_eq(value: &Value, path: &[&str], expected: &str) -> Result<()> { + let actual = value_at(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 {expected:?}, got {actual:?}", + path.join(".") + )) + } +} + +fn require_bool(value: &Value, path: &[&str], expected: bool) -> Result<()> { + let actual = value_at(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 {expected}, got {actual}", + path.join(".") + )) + } +} + +fn value_at<'a>(value: &'a Value, path: &[&str]) -> Option<&'a Value> { + let mut current = value; + for segment in path { + current = current.get(*segment)?; + } + Some(current) +} diff --git a/epiphany-core/src/bin/epiphany-work.rs b/epiphany-core/src/bin/epiphany-work.rs index 58bfa36e..e3ad8fb5 100644 --- a/epiphany-core/src/bin/epiphany-work.rs +++ b/epiphany-core/src/bin/epiphany-work.rs @@ -283,6 +283,7 @@ struct CloseArgs { closure_model_verdict: Option, closure_model_finding: Option, require_closure_model_verdict: bool, + require_source_grounding: bool, model_authored: bool, state_revision: u64, } @@ -860,6 +861,7 @@ fn parse_close_args(args: impl Iterator) -> Result { let mut closure_model_verdict = None; let mut closure_model_finding = None; let mut require_closure_model_verdict = false; + let mut require_source_grounding = false; let mut model_authored = false; let mut state_revision = 0_u64; @@ -894,6 +896,7 @@ fn parse_close_args(args: impl Iterator) -> Result { "--require-closure-model-verdict" | "--require-model-verdict" => { require_closure_model_verdict = true; } + "--require-source-grounding" => require_source_grounding = true, "--model-authored" => model_authored = true, "--state-revision" => state_revision = take_u64(&mut args, "--state-revision")?, other => return Err(anyhow!("unexpected close argument {other:?}")), @@ -912,6 +915,7 @@ fn parse_close_args(args: impl Iterator) -> Result { closure_model_verdict, closure_model_finding, require_closure_model_verdict, + require_source_grounding, model_authored, state_revision, }) @@ -8263,6 +8267,69 @@ fn closure_model_review( )) } +fn closure_verification_source_grounding_review( + declared_changed_paths: &[String], + verification_stdout: &[u8], + verification_stderr: &[u8], + commit_stat: &str, + required: bool, +) -> (Value, bool) { + let stdout_text = String::from_utf8_lossy(verification_stdout); + let stderr_text = String::from_utf8_lossy(verification_stderr); + let verification_output = format!("{stdout_text}\n{stderr_text}"); + let output_lower = verification_output.to_ascii_lowercase(); + let commit_stat_lower = commit_stat.to_ascii_lowercase(); + let mut path_rows = Vec::new(); + for path in declared_changed_paths { + let path_lower = path.to_ascii_lowercase(); + let slash_variant = path_lower.replace('\\', "/"); + let backslash_variant = path_lower.replace('/', "\\"); + let mentioned_in_verification_output = output_lower.contains(&slash_variant) + || output_lower.contains(&backslash_variant) + || output_lower.contains(&path_lower); + let present_in_commit_stat = commit_stat_lower.contains(&slash_variant) + || commit_stat_lower.contains(&backslash_variant) + || commit_stat_lower.contains(&path_lower); + path_rows.push(json!({ + "path": path, + "mentionedInVerificationOutput": mentioned_in_verification_output, + "presentInCommitStat": present_in_commit_stat, + "passed": mentioned_in_verification_output && present_in_commit_stat + })); + } + let all_paths_mentioned = !declared_changed_paths.is_empty() + && path_rows + .iter() + .all(|row| row.get("passed").and_then(Value::as_bool) == Some(true)); + let passed = !required || all_paths_mentioned; + let status = if all_paths_mentioned { + "passed" + } else if required { + "failed" + } else { + "informational" + }; + ( + json!({ + "schemaVersion": "epiphany.repo_work_verification_source_grounding_review.v0", + "status": status, + "passed": passed, + "required": required, + "declaredPathCount": declared_changed_paths.len(), + "allDeclaredPathsMentionedByVerificationOutput": all_paths_mentioned, + "pathRows": path_rows, + "reason": if all_paths_mentioned { + "verification output and commit stat cite every declared changed path" + } else if required { + "source-grounded closure required verification output to cite every declared changed path" + } else { + "verification output did not cite every declared changed path; recorded as advisory source-grounding signal" + } + }), + passed, + ) +} + fn read_committed_file( workspace: &Path, commit_sha: &str, @@ -9355,6 +9422,19 @@ fn run_close(args: CloseArgs) -> Result { ); let path_scope_matched = declared_changed_paths == actual_changed_paths; let commit_stat = git_output(&workspace, &["show", "--stat", "--oneline", &commit_sha])?; + let (verification_source_grounding, verification_source_grounded) = + closure_verification_source_grounding_review( + &declared_changed_paths, + &verification.stdout, + &verification.stderr, + &commit_stat, + args.require_source_grounding, + ); + let verification_output_mentions_changed_paths = bool_from_json( + &verification_source_grounding, + &["allDeclaredPathsMentionedByVerificationOutput"], + ) + .unwrap_or(false); let (family_assertions, family_assertions_passed) = closure_family_assertions(&workspace, &commit_sha, &execute_receipt, &item)?; let (mind_adoption_review, mind_adoption_passed) = @@ -9398,10 +9478,13 @@ fn run_close(args: CloseArgs) -> Result { "pathScopeMatched": path_scope_matched, "commitStat": compact_multiline(&commit_stat), "commitReceiptMatchedExecuteReceipt": true, + "verificationOutputMentionsChangedPaths": verification_output_mentions_changed_paths, + "sourceGroundingRequired": args.require_source_grounding, "mindAdoptionPassed": mind_adoption_passed, "familyAssertionsPassed": family_assertions_passed, "modelClosurePassed": model_closure_passed }, + "verificationSourceGrounding": verification_source_grounding, "mindAdoptionReview": mind_adoption_review, "familyAssertions": family_assertions, "modelingReview": { @@ -9426,6 +9509,7 @@ fn run_close(args: CloseArgs) -> Result { write_json(&closure_review_path, &closure_review)?; let verification_passed = verification.status.success() && path_scope_matched + && verification_source_grounded && mind_adoption_passed && family_assertions_passed && model_closure_passed; @@ -9437,6 +9521,10 @@ fn run_close(args: CloseArgs) -> Result { format!( "Soul verification failed for branch-local commit {commit_sha}: actual changed paths did not match declared Hands path scope." ) + } else if !verification_source_grounded { + format!( + "Soul verification failed for branch-local commit {commit_sha}: verification output did not cite every declared changed path." + ) } else if !mind_adoption_passed { format!( "Soul verification failed for branch-local commit {commit_sha}: Mind adoption proof did not pass." @@ -9481,6 +9569,11 @@ fn run_close(args: CloseArgs) -> Result { "Closure refused because actual git changed paths differ from Hands-declared scope." .to_string(), ] + } else if !verification_source_grounded { + vec![ + "Closure refused because the verification output did not cite every declared changed path while source grounding was required." + .to_string(), + ] } else if !mind_adoption_passed { vec![ "Closure refused because the Mind adoption decision was missing, tampered, or non-affirmative." @@ -11726,6 +11819,7 @@ fn run_tick(args: TickArgs) -> Result { closure_model_verdict: None, closure_model_finding: None, require_closure_model_verdict: false, + require_source_grounding: false, model_authored: false, state_revision: 0, })?; @@ -13108,7 +13202,7 @@ fn print_usage() { run --workspace [--item ] [--accept-receipt ] [--runtime-store ] [--requested-path ]\n\ adopt --workspace [--item ] [--run-receipt ] [--from-plan ] [--plan-summary ] [--adoption-evidence-ref ] [--mind-adoption-rationale ]\n\ execute --workspace [--item ] [--from-plan ] [--command ] [--changed-path ] [--commit-message ]\n\ - close --workspace [--item ] [--execute-receipt ] [--verification-command ] [--closure-model-ref ] [--model-authored] [--closure-model-verdict passed|failed|needs-work|blocked] [--closure-model-finding ] [--require-closure-model-verdict]\n\ + close --workspace [--item ] [--execute-receipt ] [--verification-command ] [--closure-model-ref ] [--model-authored] [--closure-model-verdict passed|failed|needs-work|blocked] [--closure-model-finding ] [--require-closure-model-verdict] [--require-source-grounding]\n\ publish --workspace [--item ] --change-summary --justification --verification-receipt --review-receipt --ledger-entry-id --pull-request-url --pull-request-title \n\ sync --workspace [--item ] [--publish-receipt ] [--upstream-ref origin/main] --merge-receipt \n\ overview --workspace [--item ] [--accept-receipt ] [--no-write]\n\ diff --git a/notes/epiphany-repo-swarm-mvp-contract.md b/notes/epiphany-repo-swarm-mvp-contract.md index f957d447..6b699937 100644 --- a/notes/epiphany-repo-swarm-mvp-contract.md +++ b/notes/epiphany-repo-swarm-mvp-contract.md @@ -1154,7 +1154,8 @@ optional model-review provenance from `--closure-model-ref` / `--model-authored` optional hard model closure verdicts from `--closure-model-verdict`, safe-family assertions for known Imagination families, the cited `epiphany.repo_work_mind_adoption_decision.v0` snapshot plus standalone receipt -match, and authority seals. Soul passes only +match, verification-output source-grounding against declared changed paths, and +authority seals. Soul passes only when the verification command succeeds, actual git changed paths match the Hands-declared path scope, the accepted Mind adoption proof is present and affirmative, the committed target content satisfies the deterministic @@ -1162,7 +1163,11 @@ safe-family assertions when the plan family is known, and any supplied or required model-authored closure verdict passes. `--require-closure-model-verdict` turns missing model verdicts into a closure refusal; without that flag, older provenance-only model refs remain -compatibility evidence instead of a hard gate. Soul +compatibility evidence instead of a hard gate. `--require-source-grounding` +turns proofless custom verification output into a closure refusal unless the +verification stdout/stderr cite every declared changed path that appears in the +commit stat. Without that flag, the source-grounding packet is advisory +evidence. Soul then writes `epiphany.soul.verdict_receipt`, Modeling records the execution/commit/closure-review summary, and Mind writes gateway review plus state-commit receipts into runtime-spine. On successful closure, Mind also @@ -1235,6 +1240,18 @@ one with `--closure-model-verdict needs-work`. The pass item returned `familyAssertions.status=passed` and `pathScopeMatched=true`; private state remained sealed. +A source-grounded closure smoke proved Soul can reject proofless verifier output +without confusing that failure with path scope or family assertions: +`.epiphany-smoke\repo-closure-source-grounding-20260620-230626` ran two +`repo-status-section` items through init -> online -> accept -> derive-plan -> +tick run/adopt/execute. The default close with `--require-source-grounding` +closed successfully because `git show --stat` cited the changed `README.md`. +The custom close with `--verification-command "Write-Output 'ok'"` +also exited successfully, kept `pathScopeMatched=true` and +`familyAssertions.status=passed`, but returned `verification-failed`, Soul +`failed`, and `verificationSourceGrounding.status=failed` because the verifier +output did not cite the changed path; `privateStateExposed=false`. + A Mind-adoption closure guard smoke proved Soul now verifies that the Hands commit being closed still descends from an accepted Mind adoption decision: `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-201153` ran a @@ -1639,7 +1656,7 @@ 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`, `repo-deployment-config` / `repo.deployment_config`, 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, and refuses plan-derived items that lack explicit verification asks or planning evidence needs. `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, 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. | +| Soul/Modeling/Mind closure | `close` verifies the Hands commit, writes `epiphany.repo_work_closure_review.v0`, refuses path-scope mismatches, refuses missing/tampered/non-affirmative Mind adoption proof, runs known safe-family content assertions, optionally gates on model-authored closure verdicts, can require verification output to cite declared changed paths with `--require-source-grounding`, writes Soul/Modeling/Mind receipts, admits a compact typed repo map entry into `.epiphany/state/repo-work-map.msgpack`, and mirrors that admitted fact into local Verse as `epiphany.cultmesh.repo_work_map_entry.v0`. | Keep extending closure toward source-grounded semantic review and richer semantic map lenses, while preserving deterministic local closure for simple mechanical work. | | Repo work sight | `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, family lens rows, path lens rows, branch lens rows, and public-proof rows without private-state exposure; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue for branch-local scheduler pulses. | 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. | @@ -1727,7 +1744,9 @@ Build the remaining MVP in this order: 5. **Execute-to-close handoff.** Let the scheduler route from branch-local Hands execution into Soul/Modeling/Mind closure when the required execute receipts exist. The closure may be deterministic for mechanical work and - model-authored for source-grounded review, but the Mind admission receipt is + model-authored for source-grounded review, and `--require-source-grounding` + now lets Soul reject verification output that does not cite the changed Body + paths even when the command exits successfully. The Mind admission receipt is still the durable-state gate. 6. **Operator-safe proof bundles.** Package each work item as compact maintainer evidence: item, branch, changed paths, Hands receipts, Soul diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index c87b2d36..57703d87 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -131,6 +131,7 @@ remembers doctrine; the branch remembers the blade. - 2026-06-20: `epiphany-work deployment-aftercare-audit` is live as the post-operator Idunn receipt ingestion mouth, and now reads sealed Idunn receipt projections from repo-local CultMesh refs. It reads the deployment runbook receipt plus `gamecult.idunn.deployment_receipt.v0` and `gamecult.idunn.deployment_aftercare_audit.v0` via `--local-verse-store`, `--idunn-deployment-receipt-ref`, and `--aftercare-audit-receipt-ref`, emits `epiphany.repo_deployment_aftercare_audit.v0`, reports `complete` only when both Idunn receipts have successful statuses and private-state seals, and remains non-mutating with deployment/SSH/git-push/service/Hands/publication/merge authority false. The older explicit receipt-file flags remain compatibility reliquaries. Smoke `.epiphany-smoke\repo-deployment-config-family-20260620-221205` proved the CultMesh ref path with `idunnDeploymentReceiptSource=cultmesh`, `idunnAftercareAuditReceiptSource=cultmesh`, `deploymentAftercareAuditStatus=complete`, `deploymentComplete=true`, and `privateStateExposed=false`. - 2026-06-20: Gjallar/Odin sight now exposes Idunn deployment proof coordinates without taking over deployment. `EpiphanyLocalVerseContext`, `receipt-directory`, `swarm-overview`, `swarm-triage`, and `gjallar` include compact `idunnDeploymentReceiptRows` / `IDUNN-DEPLOYMENT` rows for latest `gamecult.idunn.deployment_receipt.v0` and `gamecult.idunn.deployment_aftercare_audit.v0`, carrying owner `Idunn`, watched/checked refs, result refs, deployment/aftercare ids, follow-up readback command, and private-state seal. Smoke `.epiphany-smoke\repo-deployment-config-family-20260620-223203` proved the CultMesh aftercare path plus Gjallar readback with `gjallarIdunnDeploymentReceiptCount=2`, latest deployment receipt `fixture-idunn-deployment`, latest aftercare receipt `fixture-idunn-aftercare`, and `privateStateExposed=false`. - 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: Soul closure now has an explicit source-grounding gate for verifier output. `epiphany-work close` records `epiphany.repo_work_verification_source_grounding_review.v0` in the closure review, checking whether verification stdout/stderr cite every declared changed path that appears in the commit stat; `--require-source-grounding` makes missing path citations a hard closure refusal. Focused smoke `.epiphany-smoke\repo-closure-source-grounding-20260620-230626` proved default `git show --stat` close passes with source grounding required, while custom `Write-Output 'ok'` verification exits successfully but fails closure with `verificationSourceGrounding.status=failed`, `pathScopeMatched=true`, `familyAssertions.status=passed`, Soul `failed`, and `privateStateExposed=false`. - 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. - 2026-06-20: `repo-tool-capabilities` is now live as repo-owned tool capability configuration cargo. `epiphany-work derive-plan --action-family repo-tool-capabilities` writes `.epiphany/repo-tool-capabilities.toml` with safe family `repo.tool_capabilities`, local CultMesh/Odin discovery flags, daemon tool invocation intent/receipt contracts, expected repo-swarm capability ids, host-daemon execution ownership, Idunn lifecycle ownership, and authority seals for no shell/deploy/service/private-rummaging authority. Soul closure assertions inspect schema, family, summary, tool directory, contracts, expected capability ids, host receipt requirement, authority seals, and private-state seal. Focused smoke `.epiphany-smoke\repo-tool-capabilities-family-20260620-142430` ran init -> online -> accept -> repo-tool-capabilities derive-plan -> tick run/adopt/execute/close; Hands committed only `.epiphany/repo-tool-capabilities.toml`, Soul passed with `pathScopeMatched=true`, `familyAssertions.status=passed`, `hostDaemonOwnsExecution=true`, `idunnOwnsLifecycle=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. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 25833386..578e814c 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 55772ebc..7075f962 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -91,6 +91,7 @@ active_subgoals: - 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, repo deployment config, 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 proof `.epiphany-smoke\repo-deployment-config-family-20260620-221205` shows `repo.deployment_config` closes through Soul, `deployment-config-audit` reports `ready-for-idunn-review`, `deployment-execution-runbook` reports `ready-for-operator-git-push`, and `deployment-aftercare-audit` ingests local Verse/CultMesh Idunn deployment/aftercare receipt refs with source `cultmesh`, status `complete`, `deploymentComplete=true`, `daemonOwnsExecution=true`, no repo-agent execution/deployment/SSH/git-push/service/Hands/publication/merge/cross-body authority, and `privateStateExposed=false`; explicit Idunn receipt files remain only compatibility reliquaries. Latest deployment request 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`. - Gjallar/Odin sight now exposes Idunn deployment receipt refs without taking Idunn's execution throne. `EpiphanyLocalVerseContext`, `receipt-directory`, `swarm-overview`, `swarm-triage`, and `gjallar` surface latest `gamecult.idunn.deployment_receipt.v0` and `gamecult.idunn.deployment_aftercare_audit.v0` as compact `idunnDeploymentReceiptRows` / `IDUNN-DEPLOYMENT` rows with owner `Idunn`, watched/checked refs, source/result refs, aftercare ids, follow-up readback command, and `privateStateExposed=false`. Smoke `.epiphany-smoke\repo-deployment-config-family-20260620-223203` proves the aftercare audit still ingests CultMesh refs and Gjallar reports `gjallarIdunnDeploymentReceiptCount=2`, latest deployment receipt `fixture-idunn-deployment`, latest aftercare receipt `fixture-idunn-aftercare`, and no private-state exposure. This is citeable discovery only; deployment still happens by explicit operator `git push` observed by Idunn. - Mind adoption now has an explicit evidence-readiness refusal gate for plan-derived repo work. `derive-plan` carries verification asks into the Imagination action-item receipt; `adopt --from-plan` records verification asks and planning evidence needs in `epiphany.repo_work_mind_interpretation.v0` and refuses empty verification asks or evidence needs as `refused-missing-evidence-needs`, with next gate `imagination.replan_with_explicit_soul_evidence_needs`. Proof `.epiphany-smoke\repo-mind-evidence-guard-20260620-224426` grants no Hands/durable/service/publication/cross-body/private authority and writes no adoption receipt after tampering both arrays empty; regression `.epiphany-smoke\repo-planning-facets-20260620-224428` shows normal planning facets still close through Soul/Modeling/Mind. + - Soul closure can now require verification-output source grounding. `epiphany-work close` records `epiphany.repo_work_verification_source_grounding_review.v0` in the closure review and `--require-source-grounding` refuses verifier output that does not cite every declared changed path appearing in the commit stat. Proof `.epiphany-smoke\repo-closure-source-grounding-20260620-230626` closes the default `git show --stat` path with source grounding required, then blocks custom `Write-Output 'ok'` verification as `verification-failed` while `pathScopeMatched=true`, `familyAssertions.status=passed`, Soul `failed`, 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 now derives the first repo-work map semantic lens from Mind-admitted local Verse map rows. `repoWorkMapFamilyLensRows` / `REPO-WORK-MAP-LENS` group accepted repo-work consequences by safe action family, with item count, changed-path count, latest item/commit/Mind commit, Bifrost gate, and `privateStateExposed=false`; proof `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-205055` reran the counterfeit-adoption guard and passed with `gjallarRepoWorkMapFamilyLensCount=1`. This is aggregate sight only, not scheduling, publication, merge, deployment, service lifecycle, or Mind admission authority. - Gjallar now derives a changed-path repo-work map lens from the same Mind-admitted local Verse rows. `repoWorkMapPathLensRows` / `REPO-WORK-MAP-PATH` group accepted consequences by changed repo path, with item count, safe-family list, latest item/commit/Mind commit, Bifrost gate, and `privateStateExposed=false`; proof `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-205740` passed with `gjallarRepoWorkMapPathLensCount=1` beside the family lens. This lets agents see which Body paths have accepted work without opening private receipts or granting Gjallar actuation authority. @@ -640,5 +641,5 @@ 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. - last_completed_repo_swarm_cut: Mind adoption now refuses plan-derived repo-work action items that lack explicit verification asks or planning evidence needs before branch-local Hands authority opens. `derive-plan` carries verification asks into the Imagination action-item receipt; `adopt --from-plan` records verification asks and evidence needs in `epiphany.repo_work_mind_interpretation.v0`, writes `status=refused-missing-evidence-needs`, points the next gate at `imagination.replan_with_explicit_soul_evidence_needs`, grants no Hands/durable/service/publication/cross-body/private authority, and writes no adoption receipt. Proof `.epiphany-smoke\repo-mind-evidence-guard-20260620-224426` tampers both arrays empty and proves the refusal; regression `.epiphany-smoke\repo-planning-facets-20260620-224428` proves normal planning facets still close through Soul/Modeling/Mind. - 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.secret_policy_request`, `repo.deployment_config`, and `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, explicit missing verification/evidence-needs 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`, deployment config/audit/runbook/aftercare CultMesh-ref ingestion plus Gjallar Idunn receipt discovery proof `.epiphany-smoke\repo-deployment-config-family-20260620-223203`, 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-mind-evidence-guard-20260620-224426`, `.epiphany-smoke\repo-planning-facets-20260620-224428`, `.epiphany-smoke\repo-doctrine-update-request-family-20260620-192140`, `.epiphany-smoke\repo-secret-policy-request-family-20260620-193046`, `.epiphany-smoke\repo-deployment-config-family-20260620-223203`, `.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, mismatched requested paths, and missing verification/evidence needs, reviewed doctrine/security/deployment config/request cargo, deployment-config audit readiness for Idunn review, deployment execution runbook readiness for explicit operator git-push handoff, deployment aftercare receipt ingestion from local Verse/CultMesh refs, Gjallar Idunn deployment/aftercare receipt rows, 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 interpreter/closure depth or another repo-owned safe-family organ; Idunn deployment receipt refs are now visible through Gjallar/Odin sight without opening private state. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start/deployment execution still requires explicit elevated operator authority. + last_completed_repo_swarm_cut: Soul closure can now require verification-output source grounding. `epiphany-work close` records `epiphany.repo_work_verification_source_grounding_review.v0` in the closure review and `--require-source-grounding` refuses verifier stdout/stderr that do not cite every declared changed path appearing in the commit stat. Proof `.epiphany-smoke\repo-closure-source-grounding-20260620-230626` closes the default `git show --stat` path with source grounding required, then blocks custom `Write-Output 'ok'` verification as `verification-failed` while the path scope and safe-family assertions still pass, proving the failure is the missing source-grounding citation, not collateral closure drift. + 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.secret_policy_request`, `repo.deployment_config`, and `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, explicit missing verification/evidence-needs refusal, Soul closure's Mind-adoption proof guard, explicit verification-output source-grounding closure 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`, deployment config/audit/runbook/aftercare CultMesh-ref ingestion plus Gjallar Idunn receipt discovery proof `.epiphany-smoke\repo-deployment-config-family-20260620-223203`, 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-mind-evidence-guard-20260620-224426`, `.epiphany-smoke\repo-planning-facets-20260620-224428`, `.epiphany-smoke\repo-closure-source-grounding-20260620-230626`, `.epiphany-smoke\repo-doctrine-update-request-family-20260620-192140`, `.epiphany-smoke\repo-secret-policy-request-family-20260620-193046`, `.epiphany-smoke\repo-deployment-config-family-20260620-223203`, `.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, mismatched requested paths, and missing verification/evidence needs, Soul refusal for proofless verification output under required source grounding, reviewed doctrine/security/deployment config/request cargo, deployment-config audit readiness for Idunn review, deployment execution runbook readiness for explicit operator git-push handoff, deployment aftercare receipt ingestion from local Verse/CultMesh refs, Gjallar Idunn deployment/aftercare receipt rows, 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 interpreter/closure depth or another repo-owned safe-family organ; Idunn deployment receipt refs are now visible through Gjallar/Odin sight without opening private state. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start/deployment execution still requires explicit elevated operator authority.