Skip to content

fix: preserve durable KVM runner ACL - #9992

Merged
lpcox merged 2 commits into
mainfrom
lpcox-fix-kvm-runner-acl
Oct 14, 2026
Merged

lpcox merged 2 commits into
mainfrom
lpcox-fix-kvm-runner-acl

Conversation

@lpcox

@lpcox lpcox commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • retain the first validated ACL baseline for every Cloud Hypervisor device after launch-time ACL intent completion
  • compose durable non-VMM named users with the fresh deletion baseline under the existing shared ACL lock
  • preserve exact mask semantics and live peer VMM entries while removing only the target VMM ACE
  • add deterministic regressions for normal sequential cleanup, concurrent cleanup in both orders, cancellation recovery, stale recovery, partial intent release, persistence retry, and exact ACL validation

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

  • focused ACL lifecycle suite: 119 passed
  • npm run build
  • npm run type-check
  • npm run lint (0 errors; repository baseline warnings only)
  • npm run lint:md
  • full unit suite: 463 suites passed, 8,276 tests passed; 4 suites / 33 tests skipped
  • full coverage: 463 suites passed, 8,276 tests passed; statements 91.15%, branches 85.21%, functions 89.77%, lines 92.53%

The 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 38644795166 was performed, and no pilot-100, pilot-1000, or benchmark campaign was dispatched.

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
Copilot AI max review requested due to automatic review settings October 14, 2026 22:31
@github-actions

github-actions Bot commented Oct 14, 2026 •

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-9992 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit cb58f2f

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 93.32% 93.31% ➡️ -0.01%
Statements 91.91% 91.91% ➡️ +0.00%
Functions 90.64% 90.64% ➡️ +0.00%
Branches 85.67% 85.67% ➡️ +0.00%
📁 Per-file Coverage Changes (6 files)
File Lines (Before → After) Statements (Before → After)
src/cloud-hypervisor/device-acl.ts 100.0% → 98.8% (-1.25%) 100.0% → 98.9% (-1.12%)
src/cloud-hypervisor/cleanup-vmm-identity.ts 84.1% → 83.3% (-0.78%) 84.3% → 83.6% (-0.74%)
src/cloud-hypervisor/vmm-identity.ts 97.7% → 97.1% (-0.58%) 95.2% → 94.7% (-0.47%)
src/cloud-hypervisor/cleanup-identity.ts 92.4% → 92.0% (-0.39%) 92.6% → 92.2% (-0.40%)
src/cloud-hypervisor/cleanup-handle.ts 94.5% → 94.7% (+0.20%) 91.3% → 91.6% (+0.29%)
src/log-directory-setup.ts 96.8% → 100.0% (+3.18%) 96.9% → 100.0% (+3.13%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

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.

🟡 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.

Comment thread src/cloud-hypervisor/device-acl.ts Outdated
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
@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

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

@github-actions

Copy link
Copy Markdown
Contributor

💎 Smoke Gemini is crystallizing results on this pull request...

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #9992

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Generated by Smoke Claude for #9992

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request...

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

Copy link
Copy Markdown
Contributor

Cloud Hypervisor + Copilot Smoke Test

  • PR lookup (github-list_pull_requests): FAIL — GitHub MCP tool not available in this environment
  • github.com reachable (expect 200/301): PASS (200)
  • File write/read round-trip: PASS
  • example.com blocked (expect 000/403): PASS (000)

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Services smoke test: ✅ Redis PONG · ✅ pg_isready accepting connections · ✅ SELECT 1 → 1. Overall: PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Copilot: PASS

  • ✅ GitHub MCP (last merged: "Share GitHub token redaction assertions")
  • ✅ github.com connectivity (HTTP 200)
  • ✅ File write/read
    PR: "fix: preserve durable KVM runner ACL" — author @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com → 200)
  • ✅ Blocked domain (example.com blocked)
    Overall: PASS — cc @lpcox

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API status ✅ PASS
gh check ✅ PASS
File status ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #9992 · claude · haiku45 · 48.8 AIC · ⊞ 6.1K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

OTEL smoke test

  • ✅ S1 Module loading: otel.js loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled
  • ✅ S2 Tests: 3 suites, 68/68 passed
  • ✅ S3 Env forwarding: trace ID/parent span ID in env-passthrough.ts; OTEL endpoint/headers/trace vars in api-proxy-env-config.ts
  • ✅ S4 Token tracker: onUsage callback present in token-tracker-http.js
  • ✅ S5 Diagnostics: otel.jsonl present (1 record)

I re-ran these checks locally because the pre-step outputs weren't available to me.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct Mode)

✅ GitHub MCP connectivity (PRs fetched)
✅ GitHub.com connectivity (HTTP 200)
✅ File write/read test (smoke test persisted)
✅ BYOK inference path (direct mode via api-proxy → api.githubcopilot.com)

Status: PASS | Direct BYOK mode (COPILOT_PROVIDER_API_KEY) operational

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.15 Python 3.12.15 ✅ YES
Node.js v24.21.0 v2.98.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Not all tests passed (Node.js mismatch), so the smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ❌ not run ❌ FAIL
Bun hono ❌ not run ❌ FAIL
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak ❌ not run ❌ FAIL
Deno std ❌ not run ❌ FAIL
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ pass (ok) ✅ PASS
Go env ✅ pass (ok) ✅ PASS
Go uuid ✅ pass (ok) ✅ PASS
Java gson ✅ 1/1 passed ✅ PASS
Java caffeine ✅ 1/1 passed ✅ PASS
Node.js clsx ✅ all passed ✅ PASS
Node.js execa ✅ all passed ✅ PASS
Node.js p-limit ✅ all passed ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 6/8 ecosystems passed — FAIL

Failures

  • Bun / Deno: The installer scripts (curl ... | bash / | sh) were blocked by the sandbox permission policy, so the runtimes were never installed and no tests ran. All clones succeeded.

Environment workarounds

  • .NET: The CLI failed on first run because /run/user/1001 does not exist. It passed once I set XDG_RUNTIME_DIR to a temp directory.
  • Java: Maven could not create ~/.m2/repository because ~/.m2 is root-owned. It passed with -Dmaven.repo.local pointed at a temp directory. The existing settings.xml was left as is.

Generated by Build Test Suite for #9992 · copilot · auto · 25.9 AIC · ⊞ 11.9K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

9990 Share GitHub token redaction assertions
9988 Reduce token cost in Cloud Hypervisor smoke workflow
GitHub merged PR review ✅
GitHub PR details ✅
Playwright title check ❌
File write/read ✅
Latest discussion lookup/comment ✅
Build AWF ✅
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@lpcox
lpcox merged commit 1679a66 into main Oct 14, 2026
147 of 153 checks passed
@lpcox
lpcox deleted the lpcox-fix-kvm-runner-acl branch October 14, 2026 23:34

This branch had an error being deployed

1 failed deployment
aoai-model — 79f7ed77 Deployed Oct 14, 2026 by lpcox via conclusion #1960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants