Skip to content

fix: two timing-tight tests, and agent installers retry a download curl gives up on - #664

Merged
earakely-scale merged 2 commits into
mainfrom
edgararakelyan/ci-timing-flakes
Nov 13, 2026
Merged

earakely-scale merged 2 commits into
mainfrom
edgararakelyan/ci-timing-flakes

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Three of the failures that most often turned main's Local backends runs red over the last week.

  • test_the_automatic_release_waits_out_a_busy_queue (unit): the 50 ms hold could end before the drag reached the queue on a loaded runner, so the keys went up first (['key_down', 'key_up', 'drag']). The hold is now 300 ms and the drag 1 s.
  • test_a_reply_waits_its_delay_and_hours_and_its_writes_name_the_fire (integration): a delay runs from the provoking call, read as it's detected, but the test measured it from the delayed event, stamped once the fire starts, which came to 119.977 s at 60x. It now measures from detected, with 1 s of slack for a stamp trailing its reading.
  • Agent installers (claude-code, codex, gemini, letta-code, opencode): curl --retry 3 passes over a reset HTTP/2 stream (exit 92), which failed Claude Code installs. A failed fetch now gets one more go. --retry-all-errors would need curl 7.71, and an installer runs on hosts with any curl. A second failure still stops the install with curl's own exit code.

How it was tested

  • pytest packages/agentenv-protocol/tests/test_computer_queue.py: 45 passed. With a 120 ms stall injected between computer_keyboard_down and computer_drag, the old values fail with ['key_down', 'key_up', 'drag'] and the new ones pass.
  • pytest tst/unit/agents/: 951 passed.
  • fetch against a fake curl that exits 92: no failure or one failure downloads the file; two stop the script with exit 92 under set -euo pipefail.
  • The trigger test runs in integration-local-slow on this PR.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Adds one extra download attempt to five agent installers and gives two timing-sensitive tests more room.

  • The busy-queue test gives a drag time to run before key release.
  • The trigger test measures its delay from when the trigger is detected.
  • Five agent installers retry a failed download once after a short wait.

No actionable issues found.

Reviews (1) · Last reviewed commit: "fix(agents): an installer's download get..." · Reviewed by Greptile

earakely-scale and others added 2 commits November 13, 2026 08:59
…er delay is timed from detection

The auto-release test held Alt for 50 ms, so on a loaded runner the hold could end before the drag reached the
queue, and the keys went up first. The hold is now 300 ms and the drag 1 s.

The trigger-delay test measured the delay from the `delayed` event, which is stamped once the fire starts, a little
after the provoking call the delay actually runs from; at 60x that came to 119.98 s. It now measures from `detected`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
curl's --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92), which failed Claude
Code installs. --retry-all-errors needs curl 7.71, and an installer runs on hosts with any curl, so a failed fetch
is tried once more instead. A second failure still stops the install with curl's own exit code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 13, 2026 17:02
@earakely-scale
earakely-scale merged commit 25e983d into main Nov 13, 2026
36 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/ci-timing-flakes branch November 13, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant