Skip to content

fix(render): label session endpoints PEER/LOCAL to match MRT naming - #341

Merged
digizeph merged 2 commits into
mainfrom
fix/peer-local-session-labels
Sep 10, 2026
Merged

fix(render): label session endpoints PEER/LOCAL to match MRT naming#341
digizeph merged 2 commits into
mainfrom
fix/peer-local-session-labels

Conversation

@digizeph

Copy link
Copy Markdown
Member

Follow-up to the --format text output shipped in v0.22.0.

The block header labelled the two MRT endpoints FROM:/TO:, which does not say which end is which. MRT (RFC 6396) names those fields peer and local, and that is also what the model carries (peer_ip/peer_asn, local_ip/local_asn), so the rendered labels now use the same vocabulary:

TIME: 953955944
TYPE: BGP/1
PEER: 203.37.255.126 AS4608
LOCAL: 193.0.0.1 AS12654
UPDATE:
  ANNOUNCED:
    204.92.84.0/24

Rendered values, indentation and every other line are unchanged. Legacy type-5 state-change records carry only the peer endpoint and keep printing a single line (now PEER:).

The format is one day old and explicitly human-oriented rather than a stable machine interface, so this is a wording fix rather than a compatibility break; it is listed under ## Unreleased### Changed in the changelog.

The `--format text` block header printed `FROM:`/`TO:` for the MRT record's
peer and local endpoints. MRT (RFC 6396) calls these fields peer and local,
and the underlying model already uses `peer_ip`/`peer_asn` and
`local_ip`/`local_asn`, so the labels now match the vocabulary the values
come from. Rendered values are unchanged.

Legacy type-5 state-change records, which carry only the peer endpoint,
print a single `PEER:` line as before (`FROM:`).

Tests and the changelog are updated; the text fixture in
`renders_layered_update_block` pins the new labels.
Copilot AI balanced review requested due to automatic review settings September 10, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

State-change endpoint labels need explicit regression assertions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Aligns text-rendered MRT session endpoints with the model’s peer/local terminology.

Changes:

  • Renames FROM/TO labels to PEER/LOCAL.
  • Updates documentation, tests, and changelog.
File summaries
File Description
src/render/text.rs Updates endpoint labels and related tests.
CHANGELOG.md Documents the wording change.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/render/text.rs
Comment thread src/render/text.rs
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.50%. Comparing base (94c1832) to head (e59048c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #341   +/-   ##
=======================================
  Coverage   91.50%   91.50%           
=======================================
  Files         103      103           
  Lines       26483    26487    +4     
=======================================
+ Hits        24232    24236    +4     
  Misses       2251     2251           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot review on #341: the legacy and BGP4MP state-change branches renamed
their endpoint labels without a regression assertion, so only message
records protected the PEER/LOCAL contract. Assert both endpoints on the
BGP4MP state change, and the single PEER line (with no LOCAL line) on the
legacy one.
Copilot AI review requested due to automatic review settings September 10, 2026 18:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The labels consistently match the underlying endpoint fields, with coverage for all affected record variants.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@digizeph
digizeph merged commit faeab92 into main Sep 10, 2026
10 checks passed
@digizeph
digizeph deleted the fix/peer-local-session-labels branch September 10, 2026 19:12
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.

2 participants