Repository navigation
feat(session-share): authorize device-granted session reads - #201074
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: blocked before merge. What this changesThis PR adds device-granted Gateway reads for sessions selected by source-owned group and person filters. Example: The source grants device reader-01 access to Team sessions involving profile person-42.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this useful maintainer-authored feature is absent from current main, but the RPC recovery message and introduced test-budget failure need correction. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Session Share plugin receives authenticated Gateway requests, checks source-configured device grants, and uses the existing native session selection and transcript owners to return read-only catalog pages. flowchart LR
A[Signed reader device] --> B[Gateway admission]
B --> C[Session Share RPC adapter]
D[Source configuration] --> C
C --> E[Shared session selection]
E --> F[Native transcript reader]
F --> G[Read-only response]
Technical reviewBest possible solution: Keep the existing selection and transcript owners, with a narrow device-grant adapter that returns safe, actionable recovery guidance. Do we have a high-confidence way to reproduce the issue? This is a new capability rather than a reported existing bug; source inspection establishes the missing main-branch RPC path, and no runtime reproduction was executed. Is this the best way to solve the issue? Reusing native selection and disclosure owners is appropriate for this source-only slice, and the separate outbound-reader PR accounts for the remaining transport work. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 74e5127c0c3d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +162, Tests +407, Docs +9, Generated 0. Total +578 across 12 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 Reviewed November 18, 2026, 3:04 AM ET / 08:04 UTC. |
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
a46ba4c to
c7ecb5d
Compare
|
Merged via squash.
|
…#201074) * feat(session-share): authorize device-granted session reads * fix(session-share): clarify source failures and consolidate proof Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Source operators need to publish a limited set of sessions to a specifically approved reader device, not every device or a caller-selected person.
User Impact
Gateway publication is off by default. Operators must opt in, grant exact device IDs, and configure both session groups and a canonical person. Paired-node commands retain their existing behavior.
Why This Change Was Made
Uses the preceding host admission, then applies source-owned grants and group-and-person selection. Results are consumed inside the native final source guard. Wire parameters cannot choose a person or grant. Current source, identity and token authority remain required through disclosure.
Includes a real signed WSS source fixture using isolated state and a test-owned identity; the outbound catalog adapter follows separately.
Evidence
The source-only candidate passed 23 tests across four files, plus two signed-WSS cases with roles enabled/disabled, before the outbound adapter was added. Scoped types, lint and configuration checks passed. The explicit package-local check passed with emitted SDK declarations and Node 26/ES2024 libraries.
The stock ES2023 library check reports
Promise.withResolversin unchangedsession-catalog.ts. Session Share has no opt-in package-boundary tsconfig; the standard selector compiled no source-only packages and ran its negative canary. No configuration was changed to suppress that limitation. Independent exact-slice review accepted publication.The WSS fixture uses test-owned identities, pinned local TLS and synthetic Access-shaped headers. This is not live Cloudflare Access validation. No live enrollment, credentials, configuration or deployment changed.
No steering or reader write privilege is included. No live deployment was performed.
Exact revision and proof entry points
a46ba4cfd4b5c84a544ad587e3ad0f0716403b2e9791bcc978653f1ddb25beef5bf49c93e432726974cd5c2962ef52b9a38651362a33f15321b16bdbFocused runs used
node scripts/run-vitest.mjswith isolated repository-suite configurations,maxWorkers: 1and file parallelism disabled, selecting:extensions/session-share/src/node-commands.test.tstest/plugins/session-share-gateway.integration.test.tstest/plugins/session-share-filters.integration.test.tstest/plugins/session-share.integration.test.tstest/plugins/session-share-publication.gateway.test.tsunder the isolated Gateway suite.Stack order
2/4. Depends on the preceding PR (
feat/session-share-reader-host-20261118). Merge prerequisites before retargeting/revalidating this exact diff; do not merge this stack out of order.Depends on #201073.