Repository navigation
libsimlin: add deterministic patch race regressions - #314
Conversation
Add explicit regression coverage for issues #296, #297, and #298 in the libsimlin patch path. The new tests use test-only hook points in apply_project_patch_internal to force the critical interleavings deterministically, rather than relying on timing-sensitive stress loops. The hooks are cfg(test)-only and keep production behavior unchanged. They allow us to verify that snapshot reads remain atomic under the project lock, sync_state is never transiently cleared during staging, and sim_new cannot observe staged dry-run state before patch decisions are finalized.
Code Review: libsimlin deterministic patch race regressionsSummaryThis PR adds test-only hook infrastructure to the patch pipeline and three regression tests for concurrency issues (#296, #297, #298). I reviewed the hook infrastructure in FindingsNo bugs found. The implementation is sound:
VerdictCorrect. Existing code and tests will not break. The patch is free of bugs and blocking issues. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
=======================================
Coverage 79.18% 79.18%
=======================================
Files 121 121
Lines 30375 30384 +9
=======================================
+ Hits 24053 24061 +8
- Misses 6322 6323 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code ReviewI reviewed the full diff across both files ( SummaryThis PR adds a test hook mechanism to the patch system and three regression tests for concurrency issues (#296, #297, #298). The approach is sound:
Per-test analysis
FindingsNo bugs found. The patch is clean and the tests correctly validate the intended concurrency invariants. Verdict: Correct. Existing code and tests will not break, and the patch is free of bugs. |
Review SummaryThis PR was reviewed by both Codex (gpt-5.3-codex) and Claude (opus) in a single iteration. Neither reviewer found actionable issues. Both reviewers confirmed the test-only |
Summary
Test plan
cargo test -p simlinpasses all new concurrency tests#[cfg(test)]only)