@devries-cameron20 / composio-1 / commits / 2b9c02aea
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

test(cli): close the drift-guard bypass for duplicated requested_shell()

jkomyno committed Aug 3, 2026 at 20:24 UTC 2b9c02aea371483a3c342379f7f01d5f1b83c27d
1 file changed +4
test/install-sh-release-resolution.test.sh
+4
@@ -52,6 +52,10 @@ for variant in bash zsh fish; do
52 variant_script="$repo_root/install/$variant.sh"
53 grep -Fqx "requested_shell() { printf '%s\\n' $variant; }" "$variant_script" ||
54 fail "install/$variant.sh must hardcode requested_shell() for $variant"
55 + # The diff below masks every requested_shell() line, so a second overriding
56 + # definition would slip through it; require exactly one such line per variant.
57 + [[ $(grep -Fc 'requested_shell()' "$variant_script") -eq 1 ]] ||
58 + fail "install/$variant.sh must mention requested_shell() exactly once"
59 diff <(grep -Fv 'requested_shell()' "$repo_root/install/bash.sh") \
60 <(grep -Fv 'requested_shell()' "$variant_script") >/dev/null ||
61 fail "install/$variant.sh drifted from install/bash.sh outside requested_shell()"