Skip to content

Add a coding standard for deadlines in tests - #1654

Merged
JacobStephens2 merged 1 commit into
mainfrom
test-deadline-standard
Oct 30, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
test-deadline-standard

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

Adds a Deadlines in tests section to CODING_STANDARDS.md. This is option 2 from #1561.

Main's CI went red repeatedly on tests that gave the code under test a one-second --timeout while other work had to finish inside the same deadline. That other work included Trial sessions, code checks, the model Grader, and output the test read afterwards. On a loaded macOS runner it sometimes didn't finish in time (#1458; fixed in #1560). The new section asks tests to:

  • account for everything a deadline bounds;
  • make whatever is meant to time out hang, and give the deadline several seconds;
  • recheck the tests that set a deadline when a change makes that deadline cover more work;
  • poll for an event with a generous bound instead of sleeping a fixed time.

The code review's Standards axis reads CODING_STANDARDS.md, so it applies this rule to every PR.

Evidence

An A/A Experiment on main compared two otherwise identical private suites of code-review Eval tasks. One suite's tasks add this section to the reviewed repository; the other's don't. The tasks are three thirdshift PRs that each added a test with a one-second deadline that later went flaky: #1143, #1145 and #1286. Each task had 6 Trials per condition, run on codex with gpt-6.1-sol at xhigh effort.

Standards report flags the one-second deadline
Without this section 0 of 18
With this section 18 of 18

Reports with the section cite it, quote the --timeout line, and name the work that has to finish under the deadline. One also traced the Bar timeout into the model Grader, which was the cause of #1458's failure.

Caveats:

🤖 Generated with Claude Code

Short deadlines in tests made main's CI red on loaded macOS runners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit efbd620 into main Oct 30, 2026
7 checks passed
@JacobStephens2
JacobStephens2 deleted the test-deadline-standard branch October 30, 2026 16:44
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.

1 participant