playbooks/deploy-vibevoice: fix the /v1/audio/voices verify (was greping for nonexistent literals)
Build + container + /health all came up clean on the re-run; only the
voices-endpoint verify failed. The check greped the response body for
"voices"/"voice"/alloy/Carter — but VibeVoice's actual response shape
is OpenAI list-format `{"object":"list","data":[...]}`, which contains
none of those substrings. On a fresh install the data array is also
empty (voices live at /worktank/vibevoice/voices/ and the user seeds
them).
Switched the check to parse the JSON and assert the shape (object="list",
data is a list). Robust against empty voices, robust against future
schema additions.
This commit is contained in:
@@ -88,8 +88,16 @@ verify:
|
||||
shell: curl -sf -o /dev/null http://localhost:{{ host_port }}/health
|
||||
changed_when: "false"
|
||||
|
||||
- name: /v1/audio/voices returns valid JSON
|
||||
shell: curl -sf http://localhost:{{ host_port }}/v1/audio/voices | grep -q '"voices"\|"voice"\|alloy\|Carter'
|
||||
- name: /v1/audio/voices returns OpenAI list-shape JSON
|
||||
# Response is `{"object":"list","data":[...]}` per OpenAI's
|
||||
# /v1/audio/voices contract. `data` may be empty when no voice
|
||||
# files are seeded yet at /worktank/vibevoice/voices/ — the
|
||||
# wrapper is still healthy. Don't grep for sample voice names;
|
||||
# the seed set is user-controlled and a fresh install legitimately
|
||||
# ships with zero voices.
|
||||
shell: |
|
||||
curl -sf http://localhost:{{ host_port }}/v1/audio/voices \
|
||||
| python3 -c "import json,sys; d=json.load(sys.stdin); assert d.get('object')=='list' and isinstance(d.get('data'), list)"
|
||||
changed_when: "false"
|
||||
|
||||
- name: Container is running
|
||||
|
||||
Reference in New Issue
Block a user