Skip to content

fix: skip discussion probes without read access - #160980

Merged
Patrick-Erichsen merged 0 commit into
openclaw/scope-ui-01-publish-20260929from
openclaw/scope-ui-03-discussion-20260929
Oct 2, 2026
Merged

Patrick-Erichsen merged 0 commit into
openclaw/scope-ui-01-publish-20260929from
openclaw/scope-ui-03-discussion-20260929

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: Session discussion probes silently fail for session-only operators, leaving the action hidden without explanation.

User Impact

User impact: The chat no longer makes the doomed discussion-info read; authorized readers keep the existing action.

Why This Change Was Made

Gate the probe and action by the declared operator.read contract; keep the open action on its separate write contract.

Evidence

  • Discussion pane regression suite passed (27/27 across three focused files); the saved-tab reconnect regression passed 10/10, one-worker wall 3.80 s. It retains tab placement but suppresses the stale link/error and a retained loader’s RPC after scope downgrade, then reloads when operator.read returns. Server descriptor remains operator.read.
  • Server authorization is unchanged; no live role grants or Gateway identities were altered.
  • Same-route Control UI browser captures: /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. Baseline 6f4c801c18f9 → original candidate 82ffb48edb1f; repaired head 3703df1a8360. The visible publication-card difference comes from an earlier layer; this pair proves the original discussion wire-count reduction, while the later saved-tab regression proves the reconnect repair.

Before
Before: discussion scope probe

After
After: discussion probe gated

  • Wire proof: session.discussion.info 1 → 0 requests; the real Gateway returned FORBIDDEN without operator.read. Further route/request receipts are retained in task proof metadata.
  • Required remote checks passed for 3703df1a8360 in exact-head CI, including openclaw/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

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 1:31 AM ET / 05:31 UTC (Revision 6).

ClawSweeper review

What this changes

The Control UI skips discussion requests without read access and prevents saved discussion tabs from using stale loaders after reconnect.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on current main and the latest release. No introduced correctness or security defect was found, and the related discussion-panel work addresses a distinct failure.

Priority: P2
Reviewed head: 3703df1a8360781efc3830b5d18ab40805fec144

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful reconnect coverage and no identified blocking defect; supplemental runtime evidence is accurately bounded.
Proof confidence 🌊 off-meta tidepool Not applicable: Ordinary contributor runtime proof is exempt for this bot-authored PR. Inspected screenshots show the synthetic chat route; reported wire counts concern the initial probe repair, while the reconnect repair has supplemental production-component regression coverage. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Ordinary contributor runtime proof is exempt for this bot-authored PR. Inspected screenshots show the synthetic chat route; reported wire counts concern the initial probe repair, while the reconnect repair has supplemental production-component regression coverage. No stored-data contract changes.
Evidence reviewed 8 items Pinned introduced change: The introduced diff guards automatic probes, panel construction, retained request callbacks, and header actions. The original base blob confirms sidebar placement behavior was already present and is not introduced by this PR.
Still necessary on current main: Current main checks method advertisement without checking read access before probing discussion info. Its retained panel callbacks also lack the introduced generation, client identity, and scope checks.
Latest release comparison: The supplied latest release, v2026.9.7, retains advertisement-only probes and unguarded retained callbacks; it does not contain this repair.
Findings None None.
Security None None.

How this fits together

The chat pane uses the Gateway’s advertised methods and granted scopes to load plugin-provided session discussions. Those results determine discussion controls and sidebar content.

flowchart TD
  A[Gateway connection and scopes] --> C[Chat discussion controls]
  B[Selected session or saved tab] --> C
  C --> D{Method and scope available?}
  D -->|No| E[Suppress discussion requests]
  D -->|Yes| F[Gateway discussion request]
  F --> G[Discussion sidebar content]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +27, Tests +107. Total +134 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 36 9 +27
Tests 1 108 1 +107
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 144 10 +134

Review metrics

None.

Technical review

Best possible solution:

