Skip to content

Handle v2-only registration fields in v1 downgrade - #4

Open
sylvesterkaczmarek wants to merge 1 commit into
dstl:masterfrom
sylvesterkaczmarek:fix/v2-v1-registration-downgrade
Open

Handle v2-only registration fields in v1 downgrade#4
sylvesterkaczmarek wants to merge 1 commit into
dstl:masterfrom
sylvesterkaczmarek:fix/v2-v1-registration-downgrade

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Addresses #1

Rationale

BSI Flex 335 v2.0 added extensible taxonomy docking and the MOVE_TO, PATROL, and FOLLOW command types. These have no representation in the v1 registration schema. The downgrade path currently passes them into ParseDict, which rejects the registration.

This change makes the downgrade intentionally lossy only for those v2-only registration capabilities while preserving fields that v1 can represent.

Testing

  • added test_v2_registration_downgrade_omits_v2_only_taxonomy_and_commands

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downgrade still leaves V2-only RegionType values in registration task definitions. V2 adds REGION_TYPE_MOBILE_NODE_NO_GO_AREA and REGION_TYPE_MOBILE_NODE_GO_AREA, but V1 only defines 0–3; ParseDict(..., V1) will reject such a registration and translate_v2_to_v1() returns an empty message after catching the exception. Remove/translate those region types during downgrade and add a regression alongside the V2-only command test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant