Repository navigation
feat(validate): catch undefined squad variables and Liquid transfer numbers - #99
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Contributor
Devin Review🟢 Devin Review found nothing to fix · View findings |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 21, 2026
…umbers (#99) * feat(validate): warn on undefined squad variables Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(validate): reject Liquid transfer destination numbers Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: explain squad variable and transfer number validation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: link NHS example across stacked PR branches Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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
Two offline validate rules for sharing one assistant set across many practice squads (PRISM-2684). Stacked on #94, so prompt blocks are expanded before the checks run.
variable-undefined(warn; blocking with--strict)On a live call, Vapi leaves an undefined Liquid variable in the text as the literal
{{name}}(PRISM-2672). A squad that forgetspractice_mailboxwould read{{practice_mailbox}}to a caller. For each squad member, the rule checks the effective assistant (base merged with memberassistantOverrides, then squadmembersOverrides):firstMessage,voicemailMessage,endCallMessage, and string fields of attached tools (model.toolIds, inlinemodel.tools,tools:append, transferdestinations). Toolcodeis not checked.variableValuescustomer,phoneNumber,transport,call,now,currentDateTime,date,time,year,month,day, from vapiassistantDefaultOverridesBuild.tsandvariableUtil.tsvariableExtractionPlansetsassign/capture/forlocalsraw/commentblocks, filter names, and dotted paths, which are checked by their root name.It is a warning, not an error, because values can also come at call time (API
assistantOverrides, phone-number overrides), which files can't see. Only this rule is promoted by--strict; other warnings behave as before.transfer-number-liquid(error)This was found on the live run:
POST /toolreturns 400 when a transferCalldestinations[].numberholds{{urgent_handover_number}}. SettingnumberE164CheckEnabled: falsedoesn't help, because the API still requires^\+?[a-zA-Z0-9]+$(vapitransferCallTool.types.ts). The rule flags{{or{%in transfer numbers wherever the tool is defined: standalone tools, inlinemodel.tools, and member/squadtools:append. Its message points to a per-practice literal number in the squad'smembersOverrides["tools:append"](see #100).Tests:
tests/validate-variables.test.ts(12 cases, including two squads sharing one assistant where only one is missing a value) andtests/validate-transfer-numbers.test.ts(8 cases). Results:npm test733 pass / 0 fail,tscclean, biome clean.