Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
added 2 commits
November 23, 2026 10:25
TestEventsReconnectWaitsForTheConfiguredDelay failed on the macOS nightly stress run (45181183106) with "retry delivered unexpected event kind". The stub server wrote the SSE response and closed without reading the client's request; with unread request bytes in the receive buffer the close sends a reset rather than a FIN, and the peer can drop response bytes it has not yet read, losing seq 1 so the stream sees seq 2 first. Read the request head with http.ReadRequest before writing, so the close is an orderly one and both events arrive on every platform. Reproduce from #3016: go test ./internal/e2e -run TestEventsReconnectWaitsForTheConfiguredDelay -race -shuffle=on -count=5 (now ok on linux; failure was darwin-specific timing). Refs #3016, #13349.
The #1992 guard in the e2e suite fails the stress runs: the daemon and cli test binaries write daemon records into the caller's real default state dir while e2e's before/after window is open. `go test ./...` runs the packages side by side, and WriteInfo mirrors every record written under a custom state dir into the default one (#278). Leakers: TestInfoFileNamesBothDigests (the /tmp/sock pid=42 record; one leak per -count, which is why the stress log shows it 3x after vs 1x before), the in-process daemons started through the mxh temp-dir helpers (upgrade, takeover, handoff), and cli client_socket_test, which writes a record without pinning XDG_STATE_HOME. Fix, class-wide: internal/stateguard ports the e2e guard to the suites that write records and pins their state dirs away from the caller. - GuardCallerDaemons snapshots the caller's real record dirs (the default dir and MCPX_STATE_DIR) and fails the run if the set changed. Failing first: without the pin it fails on the leaking test. Run with a fresh XDG_STATE_HOME, `go test ./internal/daemon -run 'TestInfoFileNamesBothDigests$'` reports "before=[] after=[/tmp/sock pid=42]", and the cli suite reports its socket record the same way. - PinSuiteStateDirs points XDG_STATE_HOME and MCPX_STATE_DIR at a per-run temp dir for the whole test binary, so every writer lands there, present and future. - The daemon and cli TestMain functions guard, pin, run, then check. stateguard is its own package because daemon's internal tests import testsupport, so testsupport cannot import daemon. Verified: go test ./internal/daemon -count=1 and ./internal/cli -count=1 green; the changed tests with -race -shuffle=on -count=5 green. Refs #1992, #3016
This branch has not been deployed
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.
Fixes #13349
Refs #3016 (stress gate: reconnect-test flake fixed in ae506d9; #1992 daemon-state guard still open).
Summary
mcpxmain run docs(roadmap): add the PM stack as a top-level roadmap project (ROADMAP.md row + planning/roadmaps/pm-stack.md) #1216.Evidence
diff -ru pkgs/mcpx/plugin/opencode/mcpx .opencode/plugin/mcpxpassed locally after synchronization.25045feffc8is queued on Fleet at developing-today/fleet run #126; terminal result is pending. It runsgolangci-lint, the focused daemon/reconnect/codegen/runner tests, and the plugin sync diff.Merge Danger
This draft addresses the lint and dogfood-sync failures. It does not close #13349 because the main workflow's stress failures still need resolution and a green main run. Keep this PR in draft until the focused run passes and the stress gate is cleared.