Repository navigation
fix: preserve durable KVM runner ACL - #9992
Conversation
Retain the first validated device ACL baseline after launch intent completion. Compose its non-VMM entries with fresh deletion baselines during normal and stale cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b641e35-ee0f-404f-b119-2dd2ebe950fa
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit cb58f2f |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (6 files)
Coverage comparison generated by |
There was a problem hiding this comment.
🟡 Changes recommended
ACL mask composition can permanently broaden device permissions after temporary VMM access is revoked.
1 open finding
What changed in this PR
This PR preserves Cloud Hypervisor device ACL history so normal and stale VMM cleanup can restore durable runner access.
Changes:
- Retain initial device baselines after launch cleanup completes.
- Compose historical user entries with fresh deletion baselines.
- Extend lifecycle regressions and document ACL retention.
| File | Description |
|---|---|
| src/cloud-hypervisor/vmm-identity.ts | Retains and uses initial ACL history. |
| src/cloud-hypervisor/vmm-identity.test.ts | Updates normal and concurrent cleanup regressions. |
| src/cloud-hypervisor/device-acl.ts | Combines historical users and ACL masks. |
| src/cloud-hypervisor/device-acl.test.ts | Tests historical runner-access restoration. |
| src/cloud-hypervisor/cleanup-vmm-identity.ts | Uses retained history during recovery. |
| src/cloud-hypervisor/cleanup-vmm-identity.test.ts | Updates recovery and persistence-retry cases. |
| src/cloud-hypervisor/cleanup-registry.test.ts | Tests runner-access restoration during stale recovery. |
| src/cloud-hypervisor/cleanup-identity.ts | Defines and validates retained history fields. |
| src/cloud-hypervisor/cleanup-identity.test.ts | Tests malformed history rejection. |
| src/cloud-hypervisor/cleanup-handle.ts | Persists initial device ACL history. |
| src/cloud-hypervisor/cleanup-handle.test.ts | Checks history survives intent release. |
| docs/cloud-hypervisor-foundation.md | Documents durable ACL restoration. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Restore the deletion-baseline mask after the last VMM grant is removed. Use the current mask only while a live peer still needs device access. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b641e35-ee0f-404f-b119-2dd2ebe950fa
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✅ Build Test Suite completed successfully!
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
✅ Smoke Claude passed
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
🚀 Security Guard has started processing this pull request |
Cloud Hypervisor + Copilot Smoke Test
|
|
Services smoke test: ✅ Redis PONG · ✅ pg_isready accepting connections · ✅ SELECT 1 → 1. Overall: PASS
|
|
Smoke Copilot: PASS
|
|
EGRESS_RESULT allow=pass deny=pass
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
OTEL smoke test
I re-ran these checks locally because the pre-step outputs weren't available to me.
|
Smoke Test: Copilot BYOK (Direct Mode)✅ GitHub MCP connectivity (PRs fetched) Status: PASS | Direct BYOK mode (COPILOT_PROVIDER_API_KEY) operational
|
Chroot Version Comparison
Not all tests passed (Node.js mismatch), so the
|
🏗️ Build Test Suite Results
Overall: 6/8 ecosystems passed — FAIL Failures
Environment workarounds
|
|
9990 Share GitHub token redaction assertions
|

Summary
Root cause
Merged #9987 made accessed device paths durable but intentionally released the grant-time ACL baseline after launch restoration. Normal and stale account-deletion cleanup then journaled only a fresh baseline. If that fresh observation contained the hosted-runner mask residue but had already lost the durable UID 1001 runner ACE, cleanup treated the degraded ACL as authoritative and restored it before and after deleting the UID 999 VMM account. That consistently produced the observed mask-only hash while all other cleanup evidence completed.
The fix keeps the first validated per-device baseline separately from active cleanup intent. Fresh deletion baselines remain authoritative for current owner/group/other entries and live peer VMM composition, but durable historical non-VMM user ACEs are a restoration floor. Mask permissions are merged so the retained ACE keeps its original effective access without weakening the existing lock, identity validation, crash-safe persistence, or unowned-ACE rejection.
Validation
npm run buildnpm run type-checknpm run lint(0 errors; repository baseline warnings only)npm run lint:mdThe first coverage invocation encountered one unrelated 5-second timeout in
scripts/ci/gh-cli-proxy-wrapper.test.ts; the test passed immediately in isolation and the complete coverage suite then passed.No retry or resume of run
38644795166was performed, and no pilot-100, pilot-1000, or benchmark campaign was dispatched.