Skip to content

test(ssh): reset user disconnect state in connection fixtures - #40525

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/fix-ssh-test-disconnect-state
Nov 10, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/fix-ssh-test-disconnect-state

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

When shared-worker scheduling runs the SSH wake-retry suite before loopback cancellation, its final user-disconnect case leaves a hold for the shared fixture target. The next suite connects but its explicit reconnect is refused, so the cancellation test sees one forward startup instead of two. Reset user-disconnect state alongside the existing SSH fixture state.

Reproduced the exact CI assertion on pristine main bd8138b2314, the main parent of #40449's failing CI merge (42716779558, job 129500534834), by explicitly ordering those two suites in one shared worker. CI artifact diagnostics place both in concurrency slot 2, with wake-retry completing before the failing cancellation suite. The cancellation suite passes alone. The fix is based on current main and adds no production code or test cases.

Validation:

  • Ordered wake-retry → loopback-cancel: 1 failure / 7 passes before the reset; 8 passes after it.
  • pnpm check:changed before push.

The local reproduction uses macOS and pinned Bun; original CI used Linux, and the entire 688-file shard scheduling was not replayed.

Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The SSH connection test harness imports resetSshUserDisconnectsForTests. The resetSshConnectionMocks() routine calls it before resetting SSH client state and mocks.

Merge Risk: Minimal · up to d3106

The change resets SSH disconnect state in test fixtures. No merge-blocking risk is identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly describes the change: resetting user-disconnect state in SSH connection fixtures.
Description check Passed The description explains the failure, the change, the reason, and the test results. It does not include a linked issue, a risk assessment, or the required N/A note for visual proof, but the core infor…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Description check

Explanation

The description explains the failure, the change, the reason, and the test results. It does not include a linked issue, a risk assessment, or the required N/A note for visual proof, but the core information is complete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 72edc05f-8ab5-4c1c-adc0-b50e30806519
Commits

Reviewing files that changed from the base of the PR and between 3e86c5a and d3106c2.

Files selected for processing: 1

  • src/main/ssh/connection/testing/ssh-connection-test-harness.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@AmethystLiang
AmethystLiang merged commit be7d53e into main Nov 10, 2026
59 checks passed
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