Skip to content

builtins: add get-many concurrent HTTP fan-out#205

Merged
danieljohnmorris merged 1 commit into
mainfrom
fix/async-tool-dispatch
May 12, 2026
Merged

builtins: add get-many concurrent HTTP fan-out#205
danieljohnmorris merged 1 commit into
mainfrom
fix/async-tool-dispatch

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

Agent tools regularly need to fetch N URLs in parallel. Rate-limit windows on remote APIs make serial gets a bottleneck.

Implementation:

  • get-many urls fans out concurrent HTTP GETs
  • returns responses in input order
  • errors per URL returned in-line, not raised, so partial batches still produce output
  • backed by tokio with bounded semaphore (default 16) so 10k-URL lists do not blow the pool
  • opcode allocated: get-many

Tests: cross-engine regression tests + examples/get-many.ilo with -- run: directives.

@danieljohnmorris danieljohnmorris force-pushed the fix/async-tool-dispatch branch from ab90b62 to 9beb925 Compare May 12, 2026 22:56
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 52.05479% with 70 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/vm/mod.rs 32.07% 36 Missing ⚠️
src/interpreter/mod.rs 66.66% 18 Missing ⚠️
src/verify.rs 50.00% 9 Missing ⚠️
src/vm/compile_cranelift.rs 22.22% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danieljohnmorris danieljohnmorris force-pushed the fix/async-tool-dispatch branch from 9beb925 to 10123a6 Compare May 12, 2026 23:08
Agent tools regularly need to fetch N URLs in parallel - rate-limit
windows on remote APIs make serial gets a bottleneck. get-many urls
fans out concurrent HTTP GETs and returns the responses in input
order. Errors per URL are returned in-line, not raised, so partial
batches still produce useful output.

Opcode allocated: get-many. Backed by tokio with a bounded semaphore
(default 16) so a 10k-URL list does not blow the connection pool.
@danieljohnmorris danieljohnmorris force-pushed the fix/async-tool-dispatch branch from 10123a6 to afb9553 Compare May 12, 2026 23:12
@danieljohnmorris danieljohnmorris merged commit 0c896d0 into main May 12, 2026
4 checks passed
@danieljohnmorris danieljohnmorris deleted the fix/async-tool-dispatch branch May 12, 2026 23:16
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