@devries-cameron20 / composio Mirror · read-only / commits / 803f50f52
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 17:15 UTC

ci(cli): make the canary probe prove the managed PATH block

Install the no-arg canary with COMPOSIO_BIN_DIR=$HOME/.composio-canary/bin, a directory Ubuntu's ~/.profile never contributes, so the env -i login probe passes only when the managed block itself makes composio resolvable, and assert nothing lands in ~/.local/bin.

jkomyno committed Aug 4, 2026 at 00:16 UTC 803f50f524a16423240bb8c05e56270eabb6934c
1 file changed +29 -14
.github/workflows/cli.install-health-check.yml
+29 -14
@@ -68,6 +68,13 @@ jobs:
68 # the assertions mirror cli.test-installation.yml's checks — the managed PATH block in
69 # ~/.bashrc, plus that a login shell can actually resolve the binary.
70 #
71 + # COMPOSIO_BIN_DIR is pinned to a NON-default directory ($HOME/.composio-canary/bin)
72 + # to isolate managed-PATH reachability: Ubuntu's skel ~/.profile already adds
73 + # ~/.local/bin to PATH, and the ~/.bash_profile the installer seeds keeps sourcing
74 + # ~/.profile — so with the default bin dir the login-shell probe below would find
75 + # composio even if the managed block did nothing. No startup file but the managed
76 + # block ever adds the canary dir, so resolving composio from it proves the block.
77 + #
78 # Deployment coupling: like the production legs in cli.install-e2e.yml, this installs
79 # from the PRODUCTION installer (composio.dev/install), so the shell-setup assertions
80 # only pass once the auto-default ships there. This workflow is schedule/workflow_dispatch
@@ -87,15 +94,20 @@ jobs:
94 rm -rf \
95 "$HOME/.composio/services" \
96 "$HOME/.composio/acp-adapters" \
90 - "$HOME/.composio/local-tools-binaries"
91 - curl -fsSL https://composio.dev/install | SHELL=/bin/bash sh
97 + "$HOME/.composio/local-tools-binaries" \
98 + "$HOME/.composio-canary"
99 + curl -fsSL https://composio.dev/install | SHELL=/bin/bash COMPOSIO_BIN_DIR="$HOME/.composio-canary/bin" sh
100 test -x "$HOME/.composio/composio"
93 - test -L "$HOME/.local/bin/composio"
94 - "$HOME/.local/bin/composio" --version
101 + test -L "$HOME/.composio-canary/bin/composio"
102 + "$HOME/.composio-canary/bin/composio" --version
103 + # The pinned leg's default entry point was removed above and must stay
104 + # absent: the canary bin dir is the only place this install may surface
105 + # the binary, so nothing outside the managed block can resolve it.
106 + test ! -e "$HOME/.local/bin/composio"
107
108 # Assert the auto shell-setup contract: the managed PATH block landed in ~/.bashrc.
109 if grep -Fqx '# Composio CLI' "$HOME/.bashrc" \
98 - && grep -Fqx 'export PATH="$HOME/.local/bin:$PATH"' "$HOME/.bashrc"; then
110 + && grep -Fqx 'export PATH="$HOME/.composio-canary/bin:$PATH"' "$HOME/.bashrc"; then
111 echo "✅ ~/.bashrc gained the managed Composio PATH block via automatic shell setup"
112 else
113 echo "❌ ~/.bashrc missing the managed Composio PATH block after the no-argument install"
@@ -114,7 +126,7 @@ jobs:
126 login_file="$HOME/.bash_profile"
127 fi
128 if grep -Fqx '# Composio CLI' "$login_file" \
117 - && grep -Fqx 'export PATH="$HOME/.local/bin:$PATH"' "$login_file"; then
129 + && grep -Fqx 'export PATH="$HOME/.composio-canary/bin:$PATH"' "$login_file"; then
130 echo "✅ $login_file gained the managed Composio PATH block via automatic shell setup"
131 else
132 echo "❌ $login_file missing the managed Composio PATH block after the no-argument install"
@@ -123,16 +135,19 @@ jobs:
135 exit 1
136 fi
137
126 - # Assert a login shell actually resolves the binary through that PATH block.
127 - # env -i drops the step's inherited PATH: GITHUB_PATH from the pinned-tag step
128 - # and Ubuntu's skel ~/.profile both already prepend ~/.local/bin, so a probe
129 - # that inherits them would pass even if the login-file write regressed. This
130 - # mirrors the harness's assert_login_bash_path clean-environment probe.
131 - if env -i HOME="$HOME" PATH=/usr/bin:/bin bash -ilc 'command -v composio' \
138 + # Assert a login shell actually resolves the binary through the MANAGED
139 + # PATH block. env -i drops the step's inherited PATH (GITHUB_PATH from the
140 + # pinned-tag step), and the non-default canary bin dir defeats the other
141 + # leak: ~/.profile — which the installer-seeded ~/.bash_profile keeps
142 + # sourcing — prepends ~/.local/bin, never $HOME/.composio-canary/bin. The
143 + # probe therefore requires the resolved path to be the canary entry point.
144 + # This mirrors the harness's assert_login_bash_path clean-environment probe.
145 + resolved=$(env -i HOME="$HOME" PATH=/usr/bin:/bin bash -ilc 'command -v composio' || true)
146 + if [ "$resolved" = "$HOME/.composio-canary/bin/composio" ] \
147 && env -i HOME="$HOME" PATH=/usr/bin:/bin bash -ilc 'composio --version'; then
133 - echo "✅ composio resolves via a login bash shell"
148 + echo "✅ composio resolves to the managed canary bin dir via a login bash shell"
149 else
135 - echo "❌ composio did not resolve via a login bash shell"
150 + echo "❌ composio did not resolve to \$HOME/.composio-canary/bin/composio via a login bash shell (got: ${resolved:-nothing})"
151 exit 1
152 fi
153