Repository navigation
ci: run the layout-owner switch-on specs as an advisory PR check (dark, layout-owner build only) - #30582
Conversation
Build the e2e app with ORCA_LAYOUT_OWNER=main through the existing e2e.yml (new layout_owner input, read only by the app and orcad builds), run the layout oracle, its positive control and the layout-owner acceptance specs with the save-divergence log on, and upload a summary by kind and spec. Not in the PR aggregate's needs.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
598635af-01c8-4dc0-916e-b12e5b2a74d2
📒 Files selected for processing: 6
.github/workflows/e2e.yml.github/workflows/pr.ymlconfig/scripts/layout-save-divergence-summary.mjsconfig/scripts/pr-auxiliary-preflight-admission.test.mjsconfig/scripts/pr-layout-owner-switch-on-route.mjsconfig/scripts/pr-layout-owner-switch-on-route.test.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.
…th ids from kinds
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Admit the layout-owner E2E job when required checks are reused. · pr.yml:1542-1560
.github/workflows/pr.yml:1542-1560
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdmit the layout-owner E2E job when required checks are reused.
On
ready_for_review, an identical successful PR check run can setreused=true. A layout-related change still setslayout_owner_switch_on=true, but both preflight selectors become false, sopreflightis skipped. This job then skips because it requires preflight success. The regular advisory E2E job already admits this reuse case.Suggested fix
- needs.preflight.result == 'success' + ( + needs.preflight.result == 'success' || + ( + needs.preflight.result == 'skipped' && + needs.code_paths.outputs.static_analysis == 'false' && + needs.code_paths.outputs.typecheck == 'false' + ) + )
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
870bf580-c5f3-4aac-b490-6c5fc17dfd23
📒 Files selected for processing: 3
.github/workflows/e2e.ymlconfig/scripts/layout-save-divergence-summary.mjsconfig/scripts/pr-layout-owner-switch-on-route.test.mjs
🚧 Files skipped from review as they are similar to previous changes: 2
- config/scripts/pr-layout-owner-switch-on-route.test.mjs
- config/scripts/layout-save-divergence-summary.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
…r lane, drops diff-word-wrap (fails switch off), and names each looped test in the summary
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
67f14128-15b0-4741-a161-898a4e3e207f
📒 Files selected for processing: 5
.github/workflows/e2e.yml.github/workflows/pr.ymlconfig/scripts/layout-save-divergence-summary.mjsconfig/scripts/pr-layout-owner-switch-on-route.mjsconfig/scripts/pr-layout-owner-switch-on-route.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
…tore's open action, so a layout-owner build's main holds the tabs
… each naming its test Tests whose only gap was setup now run switch-on; files that show a real switch-on difference lose their mock and stay red until their fixes land. The rollback leg's trigger is back to #30582's list.
ELI5
Orca has a hidden build setting that moves ownership of the tab and pane layout from the window to the background process. It is off in every build users get. Until now, the only way to test it on is to build it on a laptop and run the tests there by hand. This PR adds a CI job that does exactly that on every pull request that touches the layout code, and posts a report. It does not block merging.
What Changed
Before: no CI job builds the app with the layout-owner setting on, so a change that breaks it is found only when someone runs the tests by hand.
After: a new check,
layout owner (switch on), runs on pull requests that change layout code. It:ORCA_LAYOUT_OWNER=main. It reuses the existing test workflow (e2e.yml) through a newlayout_ownerinput, the same way thelayout oraclecheck reuses it. The setting is applied only to the commands that build the app and the headless server, never to the whole job, because the server template build refuses it. The build step then checks that the build left its marker file (out/main/ORCA_LAYOUT_OWNER_MAIN); the marker travels in the build artifact, and the switch-on specs skip without it.ORCA_LAYOUT_SAVE_DIVERGENCE_LOG). That log records each window save whose layout differs from what the background process holds.layout-divergence-changed-layout-owner-switch-on-*,layout-divergence-headless-layout-owner-switch-on-*). Nothing in the repo counted these reports yet, soconfig/scripts/layout-save-divergence-summary.mjsis new. It matches each report to a test using the Playwright JSON report.Specs (the list lives in
config/scripts/pr-layout-owner-switch-on-route.mjs):tests/e2e/workspace-layout-oracle.spec.ts,tests/e2e/workspace-layout-oracle-headless.spec.ts(the headless one runs on both server hosts, in the existing server job)tests/e2e/cli-file-open-position.spec.ts(its only test is at line 8; it writes the store directly, so it must leave at least one report)tests/e2e/relaunch-first-terminal.spec.ts,tests/e2e/relaunch-sleeping-agents-resume-on-view.spec.tstests/e2e/terminal-cold-activation-deferral.spec.tstests/e2e/cli-first-worktree-single-terminal.spec.tstests/e2e/unopened-workspace-agent-single-resume.spec.tstests/e2e/terminal-pane-close-layout-consistency.spec.tstests/e2e/diff-word-wrap.spec.ts,tests/e2e/golden-file-open-edit-save.spec.ts,tests/e2e/golden-source-control-open-diff.spec.ts,tests/e2e/paired-cli-terminal-graph-sync-tab-retention.spec.tstests/e2e/floating-workspace-pane-height.spec.ts,tests/e2e/editor-model-host-isolation.spec.ts,tests/e2e/editor-tab-selection-restore.spec.ts,tests/e2e/finished-agent-ghost-resume.spec.ts,tests/e2e/live-background-terminal-mount-authority.spec.ts,tests/e2e/workspace-back-forward-navigation.spec.ts,tests/e2e/worktree-lineage-toggle-shortcut.spec.ts(plus cold-activation, diff-word-wrap, the two golden specs and relaunch-sleeping above)tests/e2e/local-cli-terminal-retention.spec.tstests/e2e/default-tabs-mark-crash-relaunch.spec.tstests/e2e/terminal-cli-split-closed-before-mount.spec.tsWhen it runs: the existing changed-path step in
pr.ymlnow also printslayout_owner_switch_on. It is true when a PR changessrc/shared/workspace-layout*,src/shared/layout-owner-switch.ts,src/main/persistence/**,src/main/runtime/**,src/renderer/src/store/**,tests/e2e/**,pr.yml,e2e.yml, or the job's two scripts. This PR changespr.ymlande2e.yml, so it runs the job itself.Not required: the job is not in the
PR checks passedjob's needs, and that job, its needs and its failure handling are unchanged. All existing callers ofe2e.ymlleavelayout_ownerempty, which changes nothing in their steps.Why
The layout-owner work is being checked by hand on one machine. A CI job catches regressions in pull requests that never ran it, and keeps a report history. It is advisory because some of these specs fail with the setting on until that work lands.
Alternatives considered: a separate workflow file would copy the build, artifact and server steps that
e2e.ymlalready has, and drift from them. Setting the variable job-wide would make the server template build refuse to run. Adding the job to the required list would block unrelated pull requests on known switch-on failures.Linked Issue
N/A (internal CI change).
Visual Proof
N/A: CI only, no app change.
Testing
config/scripts/pr-layout-owner-switch-on-route.test.mjs(the job's wiring: merge commit, setting only on builds, not required, unique artifact suffix, every listed spec exists; the path filter; the summary counts).pr-e2e-route-contracts,pr-ready-check-reuse,pr-code-change-scope,pr-e2e-gate-contract,required-pr-check-name,pr-workflow-parallelism,ci-e2e-job-selection,pr-auxiliary-preflight-admission(this one copies the routing scripts into a scratch repo, so the new script is added to its list).actionlintshows no new findings against main;check:code-quality:changedand the naming audit pass.AI Disclosure
Review
Agent skill upstream boundary
Notes
No app code changes, so no effect on any platform, remote host or phone. Linux CI runner only.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)