feat(remote-control): add pairing start#25675
Conversation
cbcbe7c to
f2db82e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbcbe7cb94
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
viyatb-oai
left a comment
There was a problem hiding this comment.
Added one line-anchored suggestion for the stale remote-control pairing enrollment race.
a026e1a to
5a6ffd9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a6ffd9020
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
a7c79f8 to
c4ffb29
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4ffb299f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0ec5554da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Why
Remote control enrollment authorizes a desktop server, but app-server v2 did not expose the follow-up pairing operation needed to mint a short-lived controller pairing artifact from that enrolled server. Clients need a narrow RPC that starts pairing without exposing the backend
serverIdor conflating pairing with websocket connection state.Issue: N/A; internal remote-control pairing API change.
What Changed
Added experimental app-server v2
remoteControl/pairing/startwithmanualCodeinput andpairingCode, nullablemanualPairingCode,environmentId, and Unix-secondsexpiresAtoutput. The method serializes under its ownglobal("remote-control-pairing")scope and is documented inapp-server/README.md.Extended the remote-control transport with private
/server/pairrequest/response types and normalizedpair_urlhandling. Pairing uses the current enrolled server bearer, refreshes that bearer when needed, keeps backendserver_idprivate, validates returnedserver_idandenvironment_idagainst the current enrollment, and preserves backend status/header/body context for failures and malformed responses.Wired the request through
RemoteControlRequestProcessorandMessageProcessor, mapping unavailable/disabled pairing toinvalid_requestand backend failures to internal errors.Verification
just test -p codex-app-server-transportjust test -p codex-app-server remote_control_pairing_start_returns_pairing_artifacts