Repository navigation
Gate NVX commands on selected-harness observations - #11093
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The probe transport allows unbounded guest writes to host storage, and failure cleanup with --keep-containers can leave launched guests running.
8 open issues
Unbounded writable probe share can exhaust runner storage · New Keep-containers cleanup leaks guests when admission or release fails · New Workspace-local TMPDIR creates overlapping observation shares · New Readiness timeout includes startup and can abort valid runs · New Detached probe descendants survive process-group cleanup · New Missing Bash is misreported as a missing harness binary · New Abort leaves probe and watchdog processes running · New Production lifecycle changes exceed the issue's testing-only scope · New
What changed in this PR
Adds selected-harness observations to NVX’s one-shot runtime, connecting guest version probes to AWF’s shared eligibility checks before the user command runs.
Changes:
- Introduces same-guest probing and host-controlled command release through private shares.
- Adds deterministic observation, admission and lifecycle coverage, plus a provider-free live-evidence mode.
- Documents the design and explicitly records live acceptance as blocked by missing prerequisites.
| File | Description |
|---|---|
src/nvx/runtime-backend.ts |
Integrates probing and release into a single NVX execution. |
src/nvx/runtime-backend.test.ts |
Adds shell fixtures for context, bounds, admission and lifecycle behavior. |
src/nvx/harness-observation.ts |
Implements bounded probes and private probe/release shares. |
src/harness-observation.ts |
Initializes NVX observations as pending. |
src/harness-observation.test.ts |
Extends shared evidence and eligibility coverage to NVX. |
src/external-runtime-backend.ts |
Adds an optional release hook and clarifies probe lifecycle. |
src/commands/validators/api-proxy-validator.ts |
Defers NVX harness eligibility checks to runtime evidence. |
src/commands/main-action.ts |
Wires external-runtime release into the workflow. |
src/cli-workflow.ts |
Generalizes the release-hook comment beyond Docker; no behavior change. |
scripts/ci/nvx-manager-live-evidence.ts |
Adds provider-free harness acceptance mode and evidence recording. |
docs/INTEGRATION-TESTS.md |
Documents fixture coverage, live invocation and acceptance blockers. |
docs/adr/0004-model-information-management.md |
Describes NVX observation transport and remaining coverage limits. |
Review effort: Max (auto)
| { tag: 'harness-probe', hostPath: this.directory, guestTarget: GUEST_PROBE, mode: 'rw', | ||
| deniedPaths: [], allowedPaths: [], writablePaths: [] }, |
| await this.oneShotExecution?.catch(() => undefined); | ||
| } |
| constructor(private readonly context: HarnessContext) {} | ||
|
|
||
| async stage(uid: number, gid: number): Promise<readonly NvxLiveMount[]> { | ||
| this.root = await fs.mkdtemp(path.join(os.tmpdir(), 'awf-nvx-harness-')); |
| const deadline = Date.now() + READY_TIMEOUT_MS; | ||
| while (!this.closed && Date.now() < deadline) { |
| kill -TERM -- "-$probe" 2>/dev/null || : | ||
| if kill -0 -- "-$probe" 2>/dev/null; then | ||
| /bin/sleep 1 | ||
| kill -KILL -- "-$probe" 2>/dev/null || : |
| if /bin/bash --noprofile --norc -p -c ${quote(bounded)} >${GUEST_PROBE}/stdout 2>/dev/null; then | ||
| if [ -f ${GUEST_PROBE}/status ]; then IFS= read -r status <${GUEST_PROBE}/status; else status=126; fi | ||
| else | ||
| status=$? |
| child = execa('/bin/sh', ['-c', script], { | ||
| env: {}, extendEnv: false, reject: false, detached: true, | ||
| }); | ||
| const abort = () => { if (child?.pid) process.kill(-child.pid, 'SIGTERM'); }; |
| this.harnessObservation = new NvxHarnessObservation(harnessContext(this.config)); | ||
| // Start exactly one guest now, not a second version-only VM. Its command | ||
| // remains gated while the workflow publishes evidence and checks eligibility. | ||
| this.oneShotExecution = this.executeOnce(this.config.agentTimeout); |
|
@copilot address review feedback |
Reverted the NVX producer, transport, and admission changes to keep this within the current scope, restored the pre-existing manager/test paths, and documented the unsupported observation/live-acceptance boundary. Commit: |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit af2e887 |
|
@copilot merge main and resolve conflicts |
…-observations Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Merged |
Preserve daily security refreshes and local build-tools availability while caching PR image builds across hosted runners. Repair Grype database cache ownership before saving. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse daily GitHub Actions build layers across hosted runners while retaining exact local test images, security refreshes, failure reporting and cleanup. Stop selecting Azure mirrors based only on DNS in the agent image. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |


NVX’s one-shot lifecycle lacked selected-harness evidence, leaving applicable requirements unverified. This change probes the directly selected executable inside the same guest before releasing the user command.
Observation and admission
Lifecycle and coverage
Live acceptance boundary