Skip to content

test(e2e): one managed-host setup path and skip gate for the ssh-orcad specs (Phase 3.99 0.11a) - #27465

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-11
Oct 11, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-11

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​356 $\color{#cf222e}{\Huge{\mathbf{−}}}$​634 $\color{#cf222e}{\Huge{\mathbf{−}}}$​278
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 0

ELI5

About ten of the managed-SSH end-to-end tests each spelled out the same 25 setup steps by hand: launch the app, close it, write a saved SSH host into the profile, launch again, convert it to a managed server, find that server, open the workspace, and tear it all down afterwards. Sixteen of them also copied the same "skip unless Docker is available" line. This PR gives that setup one home and points those specs at it.

What Changed

Tests only; no product code changes. Phase 3.99 PR 0.11a (the setup half of 0.11; the quote half merged as #27449).

In tests/e2e/helpers/orcad-managed-workspace.ts:

  • launchConvertedProfile(fixture, { repoPath?, folderPath?, beforeSeed?, onLaunch? }) is the one setup path: first launch → optional beforeSeed(page) (for example, adding a desktop repository at the same path) → close → seed the relay-era profile → relaunch → optional onLaunch(page, seeded) before the session is ready (where the specs attach console or store listeners) → convert → find the managed environment.
  • launchManagedWorkspace is that plus the existing activation step.
  • relaunchManagedApp(fixture, onLaunch?) is the one close/relaunch/wait sequence.
  • skipUnlessManagedDockerHost() is the one skip gate.

These specs move onto withManagedHost and the helpers: editor-ownership, editor-watch-recovery, explorer-watch-recovery, markdown-conversion, markdown-link-refresh, markdown-live-documents, browser-drop-owner, terminal-root-owner and open-in-owner. terminal-journeys uses relaunchManagedApp. 16 specs use the one skip gate. The source-routing regexes for the three specs that already route on helper changes now include orcad-managed-workspace.

Teardown now always runs the shared nested finally: close the live app, dispose the session, clean the host. The browser page server and the temp directory close in a .finally after it.

Accepted differences, none of which changes what a test proves:

  • Host files are written before the first launch instead of after it. That launch has no SSH profile yet.
  • Activation also sets the active view to the workspace view.
  • The "no managed environment" error text is now the shared helper's.

Net: +359 / −637 (−278). Production: 0.

Why

Each hand-rolled copy is a place where a launch, a listener or a teardown step can drift. Routing them through one helper also confines the dependency on relay-era conversion to one function, so retiring that migration later is a one-function change for these specs. I extended the existing withManagedHost / launchManagedWorkspace helpers instead of writing a new harness.

Not in this PR: seeding a relay-era terminal tab into orcad-upgrade-profile (design P1-3). As a default it would change the tab-count assertions in terminal-journeys and editor-ownership. The PR that asserts on it (C1) will add it together with its assertion.

Linked Issue

Internal Phase 3.99 cleanup (PR 0.11a).

Visual Proof

N/A: test harness only.

Testing

  • pnpm tc and pnpm lint pass. tsc -p config/tsconfig.e2e.json gives the same error set as main (no new errors; the two in these specs that predate this PR are unchanged).

  • pnpm run check:code-quality:changed passes, oxlint and oxfmt are clean, and the routing suites pass.

  • The orcad Docker lanes and changed e2e specs run these specs in CI (no local Docker or Electron).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

P0/P1 review: self review plus codex (gpt-6.1-sol high), read-only on refs, comparing each spec step by step. Both found no P0/P1 issues.

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

SSH: the same Docker host, profile seed and conversion path. Folder workspaces: the explorer folder case keeps its /tmp folder seed. Windows: the win32 skips are kept.

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)

@OrcaWin

OrcaWin commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator Author

P0/P1 review (self + codex gpt-6.1-sol high, read-only, of the same commit before the rebase; the content didn't change): none. Codex traced all 197 assertion chains across the 16 specs, the launch, listener and restart order per spec, teardown on failure, the skip predicates, and routing selection.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

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: 3892b138-667b-48fa-bffd-42d2e25824e9

📥 Commits

Reviewing files that changed from the base of the PR and between bdc0921 and b264e08.


📒 Files selected for processing (18)
  • config/scripts/pr-e2e-source-routing.mjs
  • tests/e2e/helpers/orcad-managed-workspace.ts
  • tests/e2e/ssh-orcad-browser-capabilities.spec.ts
  • tests/e2e/ssh-orcad-browser-drop-owner.spec.ts
  • tests/e2e/ssh-orcad-browser-routing.spec.ts
  • tests/e2e/ssh-orcad-browser-service-status.spec.ts
  • tests/e2e/ssh-orcad-editor-ownership.spec.ts
  • tests/e2e/ssh-orcad-editor-watch-recovery.spec.ts
  • tests/e2e/ssh-orcad-explorer-selected-host.spec.ts
  • tests/e2e/ssh-orcad-explorer-watch-recovery.spec.ts
  • tests/e2e/ssh-orcad-markdown-conversion.spec.ts
  • tests/e2e/ssh-orcad-markdown-link-refresh.spec.ts
  • tests/e2e/ssh-orcad-markdown-live-documents.spec.ts
  • tests/e2e/ssh-orcad-open-in-owner.spec.ts
  • tests/e2e/ssh-orcad-terminal-journeys.spec.ts
  • tests/e2e/ssh-orcad-terminal-root-owner.spec.ts
  • tests/e2e/ssh-orcad-vm-provisioned-root.spec.ts
  • tests/e2e/ssh-orcad-workspace-tools.spec.ts

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



📝 Walkthrough

Walkthrough

The E2E suites now use shared managed-workspace helpers for Docker-host availability checks, profile conversion, workspace activation, and app relaunch. Several tests replace direct host and session setup, environment discovery, and explicit cleanup with managed fixtures and returned environment IDs. Other tests use the shared template and skip gate. Three source-routing rules now include the managed-workspace helper.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b264e

The test migration is mergeable after normal checks; no concrete failure remains identified.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 18 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: consolidating managed-host setup and skip gating for the SSH ORCAD E2E specifications. It is specific and related to the changeset.
Description check Passed The description follows the repository template and explains the purpose, implementation, scope, testing, review, platform considerations, and checklist status. The linked issue section names the inte…
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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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.

@OrcaWin
OrcaWin merged commit c9a9ad3 into main Oct 11, 2026
37 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