Repository navigation
feat: share selected sessions publicly in a read-only view - #139489
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 real behavior proof before merge. Reviewed September 6, 2026, 8:34 AM ET / 12:34 UTC. ClawSweeper reviewWhat this changesAdds confirmed public session publishing, encrypted revocable links, an anonymous read-only transcript page, and publication indicators in chat. Merge readiness⛔ Blocked before merge - 15 items remain This remains useful, distinct work, but all four prior findings remain supported by the current source. Publication can survive a normal reset, stale consent can publish the reset conversation, anonymous responses use stale routing configuration, and another client's publication changes leave the indicator stale. Priority: P2 Review scores
Verification
How this fits togetherSession sharing connects authenticated owner actions to durable session metadata. The new anonymous Gateway route consumes an encrypted publication link, checks that metadata, and renders filtered conversation text. flowchart TD
A[Owner confirms publication] --> B[Gateway checks authority]
B --> C[Durable publication grant]
C --> D[Encrypted public link]
D --> E[Anonymous Gateway request]
C --> F[Check current publication]
E --> F
F --> G[Read and filter transcript]
G --> H[Read-only public page]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The encrypted-token and renderer safeguards are useful, but reset and routing checks leave concrete stale-publication authority paths. PR surfaceSource +1653, Tests +1750, Docs +56, Config +1, Other +75. Total +3535 across 56 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Bind publication and consent to the real lifecycle and storage owner, enforce current authority at anonymous output, and keep every client's publication indicator synchronized. Do we have a high-confidence way to reproduce the issue? Yes, the reviewed source establishes concrete paths: publish then run the normal same-ID reset; confirm publication after that reset; change routing during an anonymous read; or publish from a second client. These paths were traced, not executed. Is this the best way to solve the issue? The existing session-sharing and Gateway boundaries are appropriate, but the implementation is not yet safe: session ID equality does not identify the reset lifecycle, and captured configuration does not establish current routing authority. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e16e60af09fc. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
d9c80a5 to
f1a591a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d8d5374 to
3712cf7
Compare
|
Merged via squash.
|
…139489) * feat: share selected sessions publicly in a read-only view * test: align public sharing fixtures with strict types * refactor: isolate session sharing management actions * fix: harden public session sharing * test: stabilize public share hydration proof * fix: preserve public share method ordering * refactor: avoid public token lint suppressions * fix: bind history sharing to loaded session * test: align public sharing contract fixtures * build: refresh generated public sharing references
What Problem This Solves
Sharing a session currently sends recipients to an authenticated workspace. Social previews provide a card, but people outside the team still cannot read a selected conversation.
Why This Change Was Made
Adds explicit, confirmed Public access to the session sharing menu. Owners and admins can publish a live, read-only transcript, copy its public URL, and revoke it. Public access is independent of teammate visibility and editing permissions.
The public URL contains one versioned AEAD-encrypted bearer token:
/share/session?token=<opaque>. Agent IDs, session keys, session IDs, peer/channel/account identifiers, and the internal publication ID never appear in the URL or public protocol response. The token key is derived with domain-separated HKDF from the Gateway installation identity, so links survive normal restarts and full backups but fail closed if the installation identity is replaced.The grant lives in existing internal session metadata and is bound to the exact session generation and storage target. Reset, replacement, deletion, fork, incognito conversion, explicit revocation, or a routing change invalidates access. Token encoding is proved before the publication commit. Anonymous reads recheck the exact grant before transcript I/O, after the awaited read, and synchronously at the final response edge.
The anonymous route runs under Gateway work admission. It limits each client to 20 requests/minute and each publication to 120, caps unique reads at 8 globally and 2 per publication, coalesces identical reads, bounds limiter state without denying all new viewers at capacity, rejects HEAD without transcript work, and requires a secure ingress: direct TLS; a configured trusted proxy with exact
X-Forwarded-Proto: https; managed HTTPS ingress; or direct loopback development traffic.The script-free renderer publishes user text and assistant final answers only. Tool output, reasoning, files, images, internal provenance, and
MEDIA:attachment paths or signed URLs are omitted. Built-in secret rules and operatorlogging.redactPatternsare both enforced. Responses areno-store,noindex,no-referrer, frame-denied, and restricted by CSP. Revocation cannot recall copies already downloaded.Published sessions keep an amber Public indicator in wide and compact headers, including after reload. Connection changes, same-key generation replacement, off-screen publish/revoke completion, and stale post-mutation refreshes all invalidate or rehydrate the exact cache so the indicator cannot silently disagree with durable publication state.
The new RPC descriptor is appended after every existing method to preserve advertised method indices. No SQLite schema, configuration option, dependency, or protocol version changes are required.
User Impact
Selected sessions can be read worldwide without an account. Normal Control UI, Gateway API, and private session access remain authenticated. Operators behind a login proxy must expose only
/share/*, configure the public HTTPS origin, and have the trusted proxy overwriteX-Forwarded-Protowith the external request scheme.Evidence
Focused Gateway and UI suites cover opaque token tampering/cross-installation rejection, anonymous no-create behavior, URL grammar, precommit failures, exact storage remap races, reset/fork/revoke behavior, triple grant revalidation, HTTPS ingress, invalid-token/client/publication rate limits, map saturation, concurrency/coalescing, media and custom-pattern redaction, Markdown/XSS boundaries, persistent indicators, connection/session guards, and both off-screen mutation races. The final affected suites pass.
check:changedcompleted locally through protocol, formatting, generated metadata, docs, all TypeScript graphs, dead exports, core/UI/extension/script lint, and the repository architecture/security guards. Remoteci-fastproviders were unavailable, so the wrapper correctly fell back to local execution. Android lint passed with Gradle's normal cache access. All three macOS CI groups passed in the native host environment: 152 elevation/lifecycle tests, 570 packaging/signing/worker tests, and seven final platform shards.pnpm buildpassed with the bundled Control UI performance budgets and SDK declaration graph checks.The final packaged Gateway and matching bundled Control UI passed a synthetic browser flow: publish with confirmation, persistent Public indicator after a full reload, token-only copied URL, anonymous text-only view, attachment/custom-secret omission, protected private bootstrap, HEAD rejection, automatic future-text refresh, indicator removal on revoke, and 404 from the same revoked URL. Screenshots and recordings contain synthetic data only. Independent P0–P2 review completed scoped-clean with no actionable findings.
attachment-870353098.webm
attachment-3122611204.webm