Skip to content

fix(supervisor): keep instance id stable across reconnects#2263

Draft
elezar wants to merge 1 commit into
mainfrom
codex/stable-supervisor-instance-id
Draft

fix(supervisor): keep instance id stable across reconnects#2263
elezar wants to merge 1 commit into
mainfrom
codex/stable-supervisor-instance-id

Conversation

@elezar

@elezar elezar commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

Keep SupervisorHello.instance_id stable across reconnect attempts made by one supervisor process. The existing protobuf defines the field as a boot/process epoch, so each new process still receives a fresh UUID while connection retries reuse it.

Related Issue

Extracted from #1868 for independent review.

Changes

  • Generate the supervisor instance UUID once per run_session_loop.
  • Pass the same instance ID into every run_single_session attempt.
  • Keep the SupervisorHello wire format unchanged.
  • Add focused regression coverage for caller-owned instance-ID reuse.

Testing

  • mise run pre-commit passes
    • Attempted inside the Nix environment with reduced mise concurrency. The five-minute run timed out during concurrent workspace Rust builds; remaining compiler processes were resource-killed with SIGKILL, not failed assertions. Completed format, license, Helm, Markdown, Python, packaging, and install-script checks passed.
  • nix develop -c cargo test -p openshell-supervisor-process (78 passed, 1 ignored)
  • nix develop -c cargo clippy -p openshell-supervisor-process --all-targets -- -D warnings
  • Focused instance-ID regression test
  • E2E tests added/updated (not applicable; wire format and connection behavior are otherwise unchanged)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

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.

1 participant