You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
What's Changed
Bug Fixes
filters: tighten maybe_inject_no_stat word-boundary check (#1178, closes #1171): Two confirmed false positives in maybe_inject_no_stat. "gitpull some-arg" matched starts_with("git"), causing --no-stat to be appended to an unrelated binary. "git log upstream/pull/123" matched contains("pull") via the path component, silently suppressing the diffstat. Fixed with a trailing-space word boundary (starts_with("git ")) and a token-level check (command.split_whitespace().nth(1) == Some("pull")).
Features
metrics: add received event at top of each tool handler, guard OTEL histogram (#1181, closes #1177): Emits a result="received"MetricEvent at the very top of each of the seven tool handlers, before any validation or execution. A single metrics lookup can now definitively distinguish failures in the rmcp dispatch layer (no received entry) from handler-level failures (received present, no ok/error). An early-return guard in record_otel_metrics prevents duration_ms=0 events from polluting the latency histogram.
Maintenance
exec: remove redundant child.wait() in no-timeout branch, add exit_code test (#1180, closes #1173): The no-timeout branch called child.wait() twice: once to extract the exit status and again implicitly. The second call was redundant and misleading. Captured exit_status from the first await and reused it throughout. Removed the now-redundant test test_exec_exit_1_no_timeout whose coverage was already provided by existing tests in exec_command.rs.
exec: fix SIZE_LIMIT comment, add heredoc metrics, record injected command on span; add MetricEventBuilder (#1179, closes #1172): Three surgical fixes: the SIZE_LIMIT comment said "50k chars" but the constant is 5_000 bytes; corrected. The validate_heredocs early-return path emitted no metric, making validation failures invisible in JSONL; now emits result="error", error_type="invalid_params". The post-injection command is now recorded on the span before span.record("command", ...). Also adds a fluent MetricEventBuilder to metrics.rs that reduces MetricEvent construction boilerplate across all seven handlers (net -227 lines in lib.rs); no behaviour or schema change.