Files
composiohq__composio/package.json
T
Alberto Schiabel 08f7072110 fix(ci): make CLI releases reliably ship binary assets (#3515)
## Summary

Permanently stops the recurring *"release published with zero assets →
install/upgrade 404s"* outage
(https://github.com/ComposioHQ/composio/issues/3408,
https://github.com/ComposioHQ/composio/issues/3269; regressions of
https://github.com/ComposioHQ/composio/issues/2625 and
https://github.com/ComposioHQ/composio/issues/1820 — 3 of the last 5
stable releases shipped empty).

**Root cause:** a concurrent-writer race. On a CLI version bump,
`changesets/action` creates an empty `@composio/cli@x.y.z` GitHub
Release in seconds, then the slower `build-cli-binaries.yml` fails its
`gh release create` because the release already exists — so binaries
never attach.

> 🥞 **Stacked on #3415** (`pi/exclude-cli-ts-release-42161920`), which
removes the *second writer* (changesets no longer creates CLI releases).
Review/merge #3415 first; this PR targets that branch. This PR hardens
the now-sole writer so a *partial* build can't publish either, and fixes
the monitoring that hid the failure.

## What changed (`build-cli-binaries.yml` + canary)

- **Draft → verify → publish.** The release is built as a **draft**,
then a gate asserts all 6 canonical assets are present **and** `state ==
"uploaded"` (loud `::error::` + fail otherwise), and only the final step
flips it to published. Drafts fire no `release: published` event and are
excluded from `/releases/latest`, so no install.sh / Homebrew / redirect
consumer can observe an incomplete release.
- **`fail-fast: false`** on the build matrix → a single platform failure
can never publish a partial set (`needs.build.result` is `success` only
if all legs pass).
- **Per-tag job-level `concurrency`** so re-runs / quick pushes can't
interleave uploads on the same tag, without serializing unrelated betas.
- **Beta-safe:** `--prerelease` is set on the draft so betas stay
prereleases through the publish flip.
- **`promote-stable` guard** uses `gh release view --json isDraft` (the
REST tags endpoint 404s on drafts) to resume an existing draft but
refuse an already-published tag.
- **Least privilege:** workflow defaults to `contents: read`; only the
release job opts up to `contents: write`.
- **Canary fix** (`cli.install-health-check.yml`): install the newest
stable **pinned** tag (`npm view @composio/cli version`) instead of the
asset-aware no-arg flow, which self-heals to the last good release and
kept the canary green through every outage.

## Idempotency note

Re-running a run that failed **before publish** is safe (reuse draft +
`--clobber`). An already-**published** tag is refused, not mutated — by
design.

## Testing

- Extended `test/release-workflow.test.ts` (run via `pnpm
test:release-workflow`) to lock in: draft→verify→publish ordering,
`fail-fast: false`, per-tag concurrency, preserved `--prerelease`, and
the pinned-tag canary. ✅ passes.
- `shellcheck` clean on the new `run:` scripts; YAML validated.
`actionlint` runs in CI.
- Runtime verification of the full green path happens on the next
release CI run.

## Out of scope (deferred to their own PRs)

Per reviewer consensus, these are real but *not this bug*: a per-release
npm↔GitHub asset auditor (needs a grace window), the Homebrew trigger
constraint (folds into #3355), `composio upgrade` missing-asset back-off
(https://github.com/ComposioHQ/composio/issues/3269), and a rollback
runbook.

---------

Co-authored-by: Rahul Tarak <cryogenicplanet@gmail.com>
2026-06-16 15:07:23 +04:00

106 lines
4.0 KiB
JSON

{
"name": "composio",
"version": "0.10.0-alpha.1",
"private": true,
"description": "",
"workspaces": [
"ts/packages/core",
"ts/packages/json-schema-to-zod",
"ts/packages/cli",
"ts/packages/cli-keyring",
"ts/packages/cli-local-tools",
"ts/packages/providers/*"
],
"scripts": {
"build": "turbo build",
"build:binary": "turbo build:binary --filter=./ts/packages/cli",
"build:binary:all": "turbo build:binary:all --filter=./ts/packages/cli",
"build:binary:checksums": "turbo build:binary:checksums --filter=./ts/packages/cli",
"install:binary": "turbo install:binary --filter=./ts/packages/cli",
"build:packages": "turbo build --filter=./ts/packages/**",
"cli:record": "turbo run record --filter=./ts/packages/cli",
"record": "turbo run record",
"test": "pnpm run test:install-sh && pnpm run test:release-workflow && turbo test --filter=./ts/packages/** --filter=!@e2e-tests/* && pnpm run test:examples",
"test:install-sh": "bash test/install-sh-release-resolution.test.sh",
"test:release-workflow": "bun run test/release-workflow.test.ts",
"test:examples": "tsx ts/scripts/validate-examples.ts",
"test:e2e": "turbo test:e2e --filter='@e2e-tests/*'",
"test:e2e:node": "turbo test:e2e:node --filter='@e2e-tests/node-*'",
"test:e2e:deno": "turbo test:e2e:deno --filter='@e2e-tests/deno-*'",
"test:e2e:cli": "turbo test:e2e:cli --filter='@e2e-tests/cli-*'",
"test:e2e:cloudflare": "turbo test:e2e:cloudflare --filter='@e2e-tests/cf-*'",
"test:ui": "vitest --ui",
"typecheck": "turbo typecheck --filter=./ts/packages/**",
"typecheck:tsc": "turbo typecheck:tsc --filter=./ts/packages/**",
"lint": "eslint ts/packages --ext .ts,.tsx",
"lint:packages": "eslint ts/packages --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"lint:fix:packages": "eslint ts/packages --ext .ts,.tsx --fix",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"preinstall": "./ts/scripts/pre-install.sh",
"prepare": "husky",
"create:provider": "bash ts/scripts/create-provider.sh",
"create:example": "bash ts/scripts/create-example.sh",
"check:peer-deps": "tsx ts/scripts/check-peer-deps.ts",
"update:peer-deps": "tsx ts/scripts/update-peer-deps.ts",
"prepublish": "pnpm run build:packages",
"changeset": "changeset",
"changeset:version": "changeset version",
"changeset:release": "bash ts/scripts/changeset-release.sh",
"changeset:pre-enter": "changeset pre enter",
"changeset:pre-exit": "changeset pre exit",
"clean": "git clean -xdf .turbo node_modules ts/packages/**/.turbo ts/packages/**/node_modules ts/packages/**/dist",
"clean:workspace": "pnpm turbo clean"
},
"packageManager": "pnpm@10.28.2",
"devEngines": {
"runtime": {
"name": "node",
"version": "20.20.2",
"onFail": "warn"
},
"packageManager": {
"name": "pnpm",
"version": "10.28.2",
"onFail": "warn"
}
},
"devDependencies": {
"@arethetypeswrong/cli": "catalog:",
"@changesets/cli": "^2.29.8",
"@composio/anthropic": "workspace:*",
"@composio/cli-local-tools": "workspace:*",
"@composio/core": "workspace:*",
"@composio/openai": "workspace:*",
"@types/bun": "^1.3.6",
"@types/node": "^22.15.18",
"@typescript/native-preview": "catalog:",
"@vitest/ui": "catalog:",
"eslint": "^9.25.1",
"globals": "^16.0.0",
"husky": "^9.1.7",
"lint-staged": "^15.5.1",
"prettier": "^3.5.3",
"publint": "catalog:",
"semver": "^7.7.2",
"tsdown": "catalog:",
"tsx": "catalog:",
"turbo": "^2.8.11",
"typescript-eslint": "^8.31.0",
"vitest": "catalog:",
"zod": "catalog:"
},
"lint-staged": {
"ts/packages/**/*.{ts,tsx}": [
"eslint --fix"
],
"ts/packages/**/*.{ts,tsx,js,jsx,json,md}": [
"prettier --write"
],
"python/**/*.py": [
"ruff check --fix --config python/config/ruff.toml",
"ruff format --config python/config/ruff.toml"
]
}
}