Expand regression coverage and harden Electron E2E#1918
Open
nwparker wants to merge 1 commit into
Open
Conversation
- test: expand regression coverage and harden e2e - Add regression coverage measurement and settings E2E
da118e5 to
07d5ca0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR expands Orca's regression coverage across main-process services, renderer stores/UI harnesses, pane/terminal infrastructure, and Electron E2E tests. It also hardens the Electron Playwright suite around deterministic setup, platform-correct shortcuts, explicit readiness checks, and isolated seeded repositories.
The branch is test-focused. No production runtime behavior is intended to change outside the test/coverage tooling and dependency updates needed to support the expanded regression suite.
Rebase Note
Rebased onto
origin/mainafter PR #2070 landed.07d5ca06576eae8fa540 ci: shard electron e2e workflow (#2070)electron-updaterbehavior are all now inherited frommainrather than duplicated in this branch.Coverage Snapshot
Latest verified command:
Result:
Coverage summary from V8:
xychart-beta title "Post-Rebase Vitest Coverage" x-axis ["Statements", "Branches", "Functions", "Lines"] y-axis "Coverage %" 0 --> 100 bar [68.69, 59.85, 66.31, 68.96]flowchart LR A[Regression Coverage PR] --> B[Main Process] A --> C[Renderer Stores + Hooks] A --> D[Terminal + Pane Infrastructure] A --> E[Electron E2E Harness] B --> B1[Browser, GitHub, Linear, Usage, Runtime, Filesystem, Speech] C --> C1[Browser, GitHub, Linear, UI slices, issue metadata] D --> D1[PaneManager, TerminalPane lifecycle, keyboard, context menu, layout] E --> E1[Seeded repos, platform shortcuts, readiness polling, restart flows]The previous local regression-test baseline was roughly 65.19% line coverage; this branch now verifies 68.96% lines after rebasing onto the larger current
maintest surface.What Changed
Regression coverage manifest and tooling
tests/regression-coverage-manifest.jsonas a curated map of target areas and coverage intent.tools/regression-coverage-report.mjsplus package script wiring for reporting regression coverage progress.Main-process regression coverage
Added or expanded tests for high-risk main-process contracts, including:
Renderer and store regression coverage
Added or expanded tests for renderer-facing behavior, including:
Several renderer tests intentionally use narrow fake DOM/React harnesses. Where that is the case, comments explain why: these are structural regression tests around large, hard-to-mount surfaces, not replacements for user-flow E2E coverage.
Electron E2E hardening
Reviewed and improved the Electron E2E tests with a focus on deterministic Playwright behavior:
tests/e2e/helpers/shortcuts.tsso specs follow renderer platform logic instead of hardcoding macOS assumptions.tests/e2e/helpers/seeded-git-repo.tsand reused it from global setup and fixtures.execFileSyncargument arrays where practical, including Electron build and git setup paths.waitForFunctioncalls withexpect.pollassertions that have explicit failure messages.userData, and restart-persistence tests still own their persistent launch session explicitly.Validation
pnpm exec oxlintpnpm run tcpnpm run coveragepnpm exec vitest run --config config/vitest.config.ts ...SKIP_BUILD=1 pnpm exec playwright test --config tests/playwright.config.ts --project=electron-headlessSKIP_BUILD=1 pnpm exec playwright test --config tests/playwright.config.ts --project=electron-headfulNotes:
pnpm run test:e2ewas also run to rebuild the Electron E2E output after the rebase. That run exposed a focused terminal-attention marker issue introduced during conflict resolution; the test was fixed and then the full headless/headful Electron projects were rerun successfully withSKIP_BUILD=1against that build.stablybinary was checked earlier, but this installed CLI only exposesauthanddev, notstably test, so validation used the repository Playwright runner.Review Guidance
Recommended review order:
tests/e2e/helpers/seeded-git-repo.tstests/e2e/global-setup.tstests/e2e/helpers/orca-app.tstests/e2e/helpers/orca-restart.tstests/e2e/helpers/shortcuts.tsRisk
Primary risk is test-maintenance cost, not runtime behavior. This PR adds many tests and broadens mocked harness coverage, so future refactors may need to update tests that now lock down previously untested contracts. The E2E changes are intended to reduce flake risk by removing arbitrary sleeps and using explicit readiness/state checks.