Skip to content

fix(domain): make GatStreamingOrchestrator::process_concurrent_streams actually concurrent - #396

Merged
bug-ops merged 1 commit into
mainfrom
fix/393-gat-orchestrator-concurrency
Aug 17, 2026
Merged

fix(domain): make GatStreamingOrchestrator::process_concurrent_streams actually concurrent#396
bug-ops merged 1 commit into
mainfrom
fix/393-gat-orchestrator-concurrency

Conversation

@bug-ops

@bug-ops bug-ops commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • process_concurrent_streams (crates/pjs-core/src/domain/services/gat_orchestrator.rs) was documented and named as concurrent but awaited each stream one at a time in a sequential for loop; it now drives all streams via futures::future::try_join_all, still bounded by max_concurrent_streams.
  • futures is promoted from an optional, http-server-gated dependency to a required one, since this domain-layer module compiles unconditionally and must not depend on an HTTP-transport feature flag.
  • Documents that StreamingStats::processing_time now approximates the whole batch's elapsed time rather than an individual stream's share of it when driven concurrently.
  • Adds a timing-based regression test asserting real overlap in wall-clock time across streams (fails under the old sequential implementation, passes under the new concurrent one).

Closes #393

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo nextest run --workspace --all-features --lib --bins (1006/1006)
  • cargo check -p pjson-rs --no-default-features --features simd-auto (confirms futures is no longer feature-gated)
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace

@github-actions github-actions Bot added documentation Documentation updates, README, guides dependencies Dependency updates (Cargo.toml, Cargo.lock) core Changes to pjs-core crate rust Rust language specific changes labels Aug 17, 2026
@bug-ops
bug-ops enabled auto-merge (squash) August 17, 2026 21:18
@github-actions

Copy link
Copy Markdown

WASM Bundle Size Report

Target Raw (KB) Gzipped (KB) Status
web 158 70 PASS
nodejs 158 70 PASS
bundler 158 70 PASS

…s actually concurrent

process_concurrent_streams was documented and named as processing
streams concurrently via GAT futures, but awaited them one at a time
in a sequential for loop. stream_with_priority only borrows &self, so
nothing prevented real concurrency; it now uses
futures::future::try_join_all to drive every stream's future together,
still bounded by max_concurrent_streams.

futures is promoted from an optional, http-server-gated dependency to
a required one, since this domain-layer module compiles unconditionally
and must not depend on an HTTP-transport feature flag.

Documents that StreamingStats::processing_time now approximates the
whole batch's elapsed time rather than an individual stream's share of
it when driven concurrently, and adds a regression test asserting real
overlap in wall-clock time across streams.

Closes #393
@bug-ops
bug-ops force-pushed the fix/393-gat-orchestrator-concurrency branch from 230dc91 to ee836dd Compare August 17, 2026 21:22
@github-actions

Copy link
Copy Markdown

WASM Bundle Size Report

Target Raw (KB) Gzipped (KB) Status
web 158 70 PASS
nodejs 158 70 PASS
bundler 158 70 PASS

@bug-ops
bug-ops merged commit 46b8e26 into main Aug 17, 2026
54 checks passed
@bug-ops
bug-ops deleted the fix/393-gat-orchestrator-concurrency branch August 17, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to pjs-core crate dependencies Dependency updates (Cargo.toml, Cargo.lock) documentation Documentation updates, README, guides rust Rust language specific changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(domain): GatStreamingOrchestrator::process_concurrent_streams runs sequentially, not concurrently

1 participant