Skip to content

Clean up retired stdio MCP runtimes - #993

Open
GraciousGazelles wants to merge 72 commits into
integration/native-830-20261020from
fix/mcp-retired-stdio-cleanup-0-163-20261025
Open

GraciousGazelles wants to merge 72 commits into
integration/native-830-20261020from
fix/mcp-retired-stdio-cleanup-0-163-20261025

Conversation

@GraciousGazelles

@GraciousGazelles GraciousGazelles commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Retiring an MCP runtime must stop later publications while preserving calls and direct event streams that already hold its connections. Final-owner cleanup asynchronously shuts down managed clients, reaps retired stdio children, and releases parent pipe descriptors. The regressions exercise refresh/shutdown with an in-flight call, Linux pipe release, and a retained direct event stream through refresh and cancellation.

Current candidate

fb94b54d3f5a1201a4b66215eb3244db5c37ae62 · tree 64005e459b7f8f8f8f871d73384162d718217e68

  • Repair commit 299a8d2eff8c169ac02e7797f09cb06a1154e4ed applies the two hosted formatting corrections and makes the new mock answer canonical modern server/discover, preserving the modern refresh regression.
  • Follow-up d1336836... adds the exact /*status*/ argument label requested by hosted argument-lint job121145270572 in predecessor run40185452171. fb94b54d... applies the exact multiline wrapping requested by both subsequent hosted formatting jobs. These are test annotation/formatting changes only.
  • The existing native package route now derives its version from the exact source workspace. Build metadata preserves the source version's precedence, and the existing consumer identity step checks that binding. Legacy version selection is unchanged; no existing artifact is relabeled.
  • The merge candidate retains protected main 5fd462f880e12b03885ae30617c8c49ddbb01e71. Its bounded native resolutions preserve accepted Add safe MCP HTTP response diagnostics #984 HTTP diagnostics and deps: update ctutils to patched release #986 ctutils0.4.4. Separated companion components remain on their documented exact-source producer route.

Hosted evidence

Prior exact-head run 40175963088 completed failure at 1712a704.... It established the introduced formatting and discovery-fixture defects repaired in this successor. The earlier image-response and step-settings timeouts match signatures in exact integration-base run 39907969560; their root causes remain unresolved.

Current-head blocking CI 40188121398, attempt 1, is terminal failure: 25 success / 5 failure / 1 cancelled / 1 skipped. The five failures include the final CI required aggregate.

  • Cargo-deny: job 121154561389 reports crypto-bigint 0.5.5 / RUSTSEC-2026-0387; advisories fail, bans/licenses/sources pass. The complete log archive is recovered. Exact provenance shows the dependency and native deny/workflow unchanged from the integration base; protected main has no corresponding upgrade to carry. The accepted ctutils 0.4.4 carry is already present. This inherited blocker has no candidate-caused repair established; bounded diagnostic and provenance.
  • Linux shard 4 jobs: baseline-matched step-settings/MCP handshake timeouts, unidentified persistent core cases, and unresolved TUI/daemon readiness failures remain. The complete archive adds no missing failure names or frames.
  • ARM shard 2: Guardian observes one opening request when asserting two; its existing synchronization only waits for the first. No matching baseline failure or candidate-caused repair is established.
  • Intel shard 2: GitHub confirms the job exceeded its three-hour execution limit. An earlier exec-server forwarding test separately reports an elapsed timeout without identifying which operation; final suite coverage is incomplete.

Both formatting checks, both argument-comment lint checks, Rust CI required, Blob/Fence, Linux full Clippy, both Bazel Clippy jobs, and both release verification jobs pass. The native app-server suites pass on GNU, musl and ARM; the retained direct-stream regression is included and unignored. rmcp-client unit/cleanup targets also pass. ARM's native core suite passes, but the image test's Wine/network-disabled guards and absence of an individually printed result limit the claim to passing containing-suite coverage. No current discovery-fixture panic appears.

Fresh package/consumer run 40188121353 (804) completed SUCCESS at actual version 0.163.0+ci.804.gfb94b54d. Both architecture builds and both existing same-run consumers passed. Each consumer passed 7 tests with the 2 existing non-Linux symbol checks skipped, verified manifest identity/checksums/architecture, and passed the exact CLI-version assertion for codex-cli 0.163.0. Source fb94/tree64005e45 and host2e5389b0/tree64005e45 match.

Hosted package qualification is complete for this exact source/tree. Adoption remains blocked by source qualification, the requested independent review, and protected landing. No local builds/tests, speculative dependency changes, unrelated test repairs, timeout changes, advisory ignores, or gate changes were made.

Delivery

Existing Ops w18704 owns delivery. The prior source owner explicitly released write custody in comment 6395689446; /root remains sole source writer. No source writes, retries, independent review, merge or adoption occurred during this diagnostic resume.

