Skip to content

Record controlled-session resource ownership - #32

Merged
omry merged 1 commit into
pr31from
pr32
Aug 14, 2026
Merged

Record controlled-session resource ownership#32
omry merged 1 commit into
pr31from
pr32

Conversation

@omry

@omry omry commented Aug 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

@omry
omry changed the base branch from main to pr31 August 9, 2026 09:35
@omry

omry commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 771768b755

ℹ️ 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".

Comment thread internal/dockerdeploy/controlled_session_supervisor.go Outdated
@omry

omry commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: f62b8dba27

ℹ️ 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".

@omry omry added the approved PR reviewed and approved label Aug 9, 2026
@omry
omry marked this pull request as ready for review August 9, 2026 13:47
Copilot AI lite review requested due to automatic review settings August 9, 2026 13:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f62b8dba27

ℹ️ 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".

Comment thread internal/deploy/live_run_queue_file.go
Comment thread internal/dockerdeploy/controlled_session_supervisor.go

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds durable recording of controlled-session resource ownership (controller/workload container IDs + channel directory + identities) into the existing live-run queue so crash/recovery tooling can reliably reconcile inert/active resources, and removes that record on verified cleanup.

Changes:

  • Extend the live-run queue schema to include controlled_sessions ownership records, with validation and canonical persistence.
  • Update controlled-session supervision to require an admitted OperationLock, persist ownership before starting either process, and complete/remove ownership on verified cleanup.
  • Add unit/integration tests covering persistence ordering, lock-directory mismatch cleanup, and retention on cleanup failure; update design docs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/dockerdeploy/controlled_session_workload_pty.go Exposes workload container ID for ownership recording.
internal/dockerdeploy/controlled_session_controller.go Exposes controller container ID for ownership recording.
internal/dockerdeploy/controlled_session_supervisor.go Persists ownership under the admitted operation lock before process start; completes/removes ownership on verified cleanup.
internal/dockerdeploy/controlled_session_supervisor_test.go Adds unit coverage for “persist before start” and retention behavior.
internal/dockerdeploy/controlled_session_supervisor_integration_test.go Updates integration test to admit a live run/lock and verify ownership removal on successful cleanup.
internal/deploy/live_run_queue.go Adds controlled-session ownership types + validation to the live-run queue schema.
internal/deploy/live_run_queue_file.go Adds RecordControlledSessionOwnershipV1 and CompleteControlledSessionV1 lock APIs and updates queue-file lifecycle.
internal/deploy/live_run_queue_file_test.go Adds tests for ownership recording, write-failure preservation, and recovery retention.
docs/CONTROLLED_SESSION_DESIGN.md Updates design doc to describe durable ownership recording.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/CONTROLLED_SESSION_DESIGN.md Outdated
controlled-session networking remains a later phase.
Before either process starts, the exact full controller and workload
container IDs, their planned ownership identities, the private channel
directory, and the session, lease, and boot identities are now durably
@omry omry removed the approved PR reviewed and approved label Aug 9, 2026
@omry
omry force-pushed the pr32 branch 4 times, most recently from 0b66a03 to e5e7027 Compare August 9, 2026 20:21
@omry
omry force-pushed the pr32 branch 2 times, most recently from b7fd2d2 to f42c190 Compare August 9, 2026 20:47
Persist controlled-session ownership in both deployment live-run queues for the full supervisor lifetime.

Bind controller and workload resources to one run identity, enforce admission conflicts, and add recovery and cleanup coverage for abandoned or competing sessions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants