Skip to content

Timeout heavy Codex fix#321942

Draft
alexr00 wants to merge 1 commit into
mainfrom
alexr00/round-rodent
Draft

Timeout heavy Codex fix#321942
alexr00 wants to merge 1 commit into
mainfrom
alexr00/round-rodent

Conversation

@alexr00

@alexr00 alexr00 commented Jun 18, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 18, 2026 15:00
@alexr00 alexr00 self-assigned this Jun 18, 2026

Copilot AI 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.

⚠️ Not ready to approve

The new overall timeout can be exceeded substantially (due to nested waitAndClick polling) and some retry paths don’t dismiss the dropdown, risking stale snapshots and flakiness.

Pull request overview

This PR updates the Agents Window smoke-test automation to make session type selection more resilient for slow/late-registering providers (notably the Codex variant) by retrying the full open → find → click → verify loop within a configurable timeout budget.

Changes:

  • Extend selectSessionType to accept an overall timeoutMs (default 60s) and retry until the picker label commits.
  • Add verification polling after clicking a dropdown row to ensure the session type actually changed.
  • Improve failure diagnostics by reporting the last seen picker label and dropdown rows on timeout.
File summaries
File Description
test/automation/src/agentsWindow.ts Reworks selectSessionType retry/verify logic to better handle async-populated session provider dropdowns and slow provider initialization.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 4

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

Comment on lines +185 to 189
if (!items?.some(el => rowText(el).includes(needle))) {
// Row never showed in this dropdown pass — close and retry.
await new Promise(r => setTimeout(r, 1000));
continue;
}
Comment on lines +201 to +204
if (matchIndex < 0) {
await new Promise(r => setTimeout(r, 1000));
continue;
}
Comment on lines 174 to +175
await this.code.waitAndClick(SESSION_TYPE_PICKER_VISIBLE);
const deadline = Date.now() + 10_000;
while (Date.now() < deadline) {
const items = await this.code.getElements(itemSel, /* recursive */ true);
const openDeadline = Math.min(deadline, Date.now() + 10_000);
if (headerIndex >= 0) {
matchIndex = items.findIndex((el, index) => index > headerIndex && isActionRow(el));
const dataIndex = items[matchIndex].attributes['data-index'] ?? String(matchIndex);
await this.code.waitAndClick(`.action-widget .monaco-list-row[data-index="${dataIndex}"]`);
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.

2 participants