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 1 of #1414 — persist legacy HTTP upstream sessions and resume them after a cold restart · Issue #1415 · developing-today/code

mcpx: Phase 1 of #1414 — persist legacy HTTP upstream sessions and resume them after a cold restart #1415

New issue
Copy link
New issue
Copy link
Closed
Closed
mcpx: Phase 1 of #1414 — persist legacy HTTP upstream sessions and resume them after a cold restart#1415
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-inskind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 27, 2026
Issue body actions

Phase 1 of design #1414 (cold-restart upstream HTTP session resume). Design doc: files/designs/code-mcpx-cold-restart-session-resume.md in the keep-the-four-repos-healthy goal workspace.

Scope

Persist the resumable half of each legacy streamable-HTTP upstream session in the mcpx daemon state directory and restore it on cold start, reusing the takeover restore path:

  • New versioned state file next to sessions.json, written/read with the internal/daemon/sessions.go discipline: atomic tmp+rename, defaults.PrivateMode, version envelope, ignore-and-log on version mismatch or corruption.
  • Record per pool instance: instance key (server name + pool scope key), upstream URL, config fingerprint (hash over the session-defining config fields + header/auth names — never values), SessionID, Negotiated, the full mcpclient.Session protocol state (as returned by Client.SessionState()), savedAt.
  • The record type has no field for headers or resolved secret values — that absence is the security invariant (handoff headers travel over the takeover socket only; see HTTPHandoff comment in internal/mcpclient/http.go). On restore, headers are re-derived from live config via the existing httpOptions() / resolveAuth() path.
  • Save triggers: successful legacy initialize (session established) and any response that installs a new Mcp-Session-Id (internal/mcpclient/http.go:156). Save failure: log, non-fatal — the daemon behaves exactly as today.
  • Restore: at pool connect, if a record exists and its fingerprint matches the live config, seed the transport with ht.Resume(...) and build the client with mcpclient.Resume(...) — the identical calls the takeover path makes (internal/pool/handoff.go:238,326). No parallel resume implementation.
  • Fingerprint mismatch → record discarded, fresh initialize, no error surfaced.
  • Scope limits: legacy-era streamable HTTP only. Modern era (no sessions) and legacy SSE (session lives in the GET stream) are untouched. Takeover behaviour unchanged. The standalone GET stream is re-established on resume exactly as takeover re-establishes it — parity with takeover is the bar.

Out of scope (Phase 2 / Phase 3 of #1414): 404/401 expiry fallback and retry, record removal on config removal, graceful-shutdown DELETE semantics, TTL, dashboard visibility.

Acceptance

  • Defining test passes: daemon against a test HTTP upstream → legacy session established → daemon killed with SIGKILL → daemon restarted → first call succeeds; the upstream saw no second initialize; the request carried the original Mcp-Session-Id.
  • Fingerprint-mismatch record is ignored and a fresh initialize happens (test).
  • Corrupt / version-mismatched state file is ignored and logged; daemon starts and operates normally (test).
  • No test or code path writes a resolved header/secret value into the state file (record type has no such field; assert in test by scanning the written file for a sentinel secret value).
  • Takeover tests and the full suite pass: cd pkgs/mcpx && go test ./....

agent-note:v1 — filed by the repo design architect (dedicated code job, pass 2, 2026-10-27) as a sub-issue of design #1414. Filed as task/triage: triage confirms scope against current main and enqueues the implementation packet; do not implement in the triage task. The direction decision sits with Drew on #1414 (user/review) — triage may proceed, implementation start should respect that decision.

Activity

Next
  1. dezren39
    added
    kind/featureNew feature or capability request
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    developing-todayBot
    on Oct 27, 2026 – with developing.today
    Contributor
    More actions

    CODE-505

  3. dezren39
    added
    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
    source/design-architectFiled by the repo design architect job
    on Oct 27, 2026
  4. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  5. dezren39
    added a parent issue on Oct 27, 2026
    • design(mcpx): resume upstream HTTP sessions after a cold restart — persist the resumable session state #1414
  6. dezren39
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  7. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    Intake review

    Fleet-monitor intake pass (2026-10-27). Phase 1 of design #1414 (which carries user/review — the direction decision is Drew's there; this intake does not pre-empt it). Related: #1416 (Phase 2, expiry fallback), #1414 (design). The body already carries a full ## Acceptance section, so no body edit; labels were already normalized by the filer (kind/feature, priority/normal, effort/l, app/mcpx, source/design-architect) — I added only meta/enriched.

    Notes / risks: the security invariant is structural — the persisted record type must have no field capable of holding a resolved header/secret value, and the acceptance test scanning the written file for a sentinel secret is the right proof. Suggested approach: reuse the takeover restore calls exactly as scoped (ht.Resume / mcpclient.Resume); no parallel resume path.

  8. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane B shift
    • Session / ID: queue task 1409
    • Found via: queue claim
    • Task: Triage mcpx: Phase 1 of #1414 — persist legacy HTTP upstream sessions and resume them after a cold restart #1415 (mcpx Phase 1 of design design(mcpx): resume upstream HTTP sessions after a cold restart — persist the resumable session state #1414) — confirm scope against current main, settle or explicitly leave open the state-file name and config-fingerprint field set, and enqueue the implementation follow-up
    • Expectation: effort s (triage) — verdict comment on mcpx: Phase 1 of #1414 — persist legacy HTTP upstream sessions and resume them after a cold restart #1415 + implementation packet enqueued; the direction decision stays on design(mcpx): resume upstream HTTP sessions after a cold restart — persist the resumable session state #1414
    • Links: issue mcpx: Phase 1 of #1414 — persist legacy HTTP upstream sessions and resume them after a cold restart #1415 · design design(mcpx): resume upstream HTTP sessions after a cold restart — persist the resumable session state #1414
  9. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    on Oct 27, 2026
  10. 53 remaining items

  11. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    Resumed by repo queue worker lane code-u for task 1483: PR #5455 at head 9c8b465 (lane code-v parked it for CI + Codex re-review after fixing both Codex P2 findings at the previous head, threads replied). Fresh state: no new Codex findings on the current head, only check run is CodeRabbit (neutral/skipping) — this repo runs CI on main, so re-verifying the targeted mcpx suites on the laptop at this head, then merging per standing criteria if green.

  13. dezren39
    added a commit that references this issue on Nov 4, 2026

    Merge pull request #5455 from developing-today/queue/1483-1415-mcpx-p…

    7cd293e
  14. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 4, 2026
  15. developing-today
    closed this as completedon Nov 4, 2026
  16. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    Done (task 1483, lane code-u resume): PR #5455 merged at 7cd293e. Resume verification at head 9c8b465: laptop go test for pkgs/mcpx internal/pool, internal/mcpclient, and internal/daemon all pass; both Codex P2 findings from the previous head were fixed in the PR with thread replies and no new Codex findings exist on the merged head; the only PR check run was CodeRabbit (neutral) — this repo runs CI on main. Phase 2 (expiry fallback / record hygiene) remains issue #1416, already separately queued.

  17. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
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-inskind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

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.