Skip to content

test(e2e): cover session upgrade and Windows terminal recovery - #17289

Merged
AmethystLiang merged 4 commits into
mainfrom
add-more-e2e-tests
Aug 30, 2026
Merged

AmethystLiang merged 4 commits into
mainfrom
add-more-e2e-tests

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​547 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​542
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23

Summary

Adds three high-impact E2E protections that were previously registered as unprotected reliability gaps:

  • Legacy persisted workspace-session upgrade and second-relaunch recovery.
  • Windows ConPTY keyboard reset after a protocol-mode agent/TUI exits.
  • Windows + WSL terminal cwd, PTY ownership, liveness, and relaunch recovery.

The persisted-session fixture is intentionally named legacy-workspace-session-daemon-terminal.json; it captures a legacy production schema shape without tying the test to a specific old release binary.

Verification

  • Focused oxlint passed for all changed TypeScript/JavaScript files.
  • Pre-commit format/lint hooks passed.
  • Playwright discovery found all 3 new specs.
  • Persisted-session E2E passed locally on macOS (1 test).
  • WSL and ConPTY specs are correctly guarded for Windows/WSL hosts and were not runnable on macOS.

Notes

The unrelated untracked test-plan-generation-prompt.md is not included.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR adds end-to-end reliability coverage for legacy persisted-session upgrades, Windows ConPTY keyboard-mode recovery, and WSL terminal restoration.

  • Adds an immutable legacy workspace-session fixture and verifies restoration across two launches.
  • Extends the golden stub agent with configurable keyboard-protocol behavior.
  • Verifies standard ConPTY keyboard bytes are restored after a protocol-mode agent exits.
  • Verifies WSL cwd, PTY identity, ownership, and liveness survive relaunch.
  • Updates the reliability-gate metadata with the new persisted-session coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
tests/e2e/helpers/golden-stub-agent.ts Correctly serializes agentArgs into the browser evaluation context and stores the configured default agent arguments.
tests/e2e/fixtures/golden-stub-agent/golden-stub-agent.js Adds an opt-in keyboard-protocol mode and corresponding encoded Enter handling for the ConPTY recovery scenario.
tests/e2e/persisted-session-production-upgrade.spec.ts Exercises legacy daemon-backed session restoration and verifies stable identity across a second relaunch.
tests/e2e/terminal-windows-conpty-keyboard-reset.spec.ts Exercises protocol-mode exit and confirms subsequent Windows shell input uses standard keyboard sequences.
tests/e2e/windows-wsl-terminal-restore.spec.ts Exercises WSL terminal persistence, PTY ownership, cwd preservation, liveness, and post-relaunch input.
config/reliability-gates.jsonc Records the new persisted-session test as partial macOS and local-daemon protection.

Reviews (2): Last reviewed commit: "fix stub" | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e0333cd1-e25f-43bd-b9ce-fa64fb1ca7fc

📥 Commits

Reviewing files that changed from the base of the PR and between 9e9d9de and 2fdc0b6.

📒 Files selected for processing (1)
  • tests/e2e/helpers/golden-stub-agent.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The changes add three E2E coverage areas. A production daemon session fixture is upgraded and checked across relaunches. A Windows ConPTY test verifies keyboard protocol reset and standard byte output. A Windows WSL test verifies PTY ownership, session state, liveness, and guest working-directory restoration. The reliability gate records partial persisted-session coverage and its known gaps.

Merge Risk: 🟡 Moderate · up to 2fdc0

The PR adds E2E coverage for session upgrades and Windows terminal recovery, but the current test helper still prevents protocol-mode setup from completing, so the intended regression coverage may not execute reliably. Merge should wait for that helper fix or explicit owner acceptance.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description summarizes the changes and verification, but it omits most required template sections. It has no ELI5, Why, Linked Issue with a Fixes reference, Visual Proof or N/A statement, AI Discl… Complete the required template sections. Add an ELI5 explanation, explain why the approach solves the problem, include a linked issue using Fixes #..., provide visual proof or state N/A with a reason, complete the Testing checkboxes and…
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 12 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the E2E test coverage for persisted-session upgrades and Windows terminal recovery. It is concise and aligned with the main changes.
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.
Full details: Description check

Explanation

The description summarizes the changes and verification, but it omits most required template sections. It has no ELI5, Why, Linked Issue with a Fixes reference, Visual Proof or N/A statement, AI Disclosure, Review, Agent skill boundary, or Checklist content.

Resolution

Complete the required template sections. Add an ELI5 explanation, explain why the approach solves the problem, include a linked issue using Fixes #..., provide visual proof or state N/A with a reason, complete the Testing checkboxes and platform details, address AI Disclosure and Review, confirm the Agent skill upstream boundary, and complete the Notes and Checklist items.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7893811e-5610-4f9c-ba8f-5134a7493cc1

📥 Commits

Reviewing files that changed from the base of the PR and between e3757a1 and 9e9d9de.

📒 Files selected for processing (7)
  • config/reliability-gates.jsonc
  • tests/e2e/fixtures/golden-stub-agent/golden-stub-agent.js
  • tests/e2e/fixtures/persisted-sessions/legacy-workspace-session-daemon-terminal.json
  • tests/e2e/helpers/golden-stub-agent.ts
  • tests/e2e/persisted-session-production-upgrade.spec.ts
  • tests/e2e/terminal-windows-conpty-keyboard-reset.spec.ts
  • tests/e2e/windows-wsl-terminal-restore.spec.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Comment thread tests/e2e/helpers/golden-stub-agent.ts Resolved
@AmethystLiang
AmethystLiang merged commit 73ff003 into main Aug 30, 2026
28 of 30 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…yai#17289)

* coverage report

* rm test coverage

* test(e2e): cover session upgrade and Windows terminal recovery

* fix stub
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