Skip to content

program(fix): Fit the listener to the server root - #191

Merged
tony merged 3 commits into
mainfrom
program-listener-path
Dec 6, 2026
Merged

tony merged 3 commits into
mainfrom
program-listener-path

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #177.

What changed, and why

A server socket at Linux’s 107-byte pathname limit passed capability discovery but left too little space for the longer Program listener name. Program now sizes the private listener name against the owned socket basename. The test runs a child through normal exit and pane removal at the boundary.

Checks run

The public Program owner and integration suites ran on upstream tmux 3.8. The boundary case also ran under a deliberately long TMPDIR. Before the fixture correction, the same invocation failed when constructing its path.

  • Program owner and integration suites passed in 15.05 s. The unsupported-release case was skipped.
  • 107-byte socket with a long temporary directory passed in 1.42 s.

Review evidence

The Program listener owns its Unix socket name. Server socket admission and Program startup must agree at the Linux path limit. The test exercises startup, exit and pane removal on a 107-byte server socket path.

With the topic tests and the runtime code from b8bfd3764, the focused check failed. Program startup returned :program_channel on the admitted 107-byte socket path. The focused test failed in 3.97 s and passed on 61187f8c1 in 3.98 s.

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

Merge stack

This PR targets main at the bottom of the stack. Stack #206 · Changes in this PR

All six required Linux jobs passed on 61187f8c1. 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 3 commits December 5, 2026 18:45
why: A valid owned tmux socket can fill the Unix path limit. The
longer program listener name then prevented the application from
starting on a server that passed the capability check.

what:
- Size the private listener name to the owned socket's basename.
- Run an application at the maximum socket path through cleanup.
A long temporary directory exhausted the 107-byte socket budget before the test could start its server. Create a short private parent, exercise the full listener path, and remove only that parent after the test.
@tony
tony force-pushed the program-listener-path branch from d934526 to 61187f8 Compare December 6, 2026 00:45
@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 valid owned socket path can prevent an application from starting

1 participant