Skip to content

fix(skills): bound skill and plugin install HTTP requests - #6851

Merged
Hmbown merged 1 commit into
codewhale-hq:mainfrom
asto18089:upstream/install-timeouts
Oct 5, 2026
Merged

Hmbown merged 1 commit into
codewhale-hq:mainfrom
asto18089:upstream/install-timeouts

Conversation

@asto18089

Copy link
Copy Markdown
Contributor

Summary

The shared platform HTTP builder sets no timeouts, and the skill installer's client inherited none: a connection that opened but stalled (dead proxy, black-holed route) hung skill installs, plugin installs (both go through skills::install::fetch_tarball), and registry sync forever.

Bound the installer client with a 10s connect timeout and a 600s total budget — enough for the 5 MiB per-skill cap on slow links while registry sync fans out SYNC_REGISTRY_CONCURRENCY (8) downloads. A regression test drives fetch_registry against an accept-and-stall server and requires a timeout error instead of a hang; it runs with shortened test-only bounds (cfg!(test)), so it pins the mechanism, not the production values.

Testing

  • cargo test -p codewhale-tui --lib skills::install — stalled-registry test converts the hang into a timeout error (fails without the fix: the outer 30s test bound panics first)
  • cargo clippy -p codewhale-tui --all-targets --all-features --locked

Disclosures: the production 10s/600s numbers themselves are not test-pinned (the behavioral test uses the test shim); an accidental 600→60 change would not be caught. The MCP registry's own client is already bounded and untouched.

Adapted from the Pinvou fork's timeout audit (Pinvou/CodeWhale d349f2537).

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • No CHANGELOG.md changes

The shared platform HTTP client builder sets no timeouts, and the
skill installer's client inherited none: a connection that opened but
stalled (dead proxy, black-holed route) hung skill and plugin installs
and registry sync forever. Plugin installs reuse the skill installer's
fetch_tarball machinery, so one client serves both surfaces.

Bound the installer client with a tight 10s connect timeout and a
generous 600s total request budget — enough for 5 MiB tarballs on slow
links while registry sync fans out SYNC_REGISTRY_CONCURRENCY downloads
in parallel. A stalled-server regression test pins the bound: the
registry fetch must end in a timeout error instead of hanging.

Signed-off-by: asto <asto18089@126.com>
@asto18089
asto18089 requested a review from Hmbown as a code owner October 5, 2026 11:51
@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 5, 2026
@Hmbown
Hmbown merged commit ad47f69 into codewhale-hq:main Oct 5, 2026
1 check passed
@Hmbown Hmbown added this to the v0.10.1 milestone Oct 5, 2026
Hmbown pushed a commit that referenced this pull request Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants