Skip to content

fix: keep person activity timelines private from guests - #191978

Merged
vincentkoc merged 3 commits into
mainfrom
fix/guest-profile-activity-privacy
Nov 3, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
fix/guest-profile-activity-privacy

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Session-only guests can open another person's Activity timeline and request their activity counts, even though these callers cannot read the private profile directory.

User Impact

Guests receive an explicit restriction when opening someone else's timeline; previously loaded activity is cleared. Their own activity and ordinary sessions shared with them remain available. Members and administrators retain their current role authority even when requesting narrower connection scopes.

Shared sessions here means the authenticated Gateway audience. This does not create anonymous public access or change session sharing defaults. Draft and incognito restrictions remain enforced; activity inferable from intentionally shared sessions remains visible.

Why This Change Was Made

The shared session-list owner now checks current role authority before resolving person selectors and returning person or owner facets. The same policy covers exact IDs, compact person links, creator/owner filters, and profile relations. Existing profile-directory and presence restrictions remain unchanged and gain authenticated guest regression coverage.

The policy is extracted from two capped list modules into one owner, without new configuration, persistence, or caches. Production delta: +96 lines. The dedicated +177-line test allocation covers distinct selector, authenticated RPC, and revoked-view regressions.

Evidence

  • Expected-red reproduction against the frozen base: the guest timeline request returned foreign activity instead of rejecting.
  • Focused backend: 25 tests passed; focused UI: 44 tests passed.
  • After policy extraction: the complete guest selector regression passed, including padded own IDs.
  • Validated production snapshot ffae6f6149608f188f782aaf4193df9fc2378ef3: core typecheck, 20 rendered Activity tests, and targeted lint passed. The rendered transition verifies populated activity becomes an explicit restriction with rows, identity, and pulse removed.
  • At prior head 5e2f74edb088ed0ae8b498eeb63b54085a830549, the same-WebSocket member-to-guest demotion regression passed in hosted CI. It warms foreign person and roster selections, changes the authoritative role without reconnecting, and verifies foreign denial plus self-only facets. The core test-type check also passed.
  • Current head d0fb4f62ccbf5c8b1f042dda11ce2036fa415118 rebases the reviewed change onto a4e6278e182d42ded3a2d6889e1b28b99ad6f4f5. All three stable patch IDs and range-diff entries are unchanged; all four production files are byte-identical. The shared Activity test now also contains the landed identity-label fix; the combined cleanup and fixtures were reviewed.
  • Final independent source and rebase reviews found no actionable P0–P2 issues. Isolated authenticated WebSocket proof covers the guest scope; this is not a Team deployment or live guest-browser verification.

Proof used one Blacksmith Testbox with Node 24.22.1: workflow run. The wrapper's per-command results above are authoritative; lease cleanup can cancel the host workflow.

The previous CI run had 43 passing jobs. Its two root failures were the unchanged Channels save-status selector and an aggregate test-budget deficit. This base includes the selector repair and independently verified budget headroom. The current-head hosted review found no actionable findings or pre-merge changes and accepted the linked behavior proof. Current-head CI completed successfully:45 jobs passed, including all PostgreSQL lanes, build artifacts, UI, lint, test types, and the aggregate test-budget gate. It tested merge d131da5e18ce7b666d2e30e9b2346567663d7cd0 with base 45c571ed441ba4548f0fa3a7f625302e13ed3c87 and head d0fb4f62ccbf5c8b1f042dda11ce2036fa415118. No aggregate-budget exception is requested.

@vincentkoc vincentkoc self-assigned this Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: M labels Nov 3, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR restricts guests to their own person activity selectors and facets and clears retained Activity data after access is denied.

Example: [email protected] requests another person's timeline after being demoted on the same WebSocket.

  • Before: The request returns the other person's visible activity and counts.
  • After: The request returns FORBIDDEN; ordinary shared sessions remain accessible and person facets contain only the guest.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch has no actionable findings and adequate authority-boundary evidence, with confidence limited to the production-path harness and rendered UI tests.
Proof confidence 🦐 gold shrimp (3/6) ✨ media proof bonus Sufficient (linked_artifact): The accepted production-path Gateway harness exercises allowed member reads and forbidden foreign-person reads after authoritative role demotion on the same WebSocket, including warmed selections and preserved shared-session access; production blobs match the previous reviewed head, and no live guest-browser result is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Guests can request another person's activity timeline and aggregate counts despite lacking general profile-directory access.
Reason: The maintainer-authored direction establishes the privacy boundary while preserving self activity, shared-session access, and named-role authority.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored privacy fix open; no actionable introduced defects were found, and current-head CI remains pending.

Priority: P2
Reviewed head: d0fb4f62ccbf5c8b1f042dda11ce2036fa415118

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: A live guest browser showing a populated timeline becoming restricted is not demonstrated.
Agent review details

How this fits together

Authenticated sessions.list requests enter the Gateway's shared selection and presentation owners, which apply current role and sharing authority before returning rows and facets to Activity.

flowchart TD
  A[Authenticated client] --> B[Sessions list RPC]
  B --> C[Current role and sharing authority]
  C --> D[Profile selection policy]
  D --> E[Visible rows and self facets]
  E --> F[Activity owner]
  D --> G[Forbidden response]
  G --> F
Loading

Technical review

Best possible solution:

Keep current-role authorization in the shared session-list owner and clear retained Activity data when that owner denies access.

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

