Skip to content

Architecture Packet Part 1

github-actions[bot] edited this page Nov 23, 2026 · 3 revisions

labview-benchmark-actor — Architecture Description (part 1 of 6)

Standards baseline: repo-standards-review v0.15.0. Architecture description follows ISO/IEC/IEEE 42010 (stakeholders, concerns, viewpoints, views, architecture decisions). It covers the original plan and the capabilities since delivered, each traced to its requirements in the RTM.

1. Stakeholders and concerns (42010 §5.3)

Stakeholder Concern
Benchmark operator Run benchmarks and review metric+picture evidence together over time
Extension maintainer Clean extraction boundary from vi-history-suite; reproducible builds
Golden-VM / infra owner Reproducible multi-VM provisioning; safe, offline coordination
Standards reviewer Requirements→architecture→test traceability, enforced as a fail-closed 42010 correspondence graph; stamped baseline
Distributed-CI / cleanroom actor Delegate uplift to a capability-matched AI provider over the bus; gate each outcome deterministically
Release manager Bidirectional WIN↔LINUX sign-off before any shared-component publish; GitFlow governance on the release path

2. Context view

labview-benchmark-actor is extracted from vi-history-suite (LBA-REQ-001) and installed on a Codespace or Vagrant golden VM (LBA-REQ-002). It runs benchmarks via its agentic actor (LBA-REQ-003), presents them in a time-cursor viewer (LBA-REQ-004/005), and coordinates across multiple VMs over a TCP/UDP bus (LBA-REQ-006/007) instead of a GitHub Discussion. The bus carries inter-actor communication only; run data (metrics + pictures) stays VM-local in mprr's ring buffer (LBA-REQ-009). Agents review only their own previous runs; the operator concentrates runs to the host for an ollama comparison layer (LBA-REQ-010).

The context diagram below places the actor in its operational environment (the Vagrant VMs / Codespace, the coordination bus, and the operator host):

flowchart LR
  subgraph VM1[Vagrant VM 1 / Codespace]
    A1[Agentic actor] --> R1[(mprr ring buffer:\nmetrics + pictures, VM-local)]
    R1 --> V1[Time-cursor viewer: own runs]
  end
  subgraph VM2[Vagrant VM 2]
    A2[Agentic actor] --> R2[(mprr ring buffer, VM-local)]
    R2 --> V2[Time-cursor viewer: own runs]
  end
  A1 <-->|TCP: claim/handoff/ack/done| BUS((TCP+UDP bus:\ninter-actor comms only))
  A2 <-->|TCP: claim/handoff/ack/done| BUS
  A1 -. UDP presence .- BUS
  A2 -. UDP presence .- BUS
  R1 -. out-of-band concentration .-> H[Operator host:\nollama comparison]
  R2 -. out-of-band concentration .-> H
Loading

3. Viewpoints and views (42010 §5.5–5.6)

The subsections below realize the four standard architecture views (the C4 / 42010 convention): the context view is the §2 context diagram (the system in its environment); the container view is §3.1 (packaging) plus §3.2 (deployment) — the deployable .vsix, the VM-local mprr ring-buffer store, and the coordination bus as the runtime containers; the component view is §3.3–§3.5 — the actor / run-result, viewer, and coordination-transport components inside those containers; and the deployment view is §3.2 — the multi-VM / Codespace topology.

