Windows: full test suite + gate auto-discovery for local MCP #54
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/Kaimon.jl!54
Loading…
Reference in a new issue
No description provided.
Delete branch "mind6/2.0-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Windows is now usable end-to-end: the full test suite passes, and a local gate REPL is discoverable by a Kaimon MCP server (including Cursor).
Tests (914 passing on Windows / Julia 1.12.6)
mode=:tcpinstead of unsupportedipc://EMFILEon Windows handle limitsJSON.json(...)so paths likeD:\Temp\...are not corruptedjulia -e sleep(...)instead of Unixsleeptest/Project.tomlforjulia --project=testProduction: Windows gate auto-discovery
serve()defaults to TCP on Windows; localhost gates write sock metadata for file-based discoveryproject_pathwas invalid JSON and got deleted on parse)_is_pid_aliveon Windows (psunavailable; trustuv_kill)discover_sessions(skiptcp-*poll bookkeeping only)XDG_CACHE_HOMEhandling between gate and server cache dirsManually verified operational flow
using Kaimon; Kaimon.KaimonGate.serve()→ bindstcp://127.0.0.1:<ephemeral>and writes%LOCALAPPDATA%\Kaimon\sock\<session>.jsonKaimon.start!()→ ConnectionManager discovers the gate from that sock dir~/.cursor/mcp.json→http://localhost:<port>/mcp(lax mode, no auth header)extool evaluates code in the connected gate REPL (e.g.df.dates[end]→2020-03-31)Test plan
julia --project=test test/runtests.jl— 914 passed on WindowsPkg.test()inlib/KaimonGate— passing (3 IPC-only tests skipped on Windows)serve()+start!(), metadata persists in sock dir, session visible to serverexreaches gate REPL (eval mirrored in host REPL)Thanks for this — the Windows end-to-end work is great, and the JSON-escaping fix in particular is a real bug squashed.
I reviewed and tested it on macOS:
2.0-integration(the branch has moved a fair bit since you based off it — grep_code, the routing/roots work, etc.). After merging, the main suite and the KaimonGate suite are green (incl. your newmetadata JSON escapes backslashestest, and CURVE 66/66). The only red I saw were a couple of pre-existing flakes (aGate.progress@test_nowarnand the ZMQ-stress subprocess test, both pass in isolation) — nothing from your changes.2.0-integrationwhen you re-test? It merges without conflicts on my end.On the
discover_sessionschange vs #50 — I dug into this since #50 was a nasty one. Good news: it does not reintroduce the original #50. The poll/reconnect markersconnect_tcp!writes all use sidtcp-<host>-<port>, which yourstartswith(session_id, "tcp-") && continuestill skips. 👍I did find two smaller refinements for the new localhost-TCP discovery path, which I've pushed as a single commit on top of your head on branch
pr54-50-hardening(cherry-pick59a9b9f, or apply the diff below):session_mode != :tcp, so an already-connected localhost TCP gate isn't skipped — each discovery cycle re-emits it anddiscover_sessionstreats it as a "restart", causing repeated reconnect attempts.KAIMON_GATE_TOKEN→ global-config api key, mirroringconnect_tcp!). A localhost gate shares this machine's config; presenting the token authenticates an auth-required gate and is ignored by a lax one — instead of failing tokenless every cycle.Those discovery/TCP testsets pass for me (83 total: stale-session, TCP auth, ephemeral+auth, poll backoff, PID refresh + localhost reaping).
Since I can't validate Windows here: could you fold in
pr54-50-hardening, rebase onto current2.0-integration, and re-run on Windows + the full suite? Once that's green we can merge. Thanks again!Sorry for the delayed response. pr54-50-hardening tests pass on windows. I believe the branch is already based on 2.0-integration.
Are you interested in setting up CI with a Windows server?
I'm not sure what's going on with these merge conflicts. It seems there was Windows specific work different from what's in my PR.
@mind6 Hey since you last did this the 2.0 release has happened, we've done a couple windows fixes along the way and will probably have some more. You should align your changes with the main branch now.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.