diff --git a/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs b/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs index 1eb048dc..b60b0622 100644 --- a/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs +++ b/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs @@ -51,7 +51,6 @@ struct Args { root: PathBuf, smoke_root: PathBuf, fresh_repo_summary: Option, - readiness_summary: Option, daemon_survival_summary: Option, } @@ -60,7 +59,6 @@ impl Args { let mut root = env::current_dir().context("failed to resolve current directory")?; let mut smoke_root = root.join(".epiphany-smoke"); let mut fresh_repo_summary = None; - let mut readiness_summary = None; let mut daemon_survival_summary = None; let mut args = env::args().skip(1).peekable(); while let Some(arg) = args.next() { @@ -70,9 +68,6 @@ impl Args { "--fresh-repo-summary" => { fresh_repo_summary = Some(take_path(&mut args, "--fresh-repo-summary")?) } - "--readiness-summary" => { - readiness_summary = Some(take_path(&mut args, "--readiness-summary")?) - } "--daemon-survival-summary" => { daemon_survival_summary = Some(take_path(&mut args, "--daemon-survival-summary")?) @@ -84,7 +79,6 @@ impl Args { root, smoke_root, fresh_repo_summary, - readiness_summary, daemon_survival_summary, }) } @@ -116,19 +110,14 @@ fn run_smoke(args: Args) -> Result { let fresh_repo_summary = args .fresh_repo_summary .unwrap_or_else(|| latest_summary(&args.smoke_root, "fresh-repo-mvp-")); - let readiness_summary = args - .readiness_summary - .unwrap_or_else(|| latest_summary(&args.smoke_root, "repo-work-readiness-")); let daemon_survival_summary = args .daemon_survival_summary .unwrap_or_else(|| latest_summary(&args.smoke_root, "daemon-survival-rehearsal-")); let fresh = read_json(&fresh_repo_summary)?; - let readiness = read_json(&readiness_summary)?; let daemon_survival = read_json(&daemon_survival_summary)?; verify_fresh_repo(&fresh)?; - verify_readiness(&readiness)?; verify_daemon_survival(&daemon_survival)?; let weksa_interlingua = verify_weksa_interlingua()?; let persona_memory_recall = verify_persona_memory_recall()?; @@ -176,16 +165,6 @@ fn run_smoke(args: Args) -> Result { "Bifrost", "operator-safe public proof exported without private state", ), - green( - "readiness-review", - "Soul", - "readiness report and review receipt are present", - ), - green( - "receipt-directory", - "Bifrost", - "readiness review is queryable through the receipt directory", - ), green( "long-running-daemon-proof", "Idunn", @@ -227,10 +206,8 @@ fn run_smoke(args: Args) -> Result { "status": "mvp-demo-ready-with-known-operator-gates", "smokeDir": smoke_dir, "freshRepoSummary": fresh_repo_summary, - "readinessSummary": readiness_summary, "daemonSurvivalSummary": daemon_survival_summary, "freshRepoSmokeDir": fresh["smokeDir"], - "readinessSmokeDir": readiness["smokeDir"], "daemonSurvivalSmokeDir": daemon_survival["smokeDir"], "weksaInterlingua": weksa_interlingua, "personaMemoryRecall": persona_memory_recall, @@ -285,35 +262,6 @@ fn verify_fresh_repo(value: &Value) -> Result<()> { require_bool(value, &["privateStateExposed"], false) } -fn verify_readiness(value: &Value) -> Result<()> { - require_eq( - value, - &["schemaVersion"], - "epiphany.repo_work_readiness_smoke.v0", - )?; - require_eq(value, &["status"], "ok")?; - require_eq(value, &["readinessStatus"], "ready")?; - require_eq(value, &["readinessReviewStatus"], "readiness-approved")?; - require_eq(value, &["publishStatus"], "publication-receipts-recorded")?; - require_eq(value, &["syncStatus"], "upstream-main-synced")?; - require_bool(value, &["upstreamMainSynced"], true)?; - require_bool(value, &["privateStateExposed"], false)?; - require_bool(value, &["sightOnly"], true)?; - require_bool(value, &["readinessApprovalAuthorized"], false)?; - require_bool(value, &["publicationAuthorized"], false)?; - require_bool(value, &["deploymentAuthority"], false)?; - require_bool(value, &["serviceLifecycleAuthority"], false)?; - require_bool(value, &["handsActionAuthorized"], false)?; - require_row( - value, - &["bifrostReadinessReviewAccountingRow"], - "repo-work-readiness-review", - "closed", - 4, - 1, - ) -} - fn verify_daemon_survival(value: &Value) -> Result<()> { require_eq( value, @@ -810,53 +758,6 @@ fn require_contains(haystack: &str, needle: &str, label: &str) -> Result<()> { } } -fn require_row( - value: &Value, - path: &[&str], - lane: &str, - status: &str, - review_receipt_count: u64, - public_artifact_count: u64, -) -> Result<()> { - let row = path - .iter() - .try_fold(value, |current, key| current.get(*key)) - .ok_or_else(|| anyhow!("missing accounting row {}", path.join(".")))?; - let actual_lane = row - .get("lane") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_status = row - .get("status") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_review_receipt_count = row - .get("reviewReceiptCount") - .and_then(Value::as_u64) - .unwrap_or(0); - let actual_public_artifact_count = row - .get("publicArtifactCount") - .and_then(Value::as_u64) - .unwrap_or(0); - let actual_private = row - .get("privateStateExposed") - .and_then(Value::as_bool) - .unwrap_or(true); - if actual_lane == lane - && actual_status == status - && actual_review_receipt_count == review_receipt_count - && actual_public_artifact_count == public_artifact_count - && !actual_private - { - Ok(()) - } else { - Err(anyhow!( - "accounting row {} mismatch: lane={actual_lane:?}, status={actual_status:?}, reviewReceiptCount={actual_review_receipt_count}, publicArtifactCount={actual_public_artifact_count}, privateStateExposed={actual_private}", - path.join(".") - )) - } -} - fn take_path( args: &mut std::iter::Peekable>, flag: &str, diff --git a/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs b/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs deleted file mode 100644 index c8cd2b57..00000000 --- a/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs +++ /dev/null @@ -1,957 +0,0 @@ -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-work-readiness-{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"), - "# Repo Work Readiness Smoke\n\nThis repository proves readiness sight without readiness approval.\n", - ) - .with_context(|| format!("failed to seed {}", repo.join("README.md").display()))?; - git(["add", "README.md"], &repo)?; - git( - ["commit", "-m", "Seed repo work readiness smoke body"], - &repo, - )?; - git(["switch", "-c", "epiphany/repo-work-readiness"], &repo)?; - - let item = "repo-work-readiness"; - let local_verse = repo.join(".epiphany").join("local-verse.ccmp"); - let work_dir = repo.join(".epiphany").join("work"); - cargo_json( - &manifest, - "epiphany-repo", - &[ - "init", - "--workspace", - path_str(&repo)?, - "--epiphany-root", - path_str(&root)?, - "--swarm-id", - "repo-work-readiness-smoke", - "--topic", - "repo-work-readiness", - ], - &root, - )?; - cargo_json( - &manifest, - "epiphany-swarm", - &[ - "online", - "--workspace", - path_str(&repo)?, - "--epiphany-root", - path_str(&root)?, - "--runtime-id", - "repo-work-readiness-smoke", - "--local-verse-store", - path_str(&local_verse)?, - ], - &root, - )?; - cargo_json( - &manifest, - "epiphany-work", - &[ - "accept", - "--workspace", - path_str(&repo)?, - "--from", - "persona", - "--item", - item, - "--summary", - "Prove repo-work readiness sight can name safe-family planning depth and missing publication and lifecycle gates without granting authority.", - "--local-verse-store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - "--candidate-action-ref", - "candidate-action://repo-work-readiness/safe-family-planning", - "--public-discussion-ref", - "epiphany-global/persona-collaboration/repo-work-readiness", - ], - &root, - )?; - cargo_json( - &manifest, - "epiphany-work", - &[ - "derive-plan", - "--workspace", - path_str(&repo)?, - "--item", - item, - "--action-family", - "repo-planning-brief", - "--model-ref", - "repo-work-readiness-smoke-imagination-v1", - "--model-authored", - ], - &root, - )?; - for _ in 0..4 { - cargo_json( - &manifest, - "epiphany-work", - &[ - "tick", - "--workspace", - path_str(&repo)?, - "--epiphany-root", - path_str(&root)?, - "--item", - item, - "--cooldown-seconds", - "0", - ], - &root, - )?; - } - cargo_json( - &manifest, - "epiphany-work", - &[ - "queue-run", - "--workspace", - path_str(&repo)?, - "--local-verse-store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - "--max-items", - "1", - "--dry-run", - ], - &root, - )?; - let public_proof = cargo_json( - &manifest, - "epiphany-work", - &[ - "export-proof", - "--workspace", - path_str(&repo)?, - "--item", - item, - "--local-verse-store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - ], - &root, - )?; - let close_receipt = repo - .join(".epiphany") - .join("work") - .join(format!("work-close-{item}.json")); - let publish = cargo_json( - &manifest, - "epiphany-work", - &[ - "publish", - "--workspace", - path_str(&repo)?, - "--epiphany-root", - path_str(&root)?, - "--item", - item, - "--artifact-dir", - path_str(&work_dir)?, - "--closure-receipt", - path_str(&close_receipt)?, - "--local-verse-store", - path_str(&local_verse)?, - "--change-summary", - "Repo-work readiness smoke Bifrost publication proof.", - "--justification", - "Disposable Bifrost publication proof for the repo-work readiness smoke.", - "--verification-receipt", - "soul-verdict:repo-work-readiness-smoke", - "--review-receipt", - "mind-review:repo-work-readiness-smoke", - "--author-agent", - "epiphany.Hands", - "--credit-subject", - "epiphany.Hands", - "--ledger-entry-id", - "repo-work-readiness-smoke-ledger", - "--pull-request-url", - "https://example.invalid/GameCult/repo-work-readiness-smoke/pull/1", - "--pull-request-number", - "1", - "--pull-request-title", - "Repo work readiness smoke proof", - ], - &root, - )?; - git(["branch", "-f", "main", "HEAD"], &repo)?; - let sync = cargo_json( - &manifest, - "epiphany-work", - &[ - "sync", - "--workspace", - path_str(&repo)?, - "--item", - item, - "--publish-receipt", - publish - .get("receiptPath") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("publish result missing receiptPath"))?, - "--artifact-dir", - path_str(&work_dir)?, - "--upstream-ref", - "main", - "--merge-receipt", - "maintainer-merge:repo-work-readiness-smoke", - ], - &root, - )?; - let deployment_aftercare_fixture = repo - .join(".epiphany") - .join("work") - .join("deployment-aftercare-audit.json"); - write_json( - &deployment_aftercare_fixture, - &json!({ - "schemaVersion": "epiphany.repo_deployment_aftercare_audit.v0", - "status": "complete", - "deploymentComplete": true, - "deploymentAuthority": false, - "gitPushAuthority": false, - "serviceLifecycleAuthority": false, - "privateStateExposed": false - }), - )?; - let idunn_lifecycle_fixture = repo - .join(".epiphany") - .join("work") - .join("repo-work-service-audit.json"); - write_json( - &idunn_lifecycle_fixture, - &json!({ - "schemaVersion": "epiphany.repo_work_service_audit.v0", - "status": "complete", - "serviceId": "epiphany-repo-work-queue-runner", - "schedulerId": "epiphany-repo-work-queue-runner", - "receiptId": "repo-work-readiness-smoke-idunn-audit", - "planStatus": "present", - "runbookStatus": "present", - "runbookArtifactStatus": "present", - "runbookArtifactRef": "artifact://repo-work-readiness-smoke/repo-work-service-runbook.ps1", - "runbookSha256": "readiness-smoke-fixture", - "launchStatus": "ok", - "launchExitCode": 0, - "missingChecks": [], - "failedChecks": [], - "lifecycleOwner": "Idunn", - "hostedBody": "repo-work", - "mutatesServiceManager": false, - "requiresElevatedAuthority": false, - "privateStateExposed": false, - "nextSafeMove": "continue repo-swarm MVP planner/interpreter hardening" - }), - )?; - let tool_directory = cargo_json( - &manifest, - "epiphany-verse-query", - &[ - "tool-directory", - "--store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - ], - &root, - )?; - write_json( - &repo - .join(".epiphany") - .join("work") - .join("tool-directory.json"), - &tool_directory, - )?; - let readiness = cargo_json( - &manifest, - "epiphany-work", - &["readiness", "--workspace", path_str(&repo)?, "--item", item], - &root, - )?; - - require_eq( - &readiness, - &["schemaVersion"], - "epiphany.repo_work_readiness.v0", - )?; - require_eq(&readiness, &["status"], "ready")?; - require_u64(&readiness, &["missingRequiredCount"], 0)?; - require_bool(&readiness, &["authority", "sightOnly"], true)?; - require_bool( - &readiness, - &["authority", "readinessApprovalAuthorized"], - false, - )?; - require_bool(&readiness, &["authority", "publicationAuthorized"], false)?; - require_bool(&readiness, &["authority", "deploymentAuthority"], false)?; - require_bool( - &readiness, - &["authority", "serviceLifecycleAuthority"], - false, - )?; - require_bool(&readiness, &["authority", "handsActionAuthorized"], false)?; - require_bool(&readiness, &["authority", "privateStateExposed"], false)?; - require_eq( - &readiness, - &["verseProjection", "documentType"], - "epiphany.cultmesh.repo_work_readiness", - )?; - require_eq( - &readiness, - &["verseProjection", "readinessId"], - "repo-work-readiness-repo-work-readiness", - )?; - require_bool( - &readiness, - &["verseProjection", "privateStateExposed"], - false, - )?; - require_row(&readiness, "repo-init", true)?; - require_row(&readiness, "swarm-online", true)?; - require_row(&readiness, "persona-intake", true)?; - require_row(&readiness, "imagination-plan", true)?; - require_row(&readiness, "self-queue-run", true)?; - require_row(&readiness, "hands-branch-work", true)?; - require_row(&readiness, "soul-closure", true)?; - require_row(&readiness, "modeling-mind-admission", true)?; - require_row(&readiness, "safe-family-planning", true)?; - require_row_field_u64( - &readiness, - "safe-family-planning", - "candidateNextSafeFamilyCount", - 21, - )?; - require_row(&readiness, "public-proof", true)?; - require_row(&readiness, "bifrost-publication", true)?; - require_row_field_u64(&readiness, "bifrost-publication", "creditReceiptCount", 1)?; - require_row_field_u64(&readiness, "bifrost-publication", "changedPathCount", 1)?; - require_row(&readiness, "upstream-main-sync", true)?; - require_row_field_u64(&readiness, "upstream-main-sync", "mergeReceiptCount", 1)?; - require_row_field_bool(&readiness, "upstream-main-sync", "ancestryProved", true)?; - require_row_field_bool( - &readiness, - "upstream-main-sync", - "publishReceiptMatches", - true, - )?; - require_row(&readiness, "idunn-lifecycle", true)?; - require_row(&readiness, "deployment-aftercare", true)?; - require_row(&readiness, "tool-directory", true)?; - require_row(&readiness, "private-state-redaction", true)?; - - let readiness_review = cargo_json( - &manifest, - "epiphany-work", - &[ - "readiness-review", - "--workspace", - path_str(&repo)?, - "--item", - item, - "--readiness-receipt", - readiness - .get("receiptPath") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("readiness result missing receiptPath"))?, - "--maintainer-review-receipt", - "maintainer-review:repo-work-readiness-smoke", - "--soul-review-receipt", - "soul-review:repo-work-readiness-smoke", - "--mind-review-receipt", - "mind-review:repo-work-readiness-smoke", - "--bifrost-review-receipt", - "bifrost-review:repo-work-readiness-smoke", - "--review-summary", - "Smoke reviewers approve the ready readiness sight receipt without granting action authority.", - ], - &root, - )?; - require_eq( - &readiness_review, - &["schemaVersion"], - "epiphany.repo_work_readiness_review.v0", - )?; - require_eq(&readiness_review, &["status"], "readiness-approved")?; - require_u64(&readiness_review, &["missingRequiredCount"], 0)?; - require_bool( - &readiness_review, - &["authority", "readinessApprovalAuthorized"], - true, - )?; - require_bool( - &readiness_review, - &["authority", "durableStateCommitAuthorized"], - false, - )?; - require_bool( - &readiness_review, - &["authority", "publicationAuthorized"], - false, - )?; - require_bool(&readiness_review, &["authority", "mergeAuthorized"], false)?; - require_bool( - &readiness_review, - &["authority", "serviceLifecycleAuthority"], - false, - )?; - require_bool( - &readiness_review, - &["authority", "handsActionAuthorized"], - false, - )?; - require_eq( - &readiness_review, - &["verseProjection", "documentType"], - "epiphany.cultmesh.repo_work_readiness_review", - )?; - require_eq( - &readiness_review, - &["verseProjection", "reviewId"], - "repo-work-readiness-review-repo-work-readiness", - )?; - require_bool( - &readiness_review, - &["verseProjection", "privateStateExposed"], - false, - )?; - require_bool(&readiness_review, &["privateStateExposed"], false)?; - - let swarm_overview = cargo_json( - &manifest, - "epiphany-verse-query", - &[ - "swarm-overview", - "--store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - ], - &root, - )?; - require_u64(&swarm_overview, &["repoWorkReadinessCount"], 1)?; - require_eq( - &swarm_overview, - &["latestRepoWorkReadiness"], - "repo-work-readiness-repo-work-readiness", - )?; - require_bool(&swarm_overview, &["privateStateExposed"], false)?; - require_tui_row_contains( - &swarm_overview, - &["repoWorkReadinessTuiRows"], - "REPO-WORK-READINESS", - )?; - require_tui_row_contains( - &swarm_overview, - &["swarmActionTuiRows"], - "repo-work-readiness", - )?; - require_u64(&swarm_overview, &["repoWorkReadinessReviewCount"], 1)?; - require_eq( - &swarm_overview, - &["latestRepoWorkReadinessReview"], - "repo-work-readiness-review-repo-work-readiness", - )?; - require_tui_row_contains( - &swarm_overview, - &["repoWorkReadinessReviewTuiRows"], - "REPO-WORK-READINESS-REVIEW", - )?; - require_tui_row_contains( - &swarm_overview, - &["swarmActionTuiRows"], - "repo-work-readiness-review", - )?; - let receipt_directory = cargo_json( - &manifest, - "epiphany-verse-query", - &[ - "receipt-directory", - "--store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - ], - &root, - )?; - require_receipt_directory_row( - &receipt_directory, - "repo-work-readiness-review", - "repo-work-readiness-review-repo-work-readiness", - "readiness-approved", - "present", - )?; - require_tui_row_contains( - &receipt_directory, - &["tuiRows"], - "repo-work-readiness-review", - )?; - require_tui_row_contains(&receipt_directory, &["tuiRows"], "artifact=present")?; - require_bool(&receipt_directory, &["privateStateExposed"], false)?; - let bifrost_ledger = cargo_json( - &manifest, - "epiphany-verse-query", - &[ - "bifrost-ledger", - "--store", - path_str(&local_verse)?, - "--runtime-id", - "repo-work-readiness-smoke", - ], - &root, - )?; - require_bifrost_accounting_row( - &bifrost_ledger, - "repo-work-readiness-review", - "closed", - "repo-work-readiness-review-repo-work-readiness", - 4, - 1, - )?; - require_tui_row_contains( - &bifrost_ledger, - &["accountingTuiRows"], - "BIFROST-ACCOUNTING | repo-work-readiness-review", - )?; - require_tui_row_contains(&bifrost_ledger, &["accountingTuiRows"], "status=closed")?; - require_bool(&bifrost_ledger, &["privateStateExposed"], false)?; - - let summary = json!({ - "schemaVersion": "epiphany.repo_work_readiness_smoke.v0", - "status": "ok", - "smokeDir": smoke_dir, - "repo": repo, - "branch": git_output(["branch", "--show-current"], &repo)?, - "item": item, - "publicProofOutput": public_proof["outputPath"], - "publishStatus": publish["status"], - "syncStatus": sync["status"], - "upstreamMainSynced": sync["authority"]["upstreamMainSynced"], - "readinessStatus": readiness["status"], - "readinessReviewStatus": readiness_review["status"], - "readinessReviewReceiptPath": readiness_review["receiptPath"], - "readinessReviewVerseProjection": readiness_review["verseProjection"], - "missingRequiredCount": readiness["missingRequiredCount"], - "readinessVerseProjection": readiness["verseProjection"], - "swarmOverviewRepoWorkReadinessCount": swarm_overview["repoWorkReadinessCount"], - "swarmOverviewLatestRepoWorkReadiness": swarm_overview["latestRepoWorkReadiness"], - "swarmOverviewRepoWorkReadinessReviewCount": swarm_overview["repoWorkReadinessReviewCount"], - "swarmOverviewLatestRepoWorkReadinessReview": swarm_overview["latestRepoWorkReadinessReview"], - "receiptDirectoryRowCount": receipt_directory["rowCount"], - "receiptDirectoryReadinessReviewRow": receipt_directory_row_value(&receipt_directory, "repo-work-readiness-review")?, - "bifrostLedgerAccountingRowCount": bifrost_ledger["accountingRowCount"], - "bifrostReadinessReviewAccountingRow": bifrost_accounting_row_value(&bifrost_ledger, "repo-work-readiness-review")?, - "sightOnly": readiness["authority"]["sightOnly"], - "readinessApprovalAuthorized": readiness["authority"]["readinessApprovalAuthorized"], - "publicationAuthorized": readiness["authority"]["publicationAuthorized"], - "deploymentAuthority": readiness["authority"]["deploymentAuthority"], - "serviceLifecycleAuthority": readiness["authority"]["serviceLifecycleAuthority"], - "handsActionAuthorized": readiness["authority"]["handsActionAuthorized"], - "privateStateExposed": readiness["privateStateExposed"], - }); - write_json(&smoke_dir.join("summary.json"), &summary)?; - Ok(summary) -} - -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 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 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_u64(value: &Value, path: &[&str], expected: u64) -> Result<()> { - let actual = path - .iter() - .try_fold(value, |current, key| current.get(*key)) - .and_then(Value::as_u64) - .unwrap_or(u64::MAX); - 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) - .unwrap_or(!expected); - if actual == expected { - Ok(()) - } else { - Err(anyhow!( - "expected {} to be {expected:?}, got {actual:?}", - path.join(".") - )) - } -} - -fn require_row(value: &Value, kind: &str, expected_satisfied: bool) -> Result<()> { - let rows = value - .get("rows") - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("readiness output did not include rows"))?; - let row = rows - .iter() - .find(|row| row.get("kind").and_then(Value::as_str) == Some(kind)) - .ok_or_else(|| anyhow!("missing readiness row {kind:?}"))?; - let actual = row - .get("satisfied") - .and_then(Value::as_bool) - .unwrap_or(!expected_satisfied); - if actual == expected_satisfied { - Ok(()) - } else { - Err(anyhow!( - "expected readiness row {kind:?} satisfied={expected_satisfied}, got {actual}" - )) - } -} - -fn require_row_field_u64(value: &Value, kind: &str, field: &str, expected: u64) -> Result<()> { - let rows = value - .get("rows") - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("readiness output did not include rows"))?; - let row = rows - .iter() - .find(|row| row.get("kind").and_then(Value::as_str) == Some(kind)) - .ok_or_else(|| anyhow!("missing readiness row {kind:?}"))?; - let actual = row.get(field).and_then(Value::as_u64).unwrap_or(u64::MAX); - if actual == expected { - Ok(()) - } else { - Err(anyhow!( - "expected readiness row {kind:?} field {field:?} to be {expected}, got {actual}" - )) - } -} - -fn require_row_field_bool(value: &Value, kind: &str, field: &str, expected: bool) -> Result<()> { - let rows = value - .get("rows") - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("readiness output did not include rows"))?; - let row = rows - .iter() - .find(|row| row.get("kind").and_then(Value::as_str) == Some(kind)) - .ok_or_else(|| anyhow!("missing readiness row {kind:?}"))?; - let actual = row.get(field).and_then(Value::as_bool).unwrap_or(!expected); - if actual == expected { - Ok(()) - } else { - Err(anyhow!( - "expected readiness row {kind:?} field {field:?} to be {expected}, got {actual}" - )) - } -} - -fn require_tui_row_contains(value: &Value, path: &[&str], needle: &str) -> Result<()> { - let rows = path - .iter() - .try_fold(value, |current, key| current.get(*key)) - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("{} did not contain TUI rows", path.join(".")))?; - if rows - .iter() - .filter_map(Value::as_str) - .any(|row| row.contains(needle)) - { - Ok(()) - } else { - Err(anyhow!( - "expected {} to contain row fragment {needle:?}", - path.join(".") - )) - } -} - -fn receipt_directory_row_value<'a>(value: &'a Value, family: &str) -> Result<&'a Value> { - value - .get("rows") - .and_then(Value::as_array) - .and_then(|rows| { - rows.iter() - .find(|row| row.get("family").and_then(Value::as_str) == Some(family)) - }) - .ok_or_else(|| anyhow!("missing receipt-directory row {family:?}")) -} - -fn require_receipt_directory_row( - value: &Value, - family: &str, - latest_id: &str, - status: &str, - artifact_status: &str, -) -> Result<()> { - let row = receipt_directory_row_value(value, family)?; - let actual_latest_id = row - .get("latestId") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_status = row - .get("status") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_artifact_status = row - .get("artifactStatus") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_private = row - .get("privateStateExposed") - .and_then(Value::as_bool) - .unwrap_or(true); - let artifact_sha = row - .get("artifactSha256") - .and_then(Value::as_str) - .unwrap_or("none"); - if actual_latest_id == latest_id - && actual_status == status - && actual_artifact_status == artifact_status - && artifact_sha != "none" - && !actual_private - { - Ok(()) - } else { - Err(anyhow!( - "receipt-directory row {family:?} mismatch: latestId={actual_latest_id:?}, status={actual_status:?}, artifactStatus={actual_artifact_status:?}, artifactSha256={artifact_sha:?}, privateStateExposed={actual_private}" - )) - } -} - -fn bifrost_accounting_row_value<'a>(value: &'a Value, lane: &str) -> Result<&'a Value> { - value - .get("accountingRows") - .and_then(Value::as_array) - .and_then(|rows| { - rows.iter() - .find(|row| row.get("lane").and_then(Value::as_str) == Some(lane)) - }) - .ok_or_else(|| anyhow!("missing Bifrost accounting row {lane:?}")) -} - -fn require_bifrost_accounting_row( - value: &Value, - lane: &str, - status: &str, - latest_receipt_id: &str, - review_receipt_count: u64, - public_artifact_count: u64, -) -> Result<()> { - let row = bifrost_accounting_row_value(value, lane)?; - let actual_status = row - .get("status") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_latest_receipt_id = row - .get("latestReceiptId") - .and_then(Value::as_str) - .unwrap_or(""); - let actual_review_receipt_count = row - .get("reviewReceiptCount") - .and_then(Value::as_u64) - .unwrap_or(0); - let actual_public_artifact_count = row - .get("publicArtifactCount") - .and_then(Value::as_u64) - .unwrap_or(0); - let actual_private = row - .get("privateStateExposed") - .and_then(Value::as_bool) - .unwrap_or(true); - if actual_status == status - && actual_latest_receipt_id == latest_receipt_id - && actual_review_receipt_count == review_receipt_count - && actual_public_artifact_count == public_artifact_count - && !actual_private - { - Ok(()) - } else { - Err(anyhow!( - "Bifrost accounting row {lane:?} mismatch: status={actual_status:?}, latestReceiptId={actual_latest_receipt_id:?}, reviewReceiptCount={actual_review_receipt_count}, publicArtifactCount={actual_public_artifact_count}, privateStateExposed={actual_private}" - )) - } -} - -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())) -} diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 86ddb85c..9c5ae071 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -126,8 +126,6 @@ const WRAPPER_BIFROST_METRICS_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mod const WRAPPER_BIFROST_LEDGER_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode bifrost-ledger"; const WRAPPER_RECEIPT_DIRECTORY_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode receipt-directory"; -const WRAPPER_REPO_WORK_READINESS_REVIEW_COMMAND: &str = - "tools/epiphany_local_run.ps1 -Mode repo-work-readiness-review"; const DIRECT_IDUNN_DEPLOYMENT_AFTERCARE_AUDIT_COMMAND: &str = "epiphany-work deployment-aftercare-audit --workspace --local-verse-store --idunn-deployment-receipt-ref latest --aftercare-audit-receipt-ref latest"; const WRAPPER_SERVICE_TICK_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode service-tick"; const WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND: &str = @@ -3346,7 +3344,6 @@ fn run_cli() -> Result<()> { &[], &[], &[], - &[], ); if !missing_artifact_rows.iter().any(|row| { row.priority == 50 @@ -3398,7 +3395,6 @@ fn run_cli() -> Result<()> { &[], &[], &[], - &[], ); if !synthetic_artifact_rows.iter().any(|row| { row.priority == 50 @@ -4958,7 +4954,6 @@ fn swarm_action_rows( repo_work_overviews: &[EpiphanyCultMeshRepoWorkOverviewEntry], repo_work_public_proofs: &[EpiphanyCultMeshRepoWorkPublicProofEntry], repo_work_readiness_reports: &[EpiphanyCultMeshRepoWorkReadinessEntry], - repo_work_readiness_reviews: &[EpiphanyCultMeshRepoWorkReadinessReviewEntry], ) -> (Vec, Vec) { let mut rows = Vec::new(); let mut service_execution_check_counts = BTreeMap::::new(); @@ -5215,12 +5210,6 @@ fn swarm_action_rows( for (index, readiness) in repo_work_readiness_reports.iter().take(5).enumerate() { rows.push(repo_work_readiness_action_row(readiness, 70 + index as u32)); } - for (index, review) in repo_work_readiness_reviews.iter().take(5).enumerate() { - rows.push(repo_work_readiness_review_action_row( - review, - 75 + index as u32, - )); - } if rows.is_empty() { rows.push(SwarmActionRow { priority: 100, @@ -6315,60 +6304,6 @@ fn repo_work_readiness_action_row( } } -fn repo_work_readiness_review_action_row( - review: &EpiphanyCultMeshRepoWorkReadinessReviewEntry, - priority: u32, -) -> SwarmActionRow { - SwarmActionRow { - priority, - family: "repo-work-readiness-review".to_string(), - status: review.status.clone(), - lifecycle_owner: "none".to_string(), - hosted_body: "repo-work".to_string(), - action: format!( - "Read repo work readiness review {} for item {}; Bifrost/GitHub/Idunn/Hands still own publication, sync, deployment, service lifecycle, and branch consequences.", - review.review_id, review.item - ), - wrapper_mode: "repo-work-readiness-review".to_string(), - wrapper_command: format!( - "epiphany-work readiness-review --workspace \"{}\" --item \"{}\" --readiness-receipt \"{}\" --maintainer-review-receipt --soul-review-receipt --mind-review-receipt --bifrost-review-receipt ", - review.workspace, review.item, review.readiness_receipt_ref - ), - operator_artifact_ref: review.readiness_review_receipt_ref.clone(), - operator_artifact_status: if review.readiness_review_receipt_ref == "none" { - "none".to_string() - } else { - "external-ref".to_string() - }, - operator_artifact_sha256: "none".to_string(), - operator_artifact_execution_command: "none".to_string(), - operator_aftercare_command: "none".to_string(), - completion_audit_wrapper_mode: "none".to_string(), - completion_audit_wrapper_command: "none".to_string(), - authority_gate: "repo.work.readiness_review_readback".to_string(), - effect_class: "repo-work-readiness-review-readback".to_string(), - mutates_state: false, - requires_elevated_authority: false, - service_execution_failed_check_count: 0, - service_execution_missing_check_count: 0, - service_id: "none".to_string(), - service_route: "none".to_string(), - reason: format!( - "Readiness review status={} approval={}, durableState={}, publication={}, merge={}, sync={}, deployment={}, service={}, hands={}", - review.status, - review.readiness_approval_authorized, - review.durable_state_commit_authorized, - review.publication_authorized, - review.merge_authorized, - review.upstream_sync_authorized, - review.deployment_authority, - review.service_lifecycle_authority, - review.hands_action_authorized - ), - private_state_exposed: review.private_state_exposed, - } -} - fn swarm_action_tui_row(row: &SwarmActionRow) -> String { format!( "{:03} | {} | {} | {} | {} | owner={} | hostedBody={} | service={} | route={} | command={} | mutates={} | elevated={} | failedChecks={} | missingChecks={} | artifact={} | sha256={} | exec={} | audit={} | aftercare={}", @@ -7156,7 +7091,6 @@ fn load_swarm_overview_report(args: &Args) -> Result { &repo_work_overviews, &repo_work_public_proofs, &repo_work_readiness_reports, - &repo_work_readiness_reviews, ); let private_state_exposed = daemon_report .rows @@ -7915,7 +7849,7 @@ fn receipt_directory_report( .unwrap_or_else(|| "none".to_string()), service_id: "none".to_string(), service_route: "none".to_string(), - follow_up_command: WRAPPER_REPO_WORK_READINESS_REVIEW_COMMAND.to_string(), + follow_up_command: WRAPPER_RECEIPT_DIRECTORY_COMMAND.to_string(), artifact_ref: readiness_review_artifact_ref.clone(), artifact_status: readiness_review_artifact_status.clone(), artifact_sha256: operator_artifact_sha256( diff --git a/epiphany-core/src/bin/epiphany-work.rs b/epiphany-core/src/bin/epiphany-work.rs index 684323d7..8d66ac1c 100644 --- a/epiphany-core/src/bin/epiphany-work.rs +++ b/epiphany-core/src/bin/epiphany-work.rs @@ -8,14 +8,12 @@ use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY; use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION; use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION; use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION; -use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_READINESS_REVIEW_SCHEMA_VERSION; use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION; use epiphany_core::EPIPHANY_CULTMESH_WEKSA_LOWERING_RECEIPT_SCHEMA_VERSION; use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry; use epiphany_core::EpiphanyCultMeshRepoWorkOverviewEntry; use epiphany_core::EpiphanyCultMeshRepoWorkPublicProofEntry; use epiphany_core::EpiphanyCultMeshRepoWorkReadinessEntry; -use epiphany_core::EpiphanyCultMeshRepoWorkReadinessReviewEntry; use epiphany_core::EpiphanyCultMeshWeksaLoweringReceiptEntry; use epiphany_core::EpiphanyRepoWorkModelingLaunchDocument; use epiphany_core::EpiphanyWorkerLaunchDocument; @@ -95,7 +93,6 @@ use epiphany_core::write_epiphany_cultmesh_repo_work_map_entry; use epiphany_core::write_epiphany_cultmesh_repo_work_overview; use epiphany_core::write_epiphany_cultmesh_repo_work_public_proof; use epiphany_core::write_epiphany_cultmesh_repo_work_readiness; -use epiphany_core::write_epiphany_cultmesh_repo_work_readiness_review; use epiphany_core::write_epiphany_cultmesh_weksa_lowering_receipt; use epiphany_state_model::EpiphanyMemoryContextQuery; use epiphany_state_model::EpiphanyMemoryProfile; @@ -138,9 +135,6 @@ fn main() -> Result<()> { "readiness" | "readiness-report" | "mvp-readiness" => { run_readiness(parse_readiness_args(args)?) } - "readiness-review" | "review-readiness" | "mvp-readiness-review" => { - run_readiness_review(parse_readiness_review_args(args)?) - } "deployment-config-audit" | "audit-deployment-config" | "idunn-deployment-audit" => { run_deployment_config_audit(parse_deployment_config_audit_args(args)?) } @@ -379,19 +373,6 @@ struct ReadinessArgs { write_receipt: bool, } -#[derive(Clone, Debug)] -struct ReadinessReviewArgs { - workspace: PathBuf, - item: Option, - readiness_receipt: Option, - artifact_dir: Option, - maintainer_review_receipt: String, - soul_review_receipt: String, - mind_review_receipt: String, - bifrost_review_receipt: String, - review_summary: Option, -} - #[derive(Clone, Debug)] struct DeploymentConfigAuditArgs { workspace: PathBuf, @@ -1271,61 +1252,6 @@ fn parse_readiness_args(args: impl Iterator) -> Result) -> Result { - let mut workspace = None; - let mut item = None; - let mut readiness_receipt = None; - let mut artifact_dir = None; - let mut maintainer_review_receipt = None; - let mut soul_review_receipt = None; - let mut mind_review_receipt = None; - let mut bifrost_review_receipt = None; - let mut review_summary = None; - - let mut args = args.peekable(); - while let Some(arg) = args.next() { - match arg.as_str() { - "--workspace" => workspace = Some(take_path(&mut args, "--workspace")?), - "--item" => item = Some(take_string(&mut args, "--item")?), - "--readiness-receipt" => { - readiness_receipt = Some(take_path(&mut args, "--readiness-receipt")?); - } - "--artifact-dir" => artifact_dir = Some(take_path(&mut args, "--artifact-dir")?), - "--maintainer-review-receipt" | "--maintainer-review" => { - maintainer_review_receipt = - Some(take_string(&mut args, "--maintainer-review-receipt")?); - } - "--soul-review-receipt" | "--soul-review" => { - soul_review_receipt = Some(take_string(&mut args, "--soul-review-receipt")?); - } - "--mind-review-receipt" | "--mind-review" => { - mind_review_receipt = Some(take_string(&mut args, "--mind-review-receipt")?); - } - "--bifrost-review-receipt" | "--bifrost-review" => { - bifrost_review_receipt = Some(take_string(&mut args, "--bifrost-review-receipt")?); - } - "--review-summary" | "--summary" => { - review_summary = Some(take_string(&mut args, "--review-summary")?); - } - other => return Err(anyhow!("unexpected readiness-review argument {other:?}")), - } - } - - Ok(ReadinessReviewArgs { - workspace: workspace.context("missing --workspace")?, - item, - readiness_receipt, - artifact_dir, - maintainer_review_receipt: maintainer_review_receipt - .context("missing --maintainer-review-receipt")?, - soul_review_receipt: soul_review_receipt.context("missing --soul-review-receipt")?, - mind_review_receipt: mind_review_receipt.context("missing --mind-review-receipt")?, - bifrost_review_receipt: bifrost_review_receipt - .context("missing --bifrost-review-receipt")?, - review_summary, - }) -} - fn parse_deployment_config_audit_args( args: impl Iterator, ) -> Result { @@ -13174,244 +13100,6 @@ fn run_readiness(args: ReadinessArgs) -> Result { })) } -fn run_readiness_review(args: ReadinessReviewArgs) -> Result { - let workspace = args - .workspace - .canonicalize() - .with_context(|| format!("failed to resolve {}", args.workspace.display()))?; - ensure_git_repo(&workspace)?; - let artifact_dir = args - .artifact_dir - .unwrap_or_else(|| workspace.join(".epiphany").join("work")); - fs::create_dir_all(&artifact_dir) - .with_context(|| format!("failed to create {}", artifact_dir.display()))?; - let item = args.item.unwrap_or_else(|| "first-request".to_string()); - let item_slug = sanitize(&item); - let readiness_receipt_path = args - .readiness_receipt - .unwrap_or_else(|| artifact_dir.join(format!("work-readiness-{item_slug}.json"))); - let readiness_receipt = read_json(&readiness_receipt_path)?; - let readiness_item = string_from_json(&readiness_receipt, &["item"]).unwrap_or(item); - let readiness_item_slug = sanitize(&readiness_item); - let schema_ok = string_from_json(&readiness_receipt, &["schemaVersion"]).as_deref() - == Some("epiphany.repo_work_readiness_report.v0"); - let status_ready = - string_from_json(&readiness_receipt, &["status"]).as_deref() == Some("ready"); - let missing_required_count = readiness_receipt - .get("missingRequiredCount") - .and_then(Value::as_u64) - .unwrap_or(u64::MAX); - let rows = readiness_receipt - .get("rows") - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("readiness receipt has no rows"))?; - let row_count = rows.len(); - let unsatisfied_kinds: Vec = rows - .iter() - .filter(|row| row.get("satisfied").and_then(Value::as_bool) != Some(true)) - .filter_map(|row| row.get("kind").and_then(Value::as_str).map(str::to_string)) - .collect(); - let authority = readiness_receipt - .get("authority") - .ok_or_else(|| anyhow!("readiness receipt has no authority"))?; - let sight_only = authority - .get("sightOnly") - .and_then(Value::as_bool) - .unwrap_or(false); - let readiness_did_not_approve = authority - .get("readinessApprovalAuthorized") - .and_then(Value::as_bool) - == Some(false); - let dangerous_authority_denied = [ - "durableStateCommitAuthorized", - "publicationAuthorized", - "bifrostPublicationAuthorized", - "githubPrAuthorized", - "mergeAuthorized", - "upstreamSyncAuthorized", - "deploymentAuthority", - "serviceLifecycleAuthority", - "handsActionAuthorized", - "crossBodyMutationAuthorized", - "privateVerseRummaging", - "privateStateExposed", - ] - .iter() - .all(|key| authority.get(*key).and_then(Value::as_bool) == Some(false)); - let private_sealed = readiness_receipt - .get("privateStateExposed") - .and_then(Value::as_bool) - == Some(false); - let review_refs = vec![ - args.maintainer_review_receipt.clone(), - args.soul_review_receipt.clone(), - args.mind_review_receipt.clone(), - args.bifrost_review_receipt.clone(), - ]; - let review_refs_present = review_refs.iter().all(|receipt| !receipt.trim().is_empty()); - let approved = schema_ok - && status_ready - && missing_required_count == 0 - && row_count > 0 - && unsatisfied_kinds.is_empty() - && sight_only - && readiness_did_not_approve - && dangerous_authority_denied - && private_sealed - && review_refs_present; - if !approved { - return Err(anyhow!( - "readiness review refused: schemaOk={schema_ok}, statusReady={status_ready}, missingRequiredCount={missing_required_count}, rowCount={row_count}, unsatisfiedKinds={:?}, sightOnly={sight_only}, readinessDidNotApprove={readiness_did_not_approve}, dangerousAuthorityDenied={dangerous_authority_denied}, privateSealed={private_sealed}, reviewRefsPresent={review_refs_present}", - unsatisfied_kinds - )); - } - - let now = Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true); - let review_id = format!("repo-work-readiness-review-{readiness_item_slug}"); - let receipt_path = - artifact_dir.join(format!("work-readiness-review-{readiness_item_slug}.json")); - let review_summary = args.review_summary.unwrap_or_else(|| { - "Maintainer/Soul/Mind/Bifrost reviewed a ready repo-work readiness sight receipt." - .to_string() - }); - let readiness_receipt_ref = readiness_receipt_path.display().to_string(); - let review_receipt_ref = receipt_path.display().to_string(); - let review_tui_rows = vec![ - format!( - "REPO-WORK-READINESS-REVIEW | item={} | status=readiness-approved | missing={} | satisfied={} | readiness={} | review={} | approvalAuth=true | publicationAuth=false | serviceAuth=false | handsAuth=false | private=false", - readiness_item, - missing_required_count, - row_count, - readiness_receipt_ref, - review_receipt_ref - ), - format!( - "REPO-WORK-READINESS-REVIEW-REFS | item={} | maintainer={} | soul={} | mind={} | bifrost={} | private=false", - readiness_item, - args.maintainer_review_receipt, - args.soul_review_receipt, - args.mind_review_receipt, - args.bifrost_review_receipt - ), - ]; - let mut verse_projection = Value::Null; - let accept_receipt_path = work_receipt_path(&workspace, "accept", &readiness_item); - if let Some(accept_receipt) = read_json_if_exists(&accept_receipt_path)? { - if let Some(store) = path_from_json(&accept_receipt, &["localVerseStore"]) - .or_else(|| path_from_json(&accept_receipt, &["localVerseStorePath"])) - { - let runtime_id = string_from_json(&accept_receipt, &["runtimeId"]) - .unwrap_or_else(|| "repo-swarm-local".to_string()); - let entry = EpiphanyCultMeshRepoWorkReadinessReviewEntry { - schema_version: EPIPHANY_CULTMESH_REPO_WORK_READINESS_REVIEW_SCHEMA_VERSION - .to_string(), - runtime_id: runtime_id.clone(), - verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(), - review_id: review_id.clone(), - generated_at: now.clone(), - workspace: workspace.display().to_string(), - item: readiness_item.clone(), - status: "readiness-approved".to_string(), - readiness_receipt_ref: readiness_receipt_ref.clone(), - readiness_review_receipt_ref: review_receipt_ref.clone(), - missing_required_count: missing_required_count as u32, - satisfied_row_count: row_count as u32, - maintainer_review_receipt: args.maintainer_review_receipt.clone(), - soul_review_receipt: args.soul_review_receipt.clone(), - mind_review_receipt: args.mind_review_receipt.clone(), - bifrost_review_receipt: args.bifrost_review_receipt.clone(), - readiness_approval_authorized: true, - durable_state_commit_authorized: false, - publication_authorized: false, - merge_authorized: false, - upstream_sync_authorized: false, - deployment_authority: false, - service_lifecycle_authority: false, - hands_action_authorized: false, - private_state_exposed: false, - tui_rows: review_tui_rows.clone(), - notes: vec![ - "Readiness review approval is review evidence only; it does not publish, merge, deploy, sync upstream, mutate services, or grant Hands authority.".to_string(), - "Maintainer, Soul, Mind, and Bifrost receipts remain the approval authorities; The provider sight projection only publishes this compact row.".to_string(), - ], - }; - let written = write_epiphany_cultmesh_repo_work_readiness_review(&store, entry)?; - verse_projection = json!({ - "localVerseStore": store, - "runtimeId": runtime_id, - "documentType": "epiphany.cultmesh.repo_work_readiness_review", - "reviewId": written.review_id, - "latestKey": "gamecult-local/repo-work-readiness-review/latest", - "tuiRows": written.tui_rows, - "privateStateExposed": written.private_state_exposed - }); - } - } - let receipt = json!({ - "schemaVersion": "epiphany.repo_work_readiness_review_receipt.v0", - "createdAt": now, - "workspace": workspace, - "item": readiness_item, - "reviewId": review_id, - "status": "readiness-approved", - "readinessReceiptPath": readiness_receipt_path, - "readinessStatus": "ready", - "missingRequiredCount": missing_required_count, - "satisfiedRowCount": row_count, - "unsatisfiedKinds": unsatisfied_kinds, - "reviewSummary": review_summary, - "reviewReceipts": { - "maintainer": args.maintainer_review_receipt, - "soul": args.soul_review_receipt, - "mind": args.mind_review_receipt, - "bifrost": args.bifrost_review_receipt - }, - "adoption": { - "readinessAdopted": true, - "adoptedBy": "Maintainer/Soul/Mind/Bifrost", - "mindReadinessAdoption": true, - "durableStateCommit": false - }, - "authority": { - "owner": "Maintainer/Soul/Mind/Bifrost", - "readinessApprovalAuthorized": true, - "readinessApproved": true, - "durableStateCommitAuthorized": false, - "publicationAuthorized": false, - "bifrostPublicationAuthorized": false, - "githubPrAuthorized": false, - "mergeAuthorized": false, - "upstreamSyncAuthorized": false, - "deploymentAuthority": false, - "serviceLifecycleAuthority": false, - "handsActionAuthorized": false, - "crossBodyMutationAuthorized": false, - "privateVerseRummaging": false, - "privateStateExposed": false - }, - "tuiRows": review_tui_rows, - "verseProjection": verse_projection, - "privateStateExposed": false, - "nextSafeMove": "Use this readiness approval as review evidence for operator release decisions; do not treat it as publication, deployment, service lifecycle, Hands, merge, or cross-body authority." - }); - write_json(&receipt_path, &receipt)?; - Ok(json!({ - "schemaVersion": "epiphany.repo_work_readiness_review.v0", - "status": receipt["status"], - "workspace": receipt["workspace"], - "item": receipt["item"], - "reviewId": receipt["reviewId"], - "receiptPath": receipt_path, - "readinessReceiptPath": receipt["readinessReceiptPath"], - "missingRequiredCount": receipt["missingRequiredCount"], - "satisfiedRowCount": receipt["satisfiedRowCount"], - "verseProjection": receipt["verseProjection"], - "authority": receipt["authority"], - "privateStateExposed": false, - "nextSafeMove": receipt["nextSafeMove"] - })) -} - fn run_deployment_config_audit(args: DeploymentConfigAuditArgs) -> Result { let workspace = args .workspace @@ -17754,7 +17442,7 @@ fn sanitize(value: &str) -> String { fn print_usage() { eprintln!( - "usage: epiphany-work ...\n\ + "usage: epiphany-work ...\n\ persona-intake --workspace --item --message [--topic ] [--store ] [--runtime-id ]\n\ accept --workspace --from --item [--summary ] [--topic ] [--store ] [--runtime-id ] [--online-receipt ] [--public-discussion-ref ] [--candidate-action-ref ]\n\ derive-plan --workspace [--item ] [--accept-receipt ] [--action-family append-worklog|planning-note|checklist-note|section-note|repo-status-section|task-card|repo-manifest|repo-tool-capabilities|repo-tool-request|repo-eve-surface|repo-collaboration-policy|repo-collaboration-topic|repo-consensus-brief|repo-planning-brief|repo-interpreter-brief|repo-objective-draft|repo-adoption-request|repo-scheduling-request|repo-work-order|repo-verification-request|repo-publication-request|repo-sync-request|repo-maintainer-review-request|repo-pr-request|repo-credit-request|repo-artifact-acceptance-request|repo-metrics-request|repo-readiness-review-request|repo-doctrine-update-request|repo-secret-policy-request|repo-dependency-policy-request|repo-deployment-config|repo-deployment-request] [--target-path ] [--model-ref ] [--model-authored] [--action-summary ] [--verification-ask ] [--stop-condition ] [--escalation-reason ] [--assumption ] [--constraint ] [--non-goal ] [--open-question ] [--decision-point ] [--evidence-need ]\n\ @@ -17767,7 +17455,6 @@ fn print_usage() { sync --workspace [--item ] [--publish-receipt ] [--upstream-ref origin/main] --merge-receipt \n\ overview --workspace [--item ] [--accept-receipt ] [--no-write]\n\ readiness --workspace [--item ] [--accept-receipt ] [--public-proof ] [--idunn-lifecycle-receipt ] [--deployment-aftercare-audit-receipt |--deployment-aftercare-audit-receipt-ref ] [--tool-directory-receipt ] [--no-write]\n\ - readiness-review --workspace [--item ] [--readiness-receipt ] --maintainer-review-receipt --soul-review-receipt --mind-review-receipt --bifrost-review-receipt [--review-summary ]\n\ deployment-config-audit --workspace [--artifact-dir ] [--no-write]\n\ deployment-execution-runbook --workspace [--artifact-dir ] [--remote origin] [--no-write]\n\ deployment-aftercare-audit --workspace [--artifact-dir ] [--local-verse-store ] [--runtime-id ] [--runbook-receipt ] [--idunn-deployment-receipt-ref |--idunn-deployment-receipt ] [--aftercare-audit-receipt-ref |--aftercare-audit-receipt ] [--no-write]\n\ diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index b2698a0d..f60ba6d1 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -5254,21 +5254,6 @@ pub fn load_epiphany_cultmesh_repo_work_readiness_reports( Ok(reports) } -pub fn write_epiphany_cultmesh_repo_work_readiness_review( - store_path: impl AsRef, - review: EpiphanyCultMeshRepoWorkReadinessReviewEntry, -) -> Result { - validate_repo_work_readiness_review(&review)?; - let mut node = open_epiphany_cultmesh_node(&store_path, review.runtime_id.clone())?; - let written = node.put(review.review_id.clone(), &review)?; - node.put( - EPIPHANY_CULTMESH_REPO_WORK_READINESS_REVIEW_LATEST_KEY, - &written, - )?; - node.flush()?; - Ok(written) -} - pub fn load_latest_epiphany_cultmesh_repo_work_readiness_review( store_path: impl AsRef, runtime_id: impl Into, @@ -5456,60 +5441,6 @@ fn validate_repo_work_readiness(readiness: &EpiphanyCultMeshRepoWorkReadinessEnt Ok(()) } -fn validate_repo_work_readiness_review( - review: &EpiphanyCultMeshRepoWorkReadinessReviewEntry, -) -> Result<()> { - if review.private_state_exposed { - return Err(anyhow!( - "repo work readiness review must not expose private state" - )); - } - if review.schema_version != EPIPHANY_CULTMESH_REPO_WORK_READINESS_REVIEW_SCHEMA_VERSION { - return Err(anyhow!( - "repo work readiness review schema_version must be {:?}", - EPIPHANY_CULTMESH_REPO_WORK_READINESS_REVIEW_SCHEMA_VERSION - )); - } - if review.verse_id != EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID { - return Err(anyhow!( - "repo work readiness review belongs in local-area Verse {:?}", - EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID - )); - } - if review.review_id.trim().is_empty() || review.item.trim().is_empty() { - return Err(anyhow!( - "repo work readiness review requires review_id and item" - )); - } - if !review.readiness_approval_authorized - || review.durable_state_commit_authorized - || review.publication_authorized - || review.merge_authorized - || review.upstream_sync_authorized - || review.deployment_authority - || review.service_lifecycle_authority - || review.hands_action_authorized - { - return Err(anyhow!( - "repo work readiness review may grant readiness approval only; it must deny durable-state, publication, merge, sync, deployment, service, and Hands authority" - )); - } - if review.tui_rows.is_empty() { - return Err(anyhow!( - "repo work readiness review requires compact TUI rows" - )); - } - if review.tui_rows.iter().any(|row| { - let lower = row.to_ascii_lowercase(); - lower.contains("rawresult") || lower.contains("receipt body") || lower.contains("thought") - }) { - return Err(anyhow!( - "repo work readiness review rows must not expose raw worker payload names" - )); - } - Ok(()) -} - fn validate_repo_work_map_entry(entry: &EpiphanyCultMeshRepoWorkMapEntry) -> Result<()> { if entry.private_state_exposed { return Err(anyhow!("repo work map entry must not expose private state")); diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 94c6ef89..5a494164 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -512,7 +512,6 @@ pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_map_entry; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_overview; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_public_proof; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_readiness; -pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_readiness_review; pub use cultmesh_integration::write_epiphany_cultmesh_role_review_event; pub use cultmesh_integration::write_epiphany_cultmesh_soul_contracts; pub use cultmesh_integration::write_epiphany_cultmesh_status; diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 5613d19d..25e92c5b 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -292,3 +292,17 @@ Both response-closing family smokes, their bundle verifier, its PowerShell mode, and the aggregate green gate are deleted. Request cargo and open ledger rows remain valid. Typed Bifrost/Maintainer response schemas remain ingest contracts, but accounting cannot close until their actual bodies author the receipts. + +## Caller-authored multi-organ readiness approval + +`epiphany-work readiness-review` accepted four arbitrary nonempty strings named +as Maintainer, Soul, Mind, and Bifrost receipts, then authored one local +`readiness-approved` document. None of those organs participated or had its +receipt resolved. The readiness smoke and aggregate MVP gate treated that local +composition as both Soul approval and Bifrost-queryable closure. + +The command, argument surface, writer/validator, readiness smoke, wrapper mode, +and both aggregate green gates are deleted. The readiness report remains sight +only, and `repo.readiness_review_request` remains the correct request cargo. +Typed review schemas/readers may ingest a future provider-authored result; four +labels supplied by one caller are not four reviews. diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index b4254446..cbb67332 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -51,6 +51,7 @@ - Daemon-tool invocation requests likewise remain pending until the advertised host daemon or authenticated ingest boundary supplies the typed response. Local response construction/writing/validation is test-only; aggregate smoke and receipt-directory projection prove intent-present/receipt-missing instead of manufacturing host acceptance. - Idunn deployment and aftercare outcomes have no local production writer. The synthetic deployment-config family smoke and its green aggregate MVP-gate handoff are deleted; config audit/runbook remain pre-deployment surfaces, while typed Idunn readers await genuine daemon-authored ingest. - Bifrost artifact-acceptance and metrics requests remain open until actual Bifrost/Maintainer receipts are ingested. The stale response-closing request-family smokes, accounting bundle, wrapper mode, and aggregate green gate are deleted. +- Repo-work readiness reports are sight only. The generic readiness-review approval command and writer are deleted because one caller supplied four unresolved reviewer labels; `repo.readiness_review_request` is the remaining request path, and typed review readers await genuine multi-organ/provider evidence. - Persona owner: `collaboration-feedback` writes public, bounded feedback only after that provider receipt exists. - Imagination owner: consensus participant selection, packet reference, receipt status/id, and adoption gate. - Persona output: `pending-imagination` with null consensus fields and `responseOwner=Imagination`. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 9c62b088..d7e876bd 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -67,6 +67,9 @@ The confirmed conceptual substitutions have been cut: - the artifact-acceptance/metrics response-closing smokes, Bifrost accounting bundle, wrapper mode, and aggregate green gate are deleted. Their request cargo remains open until genuine Bifrost/Maintainer response ingest. +- generic repo-work readiness approval is deleted. The former command accepted + four arbitrary strings as Maintainer/Soul/Mind/Bifrost reviews; readiness + remains sight-only and the request family awaits genuine reviewer evidence. The presentation boundary is now plain: `swarm overview` is a generic compact read-only projection. Gjallar is a downstream TUI application on Nightwing and is not an Epiphany organ, provider, owner, runtime, or architectural dependency. Eve/CultUI graphs may be lowered or composited downstream without Epiphany caring which presentation client does it. diff --git a/notes/receipt-writer-provenance-audit-2026-07-12.md b/notes/receipt-writer-provenance-audit-2026-07-12.md index 039f95eb..985e6837 100644 --- a/notes/receipt-writer-provenance-audit-2026-07-12.md +++ b/notes/receipt-writer-provenance-audit-2026-07-12.md @@ -23,6 +23,11 @@ Inventory every production call to `write_*receipt`, then ask whether the execut family binaries still expected generic query commands to manufacture final provider receipts, and the bundle/MVP gate promoted those stale summaries to green accounting. Request documents remain; provider closure remains absent. +- Repo readiness-review approval: no production local writer. The deleted + command accepted four caller strings as Maintainer/Soul/Mind/Bifrost proof + and authored approval itself; its smoke, wrapper, and aggregate green gates + are also deleted. Use the readiness-review request family until genuine + reviewer evidence is resolved and ingested. - `epiphany-operator-run`: owner-aligned for operator-run receipts and coordinator receipts derived from the run it executes. - smoke binaries and the `epiphany-verse-query smoke` arm: fixtures, not runtime evidence. They remain a quarantine risk if permitted to target canonical stores. - `epiphany-work` Weksa lowering: a lowering projection receipt, explicitly non-publication authority; no substitution confirmed in this pass. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 494ca886..301d8a23 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 8465e7b3..48b5ed5f 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -99,7 +99,7 @@ active_subgoals: - Repo deployment configuration remains pre-deployment cargo only: config audit and operator runbook may prepare a reviewed handoff, but only Idunn-authored deployment and aftercare receipts can close deployment. The former deployment-config family smoke and aggregate green gate were deleted because they fabricated those outcomes. - Repo dependency/supply-chain policy request cargo is live. `repo-dependency-policy-request` lowers to safe family `repo.dependency_policy_request` and writes `.epiphany/dependency-policy-requests/.toml` with manifest inventory, lockfile policy, package-manager command review, network fetch policy, vulnerability/license/vendored-code/update-cadence requirements, Eyes/Soul/Mind/maintainer/Bifrost/dependency-audit receipt refs, and denials for dependency update, package install, lockfile mutation, network fetch, CI mutation, Hands, publication, merge, deployment, service lifecycle, cross-body mutation, private Verse rummaging, and private-state exposure. Proof `.epiphany-smoke\repo-dependency-policy-request-family-20260621-083433` closes through Soul with `familyAssertionsStatus=passed`, `pathScopeMatched=true`, `awaitingDependencyPolicyReview=true`, all direct dependency/package/network/CI authorities false, and `privateStateExposed=false`. - Repo planning brief cargo now carries the family-friendly safe-family matrix plus explicit candidate action and closure shapes. `repo-planning-brief` still lowers to safe family `repo.planning_brief` and writes `.epiphany/planning-briefs/.toml`, but it now names twenty-one candidate next safe families across preparation, adoption/queue, execution/review, publication/accounting, and policy/deployment groups, including `repo.readiness_review_request` for redacted repo-swarm MVP proof-bundle review before readiness claims. Each candidate must name id, safe family, owner, status, requested paths, verification asks, evidence needs, closure proofs, authority denials, and next gate, with statuses such as `ready-for-mind-review`, `ready-for-self-queue`, `blocked-needs-evidence`, and `closed` while remaining non-queue entries. The closure ladder names draft selection, Self queue-run, Hands receipts, Soul verdict, Modeling/Mind map admission, Bifrost publication or non-publication, Idunn deployment/config when in scope, and redaction closure. Closure `safeFamilyPlanning` readback now reports grouped matrix completeness, matrix controls, candidate-action-template presence, closure proof presence, closure-ladder presence, and authority denials while granting no scheduling, substrate, Hands, shell, commit, publication, deployment, service lifecycle, cross-body, private-transcript, raw-result, or private-state authority. Proof `.epiphany-smoke\repo-planning-brief-family-20260621-114826` closes through Soul with `candidateNextSafeFamilyCount=21`, `candidateActionTemplatePresent=true`, `allMatrixGroupsComplete=true`, `matrixControlsPresent=true`, `allClosureProofsPresent=true`, `closureLadderPresent=true`, `authorityDenied=true`, and `privateStateExposed=false`; wrapper swarm overview proof `local-20260621-124924-844-17b352e7` reads the accepted `repo.planning_brief` closure/acceptance rows from the repo-local Verse without private-state exposure. - - Repo-work readiness sight is live and now leaves typed local Verse rows. `epiphany-work readiness` reuses the existing overview/proof-bundle artery, inspects repo init, swarm online, Persona intake, Imagination plan, Self queue-run, Hands execute, Soul closure, Modeling/Mind admission, public proof, Bifrost publication, upstream-main sync, Idunn lifecycle, daemon tool directory, and private-state redaction rows, then writes `.epiphany/work/work-readiness-.json` as `epiphany.repo_work_readiness_report.v0` and mirrors compact `epiphany.cultmesh.repo_work_readiness.v0` into the repo-local Verse when the accept receipt names a local Verse store. swarm overview/swarm-overview/swarm-triage expose `repoWorkReadinessRows`, `REPO-WORK-READINESS` TUI rows, `latestRepoWorkReadiness`, and non-mutating `repo-work-readiness` action rows. It is sight only: no readiness approval, durable state commit, publication, PR, merge, sync, deployment, service lifecycle, Hands action, cross-body mutation, private Verse rummaging, or private-state exposure authority. Proof `.epiphany-smoke\repo-work-readiness-20260621-094043` drove a fresh repo through init/online/intake/checklist execution/closure/queue-run/public-proof export; readiness reported `not-ready`, `missingRequiredCount=4` for Bifrost publication, upstream-main sync, Idunn lifecycle, and tool directory, wrote readiness id `repo-work-readiness-repo-work-readiness`, swarm overview reported `repoWorkReadinessCount=1`, and authority denials held. + - Repo-work readiness is sight only: it may derive and mirror missing/satisfied rows, but it cannot approve readiness. The former generic readiness-review command, writer, smoke, wrapper mode, and aggregate Soul/Bifrost green gates are deleted because one caller supplied four unresolved reviewer labels. `repo.readiness_review_request` remains the request cargo; typed review readers await genuine evidence. - Repo-swarm Mind interpretation cargo is live. `repo-interpreter-brief` lowers to safe family `repo.interpreter_brief` and writes `.epiphany/interpreter-briefs/.toml` as draft Mind-owned interpretation from Imagination consensus, with semantic checks, candidate safe families, required Mind/Soul/Bifrost/Hands/Substrate/Idunn gates, and explicit denials for direct state commit, objective adoption, scheduling, substrate access, Hands action, shell, commit, publication, deployment execution, service lifecycle, cross-body mutation, private transcripts/raw results, and private-state exposure. Proof `.epiphany-smoke\repo-interpreter-brief-family-20260621-010858` closes through Soul with `familyAssertions.status=passed`, `mindOwnsInterpretation=true`, `candidateActionsNonAuthoritative=true`, `directStateCommitAuthorized=false`, `handsActionAuthorized=false`, and `privateStateExposed=false`. - Idunn-hosted repo-work queue-run lifecycle now has plan/runbook/launch/audit closure under explicit operator authority. `epiphany-daemon-supervisor repo-work-service-audit` reads all typed service lifecycle receipts for `epiphany-repo-work-queue-runner`, requires planned install-plan, written local runbook artifact, completed launch with exit code `0`, and no private-state exposure, then writes a `repo-work-service-audit` receipt with `status=complete` or `incomplete`. Native proof `.epiphany-smoke\repo-work-service-lifecycle-20260621-004202` proves plan/runbook/launch/audit with `auditStatus=complete`, `auditRunbookArtifactStatus=present`, `auditLaunchExitCode=0`, `mutatesServiceManager=false`, `requiresElevatedAuthority=false`, and `privateStateExposed=false`. Wrapper proofs `local-20260621-014302-362-31bbef47`, `local-20260621-014337-108-cbd99615`, `local-20260621-014413-125-09e183c5`, and `local-20260621-014558-197-f6951806` prove operator plan/runbook/launch/audit ergonomics, with audit reporting no missing or failed checks. Basic queue-run service lifecycle readiness is sealed; remaining Idunn work is optional elevated install/start execution under explicit operator authority, not Self scheduling authority. - Swarm overview may read genuine typed Idunn deployment/aftercare receipts without taking lifecycle authority. No shipped Epiphany writer can create those outcomes; absent Idunn ingest remains visibly absent. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index f391d2fc..ad1a9e81 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -1,5 +1,5 @@ param( - [ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "persona-discord", "persona-reddit", "persona-other", "persona-bridge", "daemon-survival-rehearsal", "repo-swarm-mvp-gate", "repo-livefire-closure", "bifrost-publication", "bifrost-public-proof", "bifrost-artifact-acceptance", "bifrost-metrics", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-public-proof", "repo-work-readiness", "repo-work-readiness-review", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "swarm-online-runbook", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute")] + [ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "persona-discord", "persona-reddit", "persona-other", "persona-bridge", "daemon-survival-rehearsal", "repo-swarm-mvp-gate", "repo-livefire-closure", "bifrost-publication", "bifrost-public-proof", "bifrost-artifact-acceptance", "bifrost-metrics", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-work-public-proof", "repo-work-readiness", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "swarm-online-runbook", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute")] [string]$Mode = "smoke", [string]$Root = (Resolve-Path ".").Path, [string]$Workspace = "", @@ -77,11 +77,6 @@ param( [string]$RepoWorkDeploymentAftercareReceipt = "", [string]$RepoWorkDeploymentAftercareReceiptRef = "", [string]$RepoWorkReadinessReceipt = "", - [string]$RepoWorkMaintainerReviewReceipt = "maintainer-review:local-proof", - [string]$RepoWorkSoulReviewReceipt = "soul-review:local-proof", - [string]$RepoWorkMindReviewReceipt = "mind-review:local-proof", - [string]$RepoWorkBifrostReviewReceipt = "bifrost-review:local-proof", - [string]$RepoWorkReadinessReviewSummary = "Operator-safe local readiness review approves a ready sight receipt without granting action authority.", [string]$RepoDeploymentRemote = "origin", [string]$RepoDeploymentRunbookReceipt = "", [string]$RepoDeploymentIdunnReceipt = "", @@ -395,7 +390,7 @@ $runtimeStore = Join-Path $Workspace "state\runtime-spine.msgpack" $liveRuntimeMode = @("run", "mvp") -contains $Mode if (-not $SkipBuild) { - if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "persona-discord" -and $Mode -ne "persona-reddit" -and $Mode -ne "persona-other" -and $Mode -ne "persona-bridge" -and $Mode -ne "daemon-survival-rehearsal" -and $Mode -ne "repo-swarm-mvp-gate" -and $Mode -ne "repo-livefire-closure" -and $Mode -ne "repo-work-public-proof" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-artifact-acceptance" -and $Mode -ne "bifrost-metrics" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-work-readiness-review" -and $Mode -ne "repo-deployment-config-audit" -and $Mode -ne "repo-deployment-runbook" -and $Mode -ne "repo-deployment-aftercare-audit" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") { + if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "persona-discord" -and $Mode -ne "persona-reddit" -and $Mode -ne "persona-other" -and $Mode -ne "persona-bridge" -and $Mode -ne "daemon-survival-rehearsal" -and $Mode -ne "repo-swarm-mvp-gate" -and $Mode -ne "repo-livefire-closure" -and $Mode -ne "repo-work-public-proof" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-artifact-acceptance" -and $Mode -ne "bifrost-metrics" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-deployment-config-audit" -and $Mode -ne "repo-deployment-runbook" -and $Mode -ne "repo-deployment-aftercare-audit" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") { Invoke-Checked ` -Label "build Codex app-server compatibility organ" ` -FilePath $cargoExe ` @@ -471,7 +466,7 @@ if ($Mode -eq "repo-livefire-closure") { if ($Mode -eq "persona-bridge") { $requiredBinaries += @($PersonaBridgeSmokeExe) } -if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "persona-discord" -and $Mode -ne "persona-reddit" -and $Mode -ne "persona-other" -and $Mode -ne "persona-bridge" -and $Mode -ne "daemon-survival-rehearsal" -and $Mode -ne "repo-swarm-mvp-gate" -and $Mode -ne "repo-livefire-closure" -and $Mode -ne "repo-work-public-proof" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-artifact-acceptance" -and $Mode -ne "bifrost-metrics" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-work-readiness-review" -and $Mode -ne "repo-deployment-config-audit" -and $Mode -ne "repo-deployment-runbook" -and $Mode -ne "repo-deployment-aftercare-audit" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") { +if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "persona-discord" -and $Mode -ne "persona-reddit" -and $Mode -ne "persona-other" -and $Mode -ne "persona-bridge" -and $Mode -ne "daemon-survival-rehearsal" -and $Mode -ne "repo-swarm-mvp-gate" -and $Mode -ne "repo-livefire-closure" -and $Mode -ne "repo-work-public-proof" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-public-proof" -and $Mode -ne "bifrost-artifact-acceptance" -and $Mode -ne "bifrost-metrics" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-swarm-run" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-readiness" -and $Mode -ne "repo-deployment-config-audit" -and $Mode -ne "repo-deployment-runbook" -and $Mode -ne "repo-deployment-aftercare-audit" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "repo-work-service-launch" -and $Mode -ne "repo-work-service-audit" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") { $requiredBinaries += @($codexAppServer, $coordinatorExe) } function Assert-SwarmBrakeAllowsLiveRun { @@ -544,7 +539,7 @@ function Assert-SwarmBrakeAllowsLiveRun { } } -if (@("plan", "run", "mvp", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-livefire-closure", "repo-work-public-proof", "repo-work-readiness", "repo-work-readiness-review", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute") -contains $Mode) { +if (@("plan", "run", "mvp", "repo-persona-intake", "repo-swarm-run", "repo-work-queue-run", "repo-livefire-closure", "repo-work-public-proof", "repo-work-readiness", "repo-deployment-config-audit", "repo-deployment-runbook", "repo-deployment-aftercare-audit", "repo-work-service-plan", "repo-work-service-runbook", "repo-work-service-launch", "repo-work-service-audit", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute") -contains $Mode) { if (-not (Test-Path -LiteralPath $verseQueryExe)) { throw "required binary not found for swarm brake preflight: $verseQueryExe" } @@ -2241,30 +2236,6 @@ if ($Mode -eq "repo-work-readiness") { -StderrPath (Join-Path $artifactRoot "repo-work-readiness.stderr.log") } -if ($Mode -eq "repo-work-readiness-review") { - $resultPath = Join-Path $artifactRoot "repo-work-readiness-review.stdout.json" - $repoWorkArgs = @( - "readiness-review", - "--workspace", $Workspace, - "--item", $RepoWorkItem, - "--maintainer-review-receipt", $RepoWorkMaintainerReviewReceipt, - "--soul-review-receipt", $RepoWorkSoulReviewReceipt, - "--mind-review-receipt", $RepoWorkMindReviewReceipt, - "--bifrost-review-receipt", $RepoWorkBifrostReviewReceipt, - "--review-summary", $RepoWorkReadinessReviewSummary - ) - if ($RepoWorkReadinessReceipt -ne "") { - $repoWorkArgs += @("--readiness-receipt", $RepoWorkReadinessReceipt) - } - Invoke-Checked ` - -Label "review repo-work MVP readiness sight" ` - -FilePath $repoWorkExe ` - -Arguments $repoWorkArgs ` - -WorkingDirectory $Root ` - -StdoutPath $resultPath ` - -StderrPath (Join-Path $artifactRoot "repo-work-readiness-review.stderr.log") -} - if ($Mode -eq "repo-deployment-config-audit") { $resultPath = Join-Path $artifactRoot "repo-deployment-config-audit.stdout.json" Invoke-Checked ` @@ -3032,8 +3003,6 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { $verseProjection = "$($result.verseProjection.readinessId):$($result.verseProjection.latestKey)" } Write-Host "Repo work readiness: status=$($result.status), item=$($result.item), missing=$($result.missingRequiredCount), missingKinds=$missingKinds, receipt=$($result.receiptPath), verseProjection=$verseProjection, rows=$readinessRows, sightOnly=$($result.authority.sightOnly), readinessApprovalAuthorized=$($result.authority.readinessApprovalAuthorized), publicationAuthorized=$($result.authority.publicationAuthorized), serviceLifecycleAuthority=$($result.authority.serviceLifecycleAuthority), handsActionAuthorized=$($result.authority.handsActionAuthorized), next=$($result.nextSafeMove), privateStateExposed=$($result.privateStateExposed)" - } elseif ($Mode -eq "repo-work-readiness-review") { - Write-Host "Repo work readiness review: status=$($result.status), item=$($result.item), review=$($result.reviewId), missing=$($result.missingRequiredCount), satisfied=$($result.satisfiedRowCount), receipt=$($result.receiptPath), readiness=$($result.readinessReceiptPath), readinessApprovalAuthorized=$($result.authority.readinessApprovalAuthorized), durableStateCommitAuthorized=$($result.authority.durableStateCommitAuthorized), publicationAuthorized=$($result.authority.publicationAuthorized), mergeAuthorized=$($result.authority.mergeAuthorized), serviceLifecycleAuthority=$($result.authority.serviceLifecycleAuthority), handsActionAuthorized=$($result.authority.handsActionAuthorized), next=$($result.nextSafeMove), privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "repo-deployment-config-audit") { $failed = "none" if ($null -ne $result.assertions -and @($result.assertions).Count -gt 0) {