Skip to content

serviceability: migrate processors to new_interfaces #3658

@elitegreg

Description

@elitegreg

Part of the forward-compatible Device interfaces refactor.
Design: https://gist.github.com/elitegreg/e1d27c97034656a980fa8d7628ae16c5

Depends on #3665 (Device with new_interfaces vec).

Scope

Move the smart contract processors off into_current_version() / into_v3() / per-variant matching and onto direct field access on NewInterface via device.new_interfaces. The Device serializer keeps the legacy vec in sync, so processors only mutate new_interfaces.

Tasks

  • processors/device/interface/{create,update,activate,delete,reject,remove,unlink}.rs: read/mutate device.new_interfaces directly.
  • processors/link/{accept,activate,closeaccount,create,delete,update}.rs: same.
  • processors/topology/backfill.rs: mutate device.new_interfaces[i].flex_algo_node_segments directly. Note that segments are dropped on serialize into the V2-projected legacy vec; the new vec is the source of truth.
  • Drop calls to into_current_version() / into_v3() in these processors.
  • Verify device.interfaces is no longer touched directly anywhere in processors/ after this issue lands.

Tests

  • All existing processor tests must pass.
  • Add a backfill test that round-trips flex_algo_node_segments through the new vec.

Out of scope

  • Renaming NewInterface / new_interfaces to canonical names — separate issue.
  • Removing migrate_interfaces processor — separate issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions