feat(native): serve relay media and uploads in packaged builds - #433
Conversation
ae1bebc to
e80f60d
Compare
e80f60d to
fdc9a27
Compare
wesbillman
left a comment
There was a problem hiding this comment.
One P2 integration finding inline. Star Lord’s automated source review via Wes’s account; head fdc9a273bc0d37d9854df496b5c155b3dece42ee, base f3fe889eec574a4ecee9b3dfa10697378ef0faa9.
Source-only, including independent native-boundary review; no tests, builds or app execution. Hosted CI was incomplete at the snapshot and Windows validation was skipped. Packaged media/upload/playback acceptance remains unverified.
wesbillman
left a comment
There was a problem hiding this comment.
Changes needed: one download-policy regression inline, plus a public-metadata issue below. The prior native source-classification repair is present; this does not establish packaged download/playback acceptance.
[P2] Remove internal identifiers from the new commits’ author/committer metadata. Both 05cee7fa and 3c164928 publish an internal relay hostname and agent-account identifier in author.email and committer.email. Use an approved public-facing address for the actual contributor when preparing the replacement commits. Preserve actual authorship and legitimate Signed-off-by trailers; the sign-offs are explicitly exempt from this finding.
Star Lord’s automated follow-up source review via Wes’s account. Head 3c164928a9f5f961361f17fa4700856b50b7ef28; base f3fe889eec574a4ecee9b3dfa10697378ef0faa9. No tests, builds or app execution. The hosted CI snapshot passed its required gate; Windows validation was skipped. Packaged media/upload/playback and human acceptance remain unverified.
3c16492 to
ded6fbb
Compare
wesbillman
left a comment
There was a problem hiding this comment.
Changes needed: repair the required Rust formatting gate and preserve OS download-origin metadata in the new native save path (inline). The previous download-policy regression is repaired in source. The prior public-metadata finding remains in the rebased commits’ author/committer contacts; legitimate sign-offs remain exempt.
Star Lord’s automated follow-up source review via Wes’s account — head 15d1fb1ba0192c69c24cee29af78ee322b284b0f, base 5b6bd71d389c8171652bbc009341a2e9a3b55031.
Source-only, including independent native-boundary review; no tests/builds/app execution. Hosted Rust CI stopped before tests, other lanes were still running, and Windows was skipped. Packaged download/playback, OS trust prompts and human acceptance remain unverified.
15d1fb1 to
b2d4f41
Compare
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Changes requested: one Windows compilation blocker, detailed inline. Reviewed head ad6fb7d22b79ffc6b486c5195b7fb8257f580774 against its base snapshot b2f245e43841e831e098c5e27053eec212debe60. Independent UI, upload-lifecycle and saved-file safety lanes are complete.
- Prior repairs: native document/audio/image consumers and the broker/blob download policy are repaired in source. Quarantine/zone marking is now attempted before writing file contents, with cleanup on failure. The prior author/committer-address finding is not actionable: these managed-agent identities are approved by Wes; no metadata rewrite is required for them.
- Integration/CI: main advanced to
e304e3f59aa8ae89a3982d9f144cc933ccaea5b7; GitHub reports conflicts, independently reproduced inbuild.rs,capabilities/default.json,browser_permissions_tests.rs,lib.rsandrelay/tests.rs. The previous head’s Linux job stopped at formatting;ad6fb7d2removes the offending blank line. Current-head DCO/security checks pass, but fresh required CI is not established. These merge/CI gates are separate from the inline code defect. - Exit criteria: fix the inline blocker, reconcile with current main while retaining both command/ACL sets, then obtain passing required checks plus the existing Windows native validation. Packaged upload/emoji/display/playback/save and human acceptance remain unverified. Native provenance readback and forced failure-cleanup coverage remain validation gaps; Linux tests do not exercise the macOS/Windows branches.
Source/caller/test and hosted-log review only; no new local suites, packaged launch, credential access, approval or merge. Full diff, PR text and commit metadata inspected for public-material exposure.
ad6fb7d to
1185f7b
Compare
Packaged builds used the native transport, which had no media proxy, no uploader and could not publish kind 30030, so custom emoji neither rendered nor offered an upload form. - buzz-media:// async URI scheme proxies relay /media/ blobs, signing a fresh strict 60 s Blossom get token per request and forwarding one bounded Range so video/audio stream and seek. Types are sanitized (no SVG; non-media served as downloads with nosniff). - relay_upload hashes, signs (t=upload + x) and PUTs the exact bytes JavaScript passes; JS still never signs kind 24242 and the CSP keeps connect-src closed to general HTTPS. - Shared hostUpload owns limits, timeout, relay/broker error mapping and descriptor validation for both the broker and native uploader. - Native writers advertise kind 30030; avatar previews use the scheme. Signed-off-by: cid <d9f92a72922bf45c17379a47d64dae84b6020397c2d5a52b5317d512068cd9d3@buzz.block.builderlab.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
No remaining code blockers found in this follow-up. The previous Windows compilation finding is addressed. Reviewed head 1185f7b71129a1ae93d8816eac22ace05c926180 against base snapshot e304e3f59aa8ae89a3982d9f144cc933ccaea5b7, concentrating on the repair and rebase since the prior review.
- Verified: the OsString repair removes the missing-trait call. Both media and sidebar command/permission sets survive the rebase; previously reviewed media consumers and upload/cancel behavior are retained. Required CI and the separate Windows native run passed at this head, including the Windows download-zone readback. The automatic workflow’s skipped Windows entry is not an outstanding Windows-test failure.
- Integration gate: current main
f778cb40b80f7c8a0edfe4dcc84e8b1151085c34conflicts inbuild.rs,capabilities/default.json,browser_permissions_tests.rs,lib.rs, andnative.test.ts, independently reproduced withgit merge-tree. Reconcile these and validate the resulting head; this is separate from a code-review finding. - Acceptance gap: packaged upload/emoji/playback/seeking/save and human acceptance remain unverified. Source and hosted CI are not packaged GUI evidence.
Independent frontend and native follow-up lanes completed. No local suites duplicated, app launched, credentials accessed, approval, or merge.
Signed-off-by: cid <d9f92a72922bf45c17379a47d64dae84b6020397c2d5a52b5317d512068cd9d3@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
1185f7b to
1cad73f
Compare
|
🤖 Reconciled with main Local checks at |
* origin/main: (27 commits) Let plugin pages publish NIP-AR artifacts and embed the host thread view (#434) test(app): migrate entity-navigation test off removed buzz://open locator API (#463) Show agent activity in navigation (#423) test(browser): hold motion when it commits, not on its start event (#459) fix(navigation): ignore unknown query parameters on Buzz links and remove the buzz://open locator (#457) feat(design-system): distinguish controls on floating surfaces (#429) feat(native): add community extras and media preparation (#450) Clone inventory identities through reviewed text and fresh identity creation (#289) feat(communities): add right-click actions to the community rail (#400) fix(messages): keep a send reveal pending until its scroll runs (#454) fix(messages): reserve a stable scrollbar gutter on the channel feed (#451) fix(sidebar): list plugin pages as sidebar rows via an opt-in primary flag (#401) feat(channels): surface canvas content in channel settings (#426) fix(profiles): remove redundant presence status row (#394) test(browser): count live retries once the page handles startup controls (#443) feat(composer): host-owned resource links for the Projects picker (#445) feat: support native read state and recent channel activity (#444) feat(native): serve relay media and uploads in packaged builds (#433) feat(channels): suggest joined channels in the composer (#446) feat: support native agent activity, library, memories, and community resolution (#441) ... Signed-off-by: Codex <noreply@openai.com>
Problem
In packaged builds (including preview.25.1), custom emoji did not render and the upload form was missing.
just web/just desktopuse the development broker, but the packaged app uses the native transport, which had no authenticated media URL, uploader, or kind 30030 writer capability.Change
buzz-media://as an async Tauri scheme for HTTPS relay/media/<64-hex>[.ext]URLs. A fresh strict Blossom kind 24242gettoken is signed per request, including range reads. Only a single boundedRangeis forwarded. Responses cap at 16 MiB for 206 and 100 MiB for whole-file 200; redirects are disabled. SVG and non-image/video/audio types are downloads withnosniff.relay_uploadand its main-webview ACL, plusrelay_upload_cancel. Rust hashes, signs (t=uploadandx), and PUTs the raw IPC bytes.x-buzz-content-typetransports the file type because Tauri sets the raw IPCContent-Type. Cancellation settles the JS promise and drops the in-flight native future. Renderer-generated IDs cover reorderings of separate IPC commands. The follow-up at7fc7cc65separates active-upload admission from pending pre-start cancels, caps those pending records at 64 and expires them after 60 s; late cancels or early validation failures cannot permanently deny new uploads. Already accepted bytes cannot be undone.hostUploadfor limits (images 50 MiB, GIF 10 MiB, documents 100 MiB, video 500 MiB), timeout (600 s), error mapping and descriptor validation. Add optionalSigner.upload/Signer.mediahost capabilities and native avatar previews. Preserve the development broker path.nativeWriteKindsand the Rustrelay_signallowlist. JS still cannot sign kind 24242. Add only media scheme sources to CSP, not general HTTPSconnect-src.docs/identity.mdto state the actual HTTPS +/media/<hash>URL validation instead of implying a saved-community allowlist. Update the stale README packaged-upload claim.Review follow-up
05cee7fae33f0435ca9c82d387aface971cc9f8c, align native whole-media timeout with the broker/native-upload 600 s deadline. A near-100 MiB document on a slow link otherwise failed natively at 120 s despite succeeding through the broker. Full-PR independent review now reports no actionable findings and scores minimalness/elegance/correctness 9/9/9; actual packaged behavior is a separate acceptance gate.Known limitations
Verification
Hosted CI at
05cee7fapassed JavaScript, Rust/tool integration, Chromium and WebKit journeys, measurements, DCO and required gate: https://github.com/block/buzz-app/actions/runs/36647977940. Windows native validation was skipped. Local full native package after the timeout fix passed 149 unit tests and 1 integration test (4 ignored); pinned buildbin/pnpm tauri build --debug --bundles app --no-signproduced a macOS app (131 MiB; binary SHA-25665101e0379ab5e19a54fa7dcb1f3af7f6bd0d3d587063aeee50f29558ef6355c) from a clean detached worktree at that head. Build is not packaged GUI validation. The native identity store readsSecKeychain::default()with a fixed service/account; changing bundle ID or data path does not isolate the user's Keychain, and this session lacks passwordless access to a separate OS user. The app was not launched; packaged upload, emoji, playback/seeking and human acceptance remain unverified.At
fdc9a273bc0d37d9854df496b5c155b3dece42ee, rebased the five native/media commits ontof3fe889eec574a4ecee9b3dfa10697378ef0faa9and removed our three CI-only commits. Upstream now owns the profile fixture and timeline-restoration fix; neither file appears in this PR diff. Focused profile, timeline-restoration and native relay tests passed (40/40). The mandatory pre-push hook passed TypeScript, related Vitest (193 files/2884 tests) and design checks. Hosted CI at this head is pending; DCO Check passed. Windows native validation was skipped.At
7fc7cc65e1a3efdd859bf80adfe2b351877a10ab:cargo test --manifest-path src-tauri/Cargo.toml --locked -- --test-threads=1passed (149 unit tests; 4 intentionally ignored; integration/doc targets passed). New regression checks >64 late cancels, early validation-failure cancels, pre-start and active cancellation, and admission recovery.cargo fmt --checkpassed. The pre-push hook passed related Vitest (191 files/2872 tests), types and design checks. Hosted CI at that SHA failed Rust Clippy (drop(sender.send(()))drops a Copy result under-D warnings). Atae1bebcecdefffec723c39df10c548a102242856, the one-line lint fix useslet _ = sender.send(());; local workspace Clippy with-D warningsand full serial Rust tests passed. Hosted CI at the priorae1bebcehead: Rust/tool integration and all browser jobs passed; JavaScript failed twice (initial run and failed-jobs rerun) in unchangedsrc/app/App.profile.test.tsxbecause jsdom lackedwindow.matchMediaatAppShell.tsx:59(4 tests; 5408 passed). CI required is red. Windows native validation was skipped.At prior
eebacac7: fullpnpm exec vitest runpassed (445 files/5397 tests) twice independently on the implementer's machine. Hobbes observed one timeout in unchangedread-state.test.tsduring a concurrent independent full run (444 passed/1 failed); no assertion failure was established, but repeatability is unresolved.pnpm checkpassed at eebacac; no frontend files changed in 7fc7cc6.pnpm tauri build --debug --bundles app --no-signcompiled and createdBuzz Foundation.appat eebacac. Build only, not a GUI workflow test; this artifact predates the pending-cancellation follow-up.Default parallel native tests at eebacac twice encountered timing-sensitive failures in unchanged
src-tauri/src/host_command.rs; full serial package runs passed. Do not interpret the serial run as fixing those tests.Ready for review at Kalvin’s request; packaged acceptance is still outstanding. Full-PR independent review at
05cee7fafound no remaining actionable findings and scored 9/9/9 after the timeout correction. Safely isolated packaged media/upload/playback exercise and human acceptance remain open. The macOS debug build uses a shared default Keychain item; changing the app identifier/data directory alone does not isolate credentials, so no packaged GUI has been launched. No release-signed or live packaged media/upload acceptance is claimed.