Repository navigation
Conversation
why: Ruby callers need to clean up the resources they accepted, including when a block raises or an ownership handoff is cancelled. what: - Add receipt-backed scopes, adoption, discovery and find or create - Capture the endpoint and child environment across Core and Async - Defer cancellation during receipt handoff through the bound Core executor and retain recovery owners after failed cleanup - Exercise the public scopes in ordinary Ruby and installed examples
why: Callers need to find the ownership and discovery APIs shared by Core and Async. what: Record block cleanup, bounded discovery and ownership retry in the root changelog.
This branch was previously 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 Ruby examples use the normal tmux endpoint. An external harness redirects the same code through captured socket and child-environment defaults, then cleans up its daemon. The displayed examples retain their imports and match their source files.
adoptaccepts cleanup responsibility for an existing server, session, window or pane.OwnedResourceretains the accepted daemon generation and resource ID, checks them before destruction, and permits retry after a failed close. Block scopes preserve both body and cleanup errors. Creation receipts support rollback after failed readback or cancellation. Uncertain outcomes remain explicit.Bounded discovery reports endpoints, diagnostics and truncation. Find-or-create returns owned creations or borrowed matches, with exact session/window names and pane-local identities. Calls serialize within this Ruby process. Unrelated clients do not join that coordination. The Async facade defers cancellation during ownership handoff and uses the bound core executor for ownership commands.
The rebase preserves the released socket selectors.
environment:supplies socket-selection defaults andenv:explicitly captures the child environment. Core and Async use the same distinction. Discovery resolves an implicit relative or home-relative tmux directory with the endpoint’s path rules. RBS retains the receiver type when adopting a session, window, pane or Async server. Endpoint · Lifecycle contractsValidation
adopt. Discovery and lifecycle tests · Installed consumerEarlier draft measurements
Fresh independent review at the source committed as
730aad76passed 46 core/Async cases and 396 assertions on each of tmux 3.7d and tmux 3.2a, plus 11 gate and native Async cancellation cases with 95 assertions. Removing the adoption check failed eight cases; removing the reuse handoff check failed six. The observer recorded 128 accepted daemon exits before exact fixture-root removal.Remaining work
This PR stays in draft. Whole-harness crash recovery, complete descendant accounting and the shared documentation adapters listed in the original proposal remain outstanding. The current Ruby work runs the programs and checks their Markdown and YARD bindings. Plain Markdown, Astro Markdown/MDX, Sphinx reST/MyST and Python doctest remain in the wider example-testing scope.