From 2af26f5d93068fb8dec71efad86ecfddd14b10d7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 22 Jun 2026 17:09:20 +0100 Subject: [PATCH] Record Bifrost bridge readiness oracle --- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 395103 -> 395581 bytes state/map.yaml | 1 + 3 files changed, 2 insertions(+) diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index a7467e84..7aad3ad2 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -40,6 +40,7 @@ remembers doctrine; the branch remembers the blade. - The investment dossier readiness target is now explicit: `E:\Projects\gamecult-site\docs\gamecult_integrated_dossier.tex` expects Epiphany to be part of a Bifrost-first labor loop, not only a local Mom demo. The external proof bar is: Bifrost owns topics/work items/dispatch packets/receipts/credit/reward pressure; Epiphany executes bounded work; maintainers review artifacts; public/operator evidence records scope, consent, roles, model spend, review load, artifacts, accepted/rejected outcome, memory lessons, and case-study permission; and private worker/operator/agent context stays sealed. Diligence also asks for a live fresh-repo Epiphany demo, Bifrost work item/topic/agent transport/receipt/ledger demo, CultMesh status, VoidBot/Discord swarm demo, compute/output metrics, and security model for secrets/write permissions/public-private exports. - Bifrost's identity-provider, GitHub bridge/work-sync, Patreon support-intake, and bridge-ledger slice is now upstream truth on `GameCult/Bifrost` `main` at commit `72ffa0d` after the bridge chain through `f1f9171`: `POST /auth/bifrost/register` creates a Bifrost-owned identity without OAuth, signs in with the Bifrost cookie, leaves membership at `Authenticated`, and records `BifrostIdentity` / `NormalizedBifrostIdentity` on `UserAccount`. That native Bifrost identity is the default authenticating identity for GameCult services that accept Bifrost trust. GitHub is hooked in two ways: bridge mutations use `tools/bifrost-bridge.mjs github-draft-pr` / `github-pr-comment` with hosted Bifrost gate/receipts, and the hosted GitHub webhook path syncs issues, PRs, and reviews into Bifrost work/review state. GitHub and Heimdall sign-in paths now ensure new accounts also get a Bifrost identity; Heimdall still owns outside-provider OAuth, account association, token custody, grants, capability/account claims, and provider support normalization. Hosted Persona/agent Discord, Reddit, and temporary `Other` future-public-surface bridge actions now require the supplied Bifrost identity to normalize through Bifrost's native identity law, resolve to a registered `UserAccount.NormalizedBifrostIdentity`, have a linked `HeimdallAccountId` on that same account, and carry a Heimdall-shaped reference before Bifrost authorizes the outside-account crossing; named surfaces still require surface-shaped references. `tools/bifrost-bridge.mjs other-request` is now the generic receipt-only CLI mouth for future public worlds: it records `Other`/`Other` bridge actions through the hosted ledger, carries identity/Heimdall/Epiphany provenance, executes no provider transport, and fails closed without Bifrost bridge base URL/token unless an operator uses the explicit dry-run recovery hatch outside a dispatched turn. Patreon support is hooked through Heimdall-signed patronage intake, not Bifrost-owned Patreon OAuth: `/heimdall/patron-support/events` verifies Heimdall HMAC, resolves linked `HeimdallAccountId`, records `ExternalPatronProvider.Patreon` support, writes patron point transactions, and derives current patron tier snapshots. Verified after adding the Patreon endpoint proof with `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~PlatformEndpointsTests"`: 37 passed; previous bridge CLI/platform proof with `BridgeCliTests|PlatformEndpointsTests` passed 66. Follow-up Bifrost commit `718ae94` syncs the provider advertisement and Eve interface binding to the current bridge truth: `print` advertises bridge action ledger, GitHub webhooks, and patron support intake; `print-surface`/`print-binding` expose GitHub, Discord, Reddit, future-surface, and Heimdall patron-support capabilities; README quick-start now names `other-request`. Verified with provider advertisement print/surface/export plus `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~ProviderAdvertisementTests|FullyQualifiedName~BridgeCliTests"`: 32 passed. Post-push `git status --short --branch` in `E:\Projects\Bifrost` reported `main...origin/main` clean. - Bifrost commit `30e5945` strengthens the future-surface bridge law: hosted bridge actions now persist `TargetSurfaceName`, `other-request` sends it from `--surface-name`, and Bifrost rejects `Other` Persona/agent actions unless the request names the future surface and the Heimdall capability reference matches it, such as `heimdall:bluesky:*`. This makes Epiphany's generic Persona mouth a client-side purity seal over server-side law instead of a trust assumption. Verified with focused `PlatformEndpointsTests|BridgeCliTests|ProviderAdvertisementTests` passing 71 tests, provider print/surface/binding smokes, and a temporary CultCache advertisement export/readback path. +- Bifrost commit `a474c28` exposes bridge surface readiness instead of a collapsed bridge yes/no. `tools/provider-advertisement.mjs print-surface` and `print-binding` now report per-surface rows: GitHub `live`, Patron `live` through Heimdall HMAC patron-support intake, Other `live` as receipt-only future-surface request, and Discord/Reddit `prepared` when local actuator credentials are not visible. The bridge metric warns when any prepared surface is not live, so Epiphany can treat Bifrost as the bridge oracle without guessing from its own environment. Verified with `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~ProviderAdvertisementTests"`: 2 passed, plus direct provider print/surface/binding smokes. - Persona public mouth crossings now fail closed on missing or wrong-surface authority cargo before any Bifrost CLI invocation. `epiphany-persona-discord post` and `epiphany-persona-reddit post` require a Bifrost identity plus a Heimdall-backed `heimdall:discord:*` or `heimdall:reddit:*` capability/account reference, write blocked candidate artifacts with `missing-bifrost-identity`, `missing-heimdall-capability-ref`, or `wrong-heimdall-capability-surface`, and smokes prove the bridged path still carries identity, run/lane/agent, source, authority, and surface-shaped Heimdall provenance. Verified sequentially with `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-persona-discord -- smoke` and `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-persona-reddit -- smoke`. - Epiphany now has the matching generic Persona mouth for future Bifrost surfaces. `epiphany-persona-other` supports `draft`, `request`, `latest`, and `smoke`; records the same parent-side `epiphany.persona_speech_audit.v0` and CultMesh audit as the Discord/Reddit mouths; requires Bifrost identity plus a target-shaped Heimdall reference such as `heimdall:bluesky:*`; refuses missing bridge, missing identity, missing Heimdall reference, wrong-surface authority cargo, and repeated target saturation before transport; and invokes Bifrost `tools/bifrost-bridge.mjs other-request` with Epiphany run/lane/agent provenance when eligible. Native MVP status/coordinator Persona action lists expose `otherWorldPersonaRequest` beside Discord/Reddit, and the local wrapper build list includes the new binary. Verified with `epiphany-persona-other -- smoke`, Discord/Reddit Persona smokes, and focused `cargo check` for the touched binaries. `epiphany-mvp-status-smoke` could not run because the vendored `codex-app-server.exe` prerequisite was absent; rebuilding `codex-app-server` timed out twice without producing the binary. - The local operator wrapper now exposes the advertised Persona outside-world mouth actions directly: `-Mode persona-discord`, `-Mode persona-reddit`, and `-Mode persona-other`. These modes call the native mouth binaries, write shared `.epiphany-persona` artifacts plus CultMesh speech audits, skip the Codex app-server compatibility build, and leave Bifrost/Heimdall as the crossing authority. Native status/coordinator readback now merges Discord, Reddit, and Other latest Persona artifacts instead of advertising Reddit while only reading Discord/Other. Verified with focused `cargo build --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-mvp-status --bin epiphany-mvp-coordinator --bin epiphany-persona-discord --bin epiphany-persona-reddit --bin epiphany-persona-other`, PowerShell parser proof for `tools/epiphany_local_run.ps1`, draft wrapper runs for all three modes, and `-Mode status` readback showing `personaBubble,characterTurn,discordPersonaPost,redditPersonaPost,otherWorldPersonaRequest` plus recent shared Persona artifacts. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index ff987047e12c0b928bf463df2f7dad23e0465d34..86657f3316fabc077aa1ddd7c5cdf0140a7253a6 100644 GIT binary patch delta 474 zcmYLFJ#Q015as+O>TO-kbO4{=9K}+4%k_sK4%a!;g0lY7Za(cp7{P zf}5|4(zit^kXqkmsftwf=b}{mRasvDF4gN{c=r57zbn+M_x?$=I;0UB=b^C9GpZb7 zljr0?^_yzGi4aeGiu{kq7$aHV zGCKRxgd=jX;iPjq$0QN!meDH41ZF8}P_ZvImSTBA?MY=0PZTNspBU%qyOAL5<@u%A8!+t0coWtZ9*sPG%u|()>&fN;P P-H^0wa11Ut6LjsrtpBKD delta 56 zcmdlxN#cH=#0E)5E(0qAv#4VXY-~20l^F{e8J9OtWon