Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 224b1b84dd
ℹ️ 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.
Pull request overview
Adds a controller-side “controlled-session client” broker to the monolithic reploy binary, exposing a strict versioned JSON Lines public stream and a private, same-identity, single-use terminal socket for controlled workload interaction.
Changes:
- Introduces a dedicated terminal framing protocol (binary frames + JSON for terminal-end status) and a private Unix-socket terminal listener/connection with identity checks and cleanup.
- Adds a strict JSON Lines controller stream (reader/writer) and the controller broker that bridges public requests + terminal input to the host session protocol while enforcing lifecycle/authorization rules.
- Wires a new
reploy controlled-session clientCLI subcommand and adds a changelog fragment.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/controlledsession/terminal_protocol.go | Defines the terminal binary framing and event/request encoding/decoding. |
| internal/controlledsession/terminal_protocol_test.go | Adds round-trip and malformed/wrong-direction coverage for the terminal protocol. |
| internal/controlledsession/controller_terminal.go | Implements controller-side terminal listener/connection abstractions with deadlines and single-accept behavior. |
| internal/controlledsession/controller_terminal_linux.go | Provides the Linux AF_UNIX implementation with path/permission/identity validation and cleanup. |
| internal/controlledsession/controller_terminal_linux_test.go | Verifies privacy, single-use semantics, cleanup, and backpressure on Linux. |
| internal/controlledsession/controller_terminal_unsupported.go | Fails gracefully on non-Linux platforms. |
| internal/controlledsession/controller_terminal_unsupported_test.go | Tests non-Linux graceful failure behavior. |
| internal/controlledsession/controller_stream.go | Implements strict JSON Lines public controller stream request parsing and event emission. |
| internal/controlledsession/controller_stream_test.go | Tests strict parsing rules and exact JSON lines output shape. |
| internal/controlledsession/controller_broker.go | Adds the broker that translates between public stream + terminal socket and the host session protocol with lifecycle gating. |
| internal/controlledsession/controller_broker_linux_test.go | Exercises end-to-end broker behavior, timeouts, socket loss, and request validation. |
| internal/cli/cli.go | Wires the controlled-session client command and help/usage into the CLI. |
| internal/cli/controlled_session_test.go | Adds CLI dispatch and stderr-only failure reporting coverage. |
| .changes/unreleased/+controlled-session-controller-broker.yaml | Adds a release-note fragment for the new embedded broker command. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aebb54c to
0a939b9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a939b9c6a
ℹ️ 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: 7cbcb58b46
ℹ️ 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: 6393d6f3d2
ℹ️ 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: d4db26b7df
ℹ️ 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: 9d116c1289
ℹ️ 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: 6d6bc4af43
ℹ️ 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: 05ac57df5b
ℹ️ 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: f19d7afffb
ℹ️ 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: 85bc42a92f
ℹ️ 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".
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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: a57680d4ea
ℹ️ 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".
Add the controller-side controlled-session client command to the monolithic Reploy binary. Translate the private host protocol into a strict versioned JSON Lines stream and a same-identity, single-use terminal socket with bounded attachment and backpressure behavior. Validate public requests against granted operations and lifecycle state, keep the broker alive through output finalization and terminal-result acknowledgement, and fail gracefully on unsupported platforms. Start terminal request and disconnect monitoring at attachment acceptance, preserving bounded pre-open input and the latest resize until host authorization arrives. Bound broker-to-host request writes so PTY backpressure cannot hold the control loop indefinitely, atomically discard in-flight PTY traffic once host termination latches, and preserve the acknowledgement write across clean post-result EOF. Stabilize watchdog-exit coverage by driving test input only after readiness. Cover protocol rejection, ordering, timeouts, socket loss, cleanup, and platform behavior.
|
@codex review Head: |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Add the controller-side controlled-session client command to the monolithic Reploy binary. Translate the private host protocol into a strict versioned JSON Lines stream and a same-identity, single-use terminal socket with bounded attachment and backpressure behavior.
Validate public requests against granted operations and lifecycle state, keep the broker alive through output finalization and terminal-result acknowledgement, and fail gracefully on unsupported platforms. Cover protocol rejection, ordering, timeouts, socket loss, cleanup, and platform behavior.
Stack created with Sapling. Best reviewed with ReviewStack.