Repository navigation
fix: keep Activity permission errors stable during refresh - #196939
Conversation
Retain settled denials across unrelated invalidations while admitting explicit retries, changed queries and authority refreshes. Defer hidden authority catch-up and preserve stale-response protection. Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: de188d7a-df3c-4615-becc-ef5544f47dc1
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves settled Activity permission errors during unrelated refreshes while retaining Retry and access-change recovery. Example: The Activity search “denied” has returned FORBIDDEN when an unrelated session changes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a current Activity refresh bug, and the earlier port-lifecycle finding is resolved with no new actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Activity page passes route selections, Gateway snapshots, and session events to its existing query owner, which admits sessions.list requests and publishes rows, readiness, and errors to the Solid view. flowchart LR
A[Activity selection] --> C[Activity query owner]
B[Gateway snapshots and events] --> C
C --> D[Shared refresh coordinator]
D --> C
C --> E[Gateway sessions list]
E --> C
C --> F[Solid Activity view]
Technical reviewBest possible solution: Keep denial admission in the existing Activity query owner while preserving explicit recovery, access-change refreshes, and denied-row clearing. Do we have a high-confidence way to reproduce the issue? Current main schedules another Activity read after an unrelated invalidation despite a settled FORBIDDEN; supplied before/after browser evidence supports that path, but this read-only review ran no target code. Is this the best way to solve the issue? The fix addresses request admission at its existing owner, reuses the shared refresh coordinator, and preserves the privacy and reconnect contracts without introducing a parallel path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 041c3b716463. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +39, Tests +462, Other +2. Total +503 across 7 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 10, 2026, 8:09 PM ET / November 11, 2026, 01:09 UTC (Revision 2). |
Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 9b9de9e2-86c7-47cd-b83e-042f4d71e186
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…196939) * fix: keep Activity permission errors stable during refresh Retain settled denials across unrelated invalidations while admitting explicit retries, changed queries and authority refreshes. Defer hidden authority catch-up and preserve stale-response protection. Co-authored-by: vyctorbrzezowski <[email protected]> * fix: keep Activity permission errors stable during refresh Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: de188d7a-df3c-4615-becc-ef5544f47dc1 * fix: claim the Activity proof Gateway port through shutdown Co-authored-by: vyctorbrzezowski <[email protected]> * Publish openclaw/refresh-activity-stability-nov11 Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 9b9de9e2-86c7-47cd-b83e-042f4d71e186 --------- Co-authored-by: vyctorbrzezowski <[email protected]>
What Problem This Solves
Fixes: Activity briefly replaces a settled permission error with loading placeholders when unrelated sessions change.
User Impact
User impact: denied Activity views remain stable during automatic refresh, while Retry, changed filters, reconnection and relevant access changes can still refresh them. Existing rows remain visible during a same-query refresh and are cleared if the response denies access.
This does not grant new access or introduce a limited-readable-person view. No configuration change or migration is required.
Why This Change Was Made
Activity now treats a permission denial as settled for the current selection rather than retrying it for unrelated activity. Explicit retries and authority changes bypass that settled state. Hidden-tab authority updates wait for visibility, and superseded responses cannot restore old rows.
Evidence
Maintainer verification on
09087a32dfc6a609d56147cd59304c63882ca805: 58 owner/page tests and both browser scenarios passed. In the isolated real Gateway run, an unrelated session event left the settled denial at one request, one alert and zero skeletons; Retry made a new request. The separate held-response browser scenario retained the accepted row during refresh and removed it on denial. Restoring only the prior production owner/page files made two selected cases fail, including four unwanted reads instead of one. The candidate was restored byte-for-byte; no production changes were needed.ecaefd29e7f1a23657de41a7eb217ba083c477beand pass on candidate2902a87bcc9fb29ac8033772fd225862f7b6072a.2902a87bcc9fb29ac8033772fd225862f7b6072a; 58 focused tests pass, plus a separate consumer run with 36 unit and five browser-component tests (overlapping coverage).The initial published head
5a3c0bfe68065a23bd6413bc6bf99b61eec87e33adds only publication metadata to candidate2902a87bcc9fb29ac8033772fd225862f7b6072a; those commits have the same Git tree. Follow-upf697d42197cfeb0f6c61fef61ae7212a22ba400bchanges only test-fixture lifecycle and its exact eight-line test-budget allocation, not production behavior. The corrected real-Gateway regression passes (9.7 seconds; 56.4-second invocation), with a clean Gateway shutdown and Chromium exit. All four existing Gateway port-ownership tests and seven selected state-acquisition rollback cases pass. A fresh canonical review of the follow-up and complete fixture/claim owners found no P0–P3 issues or material source-context gaps; the reviewer did not independently run tests. Published head09087a32dfc6a609d56147cd59304c63882ca805adds only publication metadata to this follow-up and has the same Git tree. No CI result is claimed.Before
An unrelated session update replaces the settled denial with loading placeholders.
After
The same update leaves the denial visible without another request. Retry remains available.
The real-Gateway test uses isolated synthetic state and the actual list authorization/event path. It does not invoke an inference model or modify a live service.
Contributor credit
Reported and scoped with @vyctorbrzezowski.
CI qualification
The completed CI run has only the test-line budget failure and its dependent gate. The official checker confirms that the exact baseline was already seven lines over its ceiling; this PR's added test lines are fully covered by its own allocation, leaving the same seven-line excess. Every other job in that run passed or was skipped. The baseline, tested merge tree and unchanged checker inputs were independently verified for the authorized inherited-failure landing route. No test was removed or allowance increased to absorb that debt.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by