Fix auto-path traces, harden contacts retrieval, add device config tooling

Trace:
- Auto-path now ends every route at the target's own hash (verified on
  hardware: a trace only replies when its destination is the final hop), so
  direct neighbors and learned multi-hop routes both resolve correctly.
- Retry the transient "no event received during contacts retrieval" blip and
  surface a clean DeviceCommandError instead of a raw traceback.
- Route summary annotates each node with its hash at the command's path-hash
  width, wrapping after an arrow when the line is too long.
- Default trace count changed from 5 to 3.

Also includes the in-progress device-config feature (config_io, device_config,
config tool, config editor UI, tests) and related supporting edits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 4.8 committed 2026-06-21 11:19:21 -04:00
1 parent 43353f83a9
commit 421781f13d
19 files changed
+3081 -108

No files matched your search

+5 -2
View File
@@ -17,6 +17,8 @@ import typer
from .context import AppContext
from .core.config import Settings
from .core.connection import DeviceCommandError
from .core.device_config import DeviceConfigError
from .core.device_store import DeviceStore
from .core.selection import DeviceSelectionError
from .persistence.logging import configure_logging
@@ -101,8 +103,9 @@ def run_tool_command(tool: Tool, params: dict) -> None:
assert _state is not None # set by the callback before any subcommand runs
try:
asyncio.run(_drive(_execute_and_render(tool, params, _state), _state))
except DeviceSelectionError as exc:
# Ambiguous/absent device: show the guidance message, not a traceback.
except (DeviceSelectionError, DeviceConfigError, DeviceCommandError) as exc:
# Expected user-facing error (ambiguous/absent device, bad config value, or a
# transient command failure): show the message, not a traceback.
_state.console.print(f"[err]✗[/err] {exc}")
raise typer.Exit(1) from exc