Repository navigation
Extract shared private cleanup-file writer - #10064
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused extraction preserves existing behavior and introduces no blocking issues.
0 open findings
What changed in this PR
Extracts duplicated private-file writing into a shared utility for the NVX and Cloud Hypervisor cleanup stores.
Changes:
- Centralizes exclusive mode-
0600creation, writing, syncing, and closing. - Updates both stores to use the helper while preserving existing persistence behavior.
| File | Description |
|---|---|
| src/private-file.ts | Adds the shared private-file writer. |
| src/nvx/cleanup-store.ts | Replaces the local writer with the shared helper. |
| src/cloud-hypervisor/cleanup-record-store.ts | Uses the shared helper for records and claims. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.19% | 93.19% | ➡️ +0.00% |
| Statements | 91.77% | 91.77% | ➡️ +0.00% |
| Functions | 90.68% | 90.67% | 📉 -0.01% |
| Branches | 85.63% | 85.64% | 📈 +0.01% |
📁 Per-file Coverage Changes (3 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/cleanup-store.ts |
70.6% → 69.1% (-1.45%) | 65.6% → 64.0% (-1.55%) |
src/cloud-hypervisor/cleanup-record-store.ts |
97.9% → 97.8% (-0.07%) | 94.6% → 94.4% (-0.17%) |
src/log-directory-setup.ts |
96.8% → 100.0% (+3.18%) | 96.9% → 100.0% (+3.13%) |
✨ New Files (1 files)
src/private-file.ts: 100.0% lines
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✅ Smoke Claude passed
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
✅ Build Test Suite completed successfully!
|
|
🚀 Security Guard has started processing this pull request |
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
Cloud Hypervisor + Copilot smoke test
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
Smoke Test: Copilot BYOK (Direct) Mode ✅ PASS
All smoke tests passed. Running in direct BYOK mode as expected.
|
|
Smoke Copilot — PR: "Extract shared private cleanup-file writer"
|
|
EGRESS_RESULT allow=pass deny=pass
|
|
OTEL smoke test
|
|
Smoke services: ✅ Redis PONG · ✅ pg_isready accepting connections · ✅ SELECT 1 = 1. PASS
|
|
feat: correlate enclave handoff and VMM launch diagnostics — ❌
|
🏗️ Build Test Suite Results
Overall: 6/8 ecosystems passed — FAIL Failures
The
|
Chroot Version Comparison
Not all tests passed (Node.js mismatch), so the
|
The NVX and Cloud Hypervisor cleanup stores duplicated private-file creation, writing, syncing, and closing logic. This duplication risked behavioral drift between cleanup persistence paths.
src/private-file.tswith the common exclusive mode-0600write-through implementation.opendependency to the shared helper.