Why:
When the deltachat-rpc-server encounters a fatal error during early startup
(e.g., when the accounts directory is invalid, a file instead of a dir, or
otherwise inaccessible), it exits. The Python RPC client previously lacked
a structured way to wait for the server to be fully initialized or to
detect early startup failures gracefully. This led to hanging tests or
obscure broken pipe errors rather than clear initialization errors.
How:
- The RPC server now sends a JSON-RPC notification on stdout at startup:
- "ready" with core_version, server_path, and accounts_dir on success
- "init_error" with error message if accounts directory initialization fails
- The Python RPC client reads the first line from stdout to ensure the server is ready.
- The Python client raises JsonRpcError on init_error, enabling early
failure detection and fast-failing rather than stalling.
- Added tests to ensure the client fails immediately on invalid dirs.