Skip to content

refactor: UAT fixes — latency precision, TCP metrics, descriptions, route warnings, ping removal#93

Merged
maxholman merged 6 commits intomainfrom
refactor/remove-ping
Mar 20, 2026
Merged

refactor: UAT fixes — latency precision, TCP metrics, descriptions, route warnings, ping removal#93
maxholman merged 6 commits intomainfrom
refactor/remove-ping

Conversation

@maxholman
Copy link
Copy Markdown
Contributor

Summary

  • Switch Ping/Pong timestamps from millisecond to microsecond resolution — sub-ms RTT no longer truncates to 0.0ms and shows
  • Wire TCP session byte counts into traffic statistics — stats now reports non-zero bytes after tunnel traffic
  • Update MCP/REPL tool descriptions for hints and disconnect to explain behavior
  • Warn when adding a route to a CIDR not covered by the peer's advertised routes
  • Remove redundant ping command — info provides the same data; peer ping was never implemented

How to verify

  • Deploy to range, check wallhack peers — latency shows fractional ms (e.g. 0.3ms)
  • wget through tunnel, then wallhack stats — bytes_in/bytes_out non-zero
  • wallhack route add 10.99.99.0/24 gateway-perimeter — should warn about unadvertised CIDR
  • wallhack ping no longer exists in CLI/REPL/MCP/REST
  • cargo test -q — all tests pass

🤖 Generated with Claude Code

maxholman and others added 6 commits March 19, 2026 12:23
…y precision

as_millis() truncated sub-ms RTTs to 0.0, causing the display layer to show
'—' (no measurement) for low-latency links. Switch Ping/Pong timestamps to
microseconds so RTTs down to 1µs are preserved; latency_ms is now computed
as (now_us - pong.timestamp_us) / 1000.0. Field number unchanged — wire-compatible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
copy_bidirectional_with_sizes returns exact byte counts but they were
discarded, leaving bytes_in/bytes_out at zero for all TCP sessions.
Pass SharedMetrics into run_tcp_session and increment after copy completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ping description no longer advertises unimplemented peer ping. Hint
descriptions explain the auto-negotiation model. Disconnect description
clarifies that peers may auto-reconnect after being dropped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… the peer

When a user adds a route pointing at a peer that advertises auto-managed
routes (from its handshake), but none of those routes cover the requested
CIDR, the route is silently accepted yet traffic will never reach its
destination.

This commit makes the gap visible across all interfaces:
- IPC layer logs a tracing::warn and returns the warning in OkResponse.warning
- REPL/CLI prints the warning to stderr after "OK"
- MCP tool appends it to the success text
- REST API includes it in the SuccessResponse.message field

If the peer has no auto-managed routes (e.g. explicit-mode peers that
don't advertise routes), no warning is issued.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ate deps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@maxholman maxholman force-pushed the refactor/remove-ping branch from 2a1c672 to d4c12c4 Compare March 19, 2026 16:44
@maxholman maxholman merged commit 323384b into main Mar 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant