Skip to content

core(fix): Preserve pane reads and MCP results - #169

Draft
tony wants to merge 24 commits into
mainfrom
landing-review-polish
Draft

tony wants to merge 24 commits into
mainfrom
landing-review-polish

Conversation

@tony

@tony tony commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Keep this draft open for comparison. The changes below land through their individual PRs. #172 merged the borrowed-control qualification into main, and #173 merged the highlighted Server.with_owned/2 source example. #174 merged the independent Program exit regression.

Landing status

Merged into main from the table below — #189, #190, #191, #192, #193, #194, #195, #196, #197, #198, #199, #200, #201. #189 now tests failure propagation and checkout selection. #195 tests both initialization and discovery over STDIO. #196 preserves qualified native error evidence and rechecks the second indexed option read.

The complete subordinate set was replayed on the review-policy change from #203. Two independent local reconstructions produced the same files. The Program test insertions and ExDoc source-link entries from both sides were retained. The Linux core ran on pristine 3.3, digest-verified patched 3.3 and upstream 3.8.

GitHub marked all eleven PRs in stack #206 merged at 15b285de9. The commit on main retains all 36 reviewed topic commits. Its tree matches the final tested tree. All 66 Linux checks passed. The original PR comparisons still show each change separately. The MCP client guide (#195) uses the response contract from #194. GitHub stack · Merged commit

Subordinate pull requests

PR Change Issue Dependency
#189 Run Workspace and MCP in native cells #175 Independent
#190 Preserve the daemon environment #176 Independent
#191 Fit the listener to the server root #177 Independent
#192 Recover a lost pane removal reply #178 Independent
#193 Wake waiters on native completion #179 Independent
#194 Preserve outcomes and cursors at the frame limit #180, #181 The two wire limits use the same encoder.
#195 Show how to read tool results #182 Depends on #194.
#196 Keep hook output out of pane and option reads #183 Pane and option reads share the server hook probe.
#197 Use the public pane wait #184 Independent
#198 Compare cold startup events on one clock #5 Independent
#199 Run core and Workspace from a checkout #185, #186 Core and Workspace use the same checkout.
#200 Explain inherited socket selection #187 Independent
#201 Link shipped capability consumers #188 Independent

Verification

The combined branch passed the required Linux checks on pristine tmux 3.3 and upstream 3.8. On 3.3 the one-shot split ran. The borrowed split reported backport_required. The local full suite on a verified 3.3 backport passed 461 tests with 28 skips in 36.79 s. The preview publisher refused the draft’s earlier tested identity after the base moved. Linux results · Preview publication check

A fresh split review identified two fixture corrections that ship on the individual PRs. #191 verifies the full socket boundary under a long temporary directory. #198 uses the same BEAM clock unit for the caller return and root exit. Each subordinate description lists its own Linux checks and durations.

Tool use

Codex extracted the individual changes and checked them on Linux. A second Codex reviewer checked the original commits, branch dependencies, fixture corrections and overlapping test insertions.

tony added 21 commits December 3, 2026 17:52
why: A reader running inside tmux could expect the default server
while the descriptor still carries the surrounding server's TMUX.

what:
- Describe inherited socket selection in the first task.
- Align the constructor and descriptor type with the module contract.
why: A control client that disconnects during attachment can stop a
borrowed daemon on pristine tmux 3.3 and 3.3a. The managed guide
named only 3.3a, and the installation and Server docs promised more.

what:
- Name both affected releases in the borrowed-control guidance.
- Distinguish the core floor from the upstream control cleanup fix.
- Qualify the Server session-preservation guarantee.
why: The source example selected a Hex core dependency before the
workspace Mix task could load its local identity probe.

what:
- Run the task from the workspace package with the sibling core.
- Keep the sample manifest in the same working directory.
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.
why: A retained workspace journal could fit in memory but exceed the
JSON-RPC response limit. Polling then lost the operation outcome.

what:
- Size the tool response including its encoded request ID and newline.
- Retain the outcome with a journal error when the frame would exceed
  the limit.
- Poll an oversized result over STDIO with two valid request IDs.
why: tmux copied update-environment entries from the planning client
when it created a session. Window programs could lose the daemon's
values before their manifest overrides were applied.

what:
- Leave the daemon environment in place when creating a session.
- Check inherited and overridden values inside the window programs.
why: Core tests could pass while a Workspace command or the MCP
adapter failed. Each package has its own Mix project and test suite.

what:
- Exercise both packages against the selected Linux tmux binary.
- Bind their dependencies to the source under test.
- Check that the native workflow calls both suites.
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.
why: The capability guide sent readers to proposals for tools already
available in the checkout. A release lookup and a check against a live
daemon answer different questions.

