feat(cm): traceroute burst capture (#196)#252
Merged
Conversation
Design spec for Connection Monitor Phase 2: event-triggered and manual traceroute capture with hop-level evidence. Reviewed through 4 internal rounds + 2 external rounds (18 issues found and resolved).
17 tasks in 7 chunks, TDD throughout. Reviewed through 2 internal rounds + 3 codex rounds. Key iterations: storage CRUD implementations, demo migration path in config_bp.py, honest DNS timeout contract.
Security fixes from code review: - Check seteuid(getuid()) return value, exit on failure - Add privilege drop to --check path (was missing)
The test_capture_entries_in_timeline test was date-dependent: it queried for 2026-03-16 but save_execution uses utc_now() for created_at, which produces today's date. This passed on 03-16 but fails on any other day.
Use uPlot.setData() for in-place updates when chart structure hasn't changed, instead of destroying and recreating. This preserves zoom state and prevents scroll jumps during the 10-second refresh cycle.
Show a "Reset Zoom" button in the top-right corner of the chart when
zoomed in. Also add a native tooltip ("Drag to zoom, double-click to
reset") on hover so users discover the zoom feature.
The setData() approach kept stale plugin closures (loss markers, tooltip labels) across refreshes. Switch back to destroy/recreate but save and restore _zoomRange across the cycle so zoom state is preserved without stale closure bugs.
Pin container min-height before chart destroy, release via requestAnimationFrame after recreate. Prevents DOM reflow from shifting scroll position during the 10s auto-refresh cycle.
Replace hardcoded yMax=200ms with dynamic scaling that adapts to the actual data range. Snaps to zone boundaries with ~20-30% headroom so the graph uses its full height instead of showing mostly whitespace.
Fixes graph disappearing on all-timeout samples (dataMax=0) and overly tight scaling at low latencies. 40ms floor keeps the green threshold zone visible with breathing room for typical 5-20ms values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds event-triggered and manual traceroute to the Connection Monitor module (Phase 2, #196).
docsight-traceroute-helper) with privilege droppingTracerouteProbePython wrapper with partial-result support on timeoutTracerouteTriggerfires on outage/packet_loss events with 5-min cooldownTest plan