test(e2e): poll restart conversation history - #1663
PierrunoYT wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (5)Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases.⚙️ CodeRabbit configuration file Files:
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.⚙️ CodeRabbit configuration file Files:
Reserve end-to-end coverage for behavior that requires the real VS Code host, workspace APIs, extension activation, webview messaging, file watchers, or a full workflow.⚙️ CodeRabbit configuration file Files:
Act as an adversarial second-opinion reviewer.⚙️ CodeRabbit configuration file Files:
Use short, stable, unique text in the task prompt.📄 CodeRabbit inference engine (apps/vscode-e2e/AGENTS.md) Files:
🔇 Additional comments (1)
📝 SummarySummary by CodeRabbit
WalkthroughThe restart-persistence end-to-end test now polls task history for the expected completion sequence. The restored-task and reopened-task checks use this polling instead of immediate boolean assertions. ChangesRestart persistence validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The restart-persistence checks now wait for the expected persisted completion sequence, avoiding transient atomic-rename read failures without adding fixed delays. 🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: Awaiting fresh human maintainer or CODEOWNER approval. Automated review is complete for the latest commit but does not replace human approval. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Related GitHub Issue
Closes: #1641
Description
The restart-persistence E2E previously checked persisted API conversation history with one immediate read after extension-host restart and another after reopening the task. Those reads could land in
safeWriteJson's atomic-rename swap window, where the destination path is briefly absent, and report a false negative.This change routes both checks through a shared
waitForMarkedCompletionhelper. It repeatedly calls the sameapi.hasTaskApiConversationHistorySequenceread used by the original assertions until the sequence becomes visible or the existing 30-secondwaitFordeadline expires. There are no fixed sleeps and no production persistence behavior changes.Test Procedure
pnpm --filter @roo-code/vscode-e2e lint pnpm --filter @roo-code/vscode-e2e check-types pnpm lint pnpm check-types pnpm exec prettier --check apps/vscode-e2e/src/suite/restart-persistence.test.ts git diff --checkAll commands pass. The commit and push hooks also completed the full workspace lint/typecheck gates (11/11 packages).
The targeted command below built the extension and webview and downloaded the pinned VS Code binary, but could not launch native VS Code in the local orb because no X display or
xvfb-runis available. CI's mocked E2E runner should execute this exact scenario:Pre-Submission Checklist
Visual Snapshots
N/A — no UI changes.
Videos (interaction / animation only)
N/A.
Documentation Updates
Additional Notes
The production write ordering and history loader are intentionally unchanged. This only makes the E2E tolerate the already-documented atomic publication window.
Get in Touch
GitHub: @PierrunoYT