Skip to content

test(ci): gate parked-conn CLIENT KILL parity test off the Windows runner - #440

Merged
TinDang97 merged 1 commit into
mainfrom
test/win-parked-kill-skip
Aug 7, 2026
Merged

test(ci): gate parked-conn CLIENT KILL parity test off the Windows runner#440
TinDang97 merged 1 commit into
mainfrom
test/win-parked-kill-skip

Conversation

@TinDang97

@TinDang97 TinDang97 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Third instance of the documented Windows socket-semantics gap (#439, #431): parked_connection_visible_and_killable asserts CLIENT KILL removes a parked/idle connection from CLIENT LIST, which relies on shutdown(2) interrupting the handler's pending read. That interruption does not fire on Windows, so the registry entry is never released and the test fails on every retry on the Windows runner.

Gated with #[cfg(not(windows))] + the standard documented-gap comment, matching the #439 convention. Behaviour remains validated on the production platforms — full suite passes on macOS in ~14s (6/6) and on the Linux gate.

Test plan

  • cargo test --release --test parked_idle_parity green locally (macOS, 6 passed)
  • Windows CI job green on this PR's merge run

Summary by CodeRabbit

  • Tests
    • Added a non-Windows test configuration for parked connection visibility and termination.
    • Documented that this behavior is unsupported on Windows due to platform-specific socket handling.

…nner

parked_connection_visible_and_killable asserts that CLIENT KILL of a
parked/idle connection removes it from CLIENT LIST. The kill path breaks
the handler's pending read via shutdown(2); on Windows that interruption
does not fire (the same socket-semantics gap already documented for the
idle-timeout close test in #439 and the #431 write-timeout suite), so the
registry entry is never released and the victim stays listed — the test
fails on every retry on the Windows runner while passing on macOS and the
Linux gate in ~14s.

Windows is a best-effort platform (documented stance); the behaviour under
test is validated on the production platforms. Gate carries the standard
documented-gap comment.

refs: #439, #431
author: Tin Dang
@TinDang97 TinDang97 added the skip-changelog Skip the CHANGELOG.md update gate for this PR label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cb5dee56-eec0-4a22-b146-e0fe783c1ef6

📥 Commits

Reviewing files that changed from the base of the PR and between bb5a8f0 and 9592fe2.

📒 Files selected for processing (1)
  • tests/parked_idle_parity.rs

📝 Walkthrough

Walkthrough

The parked connection CLIENT LIST/CLIENT KILL test now runs only on non-Windows platforms. Comments document the Windows socket shutdown limitation.

Changes

Parked connection test compatibility

Layer / File(s) Summary
Non-Windows test gate
tests/parked_idle_parity.rs
The parked connection test uses a cfg(not(windows)) guard. Comments document the unsupported Windows behavior.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • pilotspace/moon#370: Adds similar platform-specific test gating for unsupported Windows behavior.
  • pilotspace/moon#422: Added the parked connection test that this PR gates on non-Windows platforms.
  • pilotspace/moon#427: Changed parked-connection CLIENT KILL behavior covered by this parity test.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes gating the Windows-incompatible CLIENT KILL parity test.
Description check ✅ Passed The description clearly explains the Windows socket limitation, the implementation, and test results, but omits Performance Impact, Notes, and most checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/win-parked-kill-skip

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Gate parked-connection CLIENT KILL parity test off Windows

🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Skip CLIENT KILL parked/idle connection parity test on Windows due to socket semantics mismatch.
• Document why shutdown(2) does not unblock the pending read on Windows.
• Preserve validation on Linux/macOS CI where production behavior is enforced.
Diagram

graph TD
  A["CI matrix"] --> B["Linux/macOS runners"] --> C["parked_idle_parity test"] --> D["parked_connection_visible_and_killable"]
  A --> E["Windows runner"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Fix Windows kill/unpark behavior in server runtime
  • ➕ Restores parity validation on Windows CI
  • ➕ May improve real Windows runtime behavior beyond tests
  • ➖ Potentially non-trivial and platform-specific complexity around socket shutdown/read readiness semantics
  • ➖ May require deeper changes to connection registry lifecycle and readiness watcher behavior
2. Rewrite the test to avoid reliance on `shutdown(2)` interrupting read
  • ➕ Could keep some level of Windows coverage without changing production code
  • ➕ Makes the test assert behavior via more portable signals (e.g., explicit close/ack)
  • ➖ May weaken the parity assertion the test is intended to guarantee
  • ➖ Adds test complexity and may still be flaky under Windows networking semantics

Recommendation: Given Windows is explicitly best-effort and the behavior is still validated on the production platforms (Linux gate + macOS), gating this specific parity test with a documented socket-semantics gap is reasonable. Revisit the deeper runtime fix only if Windows parity becomes a supported requirement.

Files changed (1) +8 / -0

Tests (1) +8 / -0
parked_idle_parity.rsSkip CLIENT KILL parked-connection parity test on Windows +8/-0

Skip CLIENT KILL parked-connection parity test on Windows

• Adds a '#[cfg(not(windows))]' gate to disable 'parked_connection_visible_and_killable' on Windows. Documents the underlying Windows socket semantics gap where 'shutdown(2)' does not unblock the handler's pending read, preventing registry cleanup and causing persistent CLIENT LIST entries.

tests/parked_idle_parity.rs

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@TinDang97
TinDang97 merged commit ef6febc into main Aug 7, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip the CHANGELOG.md update gate for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant