Skip to content

ci: shard SSH tests, remove duplicate runs, and warm Windows caches - #23286

Merged
OrcaWin merged 1 commit into
mainfrom
ci/ssh-shards-windows-cache
Sep 27, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
ci/ssh-shards-windows-cache

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

SSH-related PRs spent over half an hour in one test job while another job repeated the same tests. Windows ARM also spent nine minutes installing dependencies after cache misses. This spreads SSH tests across four machines, removes duplicate execution, and prepares reusable Windows caches on main.

What Changed

  • Run the existing Docker SSH suite in four Playwright shards, one worker per machine. Run watcher isolation and parking/startup coverage once, on shard 1; preserve separate trace artifacts.
  • Exclude all 30 dedicated SSH specs from the changed-spec job and trigger their owner on test-only edits too.
  • Warm dependency and Node native-module caches on the same Windows x64 and ARM images as persistence CI, then probe the compiled modules.

Why

Separate machines isolate destructive SSH fixtures without introducing competing Electron workers. Explicit ownership checks prevent deduplication from dropping coverage. Reusing the existing install action preserves exact ABI, architecture, image, and source cache keys.

Linked Issue

None; requested directly. No issue created.

Visual Proof

N/A — CI scheduling and caching only.

Testing

  • 63 focused tests passed locally, including real Playwright discovery proving that the four shards preserve every test/project exactly once.
  • Changed-code quality and formatting passed.
  • Automated coverage checks added for dedicated ownership and Windows runner/runtime parity.
  • Linux Docker SSH validation: all 47 tests passed, exact test/project parity with the previous serial run. Longest shard job: 10m02s versus 31m24s previously. The changed-spec selection step launched no duplicate SSH tests.
  • All required PR checks passed, including all eight unit shards, typecheck, and static analysis.
  • Windows cold build and cache restore: both architectures passed native probes on both attempts. ARM install time fell from 6m29s to 2m07s; x64 from 1m53s to 27s. The second attempt intentionally verified cache reuse after the first successful build.

Review

No product behavior or test assertions changed. Headed Electron execution remains on isolated CI displays. Existing timeouts and retries are unchanged.

Agent skill upstream boundary

  • Not applicable; no upstream skill content.

Checklist

  • Focused CI changes with before/after and mechanism explained.
  • Self-reviewed for coverage preservation and artifact collisions.
  • Cross-platform and SSH isolation considered.
  • No UI changes; visual proof is N/A.
  • Applicable build, typecheck, lint and test checks passed in CI.

Validation notes

The first manual E2E dispatch failed at checkout because an abbreviated SHA was interpreted as a branch; the successful validation used the full immutable head SHA. No test failure was rerun to obtain green.

GitHub branch and rules APIs report no required status-check contexts on main, so matrix suffixes do not leave an old required check unsatisfied. Native and download caches become shared across PRs when this workflow runs on main; pre-merge native restore was validated within the PR cache scope.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: 281360dc-2c0c-4e55-8db8-ebcfe96b0e38

📥 Commits

Reviewing files that changed from the base of the PR and between 47ddfbd and 65f8325.

📒 Files selected for processing (5)
  • .github/workflows/ci-cache-warmup.yml
  • .github/workflows/e2e.yml
  • config/scripts/ci-cache-warmup-workflow.test.mjs
  • config/scripts/run-ssh-docker-e2e.mjs
  • config/scripts/ssh-docker-ci-sharding.test.mjs
💤 Files with no reviewable changes (1)
  • config/scripts/run-ssh-docker-e2e.mjs

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


📝 Walkthrough

Walkthrough

The CI workflow adds Windows cache warmup and updates SSH E2E spec assignment. The SSH isolation job uses four shards, with watcher-isolation and terminal-parking tests on shard 1. New tests check warmup configuration, spec ownership, and shard coverage. The change also removes a comment about the SSH job name.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 65f83

The cache warmup and SSH shard assignments have no identified issue requiring a change before merge. Pending CI runs remain normal validation.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 65f83

