Janis 288a1c5ac3 fix: add thread-safety synchronization to Observable and CommandInvoker
Test-driven fixes for code review blockers NCS-16:

**Observable (CRITICAL):** Added synchronized blocks to subscribe, unsubscribe,
notifyObservers, and observerCount to prevent race conditions when concurrent
threads register observers while notifications are dispatched.

**CommandInvoker (IMPORTANT):** Added synchronized blocks to all methods
(execute, undo, redo, history, getCurrentIndex, canUndo, canRedo, clear) to
ensure atomic access to mutable state (executedCommands, currentIndex).

Tests:
- Added ObservableThreadSafetyTest: 3 tests for concurrent subscribe/unsubscribe/notify
- Added CommandInvokerThreadSafetyTest: 2 tests for concurrent execute/undo/redo
- All 54 existing tests remain green
- Full build passes with 100% core coverage

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-31 10:10:09 +02:00
2026-03-31 10:10:09 +02:00
2026-03-21 14:40:00 +01:00
S
Description
No description provided
1.3 GiB
Languages
Scala 80.3%
Python 14.6%
Bru 3.5%
HTML 1%
Shell 0.2%
Other 0.2%