Flowgraphs generated by GRC on the host often fail in Docker containers
due to three issues:
1. message_debug constructor signature changed between GR 3.10.5 and
3.10.12 — strip the second arg for older runtimes
2. XML-RPC binds to localhost, unreachable from Docker host — rewrite
to 0.0.0.0
3. input('Press Enter to quit:') gets immediate EOF in detached
containers, killing the flowgraph instantly — inject signal.pause()
fallback after EOFError
All patches are applied in a single pass via patch_flowgraph() before
the container launches. The original file is never modified.
Add add_block_path() and get_block_paths() MCP tools for incremental
OOT module loading with BlockPathsModel responses. On startup, auto-scan
/usr/local/share and ~/.local/share for OOT blocks so modules like
gr-lora_sdr are available without manual configuration.
Add comprehensive integration tests that don't require Docker:
- test_xmlrpc_subprocess.py: Tests XmlRpcMiddleware against a real
subprocess-based XML-RPC server. Covers connection, variable
discovery, get/set operations, and flowgraph control (18 tests).
- test_mcp_runtime.py: Tests MCP runtime tools via FastMCP Client.
Verifies connect, disconnect, list_variables, get_variable,
set_variable, and flowgraph control work end-to-end (15 tests).
- test_fm_scanner.py: Tests signal probe functionality and FM scanner
parsing. Includes unit tests for helper functions and integration
tests for flowgraph construction with signal probe blocks (18 tests).
All 59 integration tests pass. These tests provide faster feedback
than Docker-based tests while still exercising real XML-RPC
communication and flowgraph construction.
The lru_cache on get_block() caused three cache coherence bugs:
1. Removed blocks remained accessible — set_block_params would
modify a detached block object that no longer exists in the
flowgraph, so save_flowgraph would serialize stale state.
2. Re-created blocks with the same auto-generated name would
return the cached (removed) block instead of the new one.
3. Renamed blocks (via set_block_params id=...) left phantom
cache entries under the old name.
Fix: always look up blocks from the live flowgraph. Block lookup
is a linear scan of typically <20 blocks — no cache needed.
Raises KeyError instead of StopIteration for missing blocks.
GRC's SimpleXMLRPCServer uses register_instance() which doesn't
expose system.listMethods. Wrap the connectivity check in a
try/except so a Fault is treated as "connected" while
ConnectionRefusedError still propagates.
Prevent silent Docker bind failures by checking port availability
before container creation. Supports auto-allocation (port=0) and
patches compiled flowgraphs when the embedded XML-RPC port differs
from the requested port.
- Bump version to 0.2.0
- Require Python 3.14+
- Update to FastMCP 3.0.0b1 with new Client API
- Update tests for FastMCP 3.0 (Pydantic models in .data)
- Pin modern dependency versions