Avatar for the QWED-AI user
QWED-AI
qwed-verification
BlogDocsChangelog

Performance History

Latest Results

fix(consensus): replace non-reentrant Lock with RLock in CircuitBreaker (#332) (#343) * fix(consensus): replace non-reentrant Lock with RLock in CircuitBreaker Fixes #332 - Replace threading.Lock with threading.RLock in CircuitBreaker._lock. Previously, record_success and record_failure acquired self._lock and then called get_health() which re-entered self._lock, causing an immediate self-deadlock on the event-loop thread. - Add with self._lock to get_all_health for thread-safe iteration over _engines. - Add regression tests in tests/test_circuit_breaker_deadlock_332.py covering: - record_success and record_failure without deadlock - Circuit transition to OPEN, DEGRADED, and HEALTHY - Thread-safe get_all_health statistics - Concurrent multi-threaded access without deadlock * fix(consensus): address review feedback on CircuitBreaker lock synchronization - Enclose is_available() read, timeout check, and state transition within with self._lock to ensure atomic state updates under concurrency. - Add CircuitBreaker.reset() under lock and delegate ConsensusVerifier.reset_circuit_breakers() to it for thread-safe dictionary clearance. - Replace wall-clock time.sleep with monkeypatched deterministic clock in recovery tests. - Remove unused imports (pytest, EngineHealth) in test_circuit_breaker_deadlock_332.py. - Add unit test for thread-safe reset() and reset_circuit_breakers(). * test(consensus): bound deadlock probes in worker threads with timeout - Run direct CircuitBreaker deadlock probes in daemon threads with a bounded timeout via _run_with_timeout. - Capture and re-raise any worker thread exceptions to ensure failures remain visible.
main
4 days ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(consensus): replace non-reentrant Lock with RLock in CircuitBreaker (#332)#343
4 days ago
bc3da53
fix/circuit-breaker-self-deadlock-332
CodSpeed Performance Gauge
0%
15 days ago
69802dc
fix/pypi-publish-metadata
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home Terms Privacy Docs