Repository navigation
fix(devices): read the device/register 0.2 binding envelope - #637
Merged
Merged
Conversation
The VTA answers device/register with { "binding": DeviceBinding } per the
0.2 spec, but parse_binding only looked under `device` or at the top level,
so every first launch warned "device registration returned no binding" for
a registration that had succeeded, and never learned its own deviceId.
Read `binding` first, keeping `device` and the bare record as fallbacks
for older VTAs.
Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
|
Backport branch created but failed to create PR. (see action log for full response) |
stormer78
added a commit
that referenced
this pull request
Nov 26, 2026
…637) The VTA answers device/register with { "binding": DeviceBinding } per the 0.2 spec, but parse_binding only looked under `device` or at the top level, so every first launch warned "device registration returned no binding" for a registration that had succeeded, and never learned its own deviceId. Read `binding` first, keeping `device` and the bare record as fallbacks for older VTAs. Signed-off-by: Glenn Gore <glenn.g@affinidi.com> (cherry picked from commit 7b89bfe)
stormer78
added a commit
that referenced
this pull request
Nov 27, 2026
…637) (#638) The VTA answers device/register with { "binding": DeviceBinding } per the 0.2 spec, but parse_binding only looked under `device` or at the top level, so every first launch warned "device registration returned no binding" for a registration that had succeeded, and never learned its own deviceId. Read `binding` first, keeping `device` and the bare record as fallbacks for older VTAs. (cherry picked from commit 7b89bfe) Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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.
Fixes #636.
Problem
device/register/0.2responds with{ "binding": DeviceBinding }, which is what the VTA sends (vta-service/src/operations/device.rs).parse_bindingonly looked underdeviceor at the top level, so the first launch after setup loggedWARNING: device registration failed: VTA contract mismatch: device registration returned no bindingeven though the registration had succeeded. That launch also never learned its owndeviceId, whichlive_siblingsfalls back to for VTAs whose rows lackconsumerDid.Fix
Read
bindingfirst. Thedeviceenvelope and the bare record are kept as fallbacks for older VTAs.Tests
bindingenvelope parsesdeviceenvelope and bare record still parseNone, so it is still reported as a contract mismatchcargo test -p openvtc-core --lib devices: 30 passed.cargo clippy -p openvtc-core --all-targets: clean.Checklist (vti-stack-development-guide)