@devries-cameron20 / composio Mirror · read-only / commits / 6e7fc24d9
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, 19:45 UTC

fix(ts): disable publint pack under Turbo to fix flaky build ENOENT (#3661)

This PR: - fixes the intermittent `E2E Test CLI (scratch)` → **Build** failure seen on the changeset release PR #3616, where `@composio/anthropic#build` died with: ``` Error: ENOENT: no such file or directory, open '/tmp/tsdown-pack-XXXXXX/composio-anthropic-0.10.0.tgz' ``` - gates `publint` with `!isTurboTask` in `tsdown.config.base.ts`, mirroring the existing ATTW workaround, so neither publish-readiness check packs a tarball under Turbo ## Root cause `tsdown.config.base.ts` already disabled **ATTW** under Turbo to dodge a "tarball path bug for scoped packages", but left **publint** enabled with `pack: 'pnpm'`. In tsdown the pack is shared and runs whenever *either* check is enabled: ```js if (publintConfigs.length || attwConfigs.length) { const tarball = await packTarball(pkg.packageJsonPath); // pnpm pack → temp dir → readdir → readFile ... } ``` So disabling ATTW alone did **not** stop the pack — publint kept triggering it, and with it the intermittent `readdir`-then-`readFile` race where the packed `.tgz` is gone by the time `readFile` runs. It's flaky: this run it hit `@composio/anthropic` while 14 sibling scoped packages packed fine. ## Fix `publint.enabled: true` → `publint.enabled: !isTurboTask`. With both ATTW and publint disabled under Turbo, `packTarball()` is never called in workspace/CI builds, eliminating the race. Direct package builds (no `TURBO_HASH`) keep running both checks with packing — where the bug does not occur. ## Verification (local, `--force` to bypass cache) - **Turbo build before:** `[publint]` runs for every package (packs the tarball) → race surface present. - **Turbo build after:** `0` publint runs, `3 successful, 3 total`, all `🙏 Build succeeded!` → pack step gone. - **Direct build after** (`env -u TURBO_HASH pnpm build` in `providers/anthropic`): both `✔ [attw]` and `✔ [publint]` run and pass → coverage retained off-Turbo.

Alberto Schiabel committed Jun 25, 2026 at 04:31 UTC 6e7fc24d9317f4515a957ccb8625b224859d85be
1 file changed +6 -3
tsdown.config.base.ts
+6 -3
@@ -1,7 +1,10 @@
1 import type { UserConfig } from 'tsdown';
2
3 -// Turbo task execution triggers a tsdown ATTW tarball path bug for scoped packages.
4 -// Keep ATTW for direct package builds, but disable it for workspace builds.
3 +// Turbo task execution triggers a tsdown tarball-pack path bug for scoped packages:
4 +// an intermittent ENOENT while reading the packed `.tgz` (e.g. composio-anthropic-*.tgz).
5 +// tsdown packs the tarball once and shares it between ATTW and publint, and only runs the
6 +// pack when at least one of them is enabled — so BOTH must be disabled to skip the pack
7 +// under Turbo. Keep both checks for direct package builds; disable them for workspace builds.
8 const isTurboTask = Boolean(process.env.TURBO_HASH);
9
10 /**
@@ -88,7 +91,7 @@ export const baseConfig = {
91 * Configuration for publint.
92 */
93 publint: {
91 - enabled: true,
94 + enabled: !isTurboTask,
95 level: 'error',
96 pack: 'pnpm',
97 },