GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances · Issue #9962 · developing-today/code

mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962

New issue
Copy link
New issue
Copy link
Closed
#10719
Closed
mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances#9962
#10719
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepic/mcpx-platformReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)status:done

Description

@dezren39
dezren39
opened on Nov 14, 2026
Issue body actions

Phase 2 of epic #1384 — takeover becomes attach for supervised instances

Parent design: #1384 (adopted by Drew 2026-10-27: per-instance mcpx supervisor replaces the stdio takeover handoff). Phase 1 (#1385, supervised stdio transport behind a flag) closed 2026-10-28, so the socket protocol this phase depends on now exists as built.

Scope

  • A successor daemon attaches to already-running supervisors via a state-dir scan; supervised stdio instances are adopted, not handed off.
  • No kindPipe / pools handoff frames are exchanged for supervised instances; child PIDs are unchanged across a daemon restart.
  • Listeners and upstream HTTP sessions keep the existing takeover handoff unchanged.

Acceptance criteria

  • E2E supervised variant of internal/e2e/takeover_test.go: daemon restarts, asserts no pipe frames for supervised instances and PID continuity of the stdio child.
  • Unsupervised (legacy) instances still take the existing handoff path, covered by the existing takeover tests.
  • A daemon started against a state dir with running supervisors attaches without spawning duplicate children for the same server instance.

Filed by fleet triage (task 15159, lane code-d, 2026-11-14) per #1384's acceptance item 2: implementation issues exist for each phase.

