Skip to content

feat(judge): interrupt cancelled microvm execution - #15

Open
CN059 wants to merge 2 commits into
agent/real-microvm-cancel-racefrom
agent/inflight-microvm-cancellation
Open

CN059 wants to merge 2 commits into
agent/real-microvm-cancel-racefrom
agent/inflight-microvm-cancellation

Conversation

@CN059

@CN059 CN059 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • keep the judge control loop responsive while synchronous execution runs in a blocking task
  • renew the lease at the negotiated cadence and once more immediately before result submission
  • interrupt the exact Attempt-owned Firecracker child on cancellation or lease loss, await teardown, and discard the result
  • validate real-KVM cancellation of an 8-second infinite-loop stage with socket reclamation under 3 seconds and judge survival

Architecture and compatibility

This realizes the execution-plane ownership accepted by ADR-0005. It does not move VM ownership into the control plane and does not change host or guest v0alpha1 schemas, generated bindings, migrations, network policy, credentials, or runtime images. The existing guest Cancel messages remain unchanged; prompt interruption uses the least-authority host VMM handle because the current synchronous guest agent cannot consume control messages while a child is running.

Validation

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • KVM-enabled cargo test --workspace --all-targets --locked: 156 passed
  • focused real-microVM process matrix: 4 passed in 17.73 seconds
  • process E2E: 9 passed in 12.45 seconds
  • strict runtime KVM smoke: passed in 1.77 seconds
  • cargo deny advisories bans sources
  • workspace and documentation checks
  • architecture, protocol, sandbox, development and verification skill validators

Unverified

Real-KVM lease-loss and UDS-disconnect interruption, cooperative guest cancellation, production jailer/cgroup/seccomp/watchdog profiles, the resource-exhaustion matrix, an operator-facing API or CLI cancellation command, and release performance remain unverified.

Stacked on #14. Review only the two commits between agent/real-microvm-cancel-race and this branch.

CN059 added 2 commits August 31, 2026 08:50
Run synchronous executors in a blocking task while renewing the lease at the negotiated cadence and immediately before result submission. On cancellation or lease loss, use a least-authority per-VM handle to terminate Firecracker, await teardown, discard the execution result, and keep the judge node available.
Record the real-KVM evidence that control-plane cancellation interrupts the Attempt-owned Firecracker process before the guest stage deadline, reclaims sockets within three seconds, and leaves the judge available. Preserve the protocol, production isolation, lease-loss and operator-surface limits as explicit unverified boundaries.

Refs: FR-JUDGE-003, FR-SCHED-001, ACC-P0-003, ACC-P0-017, ACC-P0-018, ADR-0005, THR-RESOURCE-001, CTL-RECLAIM-001, CTL-IDEMPOTENCY-001, RISK-EXEC-001

Tests: cargo test --workspace --all-targets --locked with KVM (156 passed); focused real-microVM matrix (4 passed); fmt, check, clippy -D warnings, cargo deny, check-workspace, check-docs and five skill validators passed

Unverified: real-KVM lease-loss and UDS disconnect interruption; cooperative guest Cancel; production jailer/cgroup/seccomp/watchdog; resource-exhaustion matrix; operator API/CLI cancel; release performance
@CN059
CN059 force-pushed the agent/real-microvm-cancel-race branch from 2498cda to 480db9a Compare August 31, 2026 00:51
@CN059
CN059 force-pushed the agent/inflight-microvm-cancellation branch from 801567e to f4e2b11 Compare August 31, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant