From fbf715889e0763ac7f5ad126e5c20e66ea6f71f2 Mon Sep 17 00:00:00 2001 From: CodeWhale Bot Date: Tue, 15 Sep 2026 15:42:55 -0700 Subject: [PATCH] chore(ci): budget the editor-handoff pause sleep (#6149) #6239 (#6165) added a bounded `thread::sleep` to `tui/ui/terminal_input.rs::pause_for_child_terminal`, which the blocking-calls ratchet has no entry for. The gate is advisory on pull requests and blocking on pushes to main, so the PR was green and main is only green because the budget steps SKIPPED - they are gated on `needs.changes.outputs.heavy == 'true'`, and that merge did not trip it. The violation is real and fires on the next heavy push. Budgeted rather than rewritten, because the site is the case the script's own message names. Its author already wrote the justification at the call site: a bounded retry capped by `TERMINAL_INPUT_CHILD_PAUSE_TIMEOUT`, in a synchronous API whose caller is about to block that very thread on a foreground editor for as long as the user keeps it open. `tokio::time` is not reachable from there and would not change what the thread does. The sibling sleep at :192 is already inside a `thread::Builder::spawn`, so the scanner never counted it. One entry added; the rest of the file is unchanged. check-blocking-calls-budget.py 625 sites across 181 files, within budget Worth a follow-up someone should own: a budget step that skips on a not-heavy-enough diff means a green main is not evidence the ratchet passed. That is how this reached main in the first place. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01AJENKJ2smviQW4FVGzUTk9 --- scripts/check-blocking-calls-budget.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/check-blocking-calls-budget.json b/scripts/check-blocking-calls-budget.json index 0072e3590f..f117c8b0dd 100644 --- a/scripts/check-blocking-calls-budget.json +++ b/scripts/check-blocking-calls-budget.json @@ -451,6 +451,9 @@ "crates/tui/src/tui/ui/provider_setup.rs": { "std_fs": 2 }, + "crates/tui/src/tui/ui/terminal_input.rs": { + "thread_sleep": 1 + }, "crates/tui/src/tui/ui/tests.rs": { "std_fs": 3, "thread_sleep": 1