Skip to content

test(wsl): keep the child-side gate inheritance cases next to the gate - #35765

Merged
nwparker merged 1 commit into
mainfrom
nwparker/wsl-gate-child-inheritance-tests
Oct 29, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/wsl-gate-child-inheritance-tests

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

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

ELI5

A cleanup PR deleted the test file that checked how programs Orca starts, such as the orca command line, read the WSL hosts on/off state. This puts the two checks that still matter back, inside the main gate test file. A lone suite can be deleted again without anyone noticing; there, they can't be.

What Changed

  • Restored into src/main/wsl/wsl-host-gate.test.ts, under "publishing the resolved state to child processes":
    • A child trusts what main published.
      • A child of a blocked run inherits ORCA_INTERNAL_WSL_HOSTS=1, and only the published closed tells it the truth.
      • A child of a serve-only run sees no gate env var at all, yet must still treat WSL hosts as served.
    • A child falls back to the env var when nothing valid was published: a child of an older Orca, or a garbled value.
  • Each case has a one-line comment saying why it matters.
  • Not restored, because they're redundant with the main-side test already in that file:
    • "ignores an inherited state once this process resolved the gate itself"
    • "ignores an inherited state from main's entry on"
    • The existing stale-inherited closed/open test asserts both.

Production code: none.

Flag-off: test-only, no behavior change.

Why

#35667 (a7ec7d17354) removed src/shared/wsl-host-internal-gate.test.ts as a low-value lone suite. That also dropped the only child-side coverage #35543 added.

Status

Ready. Head da8003759c4. Checks run locally: pnpm tc, pnpm run typecheck:ci, wsl-host-gate.test.ts (22), check:code-quality:changed, anti-slop oxlint, ast-grep gates. Reviewer: e9-reviewer.

Linked Issue

Internal: WSL kill switch test coverage (follow-up to #35543).

Visual Proof

N/A: test-only.

Testing

  • pnpm test src/main/wsl/wsl-host-gate.test.ts: 22 passed.

Review

Agent skill upstream boundary

  • Not applicable.

Notes

Test-only. It touches no security, platform, SSH or performance path.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A for visuals, with reason
  • Self-reviewed
  • Cross-platform, SSH/remote impact considered (none)
  • Load-rule checks pass locally

@nwparker

Copy link
Copy Markdown
Contributor Author

STATUS: ready for review. Head da89e42. Test-only: two non-redundant child-inheritance cases restored into wsl-host-gate.test.ts. Load-rule checks pass locally. Reviewer: e9-reviewer (pending).

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 8323a448-51ca-4d7c-ac22-0ee50fe54917
Commits

Reviewing files that changed from the base of the PR and between 3d812eb and da80037.

Files selected for processing: 1
  • src/main/wsl/wsl-host-gate.test.ts
  • 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.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only PR appears safe to merge.

Summary

Restores child-side WSL gate tests in src/main/wsl/wsl-host-gate.test.ts.

  • The WSL gate test covers published states and child fallback.

Reviews (2) · Last reviewed commit: "test(wsl): keep the child-side gate inhe..." · Reviewed by Greptile

Comment thread src/main/wsl/wsl-host-gate.test.ts Resolved
#35667 pruned src/shared/wsl-host-internal-gate.test.ts as a lone suite,
dropping #35543's child-side cases. Two non-redundant ones return inside
wsl-host-gate.test.ts: a child of a blocked run trusts the published
closed over ORCA_INTERNAL_WSL_HOSTS=1 (and serve-only with no env), and
falls back to the env when nothing valid was published. The main-side
cases were already there.

Co-Authored-By: Claude <[email protected]>
@nwparker
nwparker force-pushed the nwparker/wsl-gate-child-inheritance-tests branch from da89e42 to da80037 Compare October 29, 2026 07:09
@nwparker

Copy link
Copy Markdown
Contributor Author

STATUS: head da80037 (amended, pushed with lease). Applied e9-reviewer's nit: the garbled-value case now sets ORCA_INTERNAL_WSL_HOSTS=1 and expects true, so it fails if garbage were read as 'closed'. Load-rule checks pass again.

@nwparker
nwparker merged commit 1665a6e into main Oct 29, 2026
41 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