Repository navigation
test(windows): guard clean MCP stdio startup - #2952
Merged
Merged
Conversation
Adds a native Windows guard for #654: a successful MCP initialize + tools/list exchange, run against an isolated cache and runtime directory, must leave nothing on stderr but the server's own structured log lines. - tests/windows/test_mcp_stdio.py: the guard. The English and Spanish path-not-found messages reported in #654 are named cases; any other non-empty stderr line that is not a structured "level=<name> msg=<event>" record fails as well, so the same leak on a machine in another language is caught without listing its translation. The log format is pinned to text so an inherited CBM_LOG_FORMAT=json cannot change the verdict. Cache and runtime live under one temp root, so both are removed with it, also on failure, after the daemon is stopped. - tests/windows/mcp_stdio.py: close() joins the stderr reader, and the new stderr_complete() reports whether the reader reached EOF. The guard reads stderr only after it has; a reader still running after the server exited is a SETUP failure (exit 2), never a verdict on a partial capture. - scripts/test-windows.ps1: registers the guard in the green guard list and documents it in the header. #2213 was an earlier duplicate of the same check. Refs #654. Distilled from #2217. Co-authored-by: lorenzozanee <[email protected]> Co-authored-by: Shinken009 <[email protected]> Signed-off-by: Martin Vogel <[email protected]>
This was referenced Nov 11, 2026
DeusData
added a commit
to htarnacki/codebase-memory-mcp
that referenced
this pull request
Nov 12, 2026
Bring DeusData#2360 up to date with main b3ec08d (DeusData#2427 registry test verdict, DeusData#2962 MSan CI, DeusData#2952 Windows stdio guard). The merge is clean and needs no follow-up edit: DeusData#2360's code makes no cbm_registry_add* call and never used is_test_qn, and Scala definitions register through the shared seeders in pass_definitions.c, pass_parallel.c and pipeline_incremental.c, which DeusData#2427 already passes the extractor verdict through for every language. The branch's own change against main is byte-identical to 28948f2's against f5d5746. Signed-off-by: Martin Vogel <[email protected]>
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.
What does this PR do?
Adds a native Windows regression guard for #654: a successful MCP
initialize+tools/listexchange, run against an isolated cache and runtime directory, must leave nothing on stderr except the server's own structured log lines.tests/windows/test_mcp_stdio.py(new): the guard.level=<name> msg=<event>record fails as well, so the same leak on a Windows machine in any other language is caught without listing its translation.CBM_LOG_FORMAT=text), so an inherited JSON setting cannot change the verdict.tests/windows/mcp_stdio.py:close()joins the stderr reader, and the newstderr_complete()reports whether the reader reached EOF. The guard reads stderr only after it has. A reader still running after the server exited is a SETUP result (exit 2), never a verdict on a partial capture; the wait there is a liveness backstop only and never decides pass or fail.scripts/test-windows.ps1: registers the guard in the green guard list and documents it in the header.Evidence
.cmdwrapper that prints the Spanish message (expected red), a German-message wrapper (expected red only with the raw-line rule), a wrapper that keeps stderr held open (expected SETUP), and a cleanup check with an exception injected afterinitialize(nocbm-mcp-stdio-*directory left). The results will be posted here.level=infointo the raw-line case, and a clean log yields nothing;stderr_complete()is false while a background child holds stderr open and true once it is released (driven through a FIFO, so the result does not depend on timing).Credit
Distilled from #2217 by @lorenzozanee, with the cleanup by @Shinken009 (both Co-authored-by on the commit); the original could not merge because its commit has no DCO sign-off, which only the author can add. #2213 was an earlier duplicate of the same check.
Refs #654
Checklist
git commit -s)