From e32df2e60f5f3b3547647809b790b9ac20d79f41 Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 30 Sep 2026 21:22:42 +0000 Subject: [PATCH 1/2] Poll CI every 100ms in the test harness Co-Authored-By: Claude Opus 5.5 --- tests/support/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/support/mod.rs b/tests/support/mod.rs index 953930ea9..50f1c8eef 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -388,9 +388,10 @@ impl Scenario { .env("FAKE_CLAUDE_SCRIPT", self.path("claude-script.sh")) .env("FAKE_CLAUDE_RECORD", self.path("claude-calls.json")) .env("FAKE_GH_RECORD", self.path("gh-calls.json")) - // Seconds of waiting for CI become milliseconds. + // Seconds of waiting for CI become milliseconds. Each poll starts + // the fake gh, so a shorter interval starts more processes. .env("THIRDSHIFT_CI_GRACE_MS", "300") - .env("THIRDSHIFT_POLL_MS", "10"); + .env("THIRDSHIFT_POLL_MS", "100"); command } From b88bde9cca694b2416c45c245f0c541ef07680f6 Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 30 Sep 2026 21:24:27 +0000 Subject: [PATCH 2/2] Say why the harness polls every 100ms Co-Authored-By: Claude Opus 5.5 --- tests/ci.rs | 6 +++--- tests/support/mod.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/ci.rs b/tests/ci.rs index dfa1ac996..6f3b848a2 100644 --- a/tests/ci.rs +++ b/tests/ci.rs @@ -488,9 +488,9 @@ fn waits_for_github_to_work_out_whether_the_pr_is_mergeable() { checks_on_head(GREEN) )); - // Each poll starts the fake gh, so the default 300ms grace period can run - // out before the fourth read on a slow machine. Green checks keep the - // longer grace period from slowing the CI wait. + // At the harness's 100ms poll interval, the default 300ms grace period + // holds only about three reads, and this needs a fourth. Green checks keep + // the longer grace period from slowing the CI wait. let result = scenario.run_with_env( &[&scenario.issue_url(7)], &[("THIRDSHIFT_CI_GRACE_MS", "5000")], diff --git a/tests/support/mod.rs b/tests/support/mod.rs index 50f1c8eef..797e3156d 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -389,7 +389,8 @@ impl Scenario { .env("FAKE_CLAUDE_RECORD", self.path("claude-calls.json")) .env("FAKE_GH_RECORD", self.path("gh-calls.json")) // Seconds of waiting for CI become milliseconds. Each poll starts - // the fake gh, so a shorter interval starts more processes. + // the fake gh, whose Python startup costs CPU; at 100ms the grace + // period holds about three reads, enough for the absent state. .env("THIRDSHIFT_CI_GRACE_MS", "300") .env("THIRDSHIFT_POLL_MS", "100"); command