Repository navigation
Split Cloud Hypervisor cleanup capture by resource type - #11906
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… type Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 21, 2026 16:38
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The cleanup-handle test does not verify commit-before-persist ordering because the failing capture reuses the stored identity and the persistence mock never checks the identities it observes.
1 open issue
What changed in this PR
Refactors Cloud Hypervisor’s durable cleanup handle into resource-specific modules, addressing #11901 while keeping shared persistence and completion in the factory.
Changes:
- Separates network, VMM account and ACL, and process/filesystem capture methods.
- Consolidates run-scoped network path validation while preserving the factory signature and validation order.
- Extends regression coverage for duplicate commits, unsafe paths, identity ordering, and persistence/completion failures.
| File | Description |
|---|---|
src/cloud-hypervisor/cleanup-handle.ts |
Composes resource handlers and retains timestamp, persistence, and completion logic. |
src/cloud-hypervisor/cleanup-handle.test.ts |
Adds focused record-commit and error-handling tests. |
src/cloud-hypervisor/cleanup-handle-vmm.ts |
Extracts VMM account, identity, and device ACL capture rules. |
src/cloud-hypervisor/cleanup-handle-process.ts |
Extracts process, directory, artifact snapshot, and virtiofsd capture logic. |
src/cloud-hypervisor/cleanup-handle-network.ts |
Extracts network capture methods and shares path validation. |
Review effort: Max (adaptive)
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
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.

createCleanupHandlemixed network, VMM account/ACL, and process/filesystem capture rules in one large object literal. Duplicated path assertions also risked drift in security-sensitive durable cleanup state.