Repository navigation
Split Cloud Hypervisor diagnostics into focused modules - #11954
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 22, 2026 17:24
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The module split rewires privileged diagnostic persistence and public enclave redaction across Cloud Hypervisor and Docker, warranting further review of their trust-boundary interactions.
No open issues 🎉
What changed in this PR
Addresses #11945 by splitting AWF’s Cloud Hypervisor diagnostics into focused modules while preserving existing callers, public exports, and helper behavior.
Changes:
- Separates output capture, filesystem safety, artifact staging, socket readiness, and collection.
- Retains an explicit compatibility facade in
diagnostics.ts. - Adds regression checks for export identity, bounded capture, unsafe sources, and socket readiness.
| File | Description |
|---|---|
src/cloud-hypervisor/diagnostics.ts |
Replaces implementations with explicit re-exports. |
src/cloud-hypervisor/diagnostics.test.ts |
Checks facade exports and implementation identity. |
src/cloud-hypervisor/diagnostics-staging.ts |
Extracts artifact staging and evidence preservation. |
src/cloud-hypervisor/diagnostics-readiness.ts |
Extracts API socket readiness polling. |
src/cloud-hypervisor/diagnostics-readiness.test.ts |
Covers retries, deadlines, access errors, and launcher exits. |
src/cloud-hypervisor/diagnostics-paths.ts |
Groups directory validation and secure audit persistence. |
src/cloud-hypervisor/diagnostics-collect.ts |
Extracts collection orchestration and its context type. |
src/cloud-hypervisor/diagnostics-capture.ts |
Extracts bounded stream and file capture. |
src/cloud-hypervisor/diagnostics-capture.test.ts |
Covers capture limits, unsafe sources, and read errors. |
Review effort: Max (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
Contributor
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
✨ New Files (5 files)
Coverage comparison generated by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 661-line diagnostics module mixes output capture, filesystem trust-boundary checks, artifact staging, socket readiness, and collection.