feat(cli): register-device --claim mints a device claim and reports its claim_id - #54
Open
solidspark wants to merge 1 commit into
Open
solidspark wants to merge 1 commit into
solidspark wants to merge 1 commit into
Conversation
…ts claim_id The provision endpoint accepts device_claims but never echoes a claim id back; with new_claim_using_device_id the claim is named after the device, so Device.claim_id is filled client-side. A 403 from the missing can_create_device_claims entitlement is surfaced as 'entitlement requirements not met' rather than an unexpected error. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
solidspark
force-pushed
the
feat/register-device-claim
branch
from
September 9, 2026 22:48
1e2f36d to
70fd4ac
Compare
Collaborator
|
IMO it makes more sense to have a new command for this rather than a flag given the different paths and intents as well as the expansion of what can be done with this. Example potential set that matches the functionality of the backend: |
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
hubblenetwork org register-device --claimsendsdevice_claims: [{"new_claim_using_device_id": true}]on the provision request and prints the resultingclaim_id.--claim-destination-org <uuid>pins the minted claim's destination; using it without--claimis a usage error.Organization.register_device(claim=True, claim_destination_org_id=...);Devicegains aclaim_idfield.can_create_device_claimsentitlement is surfaced asError: entitlement requirements not met(exit 1) instead of an "Unexpected error".Note
The platform-api provision response never echoes a claim id. In
new_claim_using_device_idmode the cloud names the claim after the device, soDevice.claim_idis set to the device id client-side.Test plan
tests/test_cli_register_device_claim.py,tests/test_register_device_cloud.py,tests/test_register_device_validation.pypytest -m "not integration and not ble"— 671 passedruff check srcclean🤖 Generated with Claude Code