v2.4.2 — markdown add_cell false-timeout fix
Fix: notebook_add_cell(cell_type=\"markdown\") false timeout
Adding a markdown cell returned {\"success\": false, \"error\": \"Timeout waiting for frontend response after 2.0s\"} even though the cell was actually added. The frontend's extra changeCellType round-trip for markdown exceeds the old hardcoded 2.0s wait.
Changes
- Configurable frontend-response timeout
FRONTEND_RESPONSE_TIMEOUT(default 10s, overridable viaINSTRMCP_FRONTEND_TIMEOUT), threaded through every bridge operation that waits on a frontend response (add_new_cell,move_cursor,get_active_cell_output,get_notebook_structure,get_cells_by_index,delete_cells_by_index). - Bridge-stability race fix:
_send_and_waitnow always pops-and-checks the response under the lock before declaring a timeout, so a valid response landing right as the wait expires is honored instead of discarded as a false failure. - Removed hardcoded
timeout_s=2.0inbackend/notebook_unsafe.pyand 3core/notebook_tools.pyread sites (one was even lowering the intended 10s to 2s).
Tests
- New
tests/unit/servers/test_add_cell_timeout.py(markdown slow-success at bridge + backend layers, plus the late-response race), verified red pre-fix / green on fix. Full unit suite green.