Skip to content

LBA REQ 041

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

LBA-REQ-041: Capability-aware distributed task routing

Status

Proven

Area

Deployment / distributed execution (ADR-0029; extends ADR-0028)

Statement

The system shall route each distributed task only to an instance advertising the capability the task requires, so a fail-closed gate proves every task ran on a capability-matching instance.

Rationale

The distributed executor (ADR-0028) is heterogeneous, but LabVIEW lives only on capable instances (this host and, later, LabVIEW VMs) — a VI task sent to a node-only codespace would simply fail. Capability-aware routing sends each task only where it can run: LabVIEW work to LabVIEW-capable instances, non-LabVIEW parts to codespaces, so the fleet does real cross-plane work correctly (ADR-0029, operator directive).

Acceptance Criteria

  • Instances advertise capabilities (host: labview iff LabVIEWCLI present + node; codespace: node); tasks declare required capabilities.
  • routeByCapability capacity-weight-splits each capability group across only the advertising instances, and throws if a required capability is unsatisfiable.
  • validateRouting fails closed unless every task ran on a capability-matching instance, the re-route from the recorded capabilities + weights reproduces the shards, they are disjoint + cover every task + distinct-instance + ripgrep-only
    • all passed.
  • Live evidence: a real LabVIEWCLI RunVI activation probe routed to the host while 43 node self-tests spread across the host + two codespaces, all passed; the receipt replays offline in CI.

Verification

Historical statement (no longer implemented)

Supersession

Change Guidance

The router experiments/parallel/capabilityRouter.mjs + runCapabilityRouted.mjs and the self-test are gated by capability-aware-routing in verify-local-gates and mapped in the RTM. Authored under the singular-requirement directive (one shall).

TestID

T-041

CodeRef

experiments/parallel/capabilityRouter.mjs; experiments/parallel/runCapabilityRouted.mjs; experiments/parallel/verify-capability-routing.selftest.mjs; experiments/parallel/fixtures/capability-routed-receipt.json; experiments/verify-local-gates.mjs

RTM Status

Proven

Clone this wiki locally