Task · OPN-0090

Preserve unresolved interface labels during NetFlow enrichment startup

Description

The refresher publishes interface order before metadata. BuildIfMap can therefore publish a device-only mapping with Unresolved false, and Processor enrichment neither sets nor clears that flag. NetFlow during ordinary startup emits a raw device label before later switching to the resolved name, contrary to the documented all-flow-lanes unresolved sentinel.

Acceptance Criteria

Definition of Done

Implementation Plan

Add failing-before regressions at BuildIfMap and Processor enrichment seams for cold metadata and later resolution. Use existing IfaceNames/Ifaces availability and Unresolved semantics; preserve explicit overrides and local-origin names, without holding records or changing the ifIndex contract. Run focused flow checks.

Implementation Notes

Both cold-label and cold-to-resolved regressions failed before repair. Focused flow race tests passed after: ok github.com/rknightion/opnsense2otel/v4/internal/flow 1.409s. Both ends handled; explicit names retained, populated missing-device fallback preserved.

Final Summary

Landed in d2549a5dd314f40bdfaf6ad56f056dcde4821e0a. Targeted evidence recorded above; full just check passed (exit 0), terminal: Your code is affected by 0 vulnerabilities. No generated artifacts changed, so just gen not applicable. Source-only CodeRabbit completed review_completed across 13 files, findings=1; one pass. The sole minor finding concerned the intentionally reversed backup test-server branch and was retained with the regression rationale recorded on OPN-0086. No critical or major findings.

View the source file on GitHub