The changes affect how CI tests run and how Windows caches are prepared, not product-facing behavior. No new public application entrypoint was established, but the hosted cache behavior and four-runner execution have not yet been verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly evidenced execution boundary is repository CI and its test processes. The available evidence does not establish a new customer-facing entrypoint.

Trust Boundaries and Controls

  • observed — The examined test-to-child-process path uses fixed Playwright listing arguments and disables shell execution; it does not show a new route from request input to a privileged command.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes the main changes: SSH test sharding, duplicate-run removal, and Windows cache warming.
Description check ✅ Passed The description is detailed and covers the change, rationale, testing, validation, review notes, and checklist. It explains that no linked issue exists and omits the AI Disclosure and Notes headings, …
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues. One question worth confirming before merge; details inline.

Reviewed changes

  • SSH Docker lane sharded four ways — ssh-docker-watcher-isolation now runs a [1,2,3,4] matrix with fail-fast: false. The 25 specs in run-ssh-docker-e2e.mjs are split with --shard=${{ matrix.shard }}/4 (one worker per VM), while the watcher-isolation and parking/startup suites run once on shard 1 and trace artifacts are namespaced by shard.
  • Dedicated SSH specs removed from the changed-spec job — all 30 specs owned by the three SSH runners are now excluded from changed-e2e, and each owner lane triggers on a test-only edit via contains(inputs.test_files, <spec>). The exclusion list (30 owned + 3 specs with their own lanes) and the job if list are consistent, and every SSH-source-mapped spec from pr.yml is inside the excluded set, so the watcher lane is the single owner.
  • Windows cache warming — a new warm-windows matrix job on windows-2022 and windows-11-arm installs Node dependencies through the same action and runtime (native-runtime: node, default Node version) as bun-profile-tests.persistence, then probes the compiled modules with ensure-native-runtime.mjs --check-only. Image set, scope, runtime, and cache key all match the persistence consumer.
  • Contract tests — ssh-docker-ci-sharding.test.mjs asserts owner completeness against the runner files, the shard configuration, and a real four-way Playwright --shard discovery partition; the warmup contract test asserts Windows image/runtime parity. All focused contract suites pass locally (9 files, 100 tests), including the existing pr-e2e-gate-contract, routing, and release-dispatch contracts, whose expectations still hold because the job id is unchanged.

ℹ️ Nitpicks

  • docs/reference/ci-runner-efficiency.md is the rolling record for CI-efficiency changes (with hosted numbers). Once the four SSH shards and the Windows probes have real CI timings, a short entry there would keep that record complete.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread .github/workflows/e2e.yml

ssh-docker-watcher-isolation:
name: ssh docker watcher isolation
name: ssh docker watcher isolation (${{ matrix.shard }}/4)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job's display name changed from ssh docker watcher isolation to a matrix-suffixed name, and the comment in run-ssh-docker-e2e.mjs that warned about exactly this was deleted in the same PR. Since branch protection is configured outside the repo, it cannot be checked here.

Technical details
# Confirm the renamed job is not a required status check

## Affected sites
- `.github/workflows/e2e.yml:320` — `name:` gained a `(${{ matrix.shard }}/4)` suffix, so the check context is now `ssh docker watcher isolation (1/4)` … `(4/4)`, not the old `ssh docker watcher isolation`.
- `config/scripts/run-ssh-docker-e2e.mjs` — deleted comment: renaming "changes the GitHub check name and can break required-check config, so the name understates the job on purpose."

## Required outcome
- Either confirm `ssh docker watcher isolation` is not configured as a required status check for `main` (the `e2e`/watcher lanes are advisory in `pr.yml` — `verify.needs` omits `e2e`), or keep a check context that still matches the configured requirement.

## Open questions for the human
- Is this lane referenced in branch-protection required checks? If so, the matrix-suffixed names would never satisfy the old required name and would block merges.

@OrcaWin
OrcaWin merged commit 7a4f833 into main Sep 27, 2026
55 of 57 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