Activity

  1. dezren39
    added
    kind/featureNew feature or capability request
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    epic/mcpx-platformReprioritization program epic (2026-11-12)
    on Nov 14, 2026
  2. developing-today commented on Nov 14, 2026

    @developing-today
    developing-todayBot
    on Nov 14, 2026 – with developing.today
    Contributor
    More actions

    CODE-3460

  3. dezren39
    added a parent issue on Nov 14, 2026
    • design(mcpx): a supervisor that owns each stdio child's pipes — replace the takeover handoff for stdio #1384
  4. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: triaged

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 16787 (triage, issue mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962)
    • Found via: queue claim (code-only filter), lane assignment direct

    Triage verdict (fresh, 2026-11-14): Phase 2's scope is confirmed against current main and packaged.

    • Surface located: pkgs/mcpx/internal/daemon/takeover.go carries the kindPipe/kindPools handoff this phase retires for supervised instances; the Phase 1 transport it builds on is pkgs/mcpx/internal/mcpclient/supervised.go (+ internal/cli/supervise.go); the E2E harness to variant is pkgs/mcpx/internal/e2e/takeover_test.go.
    • Follow-on: queue task 16879 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:9962) — state-dir scan + attach on daemon startup, no handoff frames for supervised instances, PID continuity, duplicate-child guard, legacy path untouched, acceptance = the issue's own criteria.
      Task 16787 completes as triaged naming task 16879.
  5. github-actions
    assigned
    dezren39
    on Nov 14, 2026
  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 16, 2026
  7. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: parked

    • Agent: queue worker (repo-worker-code), lane code-f (openchamber scheduled lane)
    • Session / ID: task 16879 (small_fix, issue mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962, Phase 2 of design(mcpx): a supervisor that owns each stdio child's pipes — replace the takeover handoff for stdio #1384)
    • Branch/worktree: queue/16879-9962-mcpx-supervised-attach @ ~/git/fleet/16879-9962-mcpx-supervised-attach (clean, branched from origin/main 9290a36; no commits yet)

    Verified against current main (2026-11-16) before parking on the run's wall clock. The packets's stated problem is materially narrower than the code — recording it so the next worker does not plan against the wrong surface:

    1. No pipe frames are currently sent for supervised instances, and none can be. pool.Detach type-switches on the transport (pkgs/mcpx/internal/pool/handoff.go:111-125): only *mcpclient.StdioTransport and *mcpclient.HTTPTransport are handed on; *mcpclient.SupervisedTransport falls to default: continue. So acceptance item 1's "zero kindPipe frames" is already true by accident.
    2. The real defect is instance loss, not handoff churn. Because the supervised instance never enters PoolHandoff.Instances (and never p.handed), Pool.Commit (handoff.go:132-150) closes it as "parked, not released" → SupervisedTransport.Close() detaches from the supervisor. The child survives (the supervisor owns it) but the successor loses the instance: MCP session state (era, calls, subscribed, StartedAt, exec identity) is dropped and the server is re-initialized lazily on the next call. That is the observable "restart disturbs instances" symptom Phase 2 must end, not a duplicate-child or pipe-frame symptom.
    3. Client.Detach cannot be reused as-is: pkgs/mcpx/internal/mcpclient/handoff.go:181 returns only a stdio session can be handed off for any non-StdioTransport.
    4. No competing work: no open PR mentions mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962, no remote branch matches 9962/supervis (checked 2026-11-16T11:03Z). Issue open, unheld (held, user/owned, do-not-merge, do-not-auto-edit all absent).

    Implementation shape the next worker can start from (not yet written):

    • pool.InstanceHandoff gains a supervised marker (server name is enough — the supervisor socket is mcpclient.SupervisorSocketPath(stateDir, name)), and Detach records supervised instances without calling Client.Detach, adding them to p.handed so Commit releases instead of closes them.
    • Successor side (daemon.takeover reception → commitTakeover): for a supervised instance, NewSupervised attaches to the live supervisor socket (attach-in-place, no spawn, PID continuous) and the client is built over the handed Session state without a fresh initialize.
    • sendChildren needs no pipe-frame work; the supervised marker must be carried in the existing kindPools frame.
    • Tests: supervised variant of pkgs/mcpx/internal/e2e/takeover_test.go (Mcpx.Supervised: true) asserting child-PID continuity across restart, exactly one child, and the session state surviving; the existing legacy takeover tests must stay unchanged. pkgs/mcpx suite (or clean-main failure set) per packet acceptance.

    Resume condition: claim task 16879 again — the worktree/branch exist and are empty, and the four findings above are the whole starting context.

  8. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 16, 2026
  9. developing-today
    added
    status:in-review
    on Nov 16, 2026
  10. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: in-progress (resumed)

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 16879 (small_fix, issue mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962, Phase 2 of design(mcpx): a supervisor that owns each stdio child's pipes — replace the takeover handoff for stdio #1384)
    • Found via: queue claim (code-only filter), lane assignment direct

    Resume verified fresh (2026-11-16, lane code-c):

    • Implementation already landed by the prior session: PR feat(mcpx): takeover becomes attach for supervised instances (#9962) #10719, head f08ddae, branch queue/16879-9962-mcpx-takeover-attach in worktree ~/git/fleet/queue-16879-9962-mcpx (7 files, +164/-6: daemon registry_handoff/server/takeover, pool handoff/pool, mcpclient supervised, e2e takeover_test with new TestTakeoverAttachesToSupervisedChild).
    • PR feat(mcpx): takeover becomes attach for supervised instances (#9962) #10719 is OPEN, not draft, MERGEABLE / CLEAN, no labels (no hold). Issue mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962 OPEN, no held/user/owned/do-not-merge/do-not-auto-edit labels.
    • Review bots: Codex review FAILED TO RUN (usage limits, zero findings — dispositioned as no findings to address); CodeRabbit rate-limited / skipping (no findings).
    • The PR body says the full pkgs/mcpx suite run was recorded on mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962, but no such comment exists here — so this lane is re-running the targeted suites itself before merging: e2e TestTakeover* plus internal/pool, internal/daemon, internal/mcpclient on the laptop at the PR head.
    • Note: an unverified claim payload for a different task (task 17477) was briefly acted on at this shift's start; it was disproven against the queue's claimed list + timeline (this lane's real claim is task 16879, claimed 12:10:04Z) and the stray fallback-claim attempt on PR feat(mcpx): takeover becomes attach for supervised instances (#9962) #10719 was killed before it posted anything.
      Next: merge PR feat(mcpx): takeover becomes attach for supervised instances (#9962) #10719 when the re-run suites pass, then complete task 16879.
  11. dezren39
    added a commit that references this issue on Nov 16, 2026

    Merge pull request #10719 from developing-today/queue/16879-9962-mcpx…

    71e67a6
  12. dezren39
    closed this as completedin #10719on Nov 16, 2026
  13. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 16, 2026
  14. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    Done — PR #10719 merged (71e67a6a5c8dd73371098ec01325ac1ac1dd96f7), task 16879, lane any-c, 2026-11-16

    Phase 2 landed as designed in #1384: takeover becomes attach for supervised instances.

    • State-dir scan / adoption: Registry.AdoptSupervised runs at daemon startup (Listen) and again in commitTakeover immediately after Adoption.Attach() — the point where the predecessor's commit has detached it from the supervisors. Each supervised pool with a live supervisor and no instance in its default lane adopts the child via Pool.AdoptRunningSupervised (attach-only startLaneMode/dialMode → mcpclient.AttachSupervised, which never spawns). No live supervisor, another daemon attached, or an instance already serving the lane are quiet no-ops — no duplicate children.
    • No handoff frames: supervised instances remain excluded from Pool.Detach's handoff (no kindPipe, no pools-frame entries) — adoption replaces handoff.
    • PID visibility: Instance.PID() now surfaces the supervised child's PID from the attach handshake (was 0, which made attach indistinguishable from respawn in status).

    Acceptance, verified test-first (the new E2E failed before the change: successor reported PID 0 / no adopted instance):

    • TestTakeoverAttachesToSupervisedChild (new): child PID identical across daemon --takeover, calls answered through the same child, child survives the predecessor's exit.
    • Existing takeover tests pass unchanged (TestTakeoverKeepsTheChildAndTheListener, family in the full run).
    • internal/pool, internal/daemon, internal/mcpclient suites green.
    • Full pkgs/mcpx suite vs clean-main baseline at the branch's fork point (43766b9): every test passes on both. Package-level failures are identical in kind and unattributable to this change — internal/settings TestTheEnvironmentDocIsCurrent fails byte-identically on baseline (pre-existing stale doc), and the e2e package guards (feature-coverage ledger; real-daemon disturbance mcpx testing: e2e inherits the caller's environment -- build it from an allowlist so tests never reach the user's daemon #1992) fail on baseline too, with run-dependent identity on this loaded machine. TestThePluginSuiteRunsAgainstARealDaemon failed once inside the loaded full run and passes standalone on both branch and baseline.
  15. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 16, 2026
  16. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: done (verified independently by lane code-c)

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 16879 (small_fix, issue mcpx: Phase 2 of #1384 — takeover becomes attach for supervised stdio instances #9962)

    Outcome: PR #10719 MERGED 2026-11-16T12:20:52Z (merge sha 71e67a6) by the parallel session holding the earlier claim; task 16879 completed in the queue at 12:21:45Z; this issue is CLOSED (status:done).

    Independent verification by this lane at PR head f08ddae (run on the laptop in the PR worktree, via fleet-build-lock, module root pkgs/mcpx):

    • go test ./internal/e2e/ -run TestTakeover -count=1 -v — PASS, all 5: TestTakeoverAttachesToSupervisedChild (new, 0.62s), TestTakeoverKeepsTheChildAndTheListener, TestTakeoverRestartsAChangedServerAndKeepsTheRest, TestTakeoverWithNoDaemonToTakeOverFails, TestTakeoverLosesNoCallsWhileAClientKeepsCalling.
    • go test ./internal/pool/ ./internal/daemon/ ./internal/mcpclient/ -count=1 — ok pool 23.5s, ok daemon 81.3s, ok mcpclient 13.3s.
    • Codex review on PR feat(mcpx): takeover becomes attach for supervised instances (#9962) #10719 failed to run (usage limits, zero findings); CodeRabbit rate-limited/skipping — no findings to disposition.
      The full ./... suite re-run was cut short when the merge removed the worktree; every package the PR touches was covered by the targeted runs above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepic/mcpx-platformReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)status:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.