Skip to content

test(runtimed): add coverage for kernel restart/death execution cleanup#1656

Merged
rgbkrk merged 2 commits intomainfrom
quill/test-restart-cell-abort
Apr 9, 2026
Merged

test(runtimed): add coverage for kernel restart/death execution cleanup#1656
rgbkrk merged 2 commits intomainfrom
quill/test-restart-cell-abort

Conversation

@rgbkrk
Copy link
Copy Markdown
Member

@rgbkrk rgbkrk commented Apr 9, 2026

Summary

Adds automated test coverage for the kernel restart and kernel death execution cleanup paths fixed in #1655. The Codex review noted that these code paths lacked targeted tests — the manual verification scenarios were the only coverage.

  • Introduces MockKernel implementing KernelConnection for testing queue/state logic without ZeroMQ (as envisioned by the trait's doc comment)
  • Adds KernelState unit tests: kernel_died() return values, idempotency, and empty queue edge case; reset() state clearing
  • Adds handle_queue_command(KernelDied) integration tests verifying RuntimeStateDoc marks in-flight and queued executions as error with success: false

Verification

  • CI passes all new tests (cargo test -p runtimed -- kernel_state::tests runtime_agent::tests)
  • No regressions in existing runtimed integration tests

PR submitted by @rgbkrk's agent, Quill

Add unit tests for KernelState::kernel_died() (return values, idempotency,
empty queue) and integration tests for handle_queue_command(KernelDied)
verifying that RuntimeStateDoc marks in-flight executions as failed.

Introduces a MockKernel implementing KernelConnection for testing queue
logic without ZeroMQ, as envisioned by the trait's design doc.
@github-actions github-actions Bot added daemon runtimed daemon, kernel management, sync server quill PR authored by Quill Agent 🦆 labels Apr 9, 2026
@rgbkrk rgbkrk marked this pull request as ready for review April 9, 2026 00:09
@rgbkrk rgbkrk enabled auto-merge (squash) April 9, 2026 00:09
…_propagation

Fixes a race condition in the integration test where client2 was asserting
the presence of 3 cells immediately after joining, without waiting for
Automerge sync to propagate from client1. In CI's slower environment,
this caused an assertion failure (expected 3, got 0).

The fix adds a polling loop (similar to the one already present later in
the same test) to wait for sync convergence before asserting cell count.

This is not related to the new kernel_state/runtime_agent tests in this PR,
but rather a pre-existing flaky test that happened to fail in this CI run.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the test Test infrastructure and coverage label Apr 9, 2026
@rgbkrk rgbkrk merged commit 4acd407 into main Apr 9, 2026
21 checks passed
@rgbkrk rgbkrk deleted the quill/test-restart-cell-abort branch April 9, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

daemon runtimed daemon, kernel management, sync server quill PR authored by Quill Agent 🦆 test Test infrastructure and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant