Skip to content

feat: add same-runtime async concurrency - #44

Merged
fazzatti merged 1 commit into
devfrom
feat/async-concurrency
Oct 12, 2026
Merged

fazzatti merged 1 commit into
devfrom
feat/async-concurrency

Conversation

@fazzatti

@fazzatti fazzatti commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Convee can now compose existing async functions, steps and pipelines with bounded concurrency in the same JavaScript runtime. concurrent() returns a native callable step, preserving closures, class instances, original task errors and normal plugin/context behavior. This additive API prepares version 2.4.0.

  • Typed lazy jobs, nested split/join results and shared global/per-task limits across overlapping invocations. Atomic maxPending admission counts running and queued tasks.
  • Default all drains every task and its finalizers before rethrowing the first original error in split order; collect supplies ordered outcomes. No automatic retries.
  • Per-run signals and optional deadlines stop queued work, signal cooperative operations and retain capacity until running work actually finishes. An already-running split/join is also awaited. No worker modules or close lifecycle.
  • README usage examples and substantive public TSDoc; branded descriptor types, compiler contracts, lifecycle regressions, a 192-job overlapping-call model and GC retention checks. Isolated consumers cover the existing Deno/Node/Bun/browser matrix.

CI 38193807619 passes all 13 jobs at 8dfeef8. The downloaded quality artifact confirms exactly 3,682/3,682 lines, 1,479/1,479 branches and 323/323 instrumented functions, covering all 48 executable production modules. Codecov's processed report confirms 100.00% project coverage and all modified coverable lines covered against dev 76683be.

Validation includes 56 groups / 1,012 BDD steps, compiler contracts, README examples, architecture, type depth, isolated package consumption, JSR dry run, 60,000 seeded property cases and 74/74 detected mutations. The full runtime matrix passes: Deno 2.6.0/2.9.6, Node 22.12.0/24.1.0, Bun 1.4.3, and Chromium/Firefox/WebKit in both Vite development and production. Browser artifacts explicitly verify foreign-realm AbortSignals and no workers created by local concurrency. GC checks retain the reusable definition while confirming completed inputs are collectible. Existing Rust/ABI rebuild checks also pass.

No production source was excluded and no coverage or verification threshold was lowered.

Colibri integration is intentionally deferred until this API is live, followed by its separate worker-per-channel redesign. This PR changes no Colibri source and does not claim CPU parallelism or measured speedups.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (76683be) to head (8dfeef8).

Additional details and impacted files
@@            Coverage Diff             @@
##               dev       #44    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           42        48     +6     
  Lines         3334      3682   +348     
  Branches       639       712    +73     
==========================================
+ Hits          3334      3682   +348     
Files with missing lines Coverage Δ
src/concurrency/concurrent.ts 100.00% <100.00%> (ø)
src/concurrency/config.ts 100.00% <100.00%> (ø)
src/concurrency/error.ts 100.00% <100.00%> (ø)
src/concurrency/index.ts 100.00% <100.00%> (ø)
src/concurrency/jobs.ts 100.00% <100.00%> (ø)
src/concurrency/scheduler.ts 100.00% <100.00%> (ø)
src/index.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fazzatti
fazzatti merged commit b86d860 into dev Oct 12, 2026
13 checks passed
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.

2 participants