fix(assign): send matching_capabilities as CSV; add --template flag to deploy#16
Open
Bradymck wants to merge 1 commit into
Open
fix(assign): send matching_capabilities as CSV; add --template flag to deploy#16Bradymck wants to merge 1 commit into
Bradymck wants to merge 1 commit into
Conversation
Server drops all but the last value when multiple form fields with the same name are sent. Fixes openhome assign wiping all but one capability. Also adds --template <id> flag to openhome deploy as a workaround for the cloud router ignoring CLI-deployed abilities (template: null issue). See #14 for context and the proper server-side fix. Fixes #14 (assign bug). References #14 (template workaround). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
Fixes two bugs reported in #14 by @realdecimalist.
openhome assignwipes all but last capability —assignCapabilities()was sending onematching_capabilitiesform field per ID; the server keeps only the last. Changed to a single CSV field:capabilityIds.join(",").--template <id>flag onopenhome deploy— workaround for the cloud router ignoring CLI-deployed abilities (template: null). Users can now pass a known template ID to match portal-created behaviour until the server-side router fix lands. See openhome-cli deploy creates abilities that the cloud router silently ignores (template:null) #14 for background.Test plan
openhome assign --agent <id> --capabilities A,B,C— verify all three IDs land in the server's capability list (not just C)openhome deploy ./ability.zip --template 92 --name test ...— verify deployed ability hastemplate: 92and fires on voice triggeropenhome deploywithout--template— verify existing behaviour unchanged (templatefield omitted from form)npm run build— clean ✅Closes #14 (assign bug). The
template: nullrouter issue requires a server-side fix; the flag is a client-side escape hatch.🤖 Generated with Claude Code