fix(e2e): stabilize shell submission and review seeding#20189
Open
Hona wants to merge 8 commits intoanomalyco:devfrom
Open
fix(e2e): stabilize shell submission and review seeding#20189Hona wants to merge 8 commits intoanomalyco:devfrom
Hona wants to merge 8 commits intoanomalyco:devfrom
Conversation
Fill the shell prompt through the contenteditable editor after switching to shell mode and reuse the shared seeded patch flow so CI does not fail when the patch tool call is missed.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce e2e flakiness by making shell command submission deterministic in the contenteditable prompt and by making review patch seeding retry until the expected diff state is observable.
Changes:
- Switch shell-mode typing to
prompt.fill()and assert the command is present before submitting. - Reuse the shared
seedhelper for review patch seeding with per-test diff-state probes. - Export the shared
seedhelper frome2e/actions.tsfor reuse.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/app/e2e/session/session-review.spec.ts | Refactors patch seeding to use shared seed helper and adds diff probes to wait for specific seeded states. |
| packages/app/e2e/prompt/prompt-shell.spec.ts | Uses fill() on the contenteditable prompt and asserts command text exists before pressing Enter. |
| packages/app/e2e/actions.ts | Exports the shared seed helper so specs can reuse it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Retry the review patch seed only after the previous prompt has gone idle, catch transient probe failures when checking diff state, and remove redundant diff assertions that are now covered by the patch helper.
Abort stale review seeding runs before retrying and only accept seeded diffs when they contain the exact expected files and marks. This prevents the test from proceeding on hallucinated review files while still retrying real apply_patch misses.
Fail the review seed helper immediately when the build agent returns an assistant error so CI logs show provider status and body details instead of timing out on an empty diff poll.
Member
Author
|
/review |
| if (!idle) continue | ||
|
|
||
| const next = await waitProbe(probe, 10_000) | ||
| if (next) return |
Contributor
There was a problem hiding this comment.
Suggestion: Consider renaming next to ok or done - the variable holds a boolean result, and next suggests it might be "the next value" rather than "did it succeed". This would make the intent clearer at the call site.
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
Testing