Conversation
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Implements a host-owned controlled-session supervisor that orchestrates controller/workload startup, request handling, termination, output finalization, result delivery/ack, and cleanup, aligning the Docker runtime adapter with supervised lifecycle ownership.
Changes:
- Add
RunControlledSessionV1and supporting supervisor implementation to drive the controlled-session lifecycle machine end-to-end. - Harden Docker workload PTY handling by switching lifecycle operations to container-ID targeting and adding explicit
Started()/Cleanup()semantics. - Extend the lifecycle machine to represent startup failures where workload output finalization is still pending, plus add unit + Docker integration evidence and update design docs.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/dockerdeploy/testdata/session_channel_helper/main.go | Adds a “supervise” mode to exercise the supervisor lifecycle over the session channel. |
| internal/dockerdeploy/controlled_session_workload_pty.go | Tracks container ID and adds Started()/Cleanup() for supervised teardown correctness. |
| internal/dockerdeploy/controlled_session_workload_pty_test.go | Updates PTY adapter tests for container-ID operations and cleanup idempotence. |
| internal/dockerdeploy/controlled_session_supervisor.go | New supervisor that owns the controlled-session lifecycle from prepare through delivery-tail cleanup. |
| internal/dockerdeploy/controlled_session_supervisor_test.go | New unit tests covering normal lifecycle, cancellation, runtime-loss, and deadlines. |
| internal/dockerdeploy/controlled_session_supervisor_integration_test.go | New Docker integration test validating end-to-end supervised behavior and cleanup. |
| internal/dockerdeploy/controlled_session_controller.go | Reuses shared Docker container-ID parsing helper. |
| internal/dockerdeploy/controlled_session_controller_test.go | Updates container-ID parsing test to the renamed shared helper. |
| internal/controlledsession/lifecycle.go | Adds startup-failure modeling for “pending workload output finalization” cases. |
| internal/controlledsession/lifecycle_test.go | Adds coverage for startup failure waiting on partially-started workload output finalization. |
| docs/CONTROLLED_SESSION_DESIGN.md | Updates design documentation to reflect the implemented host supervisor. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| func (process *fakeControlledSessionProcessV1) ForceStop(context.Context) error { | ||
| process.forceStopped = true | ||
| return nil | ||
| } |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88709615e2
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d41e0f3203
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6416ae1db
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 215c80816e
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01b3781416
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9a9982870
ℹ️ 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 |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
a47e386 to
f3ab504
Compare
2aacca6 to
938e7dd
Compare
Stack created with Sapling. Best reviewed with ReviewStack.