Skip to content

ci(e2e): start the managed-SSH lane for every helper only its specs import - #30233

Merged
nwparker merged 2 commits into
mainfrom
nwparker/r2-s1-managed-ssh-harness-route
Oct 18, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/r2-s1-managed-ssh-harness-route

Conversation

@nwparker

@nwparker nwparker commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42 $\color{#cf222e}{\Huge{\mathbf{−}}}$​23 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​19
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34

ELI5

Some test helper files are used only by the managed-SSH end-to-end specs. If one of those helpers changes, nothing else runs it, so the managed-SSH lane has to start. Five of them were missing from the hand-written list. This adds them, plus a test that finds such helpers from the import graph and fails when one is missing.

What Changed

  • Before: a change to any of these five helpers started no e2e lane at all:

    • orcad-convert-teardown.ts
    • orcad-upgrade-retained-state.ts
    • reserve-local-port.ts
    • ssh-remote-only-browser-fixture.ts
    • windows-host-orcad-processes.ts
  • After: these five join MANAGED_SSH_HARNESS in pr-e2e-source-routing.mjs, so changing one starts the managed-SSH Docker lane.

  • New pr-e2e-managed-ssh-harness-route.test.mjs:

    • walks the relative imports of every e2e spec;
    • collects the test files that only ssh-orcad-* specs reach;
    • requires each of them to select the lane.

    It fails on main with exactly those five files.

  • The import walker moved out of the layout-oracle contract test into config/scripts/e2e-test-import-closure.mjs, so both tests use one copy. It now normalizes paths to /, so the contract also holds on Windows. Before, path.relative returned backslashes there and the walk found nothing.

Why

A hand-kept regex can't keep up with new helpers. The import graph is the ground truth for what a helper change can break.

The contract covers only helpers that only managed-SSH specs use. A shared helper like orca-app.ts is reached by every spec, and routing it here would start the 2×17 min lane for most e2e changes. The round-2 proposal also suggested requiring routes for every product file the specs import. I measured that and dropped it: those are mostly shared type and constant modules (store/types.ts, shared/constants.ts, …), which would turn the lane on for most PRs. The folder fallback route (#30210) covers the remote product code instead.

Linked Issue

Round 2 SSH hardening, slice S1, the import-graph route contract (internal).

Visual Proof

N/A: CI routing only.

Testing

  • The new contract test fails on main and passes here.

  • These suites pass: pr-e2e-route-contracts, ci-e2e-job-selection, pr-e2e-gate-contract, pr-unit-support-routing, pr-auxiliary-preflight-admission and wsl-e2e-lane-contract.

  • The full static-analysis job ran locally.

  • Automated tests added/updated

Review

Codex review (gpt-6.1-sol, high):

  • Round 1 found that the import closure returned backslash paths on Windows. Fixed.
  • Round 2 was clean.

Agent skill upstream boundary

  • Not applicable

Notes

No product, wire or platform impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A visual proof with reason
  • Self-reviewed
  • Cross-platform, SSH/remote impact considered
  • Static analysis and the affected tests pass locally

@coderabbitai

coderabbitai Bot commented Oct 18, 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 51 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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 273faeca-2150-4280-a662-599e556fca45
📥 Commits

Reviewing files that changed from the base of the PR and between f0a6962 and 99ccd19.

📒 Files selected for processing: 4
  • config/scripts/e2e-test-import-closure.mjs
  • config/scripts/pr-e2e-managed-ssh-harness-route.test.mjs
  • config/scripts/pr-e2e-route-contracts.test.mjs
  • config/scripts/pr-e2e-source-routing.mjs
  • 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.

@nwparker
nwparker merged commit 262a617 into main Oct 18, 2026
31 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