Skip to content

feat(0.6.0): refined segment labels + early destination ASN lookup (BREAKING)#19

Merged
dweekly merged 2 commits intomainfrom
feature/v0.5.1-path-labels
Aug 29, 2025
Merged

feat(0.6.0): refined segment labels + early destination ASN lookup (BREAKING)#19
dweekly merged 2 commits intomainfrom
feature/v0.5.1-path-labels

Conversation

@dweekly
Copy link
Owner

@dweekly dweekly commented Aug 26, 2025

feat: v0.5.1 – Replace BEYOND with TRANSIT/DESTINATION

Summary

Replaces the BEYOND segment in outputs with TRANSIT and DESTINATION. Library gains helpers to compute these refined segments based on destination ASN.

Changes

  • Library

    • New ftr::EffectiveSegment enum and TracerouteResult::effective_segments() for refined segments (LAN, ISP, TRANSIT, DESTINATION, UNKNOWN).
    • TracerouteResult::path_labels() also available for finer control.
    • Backward-compatible: existing SegmentType unchanged.
  • CLI

    • Text: Segment display shows TRANSIT or DESTINATION instead of BEYOND when enrichment allows determination.
    • JSON: segment field now emits TRANSIT/DESTINATION instead of BEYOND.

Rationale

Makes it easier to identify which parts of the route traverse transit providers versus the destination’s own network, aiding debugging, performance analysis, and visualization use cases.

Compatibility

  • Library API is additive; 0.5.0 callers remain compatible (no enum breaking changes).
  • CLI text/JSON replace BEYOND with refined labels when possible; UNKNOWN used when insufficient enrichment.

Tests/Quality

  • Added unit test for role labeling logic and effective segments.
  • cargo fmt and cargo clippy -- -D warnings clean.

Screenshots/Examples

 9 [TRANSIT] 203.0.113.1  12.345 ms [AS64500 - TRANSIT-NET, US]
10 [DESTINATION] 8.8.8.8  22.456 ms [AS15169 - GOOGLE, US]

Checklist

  • Code compiles without warnings
  • Tests updated and passing
  • Backward compatibility verified
  • Release notes added (RELEASE_NOTES_v0.5.1.md)

dweekly and others added 2 commits August 26, 2025 15:44
- Add PathLabel enum and TracerouteResult::path_labels()
- Text output: append role to segment (e.g., [BEYOND | TRANSIT])
- JSON output: optional per-hop path_label field
- Tests updated; fmt/clippy clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…lookup; docs update

- SegmentType: add Transit/Destination, remove Beyond (breaking)
- Engine: parallel destination ASN lookup from target IP
- CLI: text/JSON emit refined segments
- Docs: README + docs/LIBRARY_USAGE.md updated to 0.6.0
- Tests/examples adjusted; fmt/clippy/tests clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dweekly dweekly changed the title feat: v0.5.1 – Path Role Labels (TRANSIT/DESTINATION) feat(0.6.0): refined segment labels + early destination ASN lookup (BREAKING) Aug 26, 2025
@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 43.47826% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.56%. Comparing base (bd5d9d6) to head (8977b30).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/traceroute/fully_parallel_async_engine.rs 37.83% 23 Missing ⚠️
src/main.rs 57.14% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   58.93%   58.56%   -0.37%     
==========================================
  Files          29       29              
  Lines        1651     1687      +36     
==========================================
+ Hits          973      988      +15     
- Misses        678      699      +21     
Flag Coverage Δ
unittests 58.56% <43.47%> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/traceroute.rs 100.00% <100.00%> (ø)
src/traceroute/result.rs 96.15% <ø> (ø)
src/main.rs 54.16% <57.14%> (-0.38%) ⬇️
src/traceroute/fully_parallel_async_engine.rs 60.48% <37.83%> (-2.02%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd5d9d6...8977b30. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweekly dweekly merged commit 8977b30 into main Aug 29, 2025
12 of 15 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