Skip to content

fix(mcp): preserve readiness and attributed stderr diagnostics - #128

Draft
RecursiveIntell wants to merge 2 commits into
mainfrom
fix/ares-mcp-readiness-diagnostics-20261004
Draft

RecursiveIntell wants to merge 2 commits into
mainfrom
fix/ares-mcp-readiness-diagnostics-20261004

Conversation

@RecursiveIntell

Copy link
Copy Markdown
Owner

MCP status can report connected as soon as a session exists, before discovery finishes, and retain that readiness through an exceptional reconnect. Require the existing task's session, ready event and empty error state; clear readiness through the lifecycle owner before each actual transport attempt. Ready servers with zero tools remain connected.

Give each stdio attempt one exclusive stderr capture in its config home and record typed ownership/path metadata in mcp-stderr.log. Close attempt handles and restore context on every exit, preserve original exceptions and SDK protocol parameters, and separate terminal metadata from unterminated or bare-CR child output. Metadata identifies the config home and client parent PID; it does not certify the child executable, HOME or release.

Update the native hermes logs mcp reader to show attributed child stderr from those captures while preserving legacy rows and shared non-MCP readers. Validate profile/path/UUID/PID ownership, retain split records across polls, frame incomplete previews, and continue after oversized lines with visible reader notices. The preview has a 1 MiB tail window/output-character budget, 10,000-row cap, 64 KiB follow chunk/pending-line limits and a latest-128-attempt cap. Full stderr stays in its capture file; there is no relay or duplicate storage.

Validation: 79 cases passed against the final five-file hashes (43 authored and 36 existing), followed by independent source-review acceptance and byte-exact full/incremental forward/reverse replay. The actual run/stdio orchestration and native reader handlers were exercised with inert transports and temporary files. No existing tests changed. All failing and intermediate evidence, including the original degraded 37-pass packet, remains preserved.

Tests used an offline private sandbox, isolated homes, read-only existing dependencies, one shared-lock worker and zero retries. The unchanged canonical per-file runner was invoked with -j1; the launcher's unconditional whole-tree compileall -j0 conflicts with the user worker limit and was disclosed as an exception. The real-child process-group test was deselected. Incremental packet scratch stayed below 1 MiB of the authorized 48 MiB total budget.

Hostile parent-directory replacement races and equal-or-larger same-inode rewriting between polls remain unproven. Core owns integration and hosted CI. Live launch correlation and activation remain separate; this source packet performs no installed-runtime, configuration, memory or service changes.

This draft does not establish that current FastMCP adoption is fixed. Offline source evidence and hosted CI are separate. Exact reverse patch SHA256 ed417e2ece76513ad6ee33fde5d761bd5b14704e2432e6dbf4eb7bc588184ba9 restores this focused source delta; no live rollback or activation accompanies publication.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

૮ >ﻌ< ა ci review

ran on cb202b7 — test(mcp): model owned pre-ready discovery and recovery sign

⚠️ Warnings

OSV vulnerability scan · View job

96 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 6m3s vs 7m23s (-18.1%). 12 job(s) slower, 10 faster, 2 unchanged.

  • OS-specific tests / macOS-only tests: -100.0s
  • Python tests / Run tests slice 2/12: -69.0s
  • Python tests / Run tests slice 11/12: +68.0s
  • Python tests / Run tests slice 8/12: -66.0s
  • Check contributors / check-attribution: +66.0s

Copy link
Copy Markdown
Owner Author

Fixture-only correction for original failed Python slice 9/12: the old fake required readiness before owned registration and never signaled readiness on recovery. Corrected fixture executes real discovery/canonical ownership before transport readiness; transport/list_tools remain inert and production readiness is unchanged.

Exact hosted assertion reproduced (1 pass/1 fail), then 18/18 scoped offline cases passed; independent review and exact forward/reverse replay accepted. Original hosted result remains 3173 passed, 1 failed, 41 skipped. Original 79-case proof is historical packet evidence, not proof of current FastMCP adoption/provider readiness.

Published head cb202b7cd0960cb6c0ddbb6972fa9217bc6ec454 tree 310d3529fbbeb7d0c4f02a58d2a608e7e8d04149, all six changed-file blobs verified. Hosted CI must qualify the new head; PR remains draft. Revert this follow-up to restore fb9861a569e35f456d4c8060457e87105ed04e6d.

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