what:
- Link the release lookup example, Program guide and MCP package guide.
- Pin the rendered MCP guide link to the documentation source revision.
why: The notebook example carried its own capture loop after the
library gained a public wait with the same deadline and screen data.
README readers had to copy the loop to follow the example.

what:
- Wait for the notebook's ready line and receipt through the pane API.
- Keep the missing-Enter diagnostic and its process exit status.
why: Up to sixteen escaped pane titles could overflow one JSON-RPC
frame. The adapter discarded the previous cursor before encoding the
page, trapping callers partway through an immutable observation.

what:
- Send the largest ordered prefix that fits the response budget.
- Replace the cursor when its successor and encoded reply are ready.
- Identify display fields omitted at the existing per-field limit.
- Traverse quote-heavy titles and verify cursor scope and replay.
why: A printing after-show-options hook shared stdout with the native
read. A missing option looked configured, and a stored string could
acquire extra lines.

what:
- Check the applicable hook in the ordinary client's command queue.
- Admit native wait-for synchronization and report unqualified hooks.
- Preserve multiline, indexed, inherited and empty-server reads.
why: A hook could print a receipt the pane never showed. Both capture
modes returned those bytes as screen data, so a caller waiting for an
application could proceed too early.

what:
- Use the shared read-hook check in preflight and same-client capture.
- Keep identity, screen byte limits and timeout evidence independent.
- Exercise a printing hook and a silent native synchronization hook.
why: A consumer following the Hex recipe could expect APIs that only
exist in the working tree. The installation section needs a runnable
choice for examples that use those APIs.

what:
- Distinguish the published dependency from the unreleased checkout.
- Show the sibling path dependency and link the unreleased entries.
why: The cold-start fixture waited for an asynchronous trace before
checking the caller's timely return. A late trace could hide evidence
already in its mailbox even when the exact Root had exited.

what:
- Observe the caller's return while the code loader is suspended.
- Verify the killed Root's event time precedes the caller's return.
- Keep the original startup, return and cleanup budgets.
why: Each caller waiting for a program polled its owner every 10 ms.
The owner already receives the application's terminal event.

what:
- Monitor one completion process per running program under each
  caller's original deadline.
- Retain exit evidence at the owner and capture the final pane
  independently for each caller.
- Cover concurrent joins, timed-out callers, owner loss and channel EOF.
why: An SDK client could discover inputs without learning how to
decode a result, use its cursor or distinguish an admitted workspace
change from a completed operation.

what:
- Name the JSON text envelope and result fields in tool discovery.
- Ship a Go SDK example that walks pages and captures an exact pane.
- Document tool errors, omitted fields and operation polling.
why: Callers need the read-hook conditions, cursor limits and recovery
behavior when adopting the unreleased packages.

what:
- Describe bounded MCP pages, readable outcomes and the SDK example.
- Record Program waits and close, pane reads and Workspace behavior.
- Update installation, native package checks and cold-exit evidence.
why: Capture now applies its own byte limit. The ordinary command
runner still received an option list that it never read.

what:
- Pass the command and deadline from all three one-shot callers.
why: The option reader resolves a tmux target along with the native
flags. Its helper name still described only the flags.

what:
- Call the local, effective and inherited scope resolver read_scope.
why: The source quick start showed two shell prompts in one command
block. Copying the block left the second prompt in the command.

what:
- Select the local core after entering the Workspace directory.
@tony
tony deployed to docs-preview December 4, 2026 02:28 — with GitHub Actions Active
why: Choosing an Elixir or OTP build requires both the supported
series and its minimum version. The tmux cleanup fix applies to
managed control clients attaching to an existing server.

what:
- Pair each supported version range with its minimum.
- Name the helper build requirements and when managed control needs
  a tmux build with the cleanup fix.
@tony
tony deployed to docs-preview December 4, 2026 03:54 — with GitHub Actions Active
why: The guides put the supported version series before its minimum.
A check for the runtime name next to the minimum rejected these guides
and could miss a change to the supported series.

what:
- Match each runtime series and its minimum against the manifest in the
  README, contributor guide and implementation guide.
- Ignore Markdown backticks and line wrapping in the comparison.
why: The Linux 3.3 retirement check assumes that a borrowed daemon
survives control startup. Pristine tmux 3.3 lacks the required fix.

what:
- Bring in the borrowed-control qualification and test selection from
  #172. Keep one-shot and refusal coverage on pristine tmux 3.3.
- Link the setup instructions to the verified backport guide.
@tony
tony marked this pull request as draft December 5, 2026 17:57
This was referenced Dec 5, 2026

This branch had an error being deployed

1 failed deployment
docs-preview — 41d1aacf Deployed Dec 5, 2026 by tony via publish (pr-169, pr, false, true, elixir) / publish #362
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.

1 participant