Repository navigation
fix: keep person activity timelines private from guests - #191978
Conversation
|
🦞👀 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. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherAuthenticated 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
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +96, Tests +177, Docs +7, Other +2. Total +282 across 11 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (4 earlier review cycles)
Reviewed November 3, 2026, 11:58 AM ET / 16:58 UTC (Revision 5). |
|
@clawsweeper re-review Please review current head 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. |
|
🦞👀 Re-review progress:
|
5e2f74e to
2534399
Compare
|
@clawsweeper re-review Please review exact current head 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. |
|
🦞👀 Re-review progress:
|
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.
2534399 to
d0fb4f6
Compare
|
@clawsweeper re-review Please review exact current head The accepted same-WebSocket role-demotion proof remains applicable. Fresh current-head CI is running and remains a merge gate. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
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]>
) * 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
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
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.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.d0fb4f62ccbf5c8b1f042dda11ce2036fa415118rebases the reviewed change ontoa4e6278e182d42ded3a2d6889e1b28b99ad6f4f5. 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.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
d131da5e18ce7b666d2e30e9b2346567663d7cd0with base45c571ed441ba4548f0fa3a7f625302e13ed3c87and headd0fb4f62ccbf5c8b1f042dda11ce2036fa415118. No aggregate-budget exception is requested.