Keep discussion presentation aligned with the existing Gateway scopes and invalidate retained loaders across connection changes while preserving saved tab placement.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a connected session-only operator with the discussion method advertised reaches a request requiring operator.read on current main. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the existing method-and-scope helper and checking retained callbacks immediately before requests is a focused repair that preserves the server contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 504d2905d69c.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded Control UI repair for forbidden discussion requests and stale presentation after scope changes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Ordinary contributor runtime proof is exempt for this bot-authored PR. Inspected screenshots show the synthetic chat route; reported wire counts concern the initial probe repair, while the reconnect repair has supplemental production-component regression coverage. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff guards automatic probes, panel construction, retained request callbacks, and header actions. The original base blob confirms sidebar placement behavior was already present and is not introduced by this PR. (ui/src/pages/chat/chat-pane-discussion.ts:27, 3703df1a8360)
  • Still necessary on current main: Current main checks method advertisement without checking read access before probing discussion info. Its retained panel callbacks also lack the introduced generation, client identity, and scope checks. (ui/src/pages/chat/chat-pane-discussion.ts:14, 504d2905d69c)
  • Latest release comparison: The supplied latest release, v2026.9.7, retains advertisement-only probes and unguarded retained callbacks; it does not contain this repair. (ui/src/pages/chat/chat-pane-discussion.ts:18, c074824a27c9)
  • Existing permission contract: Gateway descriptors and method-scope tests require operator.read for discussion info and operator.write for discussion open. Discussion methods are absent from the narrower session-scope allowlists. The reused helper preserves implied write/admin access; server authorization and provider dispatch are unchanged. (src/gateway/methods/core-descriptors.ts:500, 3703df1a8360)
  • Reconnect regression coverage: The added test renders the production discussion component, reconnects with session-only scopes, retains tab placement while removing stale content, rejects a retained loader, and resumes loading when read access returns. The captured body reports 10/10 focused tests in 3.80 seconds and 27/27 across discussion suites. Tests were inspected, not executed in this read-only review. (ui/src/pages/chat/chat-pane.session-discussion.test.ts:198, 3703df1a8360)
  • Inspected media and proof limits: Both prepared PNGs were inspected. They show the same synthetic session-only chat route; the visible publication-card difference belongs to an earlier layer, as the captured body acknowledges. The body reports discussion-info requests falling from 1 to 0 and an isolated real-Gateway FORBIDDEN response. The screenshots themselves do not expose network diagnostics or demonstrate the later reconnect repair. (3703df1a8360)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-29T05:13:56.843Z sha 82ffb48edb1ff0f6334d32b25c22bfd33f9bf303 :: blocked before merge. :: none
  • reviewed 2026-09-29T05:47:49.265Z sha 82ffb48edb1ff0f6334d32b25c22bfd33f9bf303 :: blocked before merge. :: none
  • reviewed 2026-09-29T05:55:20.023Z sha 82ffb48edb1ff0f6334d32b25c22bfd33f9bf303 :: blocked before merge. :: none
  • reviewed 2026-09-29T07:14:46.711Z sha 3703df1 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-01T05:20:31.842Z sha 3703df1 :: needs maintainer review before merge. :: none

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 29, 2026 05:48
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/scope-ui-02-pr-status-20260929 branch from 8683373 to 161df93 Compare September 29, 2026 07:06
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/scope-ui-03-discussion-20260929 branch from 82ffb48 to 3703df1 Compare September 29, 2026 07:06
@roboclaw-bot
roboclaw-bot removed this pull request from stack #160986 October 1, 2026 05:14
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 1, 2026
Base automatically changed from openclaw/scope-ui-02-pr-status-20260929 to openclaw/scope-ui-01-publish-20260929 October 2, 2026 19:34
@Patrick-Erichsen
Patrick-Erichsen merged this pull request into openclaw/scope-ui-01-publish-20260929 Oct 2, 2026
106 of 107 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the openclaw/scope-ui-03-discussion-20260929 branch October 2, 2026 19:34
Patrick-Erichsen added a commit that referenced this pull request Oct 2, 2026
* 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]>
Patrick-Erichsen added a commit that referenced this pull request Oct 2, 2026
…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]>
@Patrick-Erichsen
Patrick-Erichsen restored the openclaw/scope-ui-03-discussion-20260929 branch October 2, 2026 20:14
@Patrick-Erichsen
Patrick-Erichsen deleted the openclaw/scope-ui-03-discussion-20260929 branch October 2, 2026 20:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants