Skip to content

LBA REQ 055

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

LBA-REQ-055: Handoff Beacon -- capture-status (human-in-the-loop signal)

Status

Proven

Area

Deployment / agentic (ADR-0035 -- the Handoff Beacon Protocol)

Statement

The system shall emit a machine-readable capture-status beacon for each LabVIEW-launch capture (capturing -> stopped/failed), so a fail-closed gate proves the rich stop payload (wroteToDisk, peak write throughput + its frame, per-disk breakdown) is correctly derived and an agent can await a human-in-the-loop step.

Rationale

The reviewer VM exists because some steps need a human -- run a VI, then click Stop. Those steps are invisible to the agent except through chat, so it guesses or re-asks. A capture-status beacon turns the human's Stop into an AWAITED, machine-observable event and carries a pointer straight to the evidence (the peak-write frame), so human assistance is leveraged efficiently. This is the first instance of the Handoff Beacon Protocol (ADR-0035).

Acceptance Criteria

  • buildCaptureStatus derives, from the capture's resource samples, wroteToDisk (a per-disk write rate above a threshold for a minimum number of samples), the peak write MB/s + the disk + the frame index where it peaked, and a per-physical-disk write/read peak breakdown; buildCapturingStatus / buildFailedStatus cover the other lifecycle states.
  • The extension writes capture-status.json into the run dir at capture START and STOP (or FAILED on assembly error), best-effort (never perturbing the capture).
  • Capture LabVIEW Launch records the current Windows graphical seat with ffmpeg gdigrab or the operator-visible Ubuntu desktop at 12 FPS. Xorg uses ffmpeg x11grab against the inherited active DISPLAY. Wayland keeps a persistent GJS/D-Bus client connected to GNOME Shell's native recorder, launches LabVIEW in the inherited visible session for operator interaction, finalizes the video on Stop, then extracts 12-FPS PNG frames before assembly. It resolves the LabVIEW 2026 Linux executable, samples CPU/RAM/disk activity from /proc, and labels the assembled record LINUX with source ffmpeg-x11grab or gnome-shell-screencast.
  • reviewer-workstation/await-handoff.sh runs the guest poll ONCE and blocks until the beacon resolves (stopped|failed) or a timeout, printing the resolved payload -- the one sanctioned poll in the agentic flow.
  • validateCaptureStatus fails closed on a wrong schema, an unknown state, or a stopped/ failed beacon missing its payload.
  • On STOP the Frame Correlator opens on the beacon's peak-write frame (derived via peakFrameIndexOf / readPeakFrameIndex, clamped into range by clampFrameIndex and carried into the correlator model by buildCorrelatorModel), so the human + agent land on the evidence rather than scrubbing from frame 0.

Verification

Historical statement (no longer implemented)

Supersession

Change Guidance

The experiments/handoff-beacon/ payload builder and src/capturePlatform.ts plus self-tests are gated by handoff-capture-status and ubuntu-native-labview-capture in verify-local-gates and mapped in the RTM; the builder is staged into media/ and loaded by src/extension.ts. The protocol extends (ADR-0035) with an agent->human request beacon, a keyless-signed reviewer verdict beacon, and a bus post; each ships as its own governed slice. Authored under the singular-requirement directive (one shall).

TestID

T-055

CodeRef

experiments/handoff-beacon/captureStatus.mjs; experiments/handoff-beacon/captureStatus.selftest.mjs; reviewer-workstation/await-handoff.sh; reviewer-workstation/await-handoff.ps1; src/capturePlatform.ts; src/extension.ts; test/capture-platform.mjs; test/extension-activation.mjs; experiments/verify-local-gates.mjs

RTM Status

Proven

Clone this wiki locally