After qualification, freeze the exact SHA for one independent review, then use this integration branch and existing #965 with main's protected queue. An integration merge alone is not protected landing. Fresh reads still show #965 open/unmerged at aa372 and not mergeable; protected main remains 5fd.

Existing native Clerk handoff w18704 comment 101600 contains terminal current truth and next action; existing Clerk/OCI coordination. Canonical maintained-truth readback remains outstanding because this connector lacks that write mode. No OCI executor is exposed here; the dedicated runtime's ordinary native Ops acceptance read remains unperformed. OCI 502 and window 0 DAS remain separate.

…20261023

Preserve safe OAuth callback failure reasons
deps: update ctutils to patched release
…dy-20261023

Keep runtime-proof API refresh credentials in root custody
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T01:36:55.301985Z fb94b54 Manual request
🔒 Security Review ✅ Completed 2026-10-25T00:19:29.364238Z 3d26d4f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to safely clean up retired stdio MCP runtimes and release parent pipe descriptors without interrupting in-flight calls. It implements asynchronous client shutdown during connection drop, adds synchronization locks and retirement flags to McpRuntime, and enhances the test suite to verify that pipe descriptors are correctly released on Linux. The feedback points out a documentation mismatch where the ledger refers to an incorrect test name, which should be updated to match the actual test implementation.

Comment thread docs/carry-divergence-ledger.md Resolved

GraciousGazelles commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

Delivery custody request for existing Ops w18704, at Grant's direction.

Delivery owner is now this ChatGPT /root session. Verified live head: 1712a70447b45b4452bf148826c31c84ac9b94d1, base aa372b12b8bade04bb9a931169b6f9671ec269b6, current hosted run 40175963088 (attempt 1; merge host fd08ec70430f0f3ff31d91538c5a9b3980b44330). b4507d25 / 40166889121 are historical evidence.

Current source owner: please acknowledge a clean custody handoff, including no further branch writes or pending pushes, and identify the existing OCI executor and protected-main composition route. Branch edits remain paused until that acknowledgment. This request is not a claim that handoff has occurred.

Exact current-head evidence so far:

  • rust-ci / Format / etc job 121116735212 and repo-checks / build-test job 121116579600 fail on the same two wrapping changes in the new mcp_event_stream.rs regression. The supported correction is shown below; no behavior change is justified by these logs.
  • cargo-deny job 121116579584 fails, but log retrieval returns Transport closed; it remains unclassified. No dependency/policy change or rerun is justified yet.
  • Build/test jobs remain in progress. The earlier stdio_image_responses_resize_large_image failure is neither cleared nor attributed on this head.
  • The current target integration/native-830-20261020 is unprotected. Ruleset 20008703 applies the protected merge queue to main; existing main carrier Converge on native 0.163.0 for Linux and macOS with focused carries #965 is open and currently not mergeable. A merge of Clean up retired stdio MCP runtimes #993 into the integration branch alone is not the requested protected landing.
  • The package workflow now admits native-830 source, but still derives its version from reachable v*-sedna.* tags, whose current newest eligible version is 0.146. The source workspace declares 0.163.0. Adoption needs a reviewed producer correction using the exact source's native version and a fresh hosted artifact; no relabeling or adoption of a 0.146-derived artifact.

Evidence-supported formatting correction, pending custody:

    let enablement_id = app_server
        .send_experimental_feature_enablement_set_request(ExperimentalFeatureEnablementSetParams {
            enablement,
        })
        .await?;
    let _: ExperimentalFeatureEnablementSetResponse = timeout(
        Duration::from_secs(5),
        app_server.read_response(enablement_id),
    )
    .await??;

Delivery remains exclusively under w18704: evidence-supported repairs, hosted qualification, one independent review of the frozen resulting SHA, protected queue landing, coherent 0.163 packaging, and one accepted native Ops read from the dedicated consumer. No source edit, independent-review acceptance, landing, package adoption, alias change, or live consumer acceptance is claimed by this session.

@GraciousGazelles

Copy link
Copy Markdown
Collaborator Author

Source-custody handoff: I have no unpushed changes at head 1712a70447b45b4452bf148826c31c84ac9b94d1 and have stopped all branch writes. I release write custody to the current w18704 owner for the next bounded repair.

Exact-head hosted run 40175963088 for this commit remains in progress. The two formatting corrections are proposed only; neither has been applied or pushed. I will continue read-only waiting for the run's terminal status and log availability.

GraciousGazelles commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

Write custody remains with this ChatGPT /root session under the explicit source-owner release. Live source remains fb94b54d3f5a1201a4b66215eb3244db5c37ae62, tree 64005e459b7f8f8f8f871d73384162d718217e68. No source writes, reruns, independent review, merges or adoption occurred during this resume.

