Skip to content

ci: enforce absolute fast-check request deadlines - #30822

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/fast-checks-runtime-deadline-fix
Nov 1, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/fast-checks-runtime-deadline-fix

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

The fast-checks runtime’s 180-second census bound now covers the complete HTTP operation, including response bodies and signed artifact downloads. Socket inactivity timeouts alone let a peer that drips bytes keep response.read() alive indefinitely. A scoped process alarm interrupts open, TLS, headers and body reads at the monotonic deadline, restores any prior alarm, and leaves clients without a deadline unchanged. No worker threads are created for timeout enforcement.

This is the fix-forward for the blocking audit of #30762 and keeps its strict ROUTE_TOKEN and separate SNAPSHOT_TOKEN behavior. It also covers the shared pr_runner_pool.GitHub client used by the approved runtime. #30724 overlaps only in the same client file for unrelated cmux-tui selector guards; this branch does not alter those selectors.

Observed / Not run

At 540050e3d9d2ee24da18184a497d06bec272f974, the fast-checks picker suite passes 13/13, including local HTTP drip-server regressions for API JSON and signed artifact bodies; both server and handler threads are stopped and joined. Full tests.test_ci_pr_runner_pool passed 243 tests before this final test-only addition; py_compile and git diff --check pass. The focused suite was run again at the final head.

Review audit: #30762 (merged 265c68a569ac4af557bdd5ad2e4b26365a453503); this change addresses the audit finding that socket timeouts did not establish an absolute body-read deadline.

Changelog

none

Agent session: agent session


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Enforces absolute wall-clock deadlines on fast-checks GitHub API and artifact download requests so a peer dripping bytes can no longer keep response.read() alive past the 180-second census bound.

  • Replaces socket inactivity timeouts alone with a scoped SIGALRM process alarm covering connect, TLS, headers, and body reads; restores any prior alarm and timer on exit.
  • Leaves clients without a deadline and non-main-thread callers on the legacy per-socket timeout path.
  • Adds HTTP drip-server regression tests for JSON API responses and signed artifact blob downloads; both handler and server threads are stopped and joined.

Written for commit 540050e. Summary will update on new commits.

View guided diff Turn on auto-fix

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@teamleaderleo
teamleaderleo merged commit 0207e2b into feat-cmux-next Nov 1, 2026
148 of 162 checks passed
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base bbb608c; does not block

Shipped in:

teamleaderleo added a commit that referenced this pull request Nov 4, 2026
…#34428)

Run 41718897738's admit step spent 182 s polling for an idle fleet runner (helper ecc5d60, #30648). 159a701
(#34270) decides on one census read: an online fleet runner keeps the fleet label (the lane-gh broker bounds a
checks job left queued there at 180 s), none overflows at once. The pin also carries #30762, #30822, #31896 and
#33652, each already reviewed and merged on feat-cmux-next.


Agent-Session: https://cmux.com/deeplink/agent?id=aid-342ae944382c55b76f4c

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 540050e3 Deployed Nov 1, 2026 by teamleaderleo via wait for same-key tree publisher #95929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant