Skip to content

serviceability: rename NewInterface to Interface and old enum to InterfaceDeprecated #3663

@elitegreg

Description

@elitegreg

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

Depends on #3658, #3659, #3660, #3661, #3662.

Scope

Pure rename. Swap the working-name NewInterface to Interface and the legacy enum from Interface to InterfaceDeprecated. Same for vec field names: new_interfacesinterfaces and old interfacesdeprecated_interfaces. All trait impls and call sites follow.

This is the cross-cutting churn step the earlier issues were structured to defer.

Tasks

  • smartcontract/programs/doublezero-serviceability/src/state/interface.rs: rename types.
  • smartcontract/programs/doublezero-serviceability/src/state/device.rs: rename fields.
  • All processors, CLI, sentinel, client, admin, Rust SDK call sites: rename references.
  • All Rust tests: rename references; fix tests broken purely by the rename.
  • Activator (deprecated, minimal touch): rename references so it continues to compile. Use deprecated_interfaces where it currently reads interfaces. Do not migrate it to use the new (now-renamed) Interface struct or interfaces vec.
  • SDKs: rename equivalents in Go (Interface / DeprecatedInterface if surfaced), Python, TS as needed for parity.
  • JSON serde shape: Device JSON now exposes interfaces (new shape) and deprecated_interfaces (legacy projection). Update CLI renderers / telemetry consumers if their schema assumed the old layout.

Notes

  • Mechanical PR. Likely large but reviewable as a rename. If split, do it along Rust workspace vs. SDK lines.
  • After this lands, the Future cleanup section in the design (collapse legacy vec to skip-only, drop dual writes) becomes possible — gated on every device account being re-written at least once.

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