From 8e3e48d0270af3e2e063a7769fc87b9119d0524f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 13 Jul 2026 17:16:36 +0100 Subject: [PATCH] Separate provider readiness from live transport --- .../epiphany-bifrost-bridge-status-smoke.rs | 33 +++++++----------- epiphany-core/src/bin/epiphany-mvp-status.rs | 18 +++++----- .../src/bin/epiphany-persona-bridge-smoke.rs | 32 +++++++---------- ...onceptual-substitution-audit-2026-07-12.md | 12 +++++++ notes/fresh-workspace-handoff.md | 7 ++++ state/ledgers.msgpack | Bin 481875 -> 482212 bytes state/map.yaml | 2 +- tools/epiphany_local_run.ps1 | 4 +-- 8 files changed, 55 insertions(+), 53 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-bifrost-bridge-status-smoke.rs b/epiphany-core/src/bin/epiphany-bifrost-bridge-status-smoke.rs index 5b4bb3b6..e5e3a27a 100644 --- a/epiphany-core/src/bin/epiphany-bifrost-bridge-status-smoke.rs +++ b/epiphany-core/src/bin/epiphany-bifrost-bridge-status-smoke.rs @@ -60,7 +60,7 @@ fn run_smoke(args: &Args) -> Result { "statusExe": status_exe, "bifrostBridge": bridge, "privateStateExposed": bridge["privateStateExposed"], - "readySurfaceCount": bridge["readySurfaceCount"], + "providerReadySurfaceCount": bridge["providerReadySurfaceCount"], "preparedSurfaceCount": bridge["preparedSurfaceCount"], "surfaceCount": bridge["surfaceCount"], "surfaces": bridge["surfaces"], @@ -72,7 +72,6 @@ fn run_smoke(args: &Args) -> Result { fn run_native_status(root: &Path, status_exe: &Path) -> Result { let output = Command::new(status_exe) .current_dir(root) - .arg("--native") .arg("--json") .arg("--cwd") .arg(root) @@ -104,27 +103,19 @@ fn validate_bridge(bridge: &Value) -> Result<()> { .is_some_and(|count| count >= 5), "Bifrost bridge sight should expose at least five governed surfaces", )?; - require( - surface_is(bridge, "github", &["live"]) - && surface_is(bridge, "other", &["live"]) - && surface_is(bridge, "patron", &["live"]) - && surface_is(bridge, "discord", &["live", "prepared"]) - && surface_is(bridge, "reddit", &["live", "prepared"]), - "Bifrost bridge sight should report GitHub/Other/Patron live and Discord/Reddit live or prepared", - ) -} - -fn surface_is(bridge: &Value, id: &str, allowed: &[&str]) -> bool { - bridge + let surfaces = bridge .get("surfaces") .and_then(Value::as_array) - .and_then(|surfaces| { - surfaces - .iter() - .find(|surface| surface.get("id").and_then(Value::as_str) == Some(id)) - }) - .and_then(|surface| surface.get("status").and_then(Value::as_str)) - .is_some_and(|surface_status| allowed.contains(&surface_status)) + .ok_or_else(|| anyhow!("Bifrost bridge sight has no surface rows"))?; + require( + surfaces.iter().all(|surface| { + matches!( + surface.get("status").and_then(Value::as_str), + Some("provider-ready" | "prepared" | "missing") + ) + }), + "Bifrost bridge rows must report evidence state without claiming live transport", + ) } fn ensure_status_built(root: &Path, status_exe: &Path) -> Result<()> { diff --git a/epiphany-core/src/bin/epiphany-mvp-status.rs b/epiphany-core/src/bin/epiphany-mvp-status.rs index 5a5090a6..c8e81df7 100644 --- a/epiphany-core/src/bin/epiphany-mvp-status.rs +++ b/epiphany-core/src/bin/epiphany-mvp-status.rs @@ -629,13 +629,13 @@ fn bifrost_bridge_readiness(root: &Path) -> Value { .unwrap_or_default() .into_iter() .map(|surface| { - let ready = surface["ready"].as_bool().unwrap_or(false); + let provider_ready = surface["ready"].as_bool().unwrap_or(false); let prepared = surface["prepared"].as_bool().unwrap_or(false); json!({ "id": surface["id"].clone(), "label": surface["label"].clone(), - "status": if ready { "live" } else if prepared { "prepared" } else { "missing" }, - "ready": ready, + "status": if provider_ready { "provider-ready" } else if prepared { "prepared" } else { "missing" }, + "providerReady": provider_ready, "prepared": prepared, "authority": surface["authority"].clone(), "credentialSource": surface["credentialSource"].clone(), @@ -645,25 +645,25 @@ fn bifrost_bridge_readiness(root: &Path) -> Value { .collect::>(); let ready_count = surfaces .iter() - .filter(|surface| surface["ready"].as_bool().unwrap_or(false)) + .filter(|surface| surface["providerReady"].as_bool().unwrap_or(false)) .count(); let prepared_count = surfaces .iter() .filter(|surface| { surface["prepared"].as_bool().unwrap_or(false) - && !surface["ready"].as_bool().unwrap_or(false) + && !surface["providerReady"].as_bool().unwrap_or(false) }) .count(); json!({ - "status": if bridge["ready"].as_bool().unwrap_or(false) { "live" } else if bridge["prepared"].as_bool().unwrap_or(false) { "prepared" } else { "unavailable" }, + "status": if bridge["ready"].as_bool().unwrap_or(false) { "provider-ready" } else if bridge["prepared"].as_bool().unwrap_or(false) { "prepared" } else { "unavailable" }, "owner": "Bifrost", "authority": "Bifrost owns outside-world crossing gates, bridge receipts, and readiness projection; Heimdall owns provider OAuth, account links, and capability truth; Epiphany consumes this as read-only bridge sight.", "source": "Bifrost provider advertisement print-surface", "tool": advertisement_tool, "generatedAt": parsed["stats"]["generatedAt"].clone(), - "ready": bridge["ready"].clone(), + "providerReady": bridge["ready"].clone(), "prepared": bridge["prepared"].clone(), - "readySurfaceCount": ready_count, + "providerReadySurfaceCount": ready_count, "preparedSurfaceCount": prepared_count, "surfaceCount": surfaces.len(), "surfaces": surfaces, @@ -1160,7 +1160,7 @@ pub fn render_status(status: &Value) -> String { format!( "- Bifrost bridge: {} ({}/{})", maybe(&bifrost_bridge["status"], "unavailable"), - maybe(&bifrost_bridge["readySurfaceCount"], "0"), + maybe(&bifrost_bridge["providerReadySurfaceCount"], "0"), maybe(&bifrost_bridge["surfaceCount"], "0") ), format!( diff --git a/epiphany-core/src/bin/epiphany-persona-bridge-smoke.rs b/epiphany-core/src/bin/epiphany-persona-bridge-smoke.rs index 20821f74..636752aa 100644 --- a/epiphany-core/src/bin/epiphany-persona-bridge-smoke.rs +++ b/epiphany-core/src/bin/epiphany-persona-bridge-smoke.rs @@ -128,13 +128,18 @@ fn validate_readiness(value: &Value) -> Result<()> { == Some(false), "Bifrost readiness smoke should seal private state", )?; + let surfaces = value + .pointer("/bifrostBridge/surfaces") + .and_then(Value::as_array) + .ok_or_else(|| anyhow!("Bifrost readiness smoke has no surface rows"))?; require( - surface_is(value, "github", &["live"]) - && surface_is(value, "other", &["live"]) - && surface_is(value, "patron", &["live"]) - && surface_is(value, "discord", &["live", "prepared"]) - && surface_is(value, "reddit", &["live", "prepared"]), - "Bifrost readiness smoke should expose governed bridge surfaces", + surfaces.iter().all(|surface| { + matches!( + surface.get("status").and_then(Value::as_str), + Some("provider-ready" | "prepared" | "missing") + ) + }), + "Bifrost readiness smoke should expose evidence states, not live transport claims", ) } @@ -202,7 +207,7 @@ fn validate_persona_surface( fn bridge_summary(value: &Value) -> Value { json!({ "status": value.pointer("/bifrostBridge/status"), - "readySurfaceCount": value.pointer("/bifrostBridge/readySurfaceCount"), + "providerReadySurfaceCount": value.pointer("/bifrostBridge/providerReadySurfaceCount"), "preparedSurfaceCount": value.pointer("/bifrostBridge/preparedSurfaceCount"), "surfaceCount": value.pointer("/bifrostBridge/surfaceCount"), "surfaces": value.pointer("/bifrostBridge/surfaces"), @@ -227,19 +232,6 @@ fn persona_summary(name: &str, value: &Value) -> Value { }) } -fn surface_is(value: &Value, id: &str, allowed: &[&str]) -> bool { - value - .pointer("/bifrostBridge/surfaces") - .and_then(Value::as_array) - .and_then(|surfaces| { - surfaces - .iter() - .find(|surface| surface.get("id").and_then(Value::as_str) == Some(id)) - }) - .and_then(|surface| surface.get("status").and_then(Value::as_str)) - .is_some_and(|status| allowed.contains(&status)) -} - fn ensure_bins_built(root: &Path) -> Result<()> { let mut missing = Vec::new(); for bin in REQUIRED_BINS { diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 6a74aebd..e4734ddd 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -1496,3 +1496,15 @@ editor executable. The project version is now `pinned`, the editor path is `resolved`, and editor-bridge package existence is explicitly `present`. Commands may use resolution to choose what to execute, but only `runStatus` records planned, completed, failed, or blocked execution consequence. + +## Provider readiness is not live transport + +Epiphany consumed Bifrost's provider readiness boolean and renamed it `live`, +turning credential/capability sight into a transport claim. The projection now +preserves it as `provider-ready`; rows may otherwise be `prepared` or `missing`. +Fields and counts use `providerReady` explicitly. Only a Bifrost transport +receipt may prove publication or delivery. + +The bridge smoke also stopped hard-coding an obsolete provider topology. It now +checks the evidence-state vocabulary and private-state seal rather than +asserting that a named surface must remain live forever. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 419e8e4b..4ee0edcd 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -573,3 +573,10 @@ Unity bridge uses the same boundary: project version parsing is `pinned`, exact editor path discovery is `resolved`, and the editor package predicate is named `present`. Operability belongs to the subsequent `runStatus` receipt. The native Unity bridge smoke, 259 library tests, and all-bin check pass. + +Bifrost bridge sight no longer upgrades provider readiness to live transport. +Epiphany reports `provider-ready`, `prepared`, or `missing`, with explicit +`providerReady` fields/counts; publication still requires Bifrost receipts. The +native bridge smoke validates evidence vocabulary rather than stale provider +topology and was repaired to the current native status CLI. It passes alongside +259 library tests and all-bin compilation. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 74ca3bf99b60486f97cc107dd123b192d17931a8..f2a4605ad64572e007fd0c6d26ed2d1f9e933058 100644 GIT binary patch delta 304 zcmX|*u}Z{15Qg20xq#Y;)fIse3!6KGh!$507Pb}&>Grad+(2%3-Q5eO60s0Vi;zO> zd;me=I!g;X@d11eJ2wgzA2U<@^ZlPM@#7+X8nBgv@!o#=wiKmT&s*%AvD@pWchmHk zr<;Li*%NyDi>4R7p0(fi{nhsCGz!^n%in|el5HMo(o-&LIHcSt>tJF?6bP1zsRM1$ zqN&jOO;se&fI%)uqP0NMI)8x5AuBn}NET31h2RXARx9Ji|FKaQs}uiEbAuw8k+md` z3#e4aC-ahe_d5afiVut}!o(%GRekRfR|QnIW;U}rRSd-o7-gumU} PwKUpp*FXA$0L9J^HAiid delta 60 zcmZ3oUH0-8*$tA6Tn1JqCQ-*2*dq-#D>D`{GIlgiWon