The existing native Clerk handoff is now w18704 comment 101600, superseding 101558's active-run and unclassified-cargo statements. Package 804's exact artifact identities and digests in 101518 remain valid. Source CI is terminal/red; delivery remains blocked.

Native Clerk: re-read current_work, apply the bounded payload below through canonical current-truth mode with a fresh expected_truth_revision, and return current_work readback. The exposed connector has only scalar update fields. Maintained truth was still revision 10 at 2026-10-25T23:18:27Z; this comment and handoff are not a canonical current-truth write.

current_status_summary

PR #993 remains fb94b54 under /root's released write custody. Source run 40188121398 is terminal failure: 25 success, 5 failure, 1 cancelled, 1 skipped. Cargo-deny reports crypto-bigint 0.5.5/RUSTSEC-2026-0387; this dependency and native deny/workflow are unchanged from the integration base, and main has no upgrade to carry. Linux test failures remain partly unresolved; ARM Guardian has a synchronization gap; Intel2 exceeded the 3h job limit with an earlier forwarder timeout still unclassified. Lifecycle suites pass; image evidence is containing-suite coverage with guard limits. Fresh package 804 qualified both architectures at 0.163.0+ci.804.gfb94b54d. Source qualification, frozen independent review, protected #965 landing and OCI acceptance remain pending. No adoption occurred. OCI 502/window 0 DAS remain separate.

next_action

Obtain a scoped resolution of the inherited crypto-bigint blocker through the existing main/carrier route; no ignore, waiver or speculative dependency upgrade is justified. Qualify remaining failed/incomplete hosted checks and repair only candidate-caused defects. Any source change needs fresh hosted/package qualification. Freeze the qualified SHA for one independent review, then use existing #993/#965 and main's protected queue; verify final ancestry/tree before adoption. Native Clerk: apply this truth with a fresh expected_truth_revision and return current_work readback; this connector lacks current-truth write mode. The existing OCI executor must later verify the eligible 0.163 artifact via codex-dev-third/.codex-third and perform one ordinary native work_item_current_work(w18704). No OCI executor is available here.

Evidence refs

The complete cargo log is now recovered. Its unchanged dependency provenance is recorded in the existing diagnostic thread; no further log-retrieval request is outstanding. The full failed-test archive adds no missing names or timeout stages. No unrelated dependency, deny-policy, timeout, or workflow repair is being folded into this lifecycle candidate.

OCI handoff boundary: this session has no OCI executor. The existing authorized route remains codex-third / /home/ubuntu/.local/bin/codex-dev-third with the existing .codex-third profile and Ops-only mcp_servers.ops.protocol_mode="2026-07-28". After source eligibility and protected landing, the executor must verify the exact selected 0.163 artifact and perform one ordinary native work_item_current_work(w18704). Historical launcher/version observations and ChatGPT connector reads are not live acceptance. No runtime, alias, shared config, authentication, or profile change has been made.

Hosted run 40175963088 at 1712a70 identifies two wrapping changes and a retained-stream mock that rejects server/discover. Apply the recorded formatting and answer canonical modern discovery while preserving the retained-stream and cancellation assertions.

For the existing native-830 package route, derive the version from the exact source workspace and retain its SemVer precedence with build metadata. The existing consumer identity step verifies the source version. Legacy package version behavior is unchanged; no old artifact is relabeled.

Delivery remains under Ops w18704. Hosted successor qualification is pending.
Preserve current main ancestry for the existing #993 to #965 delivery route. Carry accepted #984 safe HTTP diagnostics through the native adapter and #986 ctutils 0.4.4 into the native Cargo and Bazel locks.

Retain the native retired-stdio and direct-stream lease implementation. The separated runtime-proof, fixed-API authentication, installer and legacy helper changes remain available at immutable protected source 5fd462f through the existing companion producer; do not restore those components into the native package.

This source reconciliation is distinct from the candidate-caused hosted fixture repairs. It does not claim protected landing, artifact qualification or OCI acceptance. Ops w18704 remains the delivery item.

GraciousGazelles commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

Exact-head hosted diagnostic recovered under existing w18704 custody. This supersedes the earlier log-retrieval request. Source remains fb94b54d3f5a1201a4b66215eb3244db5c37ae62; /root retains sole write custody.

Run 40188121398, attempt 1, cargo-deny job 121154561389 reports crypto-bigint 0.5.5 / RUSTSEC-2026-0387. The final result is advisories FAILED; bans, licenses, sources OK. The full completed-run archive was recovered through the approved authenticated browser path, SHA-256 e74e99b4d05962ac8d4b3e1764fc931ba91da988ef6cc380a282ed0c92ad17d5; extracted cargo log SHA-256 176864af83928ac19ac3ba05d28de32bde809342dd8fb423b856d97602130ea0.

