Skip to content

fix(tooling): add ADCP_TIMEOUT_SCALE to with-timeout budgets - #7105

Merged
bokelley merged 1 commit into
mainfrom
precommit-timeout-override
Sep 1, 2026
Merged

fix(tooling): add ADCP_TIMEOUT_SCALE to with-timeout budgets#7105
bokelley merged 1 commit into
mainfrom
precommit-timeout-override

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

What

ADCP_TIMEOUT_SCALE stretches every scripts/with-timeout.sh budget 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 (1s vs sleep 3 → 143 + marker); ADCP_TIMEOUT_SCALE=5 stretches it (exit 0); bogus and 0.5 are warned and ignored. This PR's own commit ran the full precommit hook under ADCP_TIMEOUT_SCALE=4.

No changeset: tooling-only, no protocol surface.

🤖 Generated with Claude Code

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>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bokelley
bokelley merged commit c44a814 into main Sep 1, 2026
30 checks passed
@bokelley
bokelley deleted the precommit-timeout-override branch September 1, 2026 02:22
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