Member Junction
    Preparing search index...
    • Partition an ordered list of tests across shard.total shards using deterministic Longest Processing Time (LPT) greedy load balancing, and return the tests for shard.index (1-based) in their original sequence order.

      Key invariants:

      1. Disjoint & complete partition: Every test in tests is assigned to exactly one shard in 1..shard.total.
      2. Order preservation: Within each shard, assigned tests are sorted back into their original index order from tests, preserving all sequence invariants (including server-before-client).
      3. Companion co-location: Linked bundle pairs (CO_LOCATED_BUNDLE_PAIRS, e.g. realtime-session-guard + realtime-session-verification) are always placed in the same shard.
      4. Uniform fallback: When all tests have equal weight, tie-breaking by bucket item count and bucket index produces exact round-robin (i % total === index - 1) assignment.

      Type Parameters

      Parameters

      Returns T[]