Repository navigation
ci: sleep budget guard for test code - #14820
Merged
Merged
Conversation
//tools/ci:sleep_budget_test counts fixed sleeps in test code: thread, tokio, Python, Go, Java, Erlang and Elixir sleep calls, shell and PowerShell sleeps, sleep child processes and cmd timeouts. Test code is any file under a tests, testing or fixtures directory or named like a test, plus the cfg(test) items of other Rust files. Each file gets the count it has today in tools/ci/sleep_budget.txt; an unlisted file gets 0, and sleep_budget_update only lowers the budget. There is no allowlist. The budget comparison moves from comment_budget into dx_guard so both budgets share it, and other_code.json also carries .erl, .ex, .exs, .java and .kt files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
Collaborator
Author
|
/evidence platforms=["linux_x86_64"] task=test scope=//tools/ci:sleep_budget_test //tools/ci:comment_budget_test //tools/ci:dx_guard_test //tools/ci:repo_rule_refetch_test |
Command::new("/bin/sleep") and symlinks to /usr/bin/sleep start a fixed
sleep the same as a bare "sleep" argument, so they count too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
Collaborator
Author
|
/evidence platforms=["linux_x86_64"] task=test scope=//tools/ci:sleep_budget_test //tools/ci:comment_budget_test //tools/ci:dx_guard_test //tools/ci:repo_rule_refetch_test |
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.
Adds
//tools/ci:sleep_budget_test. It counts fixed sleeps in test code: sleep calls in Rust, Python, Go, Java, Erlang and Elixir, shell and PowerShell sleeps,sleepchild processes and cmdtimeout /t. Each test file keeps the count it has today intools/ci/sleep_budget.txt. An unlisted file gets 0, there is no allowlist, and//tools/ci:sleep_budget_updateonly lowers the budget.The budget comparison moves into
dx_guardso the comment and sleep budgets share it.other_code.jsonnow also carries.erl,.ex,.exs,.javaand.ktfiles.Works with #14818, which removes the harness sleeps.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus