fix(tooling): add ADCP_TIMEOUT_SCALE to with-timeout budgets - #7105
Merged
Conversation
Hook budgets are calibrated for an otherwise-idle machine. On a host running many parallel agent workspaces the same suites take several times longer, and a killed-at-budget run is indistinguishable from a hang — in one case the timeout masked a genuine test failure across two retries. ADCP_TIMEOUT_SCALE stretches every with-timeout budget by one factor without touching call sites, preserving the calibrated ratios between stages; it never weakens what runs. Invalid or sub-1 values are ignored with a warning so a typo cannot silently shrink a budget. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Single-file tooling change to scripts/with-timeout.sh adding an opt-in ADCP_TIMEOUT_SCALE. Input validation is fail-safe (invalid/sub-1 values warn and preserve the original budget), the scaled budget stays an integer via the awk ceiling, and only the kill deadline moves — happy path unchanged. Not protocol surface (static/schemas/source/**, docs/reference/**, dist/**, task defs), so no changeset is required. No high-risk paths, no gated paths, and no no-auto-approve team match.
No Critical/High/Medium findings. Rows 1–8 do not fire; falls through to row 9.
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.
What
ADCP_TIMEOUT_SCALEstretches everyscripts/with-timeout.shbudget by one factor (e.g.ADCP_TIMEOUT_SCALE=3 git commit ...) without touching call sites, preserving the calibrated ratios between hook stages. Invalid or sub-1 values are ignored with a warning so a typo cannot silently shrink a budget. It never weakens what runs — only the kill deadline moves.Why
Hook budgets are calibrated for an otherwise-idle machine. On a host running many parallel agent workspaces the same suites take several times longer: during the #7079 cycle the 600s precommit server-unit stage timed out five times purely from machine load (load average 30–120), and once the timeout masked a genuine test failure across two retries — a killed-at-budget run is indistinguishable from a hang.
Testing
Behavioral checks: unscaled budget still kills (
1svssleep 3→ 143 + marker);ADCP_TIMEOUT_SCALE=5stretches it (exit 0);bogusand0.5are warned and ignored. This PR's own commit ran the full precommit hook underADCP_TIMEOUT_SCALE=4.No changeset: tooling-only, no protocol surface.
🤖 Generated with Claude Code