[zh-TW] Use Chinese search_query examples in HassMediaSearchAndPlay tests - #4026
Merged
bluefoxlee merged 2 commits intoJul 30, 2026
Merged
Conversation
…ests The two English examples added in OHF-Voice#4025 pass this repo's CI but fail the packaging sanity check in OHF-Voice/intents-package, because zh-TW sets ignore_whitespace and the packaged data applies it while this repo's test fixture does not. Replaces them with Chinese examples that resolve to the same value under either configuration.
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.
Changes
The two English
search_queryexamples added in #4025 pass this repo's CI but fail the packaging sanity check inOHF-Voice/intents-package, which will break the nightly buildThe cause is a configuration difference, not the templates. zh-TW sets
ignore_whitespace: true, which strips whitespace from the whole utterance before matching.在電視上播放 Taylor Swifttherefore resolves tosearch_query='TaylorSwift'when language settings are applied — as they are in the packaged JSON that Home Assistant loads — but to'Taylor Swift'when they are not, which is the case in this repo's test fixture.This PR replaces both English examples with Chinese ones that resolve to the same value under either configuration, so the sanity check passes regardless:
ignore_whitespace: falsetrue在電視上播放 五月天'五月天''五月天'在客廳播放 怪物 的專輯'怪物''怪物'Spaces around a query are dropped either way, because the wildcard strips leading and trailing whitespace from its capture.
The fixture issue behind the divergence is fixed separately in #4027. The underlying wildcard behaviour is reported upstream in OHF-Voice/hassil#276.
Testing
python3 -m script.intentfest validate(all languages) — All good!pytest tests -n auto— 14662 passedsettingsapplied (i.e. the packaged configuration) — 14662 passedThe second run is the one that matters here: it confirms these examples hold under the configuration the sanity check uses.