feat(relay): deliver pubkey mentions to relay companions - #7793
jsibbison-square wants to merge 1 commit into
Conversation
🔐 Codex Security Review
|
4eacb6c to
43597fb
Compare
|
I reviewed this at exact head P1: deterministic HTTP failures consume the full retry budgetIn Could we classify outcomes so transport errors, P1: default redirect following can silently complete delivery at the wrong endpointThe reqwest client at Could we construct the client with Architecture question (not classified as a defect)Is deployment-global listener registration—and therefore release of mention metadata across community boundaries—an intentional operator-trust exception? Migration 0049 explicitly says registrations span communities, while the isolated-community direction in |
8bd65ce to
291c1cd
Compare
|
@TheSentinel454 fixed "deterministic HTTP failures consume the full retry budget" and "default redirect following can silently complete delivery at the wrong endpoint". Regarding "Architecture question" yes this is deliberately operator level as our service needs to be pushed information without knowing all the communities that the agents may be in. Therefore we cannot register with community fencing upfront. It's not a subscription registration in a normal user sense. |
291c1cd to
501f93e
Compare
501f93e to
c6c9ee0
Compare
Signed-off-by: jsibbison-square <jsibbison@squareup.com>
c6c9ee0 to
398999b
Compare
| () => typeof window.__BUZZ_E2E_EMIT_MOCK_MESSAGE__ === "function", | ||
| ); | ||
| await page.getByTestId("channel-deep-history").click(); | ||
| await expect |
There was a problem hiding this comment.
P1 — the new readiness wait can still admit the live-event race (async lifecycle/races; discriminating regression tests)
__BUZZ_E2E_HAS_MOCK_LIVE_SUBSCRIPTION__ is called without kind or exactChannel. Its non-exact implementation treats any wildcard ("*") subscription as readiness for this channel, so this poll can resolve before the channel's kind-39005 live REQ and head refresh are actually settled. The following mock message can then be sent into that gap; the UI still shows Jump to latest but never increments it to 1. I reproduced that exact failure once in three no-retry repetitions at this head (2 passed / 1 failed, line 931 received "Jump to latest"), while a later repeat-10 happened to pass—classic race/flake behavior that CI's two retries can conceal.
Please use the existing waitForMockChannelHeadReady(page, "deep-history", "feedf00d-0000-4000-8000-000000000007") helper, which waits for the exact kind-39005 live REQ, the subsequent null-cursor head refresh, and idle query state; or make this check equivalently exact. Then run this case repeatedly with retries disabled and preserve the assertion that the buffered count reaches 1.
We are introducing a companion service to the relay that needs pubkey event mentions for pubkeys it manages. This PR introduces an outbox for pubkey mentions that will be sent to these "operator listener" services.
Summary
Deliver mentions of registered pubkeys to deployment-global operator listeners.
BUZZ_OPERATOR_LISTENERS; listeners manage target pubkeys through NIP-98-authenticatedPOST/DELETE /operator/listener/pubkeysrequests.ptags to registrations and insert one outbox row per listener in the event transaction.Changed behavior
Listener outbox rows are enqueued inside the shared event-insert and thread-metadata transactions; enqueue failure rolls back the event.
event_mentionsbehavior is unchanged: ordinary event/reaction mention indexing remains post-commit best effort with warning-only failures.Testing
cargo fmt --allcargo test -p buzz-db --libcargo test -p buzz-relay --lib config::tests::operator_listener_routescargo check -p buzz-db -p buzz-relay