Skip to content

test(wire): give the preflight downgrade journey a non-Windows old host - #27177

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/fix-preflight-downgrade-wire-test
Oct 10, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/fix-preflight-downgrade-wire-test

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5
Prod 0 0 0 0

ELI5

A CI test on main started failing after #27164. This fixes the test, not the product.

What Changed

#27164 changed agent detection: when a host is too old to scope detection to a workspace, the client first reads the host's status. If the host is Windows, or doesn't report its platform, the client asks the user to update the host instead of using the host's default list. The cross-version test preflight-workspace-scoped-downgrade mocked the capability check but not that new status read, so the old host looked platform-less and no request was ever sent (expected [] to deeply equal [detectAgents, refreshAgents]). The mock now returns the host's capabilities plus hostPlatform: 'linux'. That matches what the journey is meant to cover: an old non-Windows host answering with its default list.

Why

It is red on every PR that triggers the cross-version lane, for example #27174. The Windows "ask to update" path is already covered by runtime-detected-agents.test.ts from #27164.

Linked Issue

N/A, CI fix.

Visual Proof

N/A, test-only.

Testing

  • vitest run tests/e2e/cross-version-wire/preflight-workspace-scoped-downgrade.unit.test.ts: 4/4 pass (fails on main)
  • Automated tests added/updated, or explained why not below

Agent skill upstream boundary

  • Not applicable

Checklist

  • This PR is small and focused

#27164 made an old host without a known non-Windows platform ask for an update
instead of answering its default list. The cross-version journey mocked the
capability probe but not the status read, so no request ever reached the wire.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 52c2f3c7-b988-4da6-aa42-93d81574ad84

📥 Commits

Reviewing files that changed from the base of the PR and between f307391 and 2a34952.


📒 Files selected for processing (1)
  • tests/e2e/cross-version-wire/preflight-workspace-scoped-downgrade.unit.test.ts

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



📝 Walkthrough

Walkthrough

The cross-version workspace-scoped downgrade test mock now returns runtime environment status. It reports the connected host’s capabilities, or an empty list when capabilities are unavailable, and sets the host platform to Linux.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2a349

The mock exercises the intended old-host behavior, with assertions covering the requests and results. No identified issue blocks merging.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check Passed The description explains the test failure, the mock update, the reason for the change, the linked-issue exception, visual proof status, and test result. It omits several optional or checklist details,…
Title check Passed The title clearly identifies the change to the preflight downgrade test and specifies the non-Windows old-host scenario. It is concise and directly related to the pull request.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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
  • 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

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

@OrcaWin
OrcaWin merged commit b961442 into main Oct 10, 2026
30 checks passed
@nwparker nwparker mentioned this pull request Oct 10, 2026
7 of 9 tasks
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