Skip to content

LBA REQ 040

github-actions[bot] edited this page Nov 19, 2026 · 2 revisions

LBA-REQ-040: Distributed capacity-weighted parallel workload

Status

Proven

Area

Deployment / distributed execution (ADR-0028; docs/roadmap.md North Star mesh)

Statement

The system shall distribute an independent-task workload across a budget-capped pool of ripgrep-only instances proportional to each instance's capacity, so a fail-closed gate proves the shards ran disjointly on distinct instances with every task passing.

Rationale

The North Star is on-demand distributed benchmark runs across planes with no central aggregation (docs/roadmap.md). A capacity-weighted executor that dynamically discovers a budget-capped pool (this host + codespaces + local VMs), splits the workload proportionally, and runs the shards concurrently — every instance searching with ripgrep only — is the first distributed-execution primitive and spreads load off the host, the only instance with LabVIEW (ADR-0028). Deliberately not two-instance-specific: N heterogeneous instances.

Acceptance Criteria

  • discoverPool enumerates the host (always) + labview-benchmark-actor codespaces + running VMs up to a conservative budget (default host + 2 remote), concurrency = pool size; stopped instances may be resumed up to the cap.
  • capacityWeightedPartition splits the task list proportional to static per-type weights (host fastest); the split is deterministic given the weights.
  • Per-type SSH adapters (local / gh codespace ssh / vagrant ssh) run the shards concurrently; every instance attests ripgrep-only search.
  • validateReceipt fails closed unless the capacity split re-derived from the recorded weights reproduces the disjoint shards, the instances are distinct, all searched with ripgrep, and every task passed.
  • Live evidence: 42 self-tests split host 25 / codespace 9 / codespace 8 across three instances, all passed concurrently; the receipt replays offline in CI.

Verification

Historical statement (no longer implemented)

Supersession

Change Guidance

The executor experiments/parallel/parallelWorkload.mjs + runParallel.mjs and the self-test are gated by distributed-parallel-workload in verify-local-gates and mapped in the RTM. Authored under the singular-requirement directive (one shall).

TestID

T-040

CodeRef

experiments/parallel/parallelWorkload.mjs; experiments/parallel/runParallel.mjs; experiments/parallel/verify-parallel-workload.selftest.mjs; experiments/parallel/fixtures/parallel-workload-receipt.json; experiments/verify-local-gates.mjs

RTM Status

Proven

Clone this wiki locally