Repository navigation
fix: stop PR status reads for session-only viewers - #160979
Patrick-Erichsen merged 4 commits into
Conversation
Co-authored-by: Patrick-Erichsen <[email protected]>
|
🦞👀 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 maintainer review before merge. Reviewed October 1, 2026, 1:31 AM ET / 05:31 UTC (Revision 6). ClawSweeper reviewWhat this changesThe Control UI gates pull-request status requests and cached details on the connection’s read access across chat, sidebar indicators, and session menus. Merge readiness✅ Ready for maintainer review This PR remains useful: current main lacks the read-scope gates, and the earlier saved-sidebar-summary finding is resolved. No introduced blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI receives connection permissions and session data from the Gateway. Its shared pull-request snapshot store feeds chat details, sidebar badges, and session menus. flowchart TD
A[Gateway connection permissions] --> B[Read access and method gate]
C[Visible sessions and menu requests] --> B
B -->|Allowed| D[Shared PR snapshot store]
B -->|Unavailable| E[Retire requests and cached details]
D --> F[Chat details and sidebar badges]
D --> G[Session menus]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +30, Tests +261. Total +291 across 11 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep PR-status presentation and requests aligned with the Gateway’s existing read permission through the shared snapshot owner. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: a connected session-only viewer sees the advertised PR subscription method, and current main attempts it without checking operator.read. This review did not execute the application. Is this the best way to solve the issue? Yes, the patch reuses the existing scope helper at the shared store and its consumers, including the saved sidebar fallback, without creating another permission policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 504d2905d69c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Co-authored-by: Patrick-Erichsen <[email protected]>
Co-authored-by: Patrick-Erichsen <[email protected]>
Co-authored-by: Patrick-Erichsen <[email protected]>
8683373 to
161df93
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
80d4681 to
8d7ff60
Compare
* fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): retire saved PR indicators when read access ends Co-authored-by: Patrick-Erichsen <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]>
…on (#160978) * fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers (#160979) * fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): retire saved PR indicators when read access ends Co-authored-by: Patrick-Erichsen <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> * fix: skip discussion probes without read access (#160980) * fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): retire saved PR indicators when read access ends Co-authored-by: Patrick-Erichsen <[email protected]> * fix: skip discussion probes without read access Co-authored-by: Patrick-Erichsen <[email protected]> * fix: gate saved Discussion tab reads after reconnect Co-authored-by: Patrick-Erichsen <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): compose read gates with shared publication --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]>
…on (openclaw#160978) * fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers (openclaw#160979) * fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): retire saved PR indicators when read access ends Co-authored-by: Patrick-Erichsen <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> * fix: skip discussion probes without read access (openclaw#160980) * fix: prevent publication scope errors in session-only chat Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise GitHub options in publication flows Co-authored-by: Patrick-Erichsen <[email protected]> * fix: stop PR status reads for session-only viewers Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): retire saved PR indicators when read access ends Co-authored-by: Patrick-Erichsen <[email protected]> * fix: skip discussion probes without read access Co-authored-by: Patrick-Erichsen <[email protected]> * fix: gate saved Discussion tab reads after reconnect Co-authored-by: Patrick-Erichsen <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> * fix(ui): compose read gates with shared publication --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]>
What Problem This Solves
Fixes: Chat, sidebar, and session menus retry PR-status subscriptions when a session-only operator lacks
operator.read.User Impact
User impact: Those views no longer issue denied PR subscriptions or expose retired cached PR details.
Why This Change Was Made
Use the connection’s read-scope decision at each consumer and at the shared snapshot store, including one-shot loads and scope-revocation cleanup.
Evidence
/chat/main/scope-proof-session, light theme, 1180×800, synthetic session-only scopes; deterministic mock Gateway for rendering and independent isolated real-Gateway authorization proof. Baseline6f4c801c18f9→ original candidate8683373ae107; the repaired head is161df93af45d. This pair shows a hovered sidebar row, not an open menu; the wire-count reduction was also verified on the original candidate, and the later revocation test covers the repaired head.Before

After

controlUi.sessionPullRequests.subscribe2 → 0 requests; the real Gateway returnedFORBIDDENwithoutoperator.read. Further route/request receipts are retained in task proof metadata.161df93af45din exact-head CI, includingopenclaw/ci-gate. The GitHub stack grouping was removed without changing this head; individual guarded landing is in progress.Contributor credit: Patrick requested the audit-backed repair.
Work sessions