relay: accept HTTP agent observer frames (draft handoff) - #7861
Draft
cloud-on-prem wants to merge 1 commit into
Draft
cloud-on-prem wants to merge 1 commit into
cloud-on-prem wants to merge 1 commit into
Conversation
🔐 Codex Security Review
|
Signed-off-by: Prem Pillai <prem@squareup.com>
cloud-on-prem
force-pushed
the
relay/observer-frame-http-ingest
branch
from
September 24, 2026 06:08
011460b to
b651669
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent runtimes that only speak HTTP can now publish NIP-AO observer frames (kind 24200) through
POST /events, not just over WebSocket.handlers/ingest.rs. Both transports run the same signature, freshness (±300 s), envelope and agent-owner checks.buzz_events_stored_total.OK falsewith the same message. It is not counted as a relay error.AcceptEphemeralaction (schema v2) instead of reusingWriteInsertGlobal.docs/nips/NIP-AO.mdnow documents the HTTP bridge behaviour.Kind 24200 is deliberately not exempt from the HTTP API quota (see #7736). The expected volume is low, so we'll measure 429s before considering an exemption or batching.
Known limitation
The agent → owner mapping is only recorded when an agent authenticates through the
x-auth-tagfallback. An agent that was added directly as a relay member has no recorded owner, so its frames are rejected.test_http_direct_relay_member_observer_frame_hits_known_owner_recording_gappins this behaviour. Fixing it is out of scope here.Testing
rust-tests), Tauri checks.e2e_relay.rs:test_http_agent_observer_frame_is_ephemeral_and_owner_scoped,test_http_observer_rate_limit_returns_429, and the known-gap test above.🤖 Generated using: 🎮 rp1.run