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

Abierto
#10,341 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, github-actions, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
169
Forks
89
Merge medio
5 h 18 min
PR fusionados (30 d)
450

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/gh-aw-firewall

Todos los issues de github/gh-aw-firewall

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.