Skip to content

sdk: regenerate device fixtures and add legacy/future-version variants #3661

@elitegreg

Description

@elitegreg

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

Depends on #3660 (SDK readers).

Scope

Update the fixture generator and add two new fixtures that exercise the SDK fallback and forward-compat-skip paths.

Tasks

  • sdk/serviceability/testdata/fixtures/generate-fixtures/src/main.rs:
    • Update generate_device to populate new_interfaces with two new-format entries (one Loopback Vpnv4 with a FlexAlgoNodeSegment, one Physical with user_tunnel_endpoint=true). Leave legacy interfaces: Vec::new() since the serializer rebuilds it.
    • Update meta.fields in the JSON sidecar to reflect the new on-disk shape.
  • Add device_legacy.bin / device_legacy.json: hand-serialized device with only the legacy vec populated and no trailing bytes. Exercises the SDK legacy-fallback path.
  • Add device_future_version.bin / device_future_version.json: like device.bin but with one new-vec element doctored to version=5 and size += N plus N trailing junk bytes after the known fields. Exercises the SDK skip-to-end path.
  • Run make generate-fixtures.

Tests

  • Go, Python, TS SDK tests load device_legacy.bin (fallback path) and device_future_version.bin (skip path).

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