Repository navigation
Conversation
Use the canonical Control UI read authenticator for profile avatars while preserving stored device grants, generation/revocation checks, the avatar Tailscale path, and ordinary HTTP API authentication. Remove superseded wrappers and the stale shared-secret-only comment without changing the browser's credential order. Fresh baseline requests returned 401 instead of 200. The candidate passed 658 auth/profile/device tests and the applicable changed checks; parsed syntax is unchanged by the UI comment cleanup. Independent final P0 review is scoped-clean. Built Gateway/browser proof remains a pre-landing gate. Fixes #137984. Split from the session-retention work in #136639.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed October 7, 2026, 4:34 PM ET / 20:34 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR lets paired Control UI browsers load profile avatars through existing read authorization, adds HTTP regression coverage, and updates authentication documentation. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 6 items remain Keep open for maintainer handling. The central paired-avatar repair has shipped, but this held branch retains a distinct no-auth scope contract and a stale-credential response gap identified during this review. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway authenticates browser avatar requests before reading uploaded photos or retrieving fallback images. The Control UI renders the returned image through an authenticated blob URL. flowchart TD
A[Control UI browser] --> B[Avatar HTTP route]
B --> C[Credential and scope checks]
C --> D[Profile photo lookup]
D --> E[Uploaded photo]
D --> F[Fallback image lookup]
E --> G[Browser image response]
F --> G
Decision needed
Why: The branch test and current main intentionally produce different outcomes, and the available discussion and docs do not explicitly choose between those header semantics. Before merge
Findings
Agent review detailsSecurityNeeds attention: The newly admitted paired-token path lacks stale-authority fencing across asynchronous fallback-image retrieval. PR surfaceSource -5, Tests +166, Docs +1. Total +162 across 4 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shipped canonical avatar flow and place only an accepted residual scope change at its shared authorization owner, with current-authority checks through the final response. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the branch's delayed-response gap: start a paired-token fallback-image request, revoke the token or rotate its issuer while retrieval waits, then allow retrieval to finish. This review did not execute that scenario; the original uploaded-avatar failure has independent before/after receipts. Is this the best way to solve the issue? No, reviving this avatar-only path is no longer the best repair. Current main owns the central fix; any accepted scope difference should be handled there with final-response authority preservation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 83a95401fb8a; fix evidence: release v2026.9.7, commit 55d37ba6a761. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Built Gateway/browser before-and-after proofVerified candidate 567884f9b3d8 against its unchanged parent using normally paired Chromium browsers and isolated built Gateways. Look at Identity → Avatar, beside “Choose image,” in the attached screenshots; the large assistant badge is unchanged.
The timing shows removal of authentication-failure delays in this fixture, not a general throughput benchmark. Ordinary session HTTP API isolation remains device credential 401 / shared credential 404. A separately labeled, documented whole-pairing removal flow passed: Named follow-up — operator-token CLI scope selection: the original token-only Both revisions passed normal Earlier driver attempts failed on CLI identity assumptions, navigation/body-capture races, a discouraged network-idle wait, and same-document navigation handling. They are recorded separately; no product source, image/auth assertion, or deadline was changed to manufacture a pass. The screenshots are untouched synthetic captures. The video is a 2.7-second rendering excerpt from the actual candidate recording, ending as pairing removal begins—not a recording of the full recovery or a latency benchmark. All 68 decoded frames (29 distinct frames), plus both complete screenshots, were inspected before publication. Raw runtime state, credentials and full diagnostic archives are not attached. This supplies the built-Gateway and paired-browser evidence requested by both items in the latest ClawSweeper review; no authorization guard was relaxed. Exact-head CI is still required. Its current failure matches the existing audit-budget test repair; no merge is being performed past that gate. attachment-1875798188.mp4 |
|
Profile-avatar access is fixed by #137926 (55d37ba) through the shared Control UI read authorizer. Closing the older avatar-specific implementation to keep a single authorization owner. Closed in a sweep of stale maintainer PRs (no activity for 7+ days). Reopen with a current reproduction if this still matters. |


Current status — held for parity against main
Main now contains the broader profile-photo repair, merged as
55d37ba6a76132855b78f967b638eb2009a8f1bf. It routes personal avatars through the canonical Control UI read authorizer and also repairs Mac SSH-tunnel credential recovery.This extracted branch remains unchanged while its original regression cases are checked against main, including declared-scope behavior with authentication disabled. If main covers the same contracts, this PR will close as superseded; any genuine residual gap will be narrowed at the canonical owner. Do not merge this older avatar-only authorization path alongside the landed implementation. The built proof below remains explicitly bound to
567884f9b3d8b81d238fce37b2d1c8966c73f6bc.Closes #137984 — paired Control UI browsers can receive 401 for profile avatars.
Split from the session-retention work; no retention, schema, or configuration changes are included.
What Problem This Solves
Fixes an issue where users connected through normal Control UI device pairing could see missing profile images because avatar requests rejected the browser's valid paired credential. Repeated legitimate image requests also accumulated authentication-failure delays.
Why This Change Was Made
Route this read-only surface through the existing Control UI read authenticator, retaining the avatar route's ambient Tailscale behavior. Stored device grants, issuer generation, revocation, and read scope remain authoritative; request headers cannot widen them. Ordinary HTTP APIs still use their existing shared-secret authentication.
The change removes three superseded generic wrappers and an obsolete shared-secret-only UI comment. Browser credential ordering is unchanged.
User Impact
A paired browser can load profile images using its current read credential. Revoked, stale-generation, or insufficient-scope credentials remain rejected, and this does not grant device-token access to ordinary session HTTP APIs.
Production: +58/−63 (net −5); tests: +166/−0; docs: +5/−4. No new auth mode, dependency, storage, protocol, or configuration surface.
Evidence
3b710e4b75c94675a0e1f1b1c31754635c08a1a6: the real HTTP regression returned 401 where 200 was expected. Prior macOS filesystem-stall/timeout attempts are recorded separately and are not counted as that reproduction.Built Linux Gateway and normally paired Chromium before-and-after proof is now recorded with inspected screenshots, a rendering excerpt, and detailed receipts. All 12 baseline reads returned 401 in roughly 4–5 seconds; all 12 candidate reads returned the exact PNG in 2.9–23.2 ms and the image decoded visibly. Ordinary API isolation held. Documented whole-pairing removal invalidated the old credential, a fresh dashboard handoff restored access, and graceful shutdown completed in 218 ms. Complete source/build manifests remained unchanged, process cleanup was verified, and the Testbox is stopped.
A separate token-only CLI revocation attempt failed because the unchanged CLI requests insufficient scope for an admin-scoped target. That failure is retained as a named follow-up, not relabeled as a pass; the supported pairing-removal flow was verified separately. The HTTP tests also cover per-token revocation, stale generations, and insufficient scope.
Exact-head CI remains a landing gate. Its current failure matches the existing audit-budget timing repair, which must be resolved before landing.