Separate provider readiness from live transport
This commit is contained in:
parent
b2edd1f276
commit
8e3e48d027
8 changed files with 55 additions and 53 deletions
|
|
@ -60,7 +60,7 @@ fn run_smoke(args: &Args) -> Result<Value> {
|
|||
"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<Value> {
|
|||
fn run_native_status(root: &Path, status_exe: &Path) -> Result<Value> {
|
||||
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<()> {
|
||||
|
|
|
|||
|
|
@ -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::<Vec<_>>();
|
||||
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!(
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -660,4 +660,4 @@ current_status:
|
|||
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
|
||||
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
|
||||
last_completed_repo_swarm_cut: Huginn live-fire has crossed the first real repo Body from Persona pressure to branch-local Hands commit and Soul/Mind closure, and now has repeatable closure and redacted-public-proof mouths. On `E:\Projects\Huginn` branch `epiphany/huginn/first-awakening`, `tools/epiphany_local_run.ps1 -Mode repo-persona-intake` accepted item `huginn-inspection-readback-livefire`, Weksa/Persona intake remained sealed, and `epiphany-work derive-plan` lowered it to model-authored safe family `repo.status_section` for `README.md` only. `tools/epiphany_local_run.ps1 -Mode repo-swarm-run` advanced four bounded pulses: run-from-plan, adopt-from-plan, execute-from-plan, and close-from-execute. Huginn commit `e9b07c38fceabbdc89ea35c2156326c80c0393a2` updated only `README.md`; closure receipt `.epiphany\work\work-close-huginn-inspection-readback-livefire.json` records status `closed`, Soul verdict `passed`, Mind state commit `repo-work-close-huginn-inspection-readback-livefire-mind-commit`, safe family `repo.status_section`, path scope `README.md`, Bifrost publication gate, and `privateStateExposed=false`. Verification also ran Huginn's TypeScript compiler through concrete Node path: `C:\Program Files\nodejs\node.exe E:\Projects\Huginn\node_modules\typescript\bin\tsc -p tsconfig.json` passed. Native verifier `epiphany-repo-livefire-closure-smoke --workspace E:\Projects\Huginn --item huginn-inspection-readback-livefire --expected-path README.md --expected-family repo.status_section --expected-gate awaiting-publication --expected-blocker bifrost-publication-missing` checks closure receipt, Mind map entry, overview gate/blocker, authority seals, and `git show` changed paths, returning `status=ok`, `soulVerdict=passed`, `publicationGate=Bifrost`, and `privateStateExposed=false`. Wrapper `tools/epiphany_local_run.ps1 -Mode repo-livefire-closure -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exposes the same read-only proof through the local operator mouth; artifact `local-20260621-190156-803-2f85ba15` printed commit, path, gate, blocker, Soul verdict, Mind commit receipt, and `privateStateExposed=False` without push, merge, publication, or target mutation. New wrapper `tools/epiphany_local_run.ps1 -Mode repo-work-public-proof -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exports the redacted proof bundle and repo-local Verse index without publishing; artifact `local-20260621-190645-345-4555b1dc` wrote `.epiphany\public\proof-bundles\repo-work-public-proof-huginn-inspection-readback-livefire.json`, proof id `repo-work-public-proof-huginn-inspection-readback-livefire`, SHA-256 `857545b199f3e37eb06c2e757e5cfc201958e46667bb1f8403fd333a22620f63`, nine artifact rows, zero publication rows, and `privateStateExposed=False`. swarm overview readback `local-20260621-190701-140-b9519ec6` sees the `REPO-WORK-PUBLIC-PROOF` row and action row from Huginn's repo-local Verse with the same SHA-256 while Bifrost publication remains missing. Launcher compact modes are now named compact operator-context modes instead of read-only modes, and `bifrost-public-proof` summaries print item, target public Verse, room, proof SHA-256, review receipts, and credit receipts so publication receipts are auditable without claiming upstream sync.
|
||||
next_action: Continue the observation-to-consequence audit. Heartbeat, operator-cache, Rider, and Unity projections no longer turn presence, parsing, or path resolution into readiness; Unity operability belongs to `runStatus`. Next inspect provider-capability/configuration projections and Persona bridge mouths for credentials or advertised surfaces standing in for verified transport. Keep closure's zero-substring invariant.
|
||||
next_action: Continue the observation-to-consequence audit. Provider advertisement/readiness now remains `provider-ready`/`prepared`/`missing` in Epiphany instead of becoming `live`; only Bifrost transport receipts prove delivery. Next inspect Persona mouth result statuses and bridge audit projections for request acceptance or receipt presence standing in for successful publication. Keep closure's zero-substring invariant.
|
||||
|
|
|
|||
|
|
@ -2569,7 +2569,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
|
|||
if ($null -ne $result.bifrostBridge -and $null -ne $result.bifrostBridge.surfaces -and $result.bifrostBridge.surfaces.Count -gt 0) {
|
||||
$bridgeRows = (@($result.bifrostBridge.surfaces) | ForEach-Object { "$($_.id)=$($_.status)" }) -join ","
|
||||
}
|
||||
Write-Host "Status: thread=$($result.threadId), coordinator=$($result.coordinator.action), crrc=$($result.crrc.recommendation.action), bifrostBridge=$($result.bifrostBridge.status), bridgeReady=$($result.bifrostBridge.readySurfaceCount)/$($result.bifrostBridge.surfaceCount), bridgeRows=$bridgeRows"
|
||||
Write-Host "Status: thread=$($result.threadId), coordinator=$($result.coordinator.action), crrc=$($result.crrc.recommendation.action), bifrostBridge=$($result.bifrostBridge.status), providerReady=$($result.bifrostBridge.providerReadySurfaceCount)/$($result.bifrostBridge.surfaceCount), bridgeRows=$bridgeRows"
|
||||
} elseif ($Mode -eq "agent-state-soa") {
|
||||
$agentRows = "none"
|
||||
if ($null -ne $result.tuiRows -and $result.tuiRows.Count -gt 0) {
|
||||
|
|
@ -2667,7 +2667,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
|
|||
if ($null -ne $result.readiness -and $null -ne $result.readiness.surfaces -and $result.readiness.surfaces.Count -gt 0) {
|
||||
$bridgeRows = (($result.readiness.surfaces | ForEach-Object { "$($_.id)=$($_.status)" }) -join ",")
|
||||
}
|
||||
Write-Host "Persona bridge: status=$($result.status), bridge=$($result.readiness.status), ready=$($result.readiness.readySurfaceCount)/$($result.readiness.surfaceCount), bridgeRows=$bridgeRows, mouthRows=$surfaceRows, privateStateExposed=$($result.privateStateExposed), artifact=$resultPath"
|
||||
Write-Host "Persona bridge: status=$($result.status), bridge=$($result.readiness.status), providerReady=$($result.readiness.providerReadySurfaceCount)/$($result.readiness.surfaceCount), bridgeRows=$bridgeRows, mouthRows=$surfaceRows, privateStateExposed=$($result.privateStateExposed), artifact=$resultPath"
|
||||
} elseif ($Mode -eq "bifrost-publication") {
|
||||
Write-Host "Bifrost publication request: status=$($result.status), intent=$($result.intentId), responseOwner=$($result.responseOwner), privateStateExposed=$($result.privateStateExposed)"
|
||||
} elseif ($Mode -eq "bifrost-public-proof") {
|
||||
|
|
|
|||
Reference in a new issue