Skip to content

test(mcp): gate parallel daemon recovery - #1628

Draft
ohdearquant wants to merge 1 commit into
mainfrom
codex/daemon-recovery-harness
Draft

test(mcp): gate parallel daemon recovery#1628
ohdearquant wants to merge 1 commit into
mainfrom
codex/daemon-recovery-harness

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

Summary

  • extract reusable daemon recovery/framing test infrastructure, including an explicit in-process launcher seam for deterministic lifecycle tests
  • cover eight concurrent pre-write NoSocket recoverers converging on one usable daemon, while preserving post-write ParseFailure as a terminal exactly-once boundary
  • gate the paired recovery scenarios with 25 serial repetitions on Linux and macOS, and align the lifecycle documentation and ADR with the tested contract

Contract details

  • production recovery still uses the process launcher and the normal incumbent-exit timeout
  • the in-process harness is available only through the explicit fault-injection/test path
  • the stable contention oracle is one live, responsive daemon after quiescence; redundant spawn attempts may occur before readiness, as documented
  • a post-write parse failure performs no kill, spawn, or follow-up connection
  • the default-store sentinel wraps the complete 25-repeat batch, preserving mutation detection without repeatedly hashing the operator store

Validation

  • cargo test --manifest-path crates/Cargo.toml --workspace
  • cargo check --manifest-path crates/Cargo.toml --workspace
  • cargo clippy --manifest-path crates/Cargo.toml --workspace --all-targets -- -D warnings
  • cargo fmt --manifest-path crates/Cargo.toml --all -- --check
  • RUSTDOCFLAGS=-Dwarnings cargo doc --manifest-path crates/Cargo.toml --workspace --no-deps
  • 25 consecutive focused repetitions of cargo test --manifest-path crates/Cargo.toml -p khive-mcp --lib 'daemon::tests::parallel_' -- --test-threads=1
  • independent final review: APPROVE, zero findings

Closes #539
Closes #544

AI-assisted contribution: Codex prepared this change and PR description.

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.

test-infra(daemon): extract shared recovery/framing test harness test(daemon): concurrent recovery — exactly-one-daemon under parallel ParseFailure

1 participant