Repository navigation
feat: support narrowly scoped Gateway publication readers - #201073
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 signed, device-only Gateway admission and an SDK attestation for narrowly scoped publication readers. Example: A paired device requests only operator.session-share.read.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this maintainer-approved capability has a concrete consumer, but the patch loses shared-credential revocation and introduces a static import cycle. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGateway WebSocket admission consumes signed device credentials and requested scopes, then supplies restricted RPC access and device attestation to source plugins that separately authorize published data. flowchart LR
A[Paired reader] --> B[Device token owner]
B --> C[Reader admission]
C --> D[RPC authorization]
D --> E[SDK attestation]
E --> F[Source plugin]
Technical reviewBest possible solution: Preserve the device-only lane while carrying its authenticated shared-generation binding and keeping token identity checks independent of mutation-store imports. Do we have a high-confidence way to reproduce the issue? Source establishes both the new import cycle and the issuer-bound token path that escapes shared-auth invalidation; no target code was executed. Is this the best way to solve the issue? The narrow host seam fits the source-plugin consumer, but it must reuse existing credential-lifetime metadata and avoid importing mutation storage into publication validation. 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. SecurityNeeds attention: The reader attachment drops an existing credential-revocation boundary. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +417, Tests +307, Docs +26, Generated 0. Total +750 across 20 files. Added test files: 1. 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:05 AM ET / 08:05 UTC. |
|
Merged via squash.
|
…01073) * feat: support narrowly scoped Gateway publication readers * fix: keep paired-device identity imports acyclic * fix: preserve publication reader credential generation Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
A Gateway needs a way to admit a publication-reader device without giving it a person's private access or ordinary operator powers.
User Impact
No sessions are published by this change alone. Ordinary operator and paired-node access remain unchanged.
Why This Change Was Made
Adds a closed signed-device admission and SDK attestation for exactly
operator.session-share.read. The stored token and requested scope must both be singleton. Human profiles, private RPCs, scope upgrades, broadcasts and writes remain unavailable. A source plugin must separately grant a device and choose what to publish.This is the inert foundation of the Session Share read stack; it adds no reader transport or UI polling.
Evidence
The host-only candidate passed 121 tests across four files, scoped typechecking/lint/config checks, a full
pnpm build, and production SDK declaration smoke checks. Tests exercise signed admission, denied private methods and late-response suppression after credential authority changes.The earlier formal review raised one finding; it was adjudicated against the actual four-argument wrapper and rejected. It is not being represented as an originally finding-free review. Independent review of the reconstructed exact slices subsequently accepted publication.
No steering or reader write privilege is included. No live deployment was performed.
Exact revision and proof entry points
9791bcc978653f1ddb25beef5bf49c93e4327269d59d976e74c07ac69d37d038cba9e9ebde6545aa1ec65f83dc9addffdf2efeff5cfdac1ad3c27019Focused runs used
node scripts/run-vitest.mjswith isolated repository-suite configurations,maxWorkers: 1and file parallelism disabled, selecting:src/gateway/server.auth.publication-reader.test.tssrc/gateway/server-methods.dispatch-authorization.test.tssrc/gateway/method-scopes.own-session.test.tssrc/gateway/server-broadcast.transport.test.tsSDK command:
node --import ./scripts/tsx.mjs scripts/build-all.mts pluginSdkStrictSmoke.Full-build command:
pnpm build(host-only tree for slice 1; identical cumulative frozen tree for slice 4).Stack order
1/4: inert host capability → device-granted source reads → outbound reader → visible polling. Targets
main; its reviewed pinned base is above. Later main commits are not part of this head.