Extract a shared Docker, NVX, and Cloud Hypervisor conformance suite

Open
#10,341 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, github-actions, typescript

Research direction

Start with scripts/ci/cloud-hypervisor-enclave-live-smoke.js and its test, then read docs/enclaves-architecture.md#cross-backend-workload-contract and its verification table. Compare the existing harness with src/enclave/host-executor-protocol.test.ts and src/cloud-hypervisor/enclave-network.integration.test.ts to identify reusable scenarios and backend-specific adapter work. Done means shared scenarios and assertions cover the stated matrix, run in root Jest without KVM, and report capability, evidence, and cleanup status without counting gated or unsupported cases as passes.

Written by the indexing model from the issue text.

Description

Goal

Catch cross-backend regressions with one set of workload scenarios and behavioral assertions, rather than three independently maintained smoke suites. Part of #10335, step 5.

Scope

  • Treat #10347's merged cross-backend contract as the scenario/evidence baseline and #10342's extracted core as implemented infrastructure, not a certificate of backend parity.
  • Extract reusable scenarios, fixtures, probes, and output validation from the Cloud Hypervisor live smoke harness.
  • Keep artifact provisioning, workload fault injection, runtime identity inspection, and residue inspection in backend-specific harness adapters.
  • Exercise Docker, NVX, and Cloud Hypervisor across primary-only, primary + script-only, primary + agent-only, and primary + both combinations. Script-only/agent-only mean only that enclave role is enabled alongside the primary, not standalone enclave CLI modes. Keep direct trusted-host seam tests distinct from the full CLI path.
  • Cover success, malformed/oversized/schema-invalid results, shared disclosure/invocation/tool/model budgets, guest identity, denied paths, immutable seeds, and allowed/denied network routes.
  • Cover storage exhaustion, sparse files/concurrent writers, memory/PID bounds, timeout, cancellation, shutdown races, broker loss, workload/VMM crash, AWF termination/restart, and orphan cleanup.
  • Run synthetic private-output sentinels through stdout, audit, diagnostics, and artifact capture checks.
  • Exercise the complete primary → compiler-owned mcpg → broker → enclave → bounded-result path, not only direct backend invocations.
  • Use deterministic provider fixtures for routine tests and separately authorized real-provider acceptance.
  • Retain backend-specific confinement/provenance tests; shared functional scenarios do not replace them.
  • Encode the contract's implemented/gated/unsupported/unverified matrix separately from scenario outcomes. NVX enclave rejection, Cloud Hypervisor named public-fixture/conformance predicates, private-repository VM non-acceptance, custom-image/engine restrictions and static/dynamic GitHub differences must be explicit negative or gated cases until separately accepted.
  • Pin the warning-emitting Cloud Hypervisor primary-only CloudHypervisorUnsupportedHostError fallback and resolved Docker backend. Enclave runs, NVX, artifact-trust failures and other launch failures must not fall back; a Docker fallback cannot count as passing a Cloud Hypervisor scenario.
  • Pin existing accounting precisely: shared per-repository disclosure ledger; executor-local response/admission counters including rejections; run-wide attempted tool-call cap and explicit exhaustion message; best-effort tool-call persistence with failed-write/unreadable/corrupt-state restart cases. Disclosure/executor balances are in-memory; do not assert fail-closed durability without an implementation and reviewed behavior change. Transport retries must retain digest-bound invocation/settlement identity, not create fresh unaccounted executions.
  • Parameterize intentional resource/path differences rather than imposing VM defaults on Docker: configurable Docker limits and host workspace paths versus fixed VM enclave policies and /workspace mapping. Probe all writable exports, allocated blocks, simultaneous/sparse writers, and separately bounded host-only artifact/image state; Docker aggregate-output acceptance remains a gap until demonstrated.

Starting points

  • /home/runner/work/gh-aw-firewall/gh-aw-firewall/scripts/ci/cloud-hypervisor-enclave-live-smoke.js
  • /home/runner/work/gh-aw-firewall/gh-aw-firewall/scripts/ci/cloud-hypervisor-enclave-live-smoke.test.ts
  • /home/runner/work/gh-aw-firewall/gh-aw-firewall/src/enclave/host-executor-protocol.test.ts
  • /home/runner/work/gh-aw-firewall/gh-aw-firewall/src/cloud-hypervisor/enclave-network.integration.test.ts

Acceptance criteria

  • Scenario definitions and invariant assertions are shared across all three backends; only operational adapters differ.
  • Harness regression tests run through the existing root Jest setup without KVM.
  • Reports identify backend, workload combination, scenario, outcome, and cleanup status using a common format.
  • Missing prerequisites and unsupported capabilities are explicit and cannot be counted as passed validation.
  • Intentional fixture perturbations demonstrate that network, storage, cleanup, and output-leak assertions actually detect regressions.
  • All supported matrix cells have real-backend evidence; deterministic mocks are labeled distinctly from live acceptance.
  • Each report records the actual workload backend, role/combination, host and artifact identity, applicable acceptance gate, capability status, evidence kind and cleanup outcome; fallback, unsupported, missing-prerequisite and unverified results cannot masquerade as passed target-backend evidence.
  • Accounting persistence faults, retry identity, backend-specific limits and the primary-only fallback exception have regression scenarios; known baseline gaps remain explicit rather than silently strengthening or overstating guarantees.

Dependencies

The contract (#10339 via #10347) and shared-core extraction (#10336 via #10342) are merged. Begin extraction now against docs/enclaves-architecture.md#cross-backend-workload-contract and its verification table; supply migration gates for #10340 and #10337 as adapters become available. Do not wait for either migration to begin the harness, and do not promote gated/unsupported cells merely to make a matrix green. Complete target parity only with separately accepted real-backend evidence.

Dominant language
TypeScript
Stars
169
Forks
89
Avg merge
5h 18m
Merged PRs (30d)
450

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-aw-firewall

All issues in github/gh-aw-firewall

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.