serviceability: rename NewInterface to Interface and old enum to InterfaceDeprecated#3677
Open
serviceability: rename NewInterface to Interface and old enum to InterfaceDeprecated#3677
Conversation
15cc59e to
5e0b36a
Compare
…rfaceDeprecated Final cross-cutting step in the forward-compatible Device interfaces refactor (issue #3663). Pure rename — no behavior change, no on-disk format change. The regenerated `device.bin` fixture is byte-identical to the committed one because Borsh is positional, not name-based. Interface (legacy enum) -> InterfaceDeprecated NewInterface (struct) -> Interface Device.new_interfaces field -> Device.interfaces Device.interfaces (legacy) -> Device.deprecated_interfaces Same shape applied to Go (`Device.NewInterfaces` / `Device.Interfaces` -> `Device.Interfaces` / `Device.DeprecatedInterfaces`), Python, and TypeScript SDKs. The `Interface` / `DeviceInterface` element type in each SDK already represents the canonical (new) format and needs no rename. The `activator/` crate was already deleted from the workspace, so the issue's "activator (minimal touch)" bullet is a no-op here.
5e0b36a to
f148176
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Interface→InterfaceDeprecated, the new structNewInterface→Interface, theDevice::new_interfacesfield →Device::interfaces, and the legacyDevice::interfacesfield →Device::deprecated_interfaces. Equivalent rename across the Go, Python, and TypeScript serviceability SDKs.sdk/serviceability/testdata/fixtures/device.binis byte-identical to the committed one.Notes for reviewers
activator/crate was deleted from the workspace in an earlier change, so the issue's "activator (minimal touch)" bullet is a no-op here.Device::find_interface_legacyis now unused — kept for this rename per the "pure rename" scope, separate cleanup follow-up.json:\",omitempty\"toDevice.DeprecatedInterfacesso it doesn't surface as anullfield when callers populate only the new vec. The original Go SDK hadomitemptyon the new (formerlyNewInterfaces) field; this PR keeps that behavior on the new canonical field and extends it to the deprecated slot for symmetry. JSON consumers that previously readInterfaces(legacy) now read eitherInterfaces(canonical) orDeprecatedInterfacesdepending on which form they want.Testing Verification
make rust-fmt,make rust-lint, andcargo test --workspace --exclude doublezero-geolocationall pass. (The geolocation test compile failure on this branch reproduces onorigin/main; pre-existing, unrelated.)make generate-fixturesconfirmeddevice.binis byte-identical pre/post rename.uv run pytest) and TypeScript (bun test) SDK suites: 119 + 142 tests passing respectively.go test ./smartcontract/sdk/go/...).grep -r "NewInterface\b\|new_interfaces\b\|newInterfaces\b"returns only generated openconfig types and an unrelated controlplaneNewInterfaceGo constructor — no remaining references in the doublezero serviceability surface.