Repository navigation
server(feat) Expose detached observations and scoped recovery - #4
Merged
Merged
Conversation
why: Recovery must locate native cleanup after a decoder retires without retaining request results or confusing work from another server scope. what: - Bind receipts to Runtime identity, connection generation and native job keys - Report logical responsibility, decoder ownership and native cleanup separately - Resume registered cleanup without closing admission or redispatching commands - Preserve ownership when a recovery worker cannot be allocated
…t handoff why: A failed capture needs a reachable recovery owner even when its caller is cancelled or its deadline expires before the request handle is returned. what: - Attach correlated recovery to the original exception context - Copy receipts before timeout conversion and force stored metadata - Preserve the first caller outcome when later completion retires responsibility - Check readiness against worker completion in accepted-read regression cases
why: Applications need a usable observation API with explicit resource ownership and pure graph navigation. what: - Add scoped Server configuration, capture and context-preserving recovery. - Expose detached sessions, physical windows and panes, contextual links and occurrences, attached clients and indexed navigation. - Stamp capture intervals, separate lookup and graph validation failures, and keep snapshot assembly and targeting references opaque. - Preserve primary failures across cleanup failure and cancellation. - Align backend handle names with tmux's observed Client vocabulary. - Add an owned capture program, source-archive consumers and reader guides. - Select cached tmux 3.8 for live documentation checks while retaining the 3.3a and 3.8 integration matrix.
why: Copyable installation examples must select the reviewed public API instead of a moving development branch. what: - Pin the capture consumer and displayed project to its implementation commit. - Keep the source-dependency example checked against its declared file.
tony
added a commit
that referenced
this pull request
Nov 9, 2026
why: Readers need the observation and failure-handling changes grouped by their effect on applications. what: - Record detached capture, contextual graph navigation and scoped recovery under PR #4. - Distinguish the new public facade from private transport and assembly.
8 of 12 tasks
tony
added a commit
that referenced
this pull request
Nov 9, 2026
why: Consumers need to discover independent Server scopes and the recovery contract for failed endpoint adoption. what: - Record the public Runtime entry points and selected cleanup behavior for PR #4
9 tasks done
why: Applications need pure graph fixtures without starting tmux or constructing unchecked live targeting references. what: - Give named fixture origins a distinct identity from endpoint adoptions. - Expose pure reference builders, ordinary fixture inputs and validated snapshot assembly through the existing graph and metadata checks. - Report acquisition provenance and keep offline capture intervals absent. - Resolve attached-client context from the same validated graph. - Add an installed offline example and readable specifications, and reject coercion from a connection generation into a fixture origin.
why: Standalone fixture and capture programs need one immutable source that includes the offline construction API. what: - Select the reviewed fixture implementation for both source projects. - Keep the displayed installation pin and fixture setup links in sync.
why: Capture cost needs reproducible measurements that include decoding, validation and owned values on realistic tmux graphs. what: - Add an optional public-API benchmark and owned graph fixtures outside routine test loops. - Record raw timings, graph cardinalities, binary and source identities, and host context for the supported tmux endpoints. - Observe daemon and pane exits before accepting a result. - Preserve separate artifacts for repeated version labels and support source-archive provenance without Git. - Publish dated reference samples, reproduction steps and their limits.
why: Record syntax and exception context types belong to the selected compiler and base documentation, so readers need their owning references. what: - Link record-dot, numeric-class and exception context documentation. - Keep package API mentions distinct from dependency declarations.
why: Cancelling fixture creation could release its command handle before joining the child. Keep that ownership without obscuring the original failure. what: - Retain session-command ownership through bounded termination and waiting. - Join the command after daemon shutdown when initial retirement fails. - Cover active creation cancellation and failed retirement with owned fixtures. - Document the remaining unreceived-pane ownership limit.
why: Contract pages still described public observations as private or absent. Readers need the current boundary alongside the historical qualification record. what: - Link implemented capture, navigation and offline-fixture modules. - Keep query, cardinality and raw-command interfaces explicitly planned. - Record the qualified public milestone and the actual remaining gates. - Correct the test guide's three-program archive inventory.
why: Shared Runtime scopes need to identify their logical and physical work independently of either kind of retirement. what: - Add opaque metadata groups to private operation admission. - Keep group identity after completion or explicit logical detachment. - Select retained logical operations without changing shared capacity limits. - Cover mixed groups, ungrouped work and retirement with the unit scheduler.
why: A token inside Maybe could remain deferred and retain caller data after operation retirement. Admission must own evaluated metadata. what: - Force the enclosed group before reading or changing scheduler state. - Reject deferred token failure without reserving an operation. - Verify that valid admission still works after the rejected transaction.
why: Shared Runtime ownership needs handle-specific cleanup while preserving other adoptions and responsibility for uncertain operations. what: - Associate each adopted pool and its reads with a persistent operation group - Settle queued reads when selected admission closes, before worker allocation - Share owned shutdown attempts and report physical and logical debt separately - Preserve retry ownership, cancellation outcomes and shared resource limits
why: Shared Server scopes need identifiable cleanup before a handle exists and must preserve other handles when adoption or cleanup fails. what: - Register opaque Server owners before pin acquisition and guard publication - Keep one selected target through scope errors, inspection, retry and waiting - Reject foreign logical detachment and propagate retained read-worker failures - Preserve callback exceptions and the masked ownership handoff
why: Components need independent Server lifetimes under one resource budget and an explicit owner for their remaining cleanup responsibility. what: - Expose opaque Runtime, withRuntime and withServerIn through the existing API - Keep failed adoption and handle cleanup tied to the selected owner - Reject closed Runtime admission and preserve callback errors and masking - Document generation separation and nested cleanup recovery owners
why: Applications sharing resource ownership need a complete installed example that preserves each handle's lifetime and recovery boundary. what: - Add a shared Runtime program with asserted output and an immutable source pin - Reuse the owned capture fixture with explicit executable and output bindings - Document shared capacity, failed adoption and overlapping cleanup ownership
why: Explain the capture and offline-testing APIs callers can adopt. what: - Summarize detached observations, graph navigation and shared ownership - Describe validated fixtures and the optional capture benchmark - Link the product changes to PR #4 in one changelog commit
tony
force-pushed
the
feat/capture-recovery
branch
from
November 10, 2026 00:18
b996025 to
ee92f05
Compare
tony
marked this pull request as ready for review
November 10, 2026 00:25
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.
Observe an existing tmux daemon through a scoped
Server, then process a detachedSnapshotwith ordinary Haskell records and collections. Failed and cancelled captures retain correlated recovery owners without replacing the original exception. The public observation API includes validated offline fixtures, installed examples and a scoped capture baseline. Broader performance qualification remains separate.Summary
LibTmux,LibTmux.ServerandLibTmux.Snapshotwith sessions, physical windows and panes, attached clients, window links and pane occurrences.withRuntimeand give eachwithServerInadoption its own lifetime and recovery scope. Failed adoption can retain recovery before a Server exists.IOand graph navigation pure. Capture intervals, generation-bound references and indexed lookups make identity and observation scope explicit.tryTmuxreturns the typed failure with its exception context and reachable recovery owners.Receipts contain correlation metadata. Recovery annotations retain the owning runtime and server scope explicitly. Detaching logical uncertainty releases no native resources. Later proven completion preserves the original caller outcome.
The supported range remains tmux 3.3a through 3.8, inclusive. Routine CI exercises the two endpoints with GHC 9.14.1. MCP remains excluded.
Before this draft is ready
The public API and its bounded failure cases have independent review. Broader performance measurements remain follow-up work; native browser navigation is handled by #5 in the merge stack.
Test plan
Local unit/spec suites, displayed programs and source-archive consumers pass. Five fixture lifecycle checks pass on each tmux endpoint, including actual SIGINT during held session creation and an injected response/retirement failure. Deliberate regressions fail for the intended ownership and bounded-wait reasons. The fixture correction has independent source review.
Hosted CI for the current public Runtime implementation passes the build, both tmux endpoints and the required aggregate check.
Local endpoint and installed-consumer checks pass, including the shared Runtime program built from its pinned Git revision on both tmux endpoints. Independent source review found no material issue in the public scope, guide or fixture binding. Native Haddock declaration coverage passes; its navigation limits remain listed above. The scoped benchmark retains local evidence and independent review. Shared capacity, retained uncertainty and explicit cleanup waits keep their documented limits.
Companion PR
Shared Haskell registration has landed, and the first production site is published from the frozen scalar API source. The observation documentation follow-up adds native capture, snapshot, fixture and shared Runtime references and guides, with separate library/exporter provenance; it remains a draft awaiting qualification. Native merging does not publish the site: the caller workflow is dispatch-only, and publication from the expanded API waits for the compatible exporter.