Conversation
Signed-off-by: Bradley Axen <baxen@squareup.com>
🔐 Codex Security Review
|
…mission Signed-off-by: Bradley Axen <baxen@squareup.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
bradseiler
added a commit
that referenced
this pull request
Sep 16, 2026
## Summary This is a behavior-preserving refactor that gives the desktop relay HTTP bridge one helper for authenticated request construction. It moves the repeated `Authorization`, JSON content type, optional `x-auth-tag`, body, and timeout setup into `build_authenticated_relay_request`. The helper uses the final URL, auth header, and body bytes passed by the caller. It does not sign, reserialize, normalize, send, parse, classify errors, choose a client, or handle rate limits. Excluded paths: media, WebSocket, Git, agents, mobile, and NIP-FI. The query send helper only routes through the new request builder so the timeout and `x-auth-tag` behavior are covered by the same seam. ### Related issue None found. This prepares for the enterprise identity follow-up to be smaller than #7663. ### Testing - `cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --check` passed at `356676a2f70f6bdf80cfdcb9084f1f7548359ecb`. - `cargo test --manifest-path desktop/src-tauri/Cargo.toml relay::tests::authenticated -- --nocapture` passed at `356676a2f70f6bdf80cfdcb9084f1f7548359ecb`. - `just desktop-tauri-check` passed at `356676a2f70f6bdf80cfdcb9084f1f7548359ecb`. - `just desktop-tauri-test` passed at `356676a2f70f6bdf80cfdcb9084f1f7548359ecb`. - `just desktop-tauri-clippy` passed at `356676a2f70f6bdf80cfdcb9084f1f7548359ecb`. Generated with Codex Signed-off-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz> Co-authored-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz>
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.
Desktop + agent POC (second pass)
This draft now implements a connected client POC against an assumed kgoose API, rather than only header plumbing and an effort inventory. Local Nostr signing remains unchanged; no remote custody implementation is imported.
Implemented
buzz git; built-in dev-MCP routes Git through the renewing launcher./agent-delegationsendpoint.Assumptions and scope
The new
/v1/buzz/identity/assertionsendpoint returns{assertion, nostr_pubkey, expires_at}following existing browser/code login. Detached agents additionally require/agent-delegationsreturning a revocableagent_credential. These are assumed API shapes, not existing kgoose implementation claims. The adapter must authorize agent enrollment/delegation; NIP-OA alone never substitutes for that policy.Disabled by default. Configure
BUZZ_BUILD_NIP_FI_ORIGINS,BUZZ_BUILD_LOGIN_API_URL, andBUZZ_BUILD_NIP_FI_ASSERTION_URLto run against the adapter. Mobile files retained from the first pass are still partial plumbing; this pass focuses desktop and agents.Remaining POC limitations
limit:0live tails still need finite reconnect gap repair. Renderer and ACP have existing catch-up machinery.buzz git(built-in dev-MCP has the shim). Long Git transfers can expire mid-operation.See
docs/nip-fi-client-poc.mdfor runnable build settings, exact assumed request/response shapes, actual coverage and refinement work. The former sketch document is replaced, not an alternative implementation plan.Verification
/queryheaders and logout during an in-flight result.just cifailed intest-unit:acp::tests::idle_resets_on_stdout_activityfailed its elapsed-time assertion (933 passed, 1 failed, 1 ignored in that run). The other 13 Rust groups passed; later CI stages did not run. No baseline establishes causality.origin/mainwas merged cleanly with sign-off (aa5845f36). On the merged tree, the isolatedidle_resets_on_stdout_activitytest and CLI HTTP/WS/Git acceptance passed. The fulljust cirerun failed onkeepalive_resets_idle_past_deadline(elapsed 100.734417ms; 940 passed, 1 failed, 1 ignored in that ACP run). The other 13 Rust groups passed; later CI stages did not run. Full CI is not green; timing sensitivity is suspected, not proven unrelated. The subsequent pre-push run exposed a shared-target collision: the CLI executable was replaced by a zero-byte sidecar stub, alongside the two ACP wall-clock fixture failures. Fix commitb90b14253runs the CLI through its own test executable and drives the actual ACP reader with in-memory input/virtual time. The three focused idle-reset tests, CLI HTTP/WS/Git fixture, and clippy passed. Published successfully atb90b142538c50bc8953e8dd35e0aa8249efc0bfd; every normal pre-push hook passed, with no bypass. A fulljust cipass after the fixture fixes is not yet established; the successful pre-push run is not equivalent to the full build gate.