fix: address code review feedback for Phase 4 backend server
Critical Issue 1: Remove dual initialization (lifespan + _ensure_initialized)
- Removed _ensure_initialized() function entirely
- Removed call to _ensure_initialized() from websocket_endpoint
- lifespan context manager is now the only init path
- Prevents resource leak from creating Observer instances twice
Critical Issue 2: Fix test_rapid_file_changes_debounced debounce test
- Removed bare 'except Exception: pass' that caught AssertionError
- Rewritten to properly count update messages in a time window
- Test now properly verifies debounce behavior (3 rapid changes -> 1 update)
Important Issue 1: Fix ConnectionManager.disconnect() ValueError
- Added try/except to handle case where websocket already removed by broadcast
- Prevents crash if disconnect() called after broadcast() removed the connection
Important Issue 2: Add exception handling in _on_file_change()
- Wrapped _reassemble() in try/except
- On failure, keeps current_json unchanged (doesn't broadcast incomplete state)
- Prevents timer thread crash that would stop live reload
Important Issue 3: Add exception handling in _reassemble()
- Wrapped source_path.read_text() in try/except
- On file read errors, returns error JSON structure with parse_error message
- Handles FileNotFoundError, OSError, UnicodeDecodeError
Minor Issue 1: Remove unused imports from server.py
- Removed: json, time, PipelineResult
- threading is still needed for DebouncedFileHandler
Minor Issue 2: Remove unused json import from test
- Removed: json
- time is still needed for sleep() and timing
All 608 tests pass. Tests updated to use TestClient context manager so
lifespan is triggered correctly.