Current-main source permits foreign person selection within visible sessions without this role check; the PR records an expected-red reproduction, but this review ran no target code.

Is this the best way to solve the issue?

The patch addresses the owning authorization boundary with one shared policy and a focused UI cleanup, and the added regressions protect distinct failures.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2cf02a5d104a.

Provenance checked

  • Person references and profile facets changes intended behavior with a stated reason (4c6d67f: Readable person URLs resolve exact, compact, retained, and merged identities within the caller-visible session scope.)
  • Inventory selectors and owner facets changes intended behavior with a stated reason (98de72d: Scoped inventories expose relationship filters and complete facets before paging while preserving session visibility.)
  • Owner activity counts changes intended behavior with a stated reason (8e57f54: Gateway-owned counts summarize accessible, owned, unarchived sessions independently of sidebar pagination.)
  • Retained Activity state changes intended behavior with a stated reason (10c95d1: The plain Activity owner retains query and refresh state across Solid presentation lifecycles; the PR narrows retention after explicit authorization denial.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +96, Tests +177, Docs +7, Other +2. Total +282 across 11 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 114 18 +96
Tests 5 180 3 +177
Docs 1 7 0 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 11 303 21 +282

Review metrics

Metric Value Why it matters
Production versus regression growth Production +96 net lines; tests +177 net lines Growth supports one shared authorization policy and distinct selector, transport-demotion, and denied-view boundaries without adding persistence or caches.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The fix restricts person activity aggregation for authenticated guests while preserving existing shared-session access.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (4 earlier review cycles)
  • reviewed 2026-11-03T15:00:14.276Z sha ea19592 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-03T15:44:27.333Z sha 5e2f74edb088ed0ae8b498eeb63b54085a830549 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-03T15:52:40.937Z sha 5e2f74edb088ed0ae8b498eeb63b54085a830549 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-03T16:12:29.163Z sha 2534399 :: needs maintainer review before merge. :: none

Reviewed November 3, 2026, 11:58 AM ET / 16:58 UTC (Revision 5).

@vincentkoc
vincentkoc marked this pull request as ready for review November 3, 2026 15:10
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review current head 5e2f74edb088ed0ae8b498eeb63b54085a830549 against the prior authority-transition proof hold.

The real Gateway WebSocket regression now passes on this exact head: it permits a member read, changes the authoritative role on the same connection, then verifies foreign-person denial and self-only facets from the next requests. It replays the retained generic selection without pulse-boundary cache bypass. Passing job.

The optional-ID assertion correction and core test types pass. Existing rendered transition proof starts with populated Activity and verifies that FORBIDDEN removes rows, identity, and pulse while displaying the restriction. Production is unchanged from the previously reviewed and tested snapshot.

The PR body contains the current evidence. Full current-head CI is still running; remaining required checks must pass before merge.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@vincentkoc
vincentkoc force-pushed the fix/guest-profile-activity-privacy branch from 5e2f74e to 2534399 Compare November 3, 2026 15:58
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact current head 25343998e4d7d0f871c9bc0c64eba31bf079f952. This is a patch-identical, signed rebase of the previously reviewed 5e2f74edb088ed0ae8b498eeb63b54085a830549 onto the separate budget and About-test repairs. All three range-diff entries are unchanged; the complete patch has the same 25,734 bytes.

The accepted same-WebSocket role-demotion proof remains applicable: passing Gateway job, passing core test types. The PR body distinguishes historical proof from the fresh current-head CI, which remains a merge gate.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
Use current role authority for person activity selectors and self-only facets while preserving shared-session access. Clear denied activity in the Control UI. Allocate 141 net regression-test lines for guest RPC, selector, and revoked-view coverage.
Warm native person and roster selections as a member, demote the same connected profile, and verify foreign timelines are denied while facets are self-only. Preserve shared session access. Increase this change's regression allocation from 141 to 176 lines.
@vincentkoc
vincentkoc force-pushed the fix/guest-profile-activity-privacy branch from 2534399 to d0fb4f6 Compare November 3, 2026 16:48
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact current head d0fb4f62ccbf5c8b1f042dda11ce2036fa415118. This signed rebase includes the separately landed identity-label and Channels fixture repairs. All three stable patch IDs and range-diff entries are unchanged, and all four production files are byte-identical. The combined Activity test fixture and disposal ordering were independently reviewed.

The accepted same-WebSocket role-demotion proof remains applicable. Fresh current-head CI is running and remains a merge gate.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@vincentkoc
vincentkoc merged commit 5d3e157 into main Nov 3, 2026
143 checks passed
@vincentkoc
vincentkoc deleted the fix/guest-profile-activity-privacy branch November 3, 2026 17:18
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

roboclaw-bot added a commit that referenced this pull request Nov 3, 2026
Resolve the presence audience test conflict with #191978: keep its demoted-guest
denials for users.list and presence.query, and assert system-presence returns
the person-only view.

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: fuller-stack-dev <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
)

* fix: keep person activity timelines private from guests

Use current role authority for person activity selectors and self-only facets while preserving shared-session access. Clear denied activity in the Control UI. Allocate 141 net regression-test lines for guest RPC, selector, and revoked-view coverage.

* test: cover connected guest role demotion

Warm native person and roster selections as a member, demote the same connected profile, and verify foreign timelines are denied while facets are self-only. Preserve shared session access. Increase this change's regression allocation from 141 to 176 lines.

* test: preserve unordered session assertion typing
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 docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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.

1 participant