Repository navigation
Conversation
why: Callers need native deferred cleanup and ordinary examples that an external harness can redirect without changing their source. what: - Capture endpoint and child environment defaults at construction - Add generation-bound ownership, adoption and acquisition recovery - Add bounded discovery and explicit created-or-reused results - Execute ordinary examples under external socket defaults and cover cleanup failures, cancellation, replacement daemons and concurrency
why: Completed client failures lost known child IDs, canceled callers could wait indefinitely for find-or-create coordination, and discovery changed the meaning of endpoints containing symlink and parent components. what: - Retain valid creation receipts before classifying client failures - Allow queued find-or-create callers to return on cancellation - Preserve filesystem path components and configured-root deduplication - Display and execute the complete ordinary README program - Prove recovery, cancellation and example failure checks with mutations
why: Copied programs need a usable default endpoint without fixture setup or mandatory ownership and teardown. what: - Add Ensure and complete ordinary programs while retaining cleanup examples under their own name - Keep accepted startup IDs through configuration hooks and retain only a needed bootstrap when server provenance is unavailable - Exercise startup, reuse, cancellation and session-only recovery through isolated external example runs
This was referenced Nov 1, 2026
10 of 12 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ordinary copied programs can call
Server.Ensure(ctx)to use the configured default endpoint whether a tmux daemon is running or absent. The quick start includes imports and an entry point, uses the ordinary public server type, and leaves teardown to the external example harness. The previous scoped-cleanup program remains as a separate lifecycle example.LIBTMUX_SOCKET_PATHandLIBTMUX_SOCKET_NAMEsupply endpoint defaults externally. The harness builds the exact displayed program and runs it twice in each isolated case.Ensureestablishes availability without transferring destruction ownership to the caller. Existing daemons retain their sessions and configuration, subject to the documented initialization of the reserved ownership generation when absent.Startup follows normal tmux configuration. The implementation retains the accepted bootstrap session ID so a rename hook cannot redirect rollback. If configuration removes the private startup marker, it cannot prove whole-server ownership. It then removes only its accepted bootstrap when another session or
exit-empty offkeeps the server alive; otherwise it retains that detached session for availability. Cancellation and failed initialization retain only the accepted session owner for cleanup retry on this unclassified path. Repeated calls reuse the daemon without adding another bootstrap.The broader lifecycle change provides
Owned[T], adoption of existing server/session/window/pane objects, bounded cleanup throughCloseInto(&err), generation-checked destruction, bounded discovery with diagnostics, and find-or-create for each object kind. Explicit ownership remains separate from ordinary availability. Calls derived from one server share cancellation-aware coordination; independent clients remain outside that serialization boundary.Validation
Ensure/FindOrCreaterace tests on tmux 3.2a and 3.7d, and core/example lint, vet and formatting with cached Go 1.26.9.Remaining work
This remains a draft. Full module aggregates, the complete 15-version tmux matrix on this repaired source, initial Go 1.26.0 execution, installed-package checks, native documentation-format integration and the nine-dimension acceptance assessment remain open. Earlier observers did not retain the identities of two separate native fixture directories; their removal remains unverified. They were not swept or claimed cleaned.
Markdown, Astro Markdown/MDX, Sphinx reST/MyST and Python doctest remain in the wider example-testing scope. This PR does not establish those integrations, hosted CI results, release latency, IAM or CI-cost acceptance. macOS and benchmarks remain outside scope. MCP source is unchanged; these Go checks do not establish real MCP-client fidelity.
Continues the work and discussion in #47 on the common
lifecycle-mvpbranch.