Skip to content

v0.8.1 fix: make hub lifecycle safe in nested tmux - #22

Merged
minglong51 merged 3 commits into
mainfrom
fix/hub-lifecycle
Aug 26, 2026
Merged

v0.8.1 fix: make hub lifecycle safe in nested tmux#22
minglong51 merged 3 commits into
mainfrom
fix/hub-lifecycle

Conversation

@minglong51

Copy link
Copy Markdown
Owner

Summary

  • Reliable hub return: clilane hub now restores the invoking shell or outer c/cdev tmux pane when its popup closes.
  • Generation-owned input: stale popup processes cannot detach a client, switch its session, or overwrite a newer switcher generation.
  • Clear nesting behavior: recursive entry on the same CLI Lane tmux server is blocked with guidance, while valid outer-tmux nesting on another socket remains supported.
  • Inert backing session: the hidden hub pane uses a non-interactive standby process instead of leaving a login shell behind.

Test Coverage

CODE PATHS                                      USER FLOWS
[+] Recursive hub entry                        [+] Start and reopen switcher
  ├── TESTED: outside tmux proceeds               ├── TESTED: normal shell launch
  ├── TESTED: same managed server is rejected     ├── TESTED: existing-task switch
  ├── TESTED: different outer socket proceeds     └── TESTED: new-session launch + retry
  └── GAP: malformed socket metadata fallback

[+] Popup ownership and cleanup                [+] Popup loss and replacement
  ├── TESTED: forced close clears owned state     ├── TESTED: forced close cleanup
  ├── TESTED: stale generation is a no-op         ├── TESTED: overlap keeps newest generation
  ├── TESTED: moved client is not detached        └── TESTED: nested popup returns to outer tmux
  ├── TESTED: raw and launch claims clean up
  └── GAP: defensive malformed-state branches

[+] Hub UI generation flow                     [+] Recursive invocation
  ├── TESTED: generation registration             ├── TESTED: same server blocked with guidance
  ├── TESTED: popup failure cleanup               └── TESTED: different server remains usable
  ├── TESTED: detach, switch, launch, retry
  └── GAP: invalid stale-at-entry guards

[+] Shell-free hub standby
  ├── TESTED: Python standby replaces shell
  ├── TESTED: existing hub reuse and reopen text
  └── GAP: non-TTY/EOF defensive branches

COVERAGE: 27/32 changed paths (84%) | USER FLOWS: 6/6 (100%)

PTY assertions: 56 → 108 (+52).

Pre-Landing Review

No issues found. Independent testing, maintainability, and concurrency reviews were clean.

Design Review

No frontend files changed; design review skipped.

Eval Results

No prompt-related files changed; evals skipped.

Scope Drift

Scope Check: CLEAN

Plan Completion

  • Deterministic regressions cover popup loss, stale generations, same-server recursion, valid outer-tmux nesting, and standby behavior.
  • Exact-generation cleanup and tagged-server recursion detection are implemented.
  • New hub sessions use the non-interactive standby process.
  • Fresh verification covers provider evidence, the hub PTY smoke suite, and all unit tests.

Completion: 4/4 done, with no deferred items.

Verification Results

The plan contained no separate manual-verification section. Automated verification is listed below.

Test plan

  • 95 unit tests pass across profile, release, and provider-evidence suites.
  • Real tmux PTY lifecycle smoke passes, including forced popup close and nested tmux return.
  • Provider evidence check passes for all 24 cells.
  • Python 3.10 syntax parse and git diff --check pass.

🤖 Generated with OpenAI Codex

@minglong51
minglong51 merged commit a232708 into main Aug 26, 2026
3 checks passed
@minglong51
minglong51 deleted the fix/hub-lifecycle branch August 26, 2026 03:02
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