Skip to content

Split Cloud Hypervisor host executor tests by responsibility - #11546

Merged
lpcox merged 2 commits into
mainfrom
copilot/refactor-split-host-enclave-executor-tests
Nov 13, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/refactor-split-host-enclave-executor-tests

Conversation

Copilot AI commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The 2,009-line executor suite mixed four responsibilities, with eight backend scenarios sharing a 1,236-line callback that obscured failures.

  • Focused suites: Separate credential boundaries, staging/deadlines, artifact trust, and result validation. Retain two factory tests at the original path to preserve diagnostic references.
  • Shared fixtures: Extract scratch-directory, fake-manager, and timer setup into *.test-utils.ts; give recovery and cleanup scenarios independent test names.
  • Preserved behavior: Retain existing assertions, scenario combinations, token-rejection coverage, and descriptor-safe filesystem checks. No production changes.
  • Integration: Add the new suites to CI selectors, support dotted filenames in selector parsing, and update the bounded-output documentation reference.

Copilot AI changed the title [WIP] Refactor to split host enclave executor test into focused files Split Cloud Hypervisor host executor tests by responsibility Nov 13, 2026
Copilot AI requested a review from lpcox November 13, 2026 15:50
@lpcox
lpcox marked this pull request as ready for review November 13, 2026 15:53
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 15:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad refactor spans shared fixtures, fake timers, lifecycle and cleanup paths, broker scenarios, and CI selectors, so runtime execution and human review are needed to confirm ordering, isolation, and behavioral parity.

No open issues 🎉

What changed in this PR

This PR refactors the Cloud Hypervisor host executor tests into focused suites without changing production code. Shared fixtures and scenario definitions reduce duplication while CI selectors and documentation are updated for the new test paths.

Changes:

  • Split credential boundaries, staging/lifecycle behavior, artifact preflight, and result validation into separate test files.
  • Extract scratch-directory, backend fixture, scenario, and timer setup into shared test utilities.
  • Update CI test selectors, dotted filename parsing, and the bounded-output ADR reference.
File Description
src/​cloud-hypervisor/​host-enclave-executor.test.ts Retains the two executor-factory tests at their original path and uses shared setup.
src/​cloud-hypervisor/​host-enclave-executor.test-utils.ts Provides shared scenarios, scratch-directory helpers, backend fixtures, cleanup logic, and timer handling.
src/​cloud-hypervisor/​host-enclave-executor.staging.test.ts Covers staging, deadlines, lifecycle, recovery, diagnostics, and cleanup scenarios.
src/​cloud-hypervisor/​host-enclave-executor.result-validation.test.ts Covers bounded, canonical, schema-validated result handling.
src/​cloud-hypervisor/​host-enclave-executor.preflight.test.ts Contains artifact verification, attestation, provenance, and trust tests.
src/​cloud-hypervisor/​host-enclave-executor.bounded-result.test.ts Isolates credential and model-budget boundary tests.
scripts/​ci/​test-cloud-hypervisor-enclave-workflow.test.ts Supports dotted test filenames and verifies the expanded selector list.
docs/​adr/​0002-cloud-hypervisor-enclave-executor.md Points bounded-output documentation to the result-validation suite.
.github/​workflows/​test-cloud-hypervisor-enclaves.yml Adds the focused suites to deterministic CI execution.

Review effort: Lite (dynamic)

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-11546 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 09361f3

@lpcox
lpcox merged commit 9e8c2e8 into main Nov 13, 2026
49 of 54 checks passed
@lpcox
lpcox deleted the copilot/refactor-split-host-enclave-executor-tests branch November 13, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactoring] Split src/cloud-hypervisor/host-enclave-executor.test.ts into focused test files

3 participants