Module: Polyrun::CLI::CiShardRunCommand
- Included in:
- Polyrun::CLI
- Defined in:
- lib/polyrun/cli/ci_shard_run_command.rb
Overview
One CI matrix job = one global shard (POLYRUN_SHARD_INDEX / POLYRUN_SHARD_TOTAL), not run-shards workers on a single host. Runs build-paths, plan for that shard, then exec of a user command with that shard’s paths appended (same argv pattern as run-shards after --).
With –shard-processes M (or partition.shard_processes / POLYRUN_SHARD_PROCESSES), fans out M OS processes on this host, each running a subset of this shard’s paths (NxM: N matrix jobs × M processes). Child processes get local POLYRUN_SHARD_INDEX / POLYRUN_SHARD_TOTAL (0..M-1, M); when N > 1, also POLYRUN_SHARD_MATRIX_INDEX / POLYRUN_SHARD_MATRIX_TOTAL for unique coverage fragments.
After --, prefer **multiple argv tokens** (bundle, exec, rspec, …). A single token that contains spaces is split with Shellwords (not a full shell); exotic quoting differs from sh -c.