You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): link codes and guest links require the access they hand out - #41742
Getting a link code through a linked environment now requires the scopes of the access level you pick, in addition to access:write.
Creating a guest link now requires orchestration:read in addition to access:write.
The link dialog in Settings offers linking through another environment only when your session there holds the access you picked. Otherwise it asks for an address and a pairing code, as it does for any other machine.
Clients paired with the default grant hold all of these scopes and see no difference. Only clients paired with a custom scope list are affected.
Both rules live in clientRpcRequiredScopes, which the server's RPC middleware enforces and the clients read for UI availability. There is no wire change.
Docs
docs/internals/04_environment-auth.md now states what access:write covers, docs/internals/06_t3-connect.md notes that approving a T3 Connect device needs access:write alone, and docs/user/remote-access.md mentions the access requirement for linking through another environment.
Tests
A new case in apps/server/src/auth/RpcAuthorization.test.ts covers both RPCs through the scope middleware: refused without the scopes, handled with them.
One case in apps/server/src/peer/PeerClientPairing.test.ts is removed because it exercised the service with a session the RPC layer no longer admits.
vp run check:changed passes locally. The dialog change was not exercised in a browser.
Getting a link code through a linked environment now requires the scopes
of the access level requested, and creating a guest link requires
orchestration:read, in addition to access:write. The link dialog offers
linking through another environment only when the session holds them.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Reviewing files that changed from the base of the PR and between 9de47a1 and 852e548.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The changes update RPC scope requirements for peer-link pairing and guest-share creation. The settings dialog checks pairing permission before using a through-environment route. Related authorization tests and documentation are updated.
Changes: Pairing authorization
Layer / File(s)
Summary
RPC scope requirements and authorization tests packages/contracts/src/clientRpcPermissions.ts, apps/server/src/auth/RpcAuthorization.test.ts, apps/server/src/peer/PeerClientPairing.test.ts
Pair-link required scopes now include access-write and the scopes for the requested access level. Guest-share creation requires access-write and orchestration-read. Tests cover authorization outcomes, and a pairing test is removed.
The dialog uses a through-environment route only when pairing permission is granted for the candidate and selected access level, and the target has not already failed. Otherwise, it uses the existing non-through flow.
Authorization and linking documentation docs/internals/04_environment-auth.md, docs/internals/06_t3-connect.md, docs/user/remote-access.md
The documentation updates scope requirements for credential-returning routes and device approval. It also describes pairing at a chosen access level and the requirements for linking through another environment.
pingdotgg/t3code#40036: Both PRs cover linking through another environment and the permission needed to offer that route.
Suggested reviewers:macroscopeapp, maria-rcks
Merge Risk: Minimal · previous review 9de47
This change makes link codes and guest links require the access they hand out, and the dialog falls back to manual pairing when the session lacks that access. No concrete merge-blocking risk was found.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Description check
The description covers the change, scope, and verification. It states what changes and why, links the related docs, and lists tests and checks run. It names the model and harness used, as the template…
Add a Problem section with the expected behavior and reproduction steps. Link the issue that shows the bug, or explain why a small fix needs no issue. Keep the note that the dialog change was not exercised in a browser, and describe any man…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title names the main change: link codes and guest links now require the access they grant. It matches the changeset's scope rules in clientRpcRequiredScopes, the dialog gating, and the related doc…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: link codes and guest links now require the access they grant. It matches the changeset's scope rules in clientRpcRequiredScopes, the dialog gating, and the related docs and tests. It follows a conventional commit format in plain language.
Full details: Description check
Explanation
The description covers the change, scope, and verification. It states what changes and why, links the related docs, and lists tests and checks run. It names the model and harness used, as the template asks. The Problem section is absent, and the Scope section does not link an issue or explain why none is needed. The Verification section notes the dialog change was not tested in a browser, which is a gap the template asks to state.
Resolution
Add a Problem section with the expected behavior and reproduction steps. Link the issue that shows the bug, or explain why a small fix needs no issue. Keep the note that the dialog change was not exercised in a browser, and describe any manual check for it if one can be run.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
0005 machine filter: persisted state follows upstream's removal of the changed-files expansion state (pingdotgg#41317).
0007 project row: uiStateStore follows pingdotgg#41317; Sidebar.tsx keeps upstream's buildSidebarProjectPickerEntries import (pingdotgg#41554).
0008 new threads in the filter: Sidebar browser test imports merged with upstream's environments mocks (pingdotgg#41554).
0015 read/unread: Mark unread also requires a runtime that is not running, upstream's rule from pingdotgg#41365, for card and menus.
0020 ask-only links: link codes require the access they hand out (pingdotgg#41742), with ask needing orchestration:read; a question leaves a send-recreated worktree's setup for the next ordinary turn (pingdotgg#30773); linked-question delivery test waits for completed runs (pingdotgg#41362).
Replaces patch 0020 on upstream 85aaef4; 0001-0019 are byte-identical,
0021 changes only one index line and one hunk offset in ChatView.tsx.
- 0020 🔗 Ask-only links, second shape. A question no longer runs as a
turn inside the thread it asks. t3_ask_send creates a separate thread
in that thread's project, marked "From <machine>", with the question as
its one message and one tool-less run; the asked thread gets no
message, run, queue entry or state change. The answer sees the asked
thread's conversation only (the messages its owner typed and the
assistant's text, newest 32 000 characters), read at turn start, with
scheduled-task webhook URL tokens withheld. The question thread takes
nothing afterwards and is never continued. An ask link is made with a
link code (`t3 auth pairing create --link ask`), which needs
orchestration:read after upstream pingdotgg#41742. Subagent threads, forks and
side chats never inherit the opt-in. Limits: 10 questions per 10
minutes per link, one open question and 20 unarchived question threads
per asked thread. The access level, the opt-in, the three tools, the
default refusal and the inbound cap are as before. The patch's own
message lists every behaviour, file and test.
Markers unchanged: server "paired to ask questions only", web "Answer
linked questions"; both strings are in the carried source.
Verification on this machine: the 21 patches applied with the workflow's
git am flags to a fresh checkout of the upstream base reproduce the
carried tree (21ecf842cf), authors, dates, subjects and bodies.
check:changed against the series head 0019: 3406 tests pass; the two
that fail (ChatView.browser "rightPanelOpen", ProjectSetupScriptRunner
"syntax error") fail the same way without the patch. stack/ci tests: 89
pass; the 4 that need bash 4 and GNU find fail here the same way without
this change.
github-actionsBot
added a commit
to omarcresp/t3code-flake
that referenced
this pull request
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
access:write.orchestration:readin addition toaccess:write.Clients paired with the default grant hold all of these scopes and see no difference. Only clients paired with a custom scope list are affected.
Both rules live in
clientRpcRequiredScopes, which the server's RPC middleware enforces and the clients read for UI availability. There is no wire change.Docs
docs/internals/04_environment-auth.mdnow states whataccess:writecovers,docs/internals/06_t3-connect.mdnotes that approving a T3 Connect device needsaccess:writealone, anddocs/user/remote-access.mdmentions the access requirement for linking through another environment.Tests
apps/server/src/auth/RpcAuthorization.test.tscovers both RPCs through the scope middleware: refused without the scopes, handled with them.apps/server/src/peer/PeerClientPairing.test.tsis removed because it exercised the service with a session the RPC layer no longer admits.vp run check:changedpasses locally. The dialog change was not exercised in a browser.Claude Fable 5.2, Claude Code in T3 Code.
🤖 Generated with Claude Code