Conversation
why: Let the shipped tour demonstrate an externally owned tmux endpoint without risking an ambient server. what: - Activate borrowing only for a complete, PATH-bound tour arena contract - Emit verified UTF-8-safe endpoint evidence after the real tour completes - Cover fallback, rejection, borrowed ownership, client binding, and evidence with real tmux Rejected using socket aliases as activation: an ordinary example invocation must stay owned unless the descriptor explicitly opts in.
why: a tmux socket path over about 104 bytes fails to bind, and these namespaces spent most of the budget on the test name before the run directory was even prefixed.
why: the arena artifact id was `libtmux_example_01_tour`, which is the CMake target name rather than a name the documentation site can read alongside the other seven. Every other port reports `<language>-<example>`: `typescript-quickstart`, `rust-inspect`, `python-workspace-setup`. what: report and expect `cpp-tour` as the artifact id, in the example and in the tests that assert it. The CMake target keeps its own name; the two were only ever equal by accident.
why: only `01-tour` could run under the documentation arena, and it carried the evidence plumbing itself. The other examples could only ever run against a server they started, so the site could prove one example and no more. what: - `ScratchServer::print_arena_evidence(artifact)` moves the evidence into the shared header, beside `open_or_borrow_arena`, and takes the artifact id. `01-tour` loses its private copy. - `02-workspace`, `05-readme` and `06-streaming` borrow when the arena activates, as `cpp-workspace`, `cpp-readme` and `cpp-streaming`. - Two of them reached for whatever the server already had: `05-readme` indexed `sessions->at(0)` and `06-streaming` took `server.panes()->at(0)` and then sent real keystrokes to it. On a borrowed server that is the supervisor's own session, and typing into a pane this program did not create is exactly what borrowing must not do. Each now makes and names its own. - `06-streaming` also attached its control connection to a session named `example`, which does not exist on a borrowed server. It attaches to the one it creates. - The arena tests loop over every capable example rather than naming `01_tour`, so a new one is covered by construction.
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.
Summary
Added since this PR opened
Three commits. A fix first: three arena test socket namespaces spent most of the ~104-byte socket path budget on the test name. Then the artifact id renamed as the other ports spell it, and every example able to borrow the lent server. Found on the way:
06-streamingsent real keystrokes topanes()->at(0), a pane it does not own on a lent server, and05-readmeindexedsessions()->at(0).ctest --preset cxx-dev463 of 463.Verified on the branch before pushing; gates listed in the commit messages.