@devries-cameron20 / composio Mirror · read-only / commits / d17844c84
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): fail the installation guard when a freshly built release skips the PATH write

The shell-config check accepted the legacy install.sh block on every leg, justified by a comment claiming no leg installs a binary built from this checkout. Build CLI Binaries calls this workflow with the tag it just released, so that leg does exercise the new binary — and a completely broken `composio install` that fell through to install.sh's writer still reported success. Callers now declare built_from_this_checkout; those legs must show the CLI-managed PATH line. promote-stable keeps the permissive check, since it rebuilds the promoted beta's own commit, which can predate the writer.

jkomyno committed Aug 4, 2026 at 19:16 UTC d17844c848ccafdcfeb11cc72dd4747010ae2c9e
2 files changed +32 -7
.github/workflows/build-cli-binaries.yml
+5
@@ -291,6 +291,11 @@ jobs:
291 uses: ./.github/workflows/cli.test-installation.yml
292 with:
293 version: ${{ needs.prepare.outputs.release_tag }}
294 + # A beta (push to next, or a manual build-beta) is built from this branch's
295 + # HEAD, so its `composio install` must write the CLI-managed PATH line.
296 + # promote-stable instead rebuilds the promoted beta's own commit, which can
297 + # predate that writer, so it keeps the permissive check.
298 + built_from_this_checkout: ${{ inputs.action != 'promote-stable' }}
299
300 create-install-instructions:
301 name: Create Install Instructions
.github/workflows/cli.test-installation.yml
+27 -7
@@ -18,6 +18,15 @@ on:
18 required: false
19 default: 'latest'
20 type: string
21 + built_from_this_checkout:
22 + description: >-
23 + Set by callers whose run built the release under test from this
24 + branch. Those legs must produce the CLI-managed PATH line; legs that
25 + install an older published release may still produce install.sh's
26 + legacy block.
27 + required: false
28 + default: false
29 + type: boolean
30
31 permissions:
32 contents: read
@@ -334,6 +343,8 @@ jobs:
343 fi
344
345 - name: Test shell config updates
346 + env:
347 + BUILT_FROM_THIS_CHECKOUT: ${{ inputs.built_from_this_checkout }}
348 run: |
349 echo "Checking shell configuration updates..."
350
@@ -352,13 +363,16 @@ jobs:
363 exit 1
364 fi
365
355 - # Every leg of this workflow installs a published release binary, never one
356 - # built from this checkout: releases predating the CLI-managed PATH line
357 - # (workflow_dispatch re-verification, workflow_call with the default
358 - # 'latest', promote-stable rebuilds of an older beta) still write the
359 - # legacy install.sh block with COMPOSIO_INSTALL_DIR, as does install.sh's
360 - # fallback when the binary cannot run. Accept either working layout and
361 - # fail only when neither PATH setup is present.
366 + # Which PATH layout is acceptable depends on where the binary under test
367 + # came from. Build CLI Binaries calls this workflow with
368 + # built_from_this_checkout, having released the binary in that same run
369 + # from this branch, so `composio install` must have written the
370 + # CLI-managed line — a broken install that silently falls through to
371 + # install.sh's inline writer has to fail here. Every other leg
372 + # (workflow_dispatch re-verification, the default 'latest', tag pushes,
373 + # promote-stable rebuilds of an older beta's commit) installs a release
374 + # that may predate the CLI-managed line and still writes the legacy
375 + # install.sh block with COMPOSIO_INSTALL_DIR, which stays acceptable.
376 if grep -Fqx 'export PATH="$HOME/.composio:$PATH"' "$config_file"; then
377 if grep -q 'COMPOSIO_INSTALL_DIR' "$config_file"; then
378 echo "❌ $config_file has the CLI-managed PATH line but still persists COMPOSIO_INSTALL_DIR"
@@ -367,6 +381,12 @@ jobs:
381 exit 1
382 fi
383 echo "✅ $config_file updated with the CLI-managed PATH line"
384 + elif [[ "$BUILT_FROM_THIS_CHECKOUT" == "true" ]]; then
385 + echo "❌ $config_file has no CLI-managed PATH line, so \`composio install\` did not configure PATH"
386 + echo "This release was built from this checkout, so install.sh's legacy fallback block is not acceptable here."
387 + echo "=== $config_file contents ==="
388 + cat "$config_file"
389 + exit 1
390 elif grep -Fqx 'export PATH="$COMPOSIO_INSTALL_DIR:$PATH"' "$config_file" &&
391 grep -Eq '^export COMPOSIO_INSTALL_DIR=' "$config_file"; then
392 echo "✅ $config_file updated with the legacy install.sh PATH block"