Skip to content

ci(e2e): run the layout oracle on PRs that change layout writers - #27103

Merged
Jinwoo-H merged 2 commits into
mainfrom
layout-oracle-ci
Oct 10, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
layout-oracle-ci

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 10, 2026 •

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

ELI5

The layout oracle is the end-to-end test that opens, splits, moves and closes terminal tabs, restarts Orca, and checks that what is saved matches what every window and phone shows. It only ran when someone edited the oracle test itself, so a PR that changed how tabs and panes are written could merge without it. This PR makes CI run it whenever such code changes.

What Changed

  • Before: CI picks e2e specs by matching changed paths against a list of routes. No route named the oracle, so a change to the layout code ran none of the three oracle specs (the window one, the headless one on orcad and Electron, and the SSH one). The SSH one only ran when a PR also happened to touch SSH terminal code, which brings up the whole Docker SSH lane.
  • After: two new routes in config/scripts/pr-e2e-source-routing.mjs.
    • workspace-layout.oracle runs all three specs when a PR changes product code in src/shared/workspace-layout/, src/main/persistence/terminal-topology/, restoring-sessions/, loading-store/pty-binding-*, or the oracle's own support files under tests/e2e/. It also runs for the runtime modules (main and renderer) that create, move, close, persist or publish layout, matched by name: pane admission, workspace layout, session tabs, headless tabs, the layout client, terminal create and split, and spawn placement.
    • workspace-layout.oracle-tab-store runs only the window and headless specs for src/renderer/src/store/slices/tabs*, so a tab-store change does not start the Docker SSH lane.
  • The existing job selection already places each spec. The window spec goes to the general e2e shards, the headless spec to the orcad mode-switch job (which builds orcad), and the SSH spec to the Docker SSH lane. No workflow file changes, and it is not made a required check.
  • Test files and fixtures don't trigger the route. Neither do the runtime rpc/ and orchestration/ folders, which only call into the modules above.

Why

The headless and window oracles caught real regressions during the layout rework, but only when someone ran them by hand. Adding a route reuses the mechanism every other e2e gate uses, so the trigger is a unit-tested path contract rather than new workflow logic.

Cost, over the last 14 days of main (1572 commits):

  • Docker SSH lane: 68 commits (4.3%) would trigger it.
  • Window and headless oracles: 71 commits (4.5%) would trigger them.

A first draft that matched every runtime file named for a session, tab, terminal or pane would have triggered on 211 commits (13.4%).

Proof with #27083's file list:

  • On main, the routes pick only the SSH terminal specs.
  • On this branch they add all three oracle specs:
    • workspace-layout-oracle.spec.ts goes to the general e2e shards (e2e_run_changed=true).
    • workspace-layout-oracle-headless.spec.ts goes to the "orca serve Electron/orcad mode switch" job, in its "Layout oracle on headless serve" step.
    • workspace-layout-oracle-ssh.spec.ts goes to the "ssh docker watcher isolation" shards. Save runtime-started tabs in the tab bar before their terminal starts #27083 already reached those shards through its SSH source change.

Linked Issue

N/A (maintainer CI change)

Visual Proof

N/A: CI path selection only, no product change.

Testing

  • Ran node config/scripts/pr-e2e-source-routing.mjs and ci-e2e-job-selection.mjs --job-outputs over Save runtime-started tabs in the tab bar before their terminal starts #27083's changed files, on main and on this branch.

  • Automated tests added/updated: new pr-e2e-layout-oracle-routing.test.mjs checks:

    • each layout writer family triggers the route on its own;
    • each spec goes to the job that can run it;
    • the route stays off the SSH-source signal;
    • the tab store reaches only the window and headless specs;
    • tests, fixtures and unrelated runtime files are left out.

    The test also checks that the tab store reaches only the window and headless specs. All config/scripts tests pass.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

The change is CI-only. Every OS and SSH are unaffected; it only changes which existing jobs run.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →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: d3921245-dd91-4b64-82bd-7a4957f339fa

📥 Commits

Reviewing files that changed from the base of the PR and between 86636e5 and 21d5123.


📒 Files selected for processing (2)
  • config/scripts/pr-e2e-layout-oracle-routing.test.mjs
  • config/scripts/pr-e2e-source-routing.mjs

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 routing configuration adds two workspace-layout oracle routes. One route selects three oracle specs for qualifying layout, persistence, runtime, and helper paths. The other selects two specs for eligible tab-store paths. The source filter excludes spec and fixture files. New tests verify route selection, E2E job settings, SSH-source classification, file existence, and excluded paths.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 21d51

The routing changes schedule the intended layout-oracle checks for the specified source changes. No material merge risk is apparent.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: running layout-oracle E2E tests when layout writers change.
Description check Passed The description follows the repository template and explains the change, rationale, routing behavior, testing, scope, and checklist status. The maintainer-specific Linked Issue exception is applied co…
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 3…
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.

…layout

Co-Authored-By: Claude <noreply@anthropic.com>
@Jinwoo-H
Jinwoo-H merged commit a90e5d9 into main Oct 10, 2026
30 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