Repository navigation
Conversation
Add provider-free compiled CLI/guest lifecycle fixtures and real sidecar eligibility/request/routing consumer checks behind the existing KVM gate. Keep portable evidence separate and live acceptance open pending an eligible run. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 20b2761 |
Verify label-triggered inference activation gates, dispatch-only enclave acceptance, and completion watchers stay isolated from cloud-hypervisor-kvm. Document provider-free versus CI provenance credentials and exact eligible-run prerequisites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.69% | 93.68% | ➡️ -0.01% |
| Statements | 92.22% | 92.22% | ➡️ +0.00% |
| Functions | 91.46% | 91.46% | ➡️ +0.00% |
| Branches | 86.45% | 86.44% | 📉 -0.01% |
📁 Per-file Coverage Changes (2 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-process.ts |
84.0% → 81.5% (-2.47%) | 76.8% → 74.7% (-2.11%) |
src/cloud-hypervisor/diagnostics.ts |
88.8% → 89.2% (+0.37%) | 87.5% → 87.8% (+0.35%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
There was a problem hiding this comment.
🟡 Changes recommended
Cancellation can resume the workflow after shutdown begins, triggering a fatal exit with code 1 instead of 143 and failing the final live case despite completed cleanup.
3 open issues
What changed in this PR
Adds provider-free acceptance coverage for selected-harness observations in Cloud Hypervisor primary guests, extending the existing model-eligibility validation path without changing production constraints. Live KVM acceptance remains pending; this PR does not close #11091 or #10294.
Changes:
- Adds Copilot, Claude and Codex fixtures plus 13 live cases covering guest context, admission, probe limits, cancellation and cleanup.
- Exercises published observations through real sidecar eligibility consumers and immutable request/routing pins.
- Integrates separate portable and live artifacts into the existing gated KVM workflow and documents the remaining acceptance gate.
| File | Description |
|---|---|
tests/fixtures/harness-observation/cloud-hypervisor/proxy-check.cjs |
Checks mounted reports, eligibility decisions and immutable consumer pins. |
tests/fixtures/harness-observation/cloud-hypervisor/preload.cjs |
Instruments the compiled lifecycle and supplies test-only requirements. |
tests/fixtures/harness-observation/cloud-hypervisor/executable.sh |
Provides deterministic harness versions and probe failure modes. |
src/cloud-hypervisor-runtime-backend.test.ts |
Adds probe-cancellation and cleanup regression coverage. |
scripts/ci/cloud-hypervisor-harness-observation.test.ts |
Validates portable fixtures, consumers and workflow wiring. |
scripts/ci/cloud-hypervisor-harness-observation.cjs |
Runs live guest cases and records sanitized provenance and cleanup evidence. |
docs/cloud-hypervisor-foundation.md |
Explains coverage, artifact separation and outstanding live acceptance. |
.github/workflows/test-cloud-hypervisor.yml |
Adds portable/live checks and separate artifacts to the gated KVM job. |
Review effort: Max (auto)
| const expectedExit = test.cancel ? 143 : test.blocked ? 1 : 23; | ||
| assert.equal(command.exitCode, expectedExit, 'unexpected CLI exit'); |
| assert(evidence.probeRequest, 'cancellation did not reach actual producer'); | ||
| result.cancelledDuringGuestProbe = true; |
|
@copilot address review feedback |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.75% | 93.74% | 📉 -0.01% |
| Statements | 92.30% | 92.29% | ➡️ -0.01% |
| Functions | 91.66% | 91.66% | ➡️ +0.00% |
| Branches | 86.51% | 86.50% | 📉 -0.01% |
📁 Per-file Coverage Changes (2 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-process.ts |
84.0% → 81.5% (-2.47%) | 76.8% → 74.7% (-2.11%) |
src/enclave/host-executor-server.ts |
91.2% → 91.2% (+0.00%) | 90.1% → 89.8% (-0.29%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
Addressed the review feedback in commit |
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
@copilot merge main and resolve conflicts |
Merged latest |
|
@copilot merge main and resolve conflicts |
Exercise compiled observation, applicable harness validation, report publication and proxy consumers through the preload lifecycle. Record expected blocked evidence before rethrowing the original error, while preserving unexpected failures and cancellation cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merged |
|
🚀 Security Guard has started processing this pull request |


Scope
Relates to #11091 and #10294. Does not close either issue. This is only the Cloud Hypervisor validation slice; NVX is separate and Docker/ARC-DinD live acceptance remains deferred.
Adds provider-free Copilot/Claude/Codex fixture executables and a runner for the real compiled CLI → host infrastructure → Cloud Hypervisor primary guest → observation publication → command lifecycle. The test-only preload observes/delegates the real manager channel and supplies applicable test-owned floors only around the ready-runtime validator. Production source, bundled harness constraints, feed rejection, policy/network/features/effort/known-limit controls, pricing non-admission and recovery/opt-outs are unchanged.
The 13 live cases cover direct absolute/relative guest selection, actual UID/GID/cwd/env/PATH and matching login-shell request semantics, compatible admission, incompatible/unverified blocking before command entry, explicitly unconstrained legacy admission, missing/malformed/failed/oversized/timed-out probes, exact 4096/4097-byte boundaries, cancellation during a guest-marked probe and residue-free cleanup. A separate process in the actual API sidecar consumes its real report mount through the real eligibility store, request pin and routing controller with deterministic test-owned catalogue/planner/classifier responses—not provider inference. Existing smoke partial-start rollback coverage remains separately identified.
Wires separate portable and live artifacts into the existing reviewed label/dispatch-gated
test-cloud-hypervisor.ymlKVM job. Artifact provenance, host eligibility and execution gates remain intact. Live evidence records checkout SHA, runner/kernel/Node/Docker, infrastructure image IDs, guest artifact source/versions/digests, sanitized reports, consumer pins and cleanup results. Raw probe output/errors and the credential sentinel are not uploaded.Corrected candidate and lifecycle regression
Current reviewed correction:
d8139cd87819f40904ad2c2279c8e21d4d5eb44f.The review-fix descendant of the original isolation audit moved an unconditional throw ahead of expected blocked-case evidence. This correction defers only the expected incompatible/unverified admission error until real proxy-consumer checks and blocked evidence complete, then rethrows the original error. Unexpected failures still propagate unchanged. Cancellation continuation, bounded/no-follow diagnostic reads, explicit report-file mode and CodeQL corrections are preserved.
Four new portable lifecycle cases exercise the actual compiled
observeHarness, applicable test-owned floor validation and report publication through the preload. Expected incompatible and unverified rejections must retain real proxy-consumer evidence and the original error; unexpected errors on both blocked and nonblocked cases must remain errors. Only the guest probe, Docker transport and root-owned file metadata are simulated. The incompatible/unverified cases failed before the correction and pass afterward; these are not live guest evidence.Label isolation audit
The workflow/gate files are unchanged from the audited
765c63d906844418f7e697ea0558b892b0c41c7ethrough this correction.cloud-hypervisor-kvmappears only in the primary integration workflow'slive-kvmjob. This is a provider-free lane, but not a harness-fixtures-only lane: it also runs the existing shell/network/security smoke with a fake OpenAI credential sentinel. It does not import provider secrets or invoke inference. The existing build still uses GitHub Actions OIDC/provenance, artifact and checkout credentials; provider-free does not mean no CI credentials or network.All label-triggered agentic inference jobs remain behind distinct exact event-label activation gates (
ready-for-awortest-cloud-hypervisor-*for the CH inference workflows). Credential-bearing enclave live acceptance is dispatch-only. No currentworkflow_runcompletion watcher includes the primary integration or enclave conformance workflow. Regression coverage checks full activation/dependency gate shapes and rejects broad completion wildcards, rather than only checking whether a label string is absent. No separate fixture lane is needed because the inherited CH gate does not bundle inference.Before any authorized run, recheck the exact head, workflow gates and PR labels. Unrelated existing opt-ins can activate their own jobs on a label/synchronize event and must remain absent. No labels have been applied and no workflow has been dispatched by this work. Previous approval named an older SHA; the corrected candidate requires confirmation before activation.
Portable validation
Local environment: macOS/Darwin arm64;
/dev/kvmabsent.d8139cd87819f40904ad2c2279c8e21d4d5eb44f: 273 tests passed (cloud-hypervisor-harness-observation,test-cloud-hypervisor-workflow, both root Cloud Hypervisor runtime suites,harness-observation,model-information-contract,model-information-eligibility).npm run build:bundle, bundled CLI--version(0.23.1) andnpm run models:checkpreviously passed at7c7db279afbaaa54a0337245b25882f004431b50; no production code or catalogue changed in these fixture corrections.Portable consumer tests explicitly redirect report paths and simulate file ownership in isolated child processes; they are not mounted-sidecar or KVM guest evidence. The live consumer uses neither redirect nor ownership stubbing.
Remaining acceptance gate
No live KVM guest acceptance has been established by this PR. An authorized run needs same-commit artifacts with the existing provenance/digest checks, a GitHub-hosted Ubuntu x86_64 runner with accessible KVM and cgroup v2, Docker and successful production host preflight. PR runs retain the existing explicit development-artifact opt-in; release-tag runs separately verify signer workflow and source/signer digests/ref. The new step and exact
cloud-hypervisor-harness-liveartifacts must pass review before #11091 can close. Earlier unrelated CH smoke, an artifact build, skipped jobs or the portable test pass are not substitutes. Actual runner/artifact failures remain blockers, not passes.No merges, provider inference, enclave attribution, NVX producer work, Docker/ARC-DinD acceptance, sbx support, compiler overlay changes, private launch ABI or new execution-security architecture.