Beachwave After Action Report #
Summary #
The initial Beachwave scaffold was added to the repository. It creates the first protocol artifact, a small SDK, a local demonstration client, protocol documentation, and lifecycle tests.
This work establishes a baseline for the project, but it is not yet a production-ready live audio application. The largest remaining gaps are real ATProto authentication, a concrete ATProto repository adapter, and LiveKit media integration.
What was done #
Repository structure #
Added the initial project layout:
lexicons/community/beachwave/room.jsonfor the Room lexicon.src/sdk/for protocol-facing TypeScript helpers.src/client/for a small browser reference client.docs/protocol.mdfor implementation-independent protocol notes.test/sdk.test.jsfor lifecycle coverage.package.jsonandtsconfig.jsonfor build and test commands.
Protocol and lexicon #
Defined the initial community.beachwave.room record with fields for title, optional description, LiveKit room name, lifecycle status, timestamps, and host DIDs.
Documented Room semantics in docs/protocol.md, including purpose, lifecycle, ownership, storage location, and interoperability expectations.
SDK #
Implemented the initial SDK API:
createRoom()endRoom()getRoom()listRooms()joinRoom()leaveRoom()
The SDK currently targets a generic RepositoryClient interface rather than binding directly to a specific ATProto library. This keeps the public API stable while allowing a real ATProto adapter to be added later.
Reference client #
Added a small browser client that consumes the SDK and an in-memory repository adapter. The client can create, discover, and end local demo rooms.
The client intentionally does not perform raw repository operations. This preserves the separation between reference UI and protocol behavior.
Tests #
Added a Node test that exercises the room lifecycle:
- create a room;
- list live rooms;
- join a live room;
- end the room;
- verify ended rooms are no longer listed or joinable.
Validation performed #
The previous implementation was validated with:
npm run buildnpm test
Both commands completed successfully at the time of the initial scaffold.
Known limitations #
- The reference client uses
MemoryRepositoryClient; it is not yet connected to a real ATProto PDS. - There is no ATProto login flow yet.
- LiveKit is represented by the
livekitRoomfield, but actual LiveKit token retrieval and audio connection are not implemented yet. - Speaker requests, host controls beyond ending a room, participant records, invitations, recordings, transcripts, and moderation events are not implemented yet.
- The SDK update path should eventually preserve unknown fields from fetched records more deliberately and may need compare-and-swap or revision handling depending on the chosen ATProto adapter.
- Discovery currently depends on explicitly provided repositories. A production client will need a broader discovery strategy.
Notes for a future agent #
- Preserve the separation between protocol, SDK, and reference UI. The client should continue to consume the SDK like any third-party app.
- Add a real ATProto adapter behind
RepositoryClientbefore expanding UI complexity. - Do not make the Room lexicon reference-client-specific. Any new fields should be justified by interoperability needs.
- Before adding future lexicons, document their purpose, lifecycle, ownership, storage location, and interoperability expectations.
- Add LiveKit through a narrow boundary that returns credentials or connection metadata from a resolved Room record. Avoid storing secrets in ATProto records.
- Keep tests focused on protocol behavior. UI tests can be added later, but SDK lifecycle tests should remain fast and deterministic.
- If package dependencies are introduced, update the development docs and commit the lockfile generated by the chosen package manager.
Recommended next steps #
- Implement an ATProto-backed
RepositoryClientadapter. - Add ATProto login to the reference client.
- Add LiveKit token service documentation and client connection flow.
- Expand discovery beyond explicitly listed repositories.
- Draft Participant and Speaker lexicons once room lifecycle behavior is stable.
Milestone 2 — ATProto OAuth and real PDS integration #
Summary #
Authentication was the stated blocker. This milestone adds modern ATProto OAuth, a real PDS-backed repository adapter, and the media-transport boundary, then wires the reference client through the full sign-in → room flow.
What was done #
ATProto OAuth (from scratch, no dependencies) #
Added src/sdk/atproto/, a browser-native implementation of the public-client
authorization-code flow using only Web Platform crypto:
encoding.ts,jwk.ts,pkce.ts— base64url/SHA-256 helpers, RFC 7638 JWK thumbprints, and PKCE.dpop.ts,transport.ts— non-extractable P-256 DPoP keys, signed proof JWTs, and a DPoP-aware fetch that handles theuse_dpop_noncechallenge.identity.ts,metadata.ts— handle/DID → PDS resolution and authorization-server discovery.oauth-client.ts,oauth-session.ts,store.ts— PAR + token exchange, an authenticated session with token refresh, and persistence (IndexedDB for the key, localStorage for state).
The client is scope-agnostic and defaults to atproto transition:generic, so
granular scopes can be adopted by changing one configuration string.
Real repository adapter and dev fallback #
repository.tsimplementsRepositoryClientagainstcom.atproto.repo.*: authenticated DPoP writes to the owner's PDS, and public reads against any repository (resolving each DID's PDS).app-password.tsprovides an optional, clearly-scoped development fallback.
Media boundary #
src/sdk/media/ defines MediaController/MediaTokenProvider/MediaSession
and a LiveKit adapter. Token minting is delegated to a deployer-operated
endpoint because it requires a server-side secret. Media transport stays fully
decoupled from room metadata.
Reference client #
Rewrote src/client/ for OAuth sign-in (primary), app-password and offline
fallbacks (dev), redirect-callback handling, and the signed-in room flow
(create, discover, share link, join, end) against the real PDS. Added
client-metadata.json and loopback dev configuration.
Validation performed #
npm run buildandnpm testpass (addedtest/oauth.test.js, including a real ES256 DPoP sign/verify round-trip and PKCE/JWK/AT-URI/identity coverage).- Browser smoke test (Chromium): sign-in renders, offline create/join/end/sign-out work with zero console errors.
- The OAuth pre-redirect pipeline was driven against live Bluesky infrastructure:
handle resolution, auth-server discovery, DPoP, and a PAR that exercised the
use_dpop_nonceretry and returned a realrequest_uri.
Known limitations / next steps #
- The token-exchange callback and authenticated writes require a real interactive login to validate end to end; they reuse the DPoP transport already exercised by PAR.
- In-app audio requires a LiveKit token service (documented in
deployment.md). - Speaker request/approval and moderation remain future milestones pending the Participant/Speaker/Invitation/Moderation lexicons.
Milestone 3 — Working rooms: audio, presence, chat, and Bluesky sharing #
Summary #
After the first interactive sign-in (via the app-password fallback) it became clear the room "worked" but didn't feel like one: no audio was actually audible, and there was no sense of who was present. This milestone makes the room real and chooses the product direction — live rooms shared into the Bluesky feed.
What was done #
Real audio #
The LiveKit adapter previously connected and published the local microphone but
never attached remote audio tracks, so participants could not hear each other.
The adapter now attaches subscribed audio tracks to hidden <audio> elements
(and detaches them on unsubscribe), so audio actually flows.
Presence and speaking indicators #
The media boundary (src/sdk/media/types.ts) gained MediaRoomState /
MediaParticipant and a subscribe() stream. The LiveKit adapter emits presence
on connect/disconnect and active-speaker changes, and the room stage renders a
live participant list with speaking highlights and a head count — which is also
how a host validates that audio is working.
In-room text chat (accessibility) #
An ephemeral text chat rides the LiveKit data channel (src/sdk/media/chat.ts,
CHAT_TOPIC), with a visible, aria-live chat feed in the room. It is a text
alternative to audio and needs no new lexicon or persistence. Messages are not
written to ATProto.
Share rooms to Bluesky #
announceRoom() / buildRoomPost() (src/sdk/announce.ts) publish an
app.bsky.feed.post with a clickable join-link facet, through the same
RepositoryClient. The room lexicon stays provider-neutral. The client offers a
"Share to my Bluesky feed" checkbox on create and a per-room "Share to Bluesky"
button. This is the chosen differentiator: going live surfaces a tap-to-join
link in the host's feed, joinable with the viewer's own ATProto identity.
Validation performed #
npm run buildandnpm testpass (15 tests; added chat codec round-trips andbuildRoomPostfacet-offset coverage incl. unicode, plus anannounceRoomwrite against the in-memory client).- Browser smoke test (Chromium) of the offline path: zero console errors.
- The LiveKit presence/chat/audio-attach paths follow the documented livekit-client v2 API and type-check, but a two-participant test on the deployed site is still needed to confirm them end to end (it needs a real LiveKit server and a second participant).
Known limitations / next steps #
api/token.jsstill trusts the caller's identity/role; harden before public launch (verify the ATProto session; derive role server-side).- Chat and presence require LiveKit to be configured; the offline demo is local-only and does not connect.
- Speaker request/approval and moderation still await the Participant/Speaker/Invitation/Moderation lexicons.
Milestone 4 — Interface, language, and a real design pass #
Summary #
The stack worked end to end, but the project did not yet read as what it is: a forkable reference implementation. This milestone is a presentation and framing pass — clearer language, a polished multi-screen visual design, real typography, and two concrete sharing fixes — with no expansion of the protocol or feature set.
What was done #
Reframing the language #
Rewrote the landing copy, README intro, and page metadata so Beachwave reads as
a forkable reference implementation rather than a hosted consumer product: the
demo is framed as proof of the stack, the repository as the reusable artifact.
Added title/description, OpenGraph, and Twitter-card meta to index.html,
and saved before/after screenshots under docs/screenshots/ so the visual
history travels with the repo.
Design implementation (Beachwave.dc.html) #
Implemented a Claude Design handoff (Beachwave.dc.html) across the screens
that map to real functionality — landing + sign-in, dashboard (create room +
your rooms), and the live room (speaker/listener avatar grids, mic + leave
controls, LiveKit-backed chat rail). Adopted the design's deep-navy + ATProto
blue + berry-pink palette and its live badges and equalizer/ring/pulse
animations. The design's mock-only Discover, Profile, and Schedule screens were
deliberately not built, because they have no data or backend behind them;
building them would have meant non-functional fake-data pages.
All existing behavior was preserved: the redesign is structure and styling only, keeping every form, handler, and element id intact.
Typography (Fontshare, self-served) #
Replaced the design's Google Fonts CDN reference with Fontshare faces served from its CSS API: Cabinet Grotesk for display/headings, Alpino for body/UI, and Zodiak (serif) for the large statement lines (hero accent and the dashboard greeting), giving a deliberate sans/serif contrast. No request is made to Google.
Branded Bluesky room cards #
Room announcements now attach an app.bsky.embed.external card (title +
description) via a new optional card field on the announce SDK. When a room is
shared, Bluesky renders a branded Beachwave card instead of unfurling the
generic site landing page. The room lexicon stays provider-neutral; the embed is
built only when the client supplies card metadata.
Shared-link deep join #
Following a shared room link now opens the live room directly: the pending shared room auto-joins after authentication instead of showing an invite card to click. Logged-out visitors who follow a link get a banner ("you followed a link to a live room — sign in to join it") and the sign-in form is scrolled into view.
Validation performed #
npm run buildandnpm testpass (17 tests; added twobuildRoomPostcases — embed omitted without a card, and a brandedapp.bsky.embed.externalcard when one is supplied).- Browser smoke test (Chromium) of the offline path across landing, dashboard,
create → join → live room, and the shared-link invite banner: zero page
errors, and computed
font-familyconfirmed the Fontshare faces load.
Known limitations / next steps #
- Per-room link cards are branded on Bluesky via the post embed. A raw room link pasted into a non-Bluesky unfurler still resolves the static site-level OpenGraph tags, not the specific room. Branding those would need a small serverless function (Vercel) that resolves the room record and emits per-room OpenGraph tags; this was scoped out of this pass.
- The external-embed card has no thumbnail: the
RepositoryClienthas nouploadBlob, so athumbblob is not attached. Adding blob upload would let the Bluesky card carry the Beachwave image. - Discover, Profile, and Schedule from the design remain unbuilt by design; they need real discovery, profile, and scheduling features (and lexicons) first.
- In this environment the Fontshare/Google requests are subject to the network policy; fonts fall back to the system stack when the CDN is unreachable.
Milestone 5 — Speaker moderation, deploy robustness, and PWA #
Summary #
With sign-in and audio working on the deployed site, this pass closes the gaps that surfaced from real multi-user use: hardening OAuth deployment, making the "who is talking" cue obvious, letting guests request to speak with host approval, and making the app installable as a PWA.
What was done #
OAuth deployment robustness #
The static client-metadata.json had to match the deployed origin exactly or
sign-in failed with invalid_client_metadata — fragile across preview URLs,
custom domains, and missing env vars. Replaced it with api/client-metadata.js,
a function that derives every URL from the request's own Host header, plus a
vercel.json rewrite serving it at /client-metadata.json. It now matches any
origin automatically; the only remaining requirement is that the deployment be
publicly reachable (Vercel Deployment Protection off).
Mobile audio unlock #
Mobile browsers block audio playback and mic capture outside a direct gesture.
The adapter no longer auto-enables the mic inside join(); the client enables it
from a tap (with an "Enable mic" retry), and a "Tap to enable audio" control
appears when the browser reports playback blocked (canPlaybackAudio /
AudioPlaybackStatusChanged → MediaSession.startAudio()).
Speaking indicator #
The active speaker now lights up clearly — a solid sky ring and glow on the avatar and a lit name — and the local participant shows "speaking" when you talk (it was previously hardcoded to "you", so you never saw your own state).
Request to speak / host approval #
- Listeners can "Request to speak"; the signal rides an ephemeral LiveKit
data-channel control topic (
src/sdk/media/control.ts), separate from chat. - Hosts see pending requests with Approve/Deny. A LiveKit participant's publish
permission is fixed in its join token, so granting requires a server call:
api/grant-speak.jsusesRoomServiceClient.updateParticipant. The promoted listener's client observesParticipantPermissionsChanged, flipscanSpeaklive, and shows the mic control without rejoining. - Room controls are state-driven (
renderControls) so the swap from "Request to speak" to the mic control happens reactively. - Signaling is ephemeral by design — no new lexicon. A persistent moderation lexicon remains a future milestone.
Progressive Web App #
Added manifest.webmanifest (name, icons, standalone display, theme color),
192/512 icons generated from the logo, Apple touch-icon/meta tags, and a service
worker (sw.js) registered from index.html. The worker is deliberately
conservative: same-origin GET only, never caches /api/* or OAuth callbacks
(?code/?state), network-first for navigations (fresh app after each deploy),
stale-while-revalidate for static assets. A vercel.json Cache-Control: no-cache header on /sw.js lets worker updates roll out.
Validation performed #
npm run buildandnpm testpass (20 tests; added control-channel codec round-trips and grant-speak endpoint validation).- Chromium checks: the service worker registers and activates, the manifest
parses (name + 3 icons), and PWA assets serve with correct MIME types
(
application/manifest+json,text/javascript). - The client-metadata function was verified to emit origin-matched documents.
Known limitations / next steps #
api/token.jsandapi/grant-speak.jstrust the caller's identity/role. Before a public launch, verify the caller's ATProto session and derive role / host-authority server-side rather than trusting the client.- The LiveKit-dependent paths (audio attach, presence, chat, permission change, data signaling) follow the documented v2 API and type-check, but need a real two-user session to confirm end to end; the sandbox can't run one.
- In standalone-PWA mode the OAuth redirect leaves and re-enters app scope; it works in general but is worth testing per-platform (iOS especially).
Milestone 6 — Discovery (follows-based "live now") and room TTL #
Summary #
Rooms were reachable only by link, and a host who closed the tab left a ghost "live" record forever. This pass adds no-backend discovery from the social graph and a heartbeat so liveness stays honest — the two pieces that turn "you need the link" into "your people can find you."
What was done #
Room heartbeat / TTL #
- Added an optional
lastActiveAtfield tocommunity.beachwave.room(lexicon, types, validation). createRoomstampslastActiveAt;touchRoom(client, uri)refreshes it.isRoomLive(record, now, ttl)treats a live room as ended oncelastActiveAtis older thanROOM_LIVE_TTL_MS(5 min). Records with nolastActiveAt(older or third-party) fall back to status only, preserving interop.- The client runs a heartbeat (every TTL/2) while the local user hosts a room, and stops it on leave/sign-out. So a closed tab ages out of discovery.
Follows-based discovery #
listFollowDids(did)reads the viewer's Bluesky follow graph from a public appview (app.bsky.graph.getFollows).discoverLiveRooms(client, repos)checks those repositories for room records, concurrency-limited (mapWithConcurrency) and fault-tolerant (a repo that fails or has none is skipped), returning only currently-live rooms, newest first.- The dashboard gains a "Live now · from people you follow" lobby, populated on load and refresh. Offline demo mode skips it.
This is deliberately the cheapest discovery layer: link → follows → appview. A global "live now" index would need a firehose crawler; because the room lexicon is open, that remains a separable (even third-party) component and was scoped out.
Validation performed #
npm run buildandnpm testpass (25 tests; addedtest/discovery.test.jscoveringisRoomLiveTTL logic,touchRoom,discoverLiveRoomsfiltering and ordering, andmapWithConcurrencyorder/bounds).- The signed-in dashboard renders; the lobby and heartbeat are additive and guarded by account kind.
Known limitations / next steps #
discoverLiveRoomsis O(follows): it resolves and lists each followed repo. It is capped (150 follows) and concurrency-limited, but a heavy-follow account pays a real per-refresh cost. A global index would remove this.- Discovery needs two mutually-following accounts to see in practice, which the sandbox can't exercise; verify with real accounts.
- The heartbeat only runs while a host's tab is open; a global index could reconcile liveness against LiveKit room state instead.
- Discovery currently surfaces public rooms only; invite-only rooms would need a room-record allowlist and a server-side token check.
Milestone 7 — Host moderation and a request-delivery fix #
Summary #
Multi-user testing surfaced two gaps: the host never saw incoming "request to speak" signals, and a room owner had no moderation powers. This pass fixes the signal delivery and gives hosts real control: promote, mute (move to audience), and remove (kick).
What was done #
Request-delivery fix #
Control messages (request/decision) were routed by the LiveKit data-channel
topic. Topic propagation can vary, so a request could arrive with no topic and
fall through to the chat decoder, which silently dropped it — the host never saw
it. Routing is now by message content (decodeControl first, then
decodeChat); the payloads are self-describing, so delivery no longer depends on
topic propagation.
Host moderation #
api/grant-speak.jsalready toggled publish permission, so "mute" is a demote (canPublish: false) and "invite"/approve is a promote (canPublish: true).- Added
api/remove-participant.js(RoomServiceClient.removeParticipant) to kick a participant; the controller gainedremoveParticipant(). - The room roster now shows host-only buttons on every remote participant: Invite (promote a listener), Mute (move a speaker to the audience), and Remove (kick). They appear only for a user who can administer the room.
Validation performed #
npm run buildandnpm testpass (26 tests; added remove-participant endpoint validation).- The control-routing fix is logic that unit tests already cover via the codec; the end-to-end promote/mute/remove flow still needs a real two-user session.
Known limitations / next steps #
- The three media functions (
token,grant-speak,remove-participant) still trust the caller. Host-authority verification (confirm the caller's ATProto session and the room's host list server-side) is the main hardening task before a public launch. - "Mute" demotes to listener rather than force-muting a still-published track; that is the stronger moderation action and needs no track lookup, but a keep-on-stage mute could be added later.
Milestone 8 — Cross-instance media (forkable interoperability) #
Summary #
Forking works, but live audio was implicitly bound to one deployment: a room discovered on instance B would mint its token on B's LiveKit project, not the host's, so participants wouldn't actually share audio. This pass makes the room record say where its media lives, so any fork can join any room's audio.
What was done #
- Added optional
serviceEndpoint(the host deployment's base URL) to the room lexicon, types, and validation.createRoomstamps it; the client passeswindow.location.origin. - The client now picks a per-room controller (
controllerFor): your own / same -origin rooms use the local endpoints; a room whoseserviceEndpointis a different origin is joined through<serviceEndpoint>/api/token(and/api/grant-speak,/api/remove-participantfor moderation). All media and moderation calls route through that controller. - The three media functions (
token,grant-speak,remove-participant) now answer CORS preflight and allow cross-origin POSTs, so a guest on another deployment can reach the host's endpoints. - Documented the model in
protocol.md: the ATProto record layer stays fully portable;serviceEndpointtells any client where the media lives.
Validation performed #
npm run buildandnpm testpass (28 tests; addedserviceEndpointpersistence and a CORS-preflight test).
Known limitations / next steps #
serviceEndpointis derived as<origin>/api/...; a fork that serves the API under non-default paths would need to advertise those explicitly.- CORS is
*on the media endpoints — necessary for cross-instance joins and consistent with the existing "trusts the caller" posture, but it reinforces that server-side host-authority verification is the key pre-launch hardening. - OAuth sessions are per-origin: a user joining a remote room stays signed in on their own instance (media routes to the host), which is the intended model.
Milestone 9 — Shareable room cards and moderator roles #
Summary #
Two pieces of polish from real use: room links now unfurl as room-specific cards, and a room owner can promote others to co-moderators (not just speakers).
What was done #
Per-room link cards #
api/room-page.js (reached via a /?room=... rewrite) resolves the room record
server-side and rewrites the page's Open Graph / Twitter metadata to the room's
title and description, while still serving the full SPA. Link unfurlers that
don't run JS now get a room-specific card instead of the generic site card;
edge-cached, with a graceful fallback for unresolvable rooms.
Moderator roles #
addRoomHost/removeRoomHostupdate the room record'shostslist (owner action — only the owner can write their record).- The roster shows host-only buttons: Invite / Move to audience (the clearer name for demoting a speaker), Make mod / Remove mod (owner only), and Remove. Promoted moderators gain the same toolbar.
- A
role-updatecontrol-channel ping tells the affected client to re-read the room record, so a newly promoted moderator gets their tools in real time without rejoining. Roster role labels show host / moderator / speaker. - Because moderation calls already route through the room's controller
(
serviceEndpoint), a moderator on another instance can moderate through the host's deployment.
Validation performed #
npm run buildandnpm testpass (31 tests; added room-page rendering, role-update codec, andaddRoomHost/removeRoomHostcoverage).
Known limitations / next steps #
- Moderator promotion writes the owner's room record, so only the owner promotes; delegated moderators can run live moderation (speak/remove) but not appoint other moderators.
- The link card uses the static logo image; a dynamically rendered card image (room title) is a future enhancement.
- The trust-the-caller posture on media/moderation endpoints still stands; server-side host-authority verification remains the pre-launch hardening.
Milestone 10 — Room-level moderation #
Summary #
Per-participant action buttons were crammed under avatars in the roster grid and overflowed their cells, and managing a busy room one person at a time did not scale. Moderation moves into a dedicated room-level panel with bulk controls.
What was done #
- A collapsible "Moderator tools" panel (admins only) replaces the inline roster buttons. It lists every participant in a scrollable column with their actions, so the speakers/listeners grid stays clean and nothing clips.
- Bulk controls: Mute all moves every non-admin speaker to the audience in one action; an Open mic toggle (owner only) sets the room's policy.
- Added an
openMicfield to the room lexicon.participantRolereads it, so a room can start open (everyone speaks) or moderated (listen and request).setRoomOpenMicflips it; enabling it also promotes current listeners.
Validation performed #
npm run buildandnpm testpass (32 tests; added open-mic policy coverage).
Known limitations / next steps #
openMicand moderator promotion write the owner's room record, so policy and appointments are owner-only; delegated moderators run live moderation (approve, move to audience, remove) but do not change room policy.- Server-side host-authority verification on the media/moderation endpoints remains the pre-public hardening.
Milestone 11 — Host-authority verification and per-room link cards #
Summary #
Two pre-public hardening items the earlier milestones called out: the media/moderation endpoints trusted whatever identity the caller claimed, and a shared room link previewed with the same static logo for every room. Both are addressed here.
What was done #
- Host-authority verification (opt-in). A new
lib/auth.jsverifies an ATProto service-auth JWT (com.atproto.server.getServiceAuth, bound to thecommunity.beachwave.moderatemethod) against the caller's published signing key, andlib/room.jsresolves a room record server-side.api/token,api/grant-speak, andapi/remove-participantnow, whenBEACHWAVE_VERIFY_AUTH=1, require a valid token, confirm the room'slivekitRoommatches, and derive authority from the record: the token is bound to the verified DID, publish permission comes from host membership or the room's open-mic policy, and grant/remove require host privileges. The browser mints the token (createServiceAuth) and sends it as a Bearer header. Enforcement is default-off, so existing deployments keep working until a deployer turns it on. - Per-room Open Graph card image.
api/og-image(edge,@vercel/og) draws a 1200×630 card with the room title, host, and live/ended state on the Beachwave gradient.api/room-pagepointsog:imageat it. It falls back to a branded card when the room can't be resolved.
Validation performed #
npm run buildandnpm testpass (36 tests; addedisHosthost-authority coverage). The OG renderer was smoke-tested to emit a valid PNG, including the null-child paths (ended badge, missing host).
Known limitations / next steps #
- The JWT-signature path depends on live DID/key resolution, so it is exercised
end-to-end rather than unit-tested; only the pure authority logic (
isHost) has unit coverage. BEACHWAVE_VERIFY_AUTHis off by default; turning it on is the remaining step to close the trust-the-caller posture in production.