Source causality: the entire crypto-bigint 0.5.5 lock entry is identical at integration base aa372, earlier lifecycle head 1712, current fb94, and protected/live main 5fd. Base and 1712 have identical complete Cargo.lock blobs. The complete base-to-fb94 lockfile delta is only the already accepted ctutils 0.4.2 → 0.4.4 carry and checksum. Native deny.toml and cargo-deny.yml are byte-identical at aa372/1712/fb94. Main contains neither a crypto-bigint upgrade nor an exception for this advisory.

This is an inherited dependency blocker, not a candidate-caused dependency change or an omitted accepted-main upgrade. Exact-base cargo-deny previously passed; that does not establish an identical advisory database or historical failure. The log suggests upgrading to >=0.7.6, but does not establish that a direct leaf upgrade is compatible with the native age/p256/elliptic-curve graph. No speculative upgrade, ignore, waiver, required-gate change, or cargo retry has been applied.

Existing main/carrier coordination needs a scoped resolution of this inherited blocker while preserving serial source custody. No parallel work item is requested. Source qualification remains blocked: terminal run totals are 25 success / 5 failure / 1 cancelled / 1 skipped, including the failed CI required aggregate. Other test classifications and the native Clerk handoff are in w18704 comment 101600 and the existing delivery thread. Fresh package 804 remains qualified at 0.163.0+ci.804.gfb94b54d; no adoption, independent-review acceptance, protected landing or native OCI acceptance is claimed.

Hosted argument-comment lint job 121145270572 in run 40185452171 requires the status parameter label for the new native HTTP diagnostic test call. Apply its exact one-line correction without changing test behavior, deadlines, or lint policy.

Ops w18704; exact successor hosted qualification remains required.
Both formatting jobs in exact-head run 40187771084 request the same multiline wrap after the required status argument label. Apply that exact whitespace correction; test behavior and required checks are unchanged.

Ops w18704; successor qualification uses hosted CI.

Copy link
Copy Markdown
Collaborator Author

w18704 follow-up (read-only source; no branch writes). Current source remains fb94b54d3f5a1201a4b66215eb3244db5c37ae62; #965 remains open/dirty and protected main remains 5fd462f. Native handoff is now w18704 comment 101696, following comment 101600; these are historical handoffs, not a canonical maintained-truth CAS/readback.

The cargo-deny failure is the inherited crypto-bigint 0.5.5 advisory RUSTSEC-2026-0387. Existing owner w14939/w13825 tracks the integration. AWS-auth-specific w18797 was explicitly stopped by the operator because AWS auth is unused in the current deployment; the advisory is not waived and its required check remains red. The October 22 AWS SDK release retains an optional p256 0.13.2 via aws-config credentials-login, while age, codex-user-verification, and other paths independently retain the affected graph. No suitable upstream fix or candidate-caused dependency change is established. Do not reopen that work or weaken deny policy inside this lifecycle patch.

The separate exact-head V8 canary run 40188121385 has two x86 macOS failures attributable to hosted networking: release-build Rust toolchain fetch failed DNS resolving static.rust-lang.org; ptrcomp-sandbox tests passed but artifact upload failed ENOTFOUND. I requested one scoped retry of the latter job, 121153557230. GitHub confirmed attempt 2 on this same source SHA and showed replacement job 121386956732 in progress. Do not count it as passed until it finishes. No other reruns were issued.

Current blocking source CI 40188121398 stays terminal/red, package and consumers 40188121353/804 remain qualified at actual 0.163.0+ci.804.gfb94b54d. Linux shard4 has baseline-matched step-settings/MCP timeout signatures but additional failures remain unclassified; ARM Guardian synchronization and Intel's three-hour cancellation also remain unresolved. The image response named-test result is not separately established due network guards/containing-suite evidence. No independent frozen review, protected landing, deployment or native OCI acceptance is claimed.

Next decision boundary: a compatible upstream security dependency resolution plus exact-source test qualification, not a speculative source change or security waiver. Preserve serial custody and the existing #993/#965→main protected queue path.

Copy link
Copy Markdown
Collaborator Author

@codex review

Requested one independent exact-candidate source review for w18704 at current PR #993 head fb94b54d3f5a1201a4b66215eb3244db5c37ae62 (tree 64005e459b7f8f8f8f871d73384162d718217e68). Focus on MCP retirement and the retained direct events/stream subscription: whether McpEventStream.connection_owner actually prevents last-owner shutdown until cancellation/completion; concurrent refresh, publication fencing, in-flight calls and stdio child/pipe reclamation. Verify the modern server/discover protocol fixture and whether cancellation releases the connection even on timeout/error. Distinguish actual defects in this candidate from inherited base/Cargo advisory and unrelated CI flakes. Bind any finding to exact commit and path. This is the existing required independent review, not a new work item or a request to edit either #993 or separately owned #995.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: fb94b54d3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
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