3.1 Packaging / boundary view — addresses LBA-REQ-001, LBA-REQ-008, LBA-REQ-085, LBA-REQ-086, LBA-REQ-093

  • The extension is a self-contained .vsix. Reused vi-history-suite logic is vendored or a pinned published dependency — never a relative path.
  • A moved-module manifest records the extraction so the origin can be retired.
  • The packaged .vsix is byte-reproducible (ADR-0066): a post-package normalizer pins every zip entry timestamp to 1980-01-01 so repackaging the same committed source yields a byte-identical artifact, so the reviewed vsixSha256 can equal the shipped one.
  • It is byte-reproducible ACROSS planes too (ADR-0067): the normalizer also pins entry mode + version-made-by, and .gitattributes + tsconfig newLine: lf force LF content, so a Windows build and a Linux build of the same commit are byte-identical — proven by a dual-OS (ubuntu+windows) CI build+compare.
  • The Node.js version that packages the .vsix is pinned exactly (issue #408): a repo-root .nvmrc (24.19.0) is sourced by every release-path workflow via node-version-file: .nvmrc, because the packaged bytes are reproducible only within an exact Node version (a Node minor can perturb them), so the reviewed (local) build and the CI publish build resolve the same Node and cannot drift — gated by release-path-node-pinned (LBA-REQ-093).
  • One artifact, two install targets (Codespace, Vagrant golden VM).
  • A declarative topology spawns N VMs, each activating the extension with a unique participant identity; teardown is clean.
  • Personal golden-VM onboarding (LBA-REQ-033): a one-command lba init provisions a from-scratch Ubuntu 24.04 (Noble) VM, installs LabVIEW 2026 Community Edition + VIPM from the NI apt repo, has the member activate interactively, then confirms activation with a headless probe VI (LabVIEWCLI) and mints a local personal golden VM registered as a mesh actor (ADR-0023). LabVIEWCLI -Headless is the actor runtime.
  • Activation confirmation, delivered (LBA-REQ-038): the confirmation step is realized first — a headless known-answer probe (LabVIEWCLI RunVI on the shipped AddTwoNumbers.vi) must return the expected sum for the install to count as activated. The result is a deterministic activation-receipt@1 whose digest covers only the verdict-bearing fields, so a committed real capture (LabVIEW 2026, 20 + 22 = 42) replays offline in CI and fails closed on any un-activated signal.
  • Mesh-actor registration, gated (LBA-REQ-039): the golden VM is enrolled in mesh-actors.csv only after its activation receipt confirms activation — an unactivated or tampered receipt is refused and the registry is left untouched, so confirmation and enrollment are one fail-closed chain (ADR-0023).
  • Distributed workload, delivered (LBA-REQ-040): the executor spreads an independent-task workload across a budget-capped, dynamically-discovered pool (this host + codespaces + local VMs) proportional to each instance's capacity, running disjoint shards concurrently — every instance searching with ripgrep only. Proven live across three instances; a fail-closed gate replays the receipt (ADR-0028), a step toward the North Star distributed benchmark mesh.
  • Capability-aware routing (LBA-REQ-041): each distributed task runs only on an instance advertising the capability it needs — a real LabVIEWCLI RunVI task is routed to the LabVIEW-capable host while node tasks spread across the pool. A fail-closed gate proves capability-correct placement (ADR-0029); the substrate for cross-plane distribution once a second LabVIEW instance joins.
  • Cross-plane LabVIEW liveness (LBA-REQ-042): the fleet has two independent, activated LabVIEW planes — this host and the Ubuntu golden VM — each proven live by running the known-answer activation probe concurrently. A fail-closed gate requires >= 2 activated planes (ADR-0030); the substrate for cross-plane benchmark comparison, and Phase 1 (ADR-0023) proven operational.
  • Cross-plane comparison, proven (LBA-REQ-043): the same VI Analyzer config run on both LabVIEW planes (host + golden VM) yields a byte-identical deterministic resultHash — objective, reproducible cross-plane benchmark equivalence, the North Star. A fail-closed gate requires the planes agree (ADR-0031, builds on LBA-REQ-015).
  • Provisioner installs LabVIEW + VIPM (LBA-REQ-044): the from-scratch Ubuntu golden-VM provisioner installs LabVIEW 2026 Community (NI apt repo, committed key) and VIPM (the JKI .deb), so the golden VM is complete. A fail-closed gate keeps both installs present (ADR-0023); proven live — VIPM 26.3.1 installed on the scratch VM from JKI.
  • Human-assisted VM bridge (LBA-REQ-045): a shared tmux session on the golden VM lets an automation agent drive the VM's interactive shell (send-keys/capture-pane over ssh) while a human attaches to type any password or token directly on the VM — credentials never transit the agent or the model. A fail-closed gate proves the bridge is secret-safe (ADR-0032); proven live — the agent detected a real password: prompt (exit 42) and handed off without answering.

3.3 Actor / run-result view — addresses LBA-REQ-003, LBA-REQ-009

  • The agentic actor drives a run and emits a schema-versioned run result: an ordered metric time-series and an ordered set of captured pictures, all on one run clock. This schema is the contract between actor and viewer.
  • Captured pictures are stored VM-locally in mprr's ring buffer (long-packet), indexed via short-packet; the run result carries frame refs into that local store, never image bytes (ADR-0005, LBA-REQ-009).

3.4 Viewer view — addresses LBA-REQ-004, LBA-REQ-005

  • A single selected-time value is the source of truth. The draggable vertical cursor writes it; the chart and the picture panel below read it.
  • Pictures are indexed by run-relative timestamp for O(log n) nearest-at-or- before resolution; the panel shows the indexed frame or an explicit "no frame" state.
  • The viewer operates over the actor's own previous runs (local mprr store); there is no cross-VM comparison (LBA-REQ-010, ADR-0006).

3.5 Coordination-transport view — addresses LBA-REQ-007

  • TCP carries reliable, ordered coordination (claim / handoff / ack / done / progress / note) preserving the GitHub-Discussion collab semantics (check-before-publish, one owner per hotspot).
  • UDP carries presence/liveness (and a coordination time reference); it is not used for run comparison, since runs are never compared across VMs (ADR-0006).
  • Messages are schema-versioned with sender id, timestamp, and session id; a late joiner reconstructs session state from the TCP log.
  • The bus carries inter-actor communication only (claim/handoff/ack/done/ note); it never carries run data, run/frame metadata, or images — the entire mprr ring buffer stays VM-local (ADR-0005, LBA-REQ-009).

3.6 Analysis view — addresses LBA-REQ-010, LBA-REQ-011, LBA-REQ-014, LBA-REQ-015, LBA-REQ-032

  • Resource-usage correlation folds CPU/RAM/disk samples onto the benchmark frame timeline on a shared epoch-ms axis and, anchored on a trigger instant, computes a pre/post-trigger window (count, mean, min, max, delta) per metric — so a run's machine cost is readable against its own frames (LBA-REQ-011).
  • Mesh-stress performance-signature calibration extracts a per-actor signature (the repetitive + outlier features of the 42-counter series across repeated runs), fits a stress-ladder calibration curve (rung → expected value + tolerance band, scored monotone/separable/repeatable), and inverse-reads an observed signature to an inferred stress level (LBA-REQ-032).
  • Cross-plane comparison ingests the same mprr short-packet input on each plane (LINUX, WIN), stores a plane-local run, and compares a shared benchmarkId: the deterministic seriesHash MUST match across planes (substrate-independent correctness); the per-plane screenshot hash is a visual witness (LBA-REQ-014).
  • A VI Analyzer run over the repo VIs is summarized into a deterministic, order-independent result (pass/fail/error counts + per-VI findings + a resultHash), making a static-analysis run a cross-plane-comparable benchmark (LBA-REQ-015).

3.7 Agentic-infrastructure view — addresses LBA-REQ-012, LBA-REQ-013, LBA-REQ-018, LBA-REQ-019, LBA-REQ-101, LBA-REQ-102

  • The lbabus binary embeds version-pinned agent base instructions and exposes them via lbabus agents (print / --out / --check), so every session on a given version shares byte-identical, hardenable base instructions (LBA-REQ-012).
  • The bus carries a priority tier (P0>P1>P2>P3) and an explicit addressee as additive flat-scalar fields that keep the Discussion-era collab-message schema, with --to-me / --min-priority reader filters, so triage never breaks older clients (LBA-REQ-013).
  • Uplift / documentation tasks are delegated to a capability-matched cleanroom AI provider over the bus; the provider seam is agnostic (ollama / copilot-cli / codex / mock), outcomes are gated deterministically, and a receipt is announced as an ADR-0003 DONE frame (LBA-REQ-018, ADR-0011).
  • The actor exposes its tools (host capabilities, benchmark series, bus poll / post) to a coding agent through a Model Context Protocol server (LBA-REQ-019, ADR-0012).
  • A standalone Node client exposes permitted tools from the same stdio server to a local Ollama chat model, without an editor or additional listener (LBA-REQ-019, ADR-0092).
  • The MCP server preserves those four core tools and exposes active capture as bounded, read-only pathless resources: opaque run identity, explicit lifecycle, ordered frame/sample metadata, and frame bytes only on a requested validated resource read (LBA-REQ-101, ADR-0084).

Generated from docs/architecture/overview.md on develop. Edit the source in the repository, not this page.

Clone this wiki locally