Skip to content

program(fix): Recover a lost pane removal reply - #192

Merged
tony merged 2 commits into
program-listener-pathfrom
program-close-retry
Dec 6, 2026
Merged

tony merged 2 commits into
program-listener-pathfrom
program-close-retry

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #178.

What changed, and why

A close can remove a pane before tmux acknowledges the command. On retry, Program releases the handle when the same daemon confirms the pane is absent. An inconclusive observation keeps the recovery handle and its original deadline.

Checks run

The Linux Program suites exercise the lost reply, a noisy observation and a successful retry on upstream tmux 3.8.

  • Program owner and integration suites passed in 15.33 s. The unsupported-release case was skipped.

Review evidence

The Program owner owns both the recovery handle and the admission slot. The same-daemon observation distinguishes a removed pane from an inconclusive retry. Close, retry and subsequent admission use that decision.

With the topic tests and the runtime code from 61187f8c1, the focused check failed. Repeating close returned :program_pane_unavailable after the same daemon had already removed the pane. The focused test failed in 5.07 s and passed on 105ee3514 in 5.15 s.

mix test --include integration --warnings-as-errors --max-cases 2 --seed 624498 test/program_integration_test.exs:125

Merge stack

This PR follows #191 in the tested merge order. The comparison shows this PR’s own changes. Stack #206 · Changes in this PR

All six required Linux jobs passed on 105ee3514. GitHub records the stack merge at 15b285de9. CI run · Merged commit

Tool use

Codex extracted this change from #169 and ran the checks above on the topic branch. A separate Codex reviewer checked the component boundaries and the two corrected test fixtures.

tony added 2 commits December 5, 2026 19:05
why: tmux can remove an owned pane before its client times out. A
second close then found no target and kept the program's admission
slot, even after the application had retired.

what:
- Confirm an absent pane on the same daemon within the close deadline.
- Keep the recovery handle when the observation is inconclusive.
- Exercise a late reply, a noisy observation and a successful retry.
@tony
tony changed the base branch from main to program-listener-path December 6, 2026 01:07
@tony
tony force-pushed the program-close-retry branch from a7bd25e to 105ee35 Compare December 6, 2026 01:08
@tony
tony added this pull request to stack #206 December 6, 2026 01:08
@tony
tony merged commit 15b285d into main Dec 6, 2026
6 checks passed
tony added a commit that referenced this pull request Dec 6, 2026
why: A tmux hook could add output to a pane or option read. A large
MCP reply could hide an operation outcome or advance a cursor before
the client received the page.

what:
- Fit the Program listener to the server socket path, wake waiters on
  exit, and retry pane removal after a lost reply (#191, #192, #193).
- Keep MCP operation outcomes readable and size pages before advancing
  their cursors. Show the STDIO client reading a result (#194, #195).
- Keep hook output out of pane captures and option reads. Use
  `Pane.wait_for_text/4` in the notebook (#196, #197).
- Check root exit separately from trace delivery in cold-start tests
  (#198).
- Document checkout dependencies, inherited sockets and capability
  APIs (#199, #200, #201).
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.

A lost pane-removal reply leaves a Program admission slot occupied

1 participant