cargo fmt --all --check failed Rust Lint on the assertions added in the
prior commit (lines 925, 938). Whitespace/reflow only; no assertion or
logic change.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
test_nip10_thread_reply_not_in_top_level asserted only that a reply
threads under its root — a correlate, not the relay's actual top-level
rule. get_channel_messages_top_level surfaces a depth-1 reply iff
broadcast = true, so a broadcast=1 depth-1 reply satisfied every old
assertion yet IS surfaced at top level: the test greened by data
accident. The relay exposes no top-level-queryable surface over
POST /query (feed_types routes to feed queries that never read
thread_metadata.depth/broadcast), so the rule is pinned via its two
test-observable inputs — recorded depth and the broadcast tag — in both
directions: a non-broadcast depth-1 reply is excluded, a broadcast=1
depth-1 reply is surfaced.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The Relay E2E job (new in #939) is the first to run these previously-skipped
tests. Two asserted against `/channels/.../threads` and `/channels/.../messages`
REST routes the relay never served (permanent 404); a third raced a live
kind:44100 fan-out that a sibling subscription's drain silently discarded.
Rewrite the thread read-backs against POST /query — the depth_limit + #e
extension routes to get_thread_replies, the relay's real thread surface — and
reorder the DM test to subscribe after create_dm so the persisted membership
and discovery events are served deterministically from history.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The live_split_model_completes test is a manual runbook test requiring
multiple serve nodes. Replace panic!() with println+return so it skips
gracefully when CI runs --ignored tests.
Co-authored-by: Will Pfleger <wpfleger96@gmail.com>
Signed-off-by: Will Pfleger <wpfleger96@gmail.com>
Same class of issues as e2e_media_extended — tests assumed image-only
policy and wrong API path. The relay ignores Content-Type headers (uses
magic bytes) and the route is /events not /api/events.
Co-authored-by: Will Pfleger <wpfleger96@gmail.com>
Signed-off-by: Will Pfleger <wpfleger96@gmail.com>
infer detects XML-based SVG as text/xml (not image/svg+xml), which is
not in the blocked list, so the relay accepts it through the generic
file path with that MIME type.
Co-authored-by: Will Pfleger <wpfleger96@gmail.com>
Signed-off-by: Will Pfleger <wpfleger96@gmail.com>
The relay now has a generic file upload path that accepts PDFs, random
bytes, and unrecognised formats as application/octet-stream downloads.
SVG with XML declaration is not detected by `infer` and also routes
through the generic path. Updated four content validation tests from
expecting rejection (400/415) to expecting acceptance (200).
Additionally, three WebSocket imeta tests hit /api/events but the
relay route is at /events (no /api prefix). Fixed the URL in all three.
Co-authored-by: Will Pfleger <wpfleger@squareup.com>
Signed-off-by: Will Pfleger <wpfleger@squareup.com>
Missed during rebase: sprout_core→buzz_core_pkg imports in
persona_events.rs and migration.rs, sprout-desktop→buzz-desktop
in log messages, and cargo fmt on e2e_persona.rs.
Squashed for rebase — original commits:
- feat(desktop): add persona event kind with client publish/read/retain
- fix(desktop): sign every migrated persona event and drop the sentinel file
- fix(relay): validate kind:30175 persona d-tag slug grammar on ingest
- fix(desktop): drop env_vars from public PersonaEventContent
- docs: add NIP-AP spec for kind:30175 persona events
- feat(ci): add relay E2E testing job and persona event tests
Adds a build-time-configured transport reconnect hook so internal builds can recover the underlying transport (e.g. WARP VPN) before the relay reconnect, while OSS builds stay a pure no-op.
The generic "Reconnect to relay" button is transport-agnostic; internal users behind a VPN need the transport re-established first. A build-time env var `BUZZ_BUILD_RELAY_RECONNECT_CMD` (set only in `squareup/buzz-releases`) carries a JSON config validated into a typed Rust struct at compile time, so the OSS binary ships with zero VPN knowledge.
- New Tauri command `relay_reconnect_hook` runs structured fixed-argv steps plus a readiness probe, wrapped in `tokio::task::spawn_blocking`; non-fatal end-to-end so any failure falls through to `preconnect()`.
- `ReconnectHookConfig` lives in one dep-free source file `include!`'d by both `build.rs` and the runtime command, so the compile-time validation and runtime parse cannot drift.
- `useReconnectRelay.ts` invokes the hook before relay preconnect, guarded so a hook rejection cannot abort the reconnect.
- When `BUZZ_BUILD_RELAY_RECONNECT_CMD` is unset (OSS), the command compiles to an early-return no-op.
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>