Skip to content

Fix empty flags in Attributes::from_iter(AttributeValue)#264

Merged
digizeph merged 1 commit intomainfrom
dev/fix-attr-flags-from-iter
Feb 21, 2026
Merged

Fix empty flags in Attributes::from_iter(AttributeValue)#264
digizeph merged 1 commit intomainfrom
dev/fix-attr-flags-from-iter

Conversation

@digizeph
Copy link
Member

Summary

Fix attribute flag initialization when constructing Attributes from AttributeValue iterators.

Changes

  • Update FromIterator for Attributes to map via Attribute::from.
  • Remove manual construction that set AttrFlags::empty().
  • Add regression test to assert ORIGIN and AS_PATH created through Attributes::from_iter(...) are marked transitive.
  • Add an Unreleased changelog entry under Bug fixes.

Example

Before this change, Attributes::from_iter(vec![AttributeValue::Origin(Origin::IGP)]) encoded ORIGIN with flag byte 0x00.
After this change, it encodes with the correct transitive flag 0x40.

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.10%. Comparing base (3060b00) to head (9371c2e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #264   +/-   ##
=======================================
  Coverage   91.09%   91.10%           
=======================================
  Files          83       83           
  Lines       14974    14982    +8     
=======================================
+ Hits        13641    13649    +8     
  Misses       1333     1333           

☔ View full report in Codecov by Sentry.
📢 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.

@digizeph digizeph merged commit 61dae4d into main Feb 21, 2026
5 checks passed
@digizeph digizeph deleted the dev/fix-attr-flags-from-iter branch February 21, 2026 15:24
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