Skip to content

fix(devices): read the device/register 0.2 binding envelope - #637

Merged
stormer78 merged 1 commit into
mainfrom
fix/636-device-register-binding
Nov 26, 2026
Merged

stormer78 merged 1 commit into
mainfrom
fix/636-device-register-binding

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Fixes #636.

Problem

device/register/0.2 responds with { "binding": DeviceBinding }, which is what the VTA sends (vta-service/src/operations/device.rs). parse_binding only looked under device or at the top level, so the first launch after setup logged WARNING: device registration failed: VTA contract mismatch: device registration returned no binding even though the registration had succeeded. That launch also never learned its own deviceId, which live_siblings falls back to for VTAs whose rows lack consumerDid.

Fix

Read binding first. The device envelope and the bare record are kept as fallbacks for older VTAs.

Tests

  • Spec binding envelope parses
  • Legacy device envelope and bare record still parse
  • A response with no binding still returns None, so it is still reported as a contract mismatch

cargo test -p openvtc-core --lib devices: 30 passed. cargo clippy -p openvtc-core --all-targets: clean.

Checklist (vti-stack-development-guide)

  • R3.6: response shape checked against the current spec bundle and VTA source
  • R6.4: a reply that really has no binding still surfaces as a contract mismatch

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>
@stormer78
stormer78 requested a review from a team as a code owner November 26, 2026 19:27
@stormer78 stormer78 added the backport release/0.9 Cherry-pick onto release/0.9 once merged label Nov 26, 2026
@stormer78
stormer78 merged commit 7b89bfe into main Nov 26, 2026
22 checks passed
@stormer78
stormer78 deleted the fix/636-device-register-binding branch November 26, 2026 20:16
@github-actions

Copy link
Copy Markdown

Backport branch created but failed to create PR.
Request to create PR rejected with status 403.

(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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/0.9 Cherry-pick onto release/0.9 once merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(devices): first launch warns "device registration failed … returned no binding" although the VTA registered the device

1 participant