AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
ci: retire the old CI workflow, CI v2 becomes CI (#15842)
Louai Boumedieneca81aadd8671
diff --git a/.github/workflows/ci-v2.yml b/.github/workflows/ci-v2.ymldeleted file mode 100644index bc14cdf9c2b..00000000000--- a/.github/workflows/ci-v2.yml+++ /dev/null@@ -1,232 +0,0 @@-name: CI v2-on:- pull_request:--permissions:- actions: read- contents: read--concurrency:- group: ci-v2-${{ github.event.pull_request.number }}- cancel-in-progress: true--env:- # turbo --affected diffs against this ref. CI checkouts have origin/<base> but no local main.- TURBO_SCM_BASE: origin/${{ github.base_ref }}- TURBO_TELEMETRY_DISABLED: "1"--jobs:- changes:- runs-on: ubuntu-latest- if: github.repository == 'activepieces/activepieces'- outputs:- packages: ${{ steps.affected.outputs.packages }}- all: ${{ steps.affected.outputs.all }}- steps:- - uses: actions/checkout@v5- with:- fetch-depth: 0-- - name: Find affected packages- id: affected- run: |- set -euo pipefail- ALL=false- # Files outside any package (workflows, root config, tools) are invisible to turbo's- # graph, so a change there runs everything. Docs and markdown never do.- OUTSIDE_PACKAGES=$(git diff --name-only "$TURBO_SCM_BASE...HEAD" | grep -vE '^(packages/|docs/|brain/|\.agents/|\.claude/)|\.md$' || true)- if [ -n "$OUTSIDE_PACKAGES" ]; then- ALL=true- fi- # Pieces follow the old ci.yml rule: a piece runs when its own files changed, and every- # piece runs when pieces/framework or pieces/common changed. A change to a core package- # (core-piece-types, core-utils, ...) does not pull the 700+ pieces in, even though they- # depend on it; a break there is caught when pieces are published, not in the PR.- if ! DIRECT=$(npx --yes [email protected] ls --filter="[$TURBO_SCM_BASE...HEAD]" --output=json | jq -c '[.packages.items[].name]') \- || ! AFFECTED=$(npx --yes [email protected] ls --affected --output=json | jq -c '[.packages.items[].name]'); then- ALL=true- PACKAGES='[]'- else- PACKAGES=$(jq -cn --argjson direct "$DIRECT" --argjson affected "$AFFECTED" '- ($direct | any(. == "@activepieces/pieces-framework" or . == "@activepieces/pieces-common")) as $allPieces- | [$affected[] | select((startswith("@activepieces/piece-") | not) or $allPieces or IN($direct[]))]')- fi- echo "all=$ALL" >> "$GITHUB_OUTPUT"- echo "packages=$PACKAGES" >> "$GITHUB_OUTPUT"- echo "all=$ALL"- echo "packages=$PACKAGES"-- lint:- runs-on: ubuntu-latest- needs: changes- if: needs.changes.outputs.all == 'true' || needs.changes.outputs.packages != '[]'- steps:- - uses: actions/checkout@v5- with:- fetch-depth: 0-- - uses: ./.github/actions/setup- with:- turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}-- - name: Lint core packages- if: needs.changes.outputs.all == 'true'- run: npm run lint-core-- # Also on full runs: a PR that edits a workflow and pieces/framework in one go still needs- # every piece linted, and the changes job's list is what knows that.- - name: Lint affected packages- env:- AFFECTED_PACKAGES: ${{ needs.changes.outputs.packages }}- run: |- set -euo pipefail- FILTERS=$(echo "$AFFECTED_PACKAGES" | jq -r '.[] | "--filter=" + .' | tr '\n' ' ')- if [ -n "$FILTERS" ]; then- npx turbo run lint $FILTERS- fi-- build-test:- runs-on: ubuntu-latest- needs: changes- if: needs.changes.outputs.all == 'true' || needs.changes.outputs.packages != '[]'- services:- redis:- image: redis:7-alpine- options: >-- --health-cmd "redis-cli ping"- --health-interval 10s- --health-timeout 5s- --health-retries 5- ports:- - 6379:6379- env:- AP_REDIS_HOST: localhost- AP_REDIS_PORT: "6379"- steps:- - uses: actions/checkout@v5- with:- fetch-depth: 0-- - uses: ./.github/actions/setup- with:- turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}-- # One turbo invocation so every package builds once: the affected packages from the changes- # job, plus the core set on full runs. --affected and --filter intersect in turbo, so the- # union is built here as explicit filters. api is excluded because its `test` script runs- # the three integration suites serially; the api-tests matrix covers those.- - name: Typecheck, build and test- env:- AFFECTED_PACKAGES: ${{ needs.changes.outputs.packages }}- RUN_ALL: ${{ needs.changes.outputs.all }}- run: |- set -euo pipefail- FILTERS=$(echo "$AFFECTED_PACKAGES" | jq -r '.[] | select(. != "api") | "--filter=" + .' | tr '\n' ' ')- if [ "$RUN_ALL" = "true" ]; then- FILTERS="$FILTERS $(npx tsx tools/scripts/test-filters.ts)"- fi- npx turbo run typecheck build test $FILTERS-- - name: Check new migrations are rollback-safe- run: npx tsx tools/scripts/check-migration-rollback.ts-- # The api e2e tests import the worker's source, and the worker resolves @activepieces/sandbox- # through its built dist, so the api jobs build worker too and also run when worker is affected.- api-tests:- name: api (${{ matrix.name }})- runs-on: ubuntu-latest- needs: changes- if: needs.changes.outputs.all == 'true' || contains(needs.changes.outputs.packages, '"api"') || contains(needs.changes.outputs.packages, '"worker"')- strategy:- fail-fast: false- matrix:- include:- - name: ce- tasks: test-ce- - name: cloud- tasks: test-cloud- - name: ee, unit, migrations- tasks: test-ee test-unit check-migrations- services:- redis:- image: redis:7-alpine- options: >-- --health-cmd "redis-cli ping"- --health-interval 10s- --health-timeout 5s- --health-retries 5- ports:- - 6379:6379- env:- # .env.tests pins AP_REDIS_HOST=redis, the alias inside the job's docker network, which a- # non-container job is not on. dotenv does not override values already in the environment.- AP_REDIS_HOST: localhost- AP_REDIS_PORT: "6379"- steps:- - uses: actions/checkout@v5-- - uses: ./.github/actions/setup- with:- turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}-- - run: npx turbo run build ${{ matrix.tasks }} --filter=api --filter=worker-- # Only the tool-search integration tests, against real PostgreSQL + pgvector. The api-tests- # matrix runs them on PGLITE, which papers over node-postgres driver behaviour.- tool-search-postgres:- name: tool-search (postgres)- runs-on: ubuntu-latest- needs: changes- if: needs.changes.outputs.all == 'true' || contains(needs.changes.outputs.packages, '"api"')- services:- postgres:- image: pgvector/pgvector:pg16- env:- POSTGRES_USER: postgres- POSTGRES_PASSWORD: postgres- POSTGRES_DB: activepieces- options: >-- --health-cmd pg_isready- --health-interval 10s- --health-timeout 5s- --health-retries 5- ports:- - 5432:5432- env:- AP_DB_TYPE: POSTGRES- AP_POSTGRES_HOST: localhost- AP_POSTGRES_PORT: "5432"- AP_POSTGRES_DATABASE: activepieces- AP_POSTGRES_USERNAME: postgres- AP_POSTGRES_PASSWORD: postgres- AP_POSTGRES_USE_SSL: "false"- steps:- - uses: actions/checkout@v5-- - uses: ./.github/actions/setup- with:- turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}-- - name: Enable pgvector extension- run: |- PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d activepieces \- -c 'CREATE EXTENSION IF NOT EXISTS vector;'-- - run: npx turbo run build --filter=api-- # Serial: every file migrates the one shared service DB on DataSource.initialize().- - name: Run tool-search integration tests on Postgres- working-directory: packages/server/api- run: npx vitest run test/integration/ce/tool-search --bail 1 --passWithNoTests=false --no-file-parallelismdiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 0a7943960b9..84d743d86ff 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -6,64 +6,92 @@ permissions:actions: readcontents: read+concurrency:+ group: ci-${{ github.event.pull_request.number }}+ cancel-in-progress: true++env:+ # turbo --affected diffs against this ref. CI checkouts have origin/<base> but no local main.+ TURBO_SCM_BASE: origin/${{ github.base_ref }}+ TURBO_TELEMETRY_DISABLED: "1"jobs:- lint:+ changes:runs-on: ubuntu-latestif: github.repository == 'activepieces/activepieces'+ outputs:+ packages: ${{ steps.affected.outputs.packages }}+ all: ${{ steps.affected.outputs.all }}steps:- uses: actions/checkout@v5with:fetch-depth: 0- - uses: actions/setup-node@v6- with:- node-version: 24+ - name: Find affected packages+ id: affected+ run: |+ set -euo pipefail+ ALL=false+ # Files outside any package (workflows, root config, tools) are invisible to turbo's+ # graph, so a change there runs everything. Docs and markdown never do.+ OUTSIDE_PACKAGES=$(git diff --name-only "$TURBO_SCM_BASE...HEAD" | grep -vE '^(packages/|docs/|brain/|\.agents/|\.claude/)|\.md$' || true)+ if [ -n "$OUTSIDE_PACKAGES" ]; then+ ALL=true+ fi+ # Pieces override the dependency graph: a piece runs when its own files changed, and every+ # piece runs when pieces/framework or pieces/common changed. A change to a core package+ # (core-piece-types, core-utils, ...) does not pull the 700+ pieces in, even though they+ # depend on it; a break there is caught when pieces are published, not in the PR.+ if ! DIRECT=$(npx --yes [email protected] ls --filter="[$TURBO_SCM_BASE...HEAD]" --output=json | jq -c '[.packages.items[].name]') \+ || ! AFFECTED=$(npx --yes [email protected] ls --affected --output=json | jq -c '[.packages.items[].name]'); then+ ALL=true+ PACKAGES='[]'+ else+ PACKAGES=$(jq -cn --argjson direct "$DIRECT" --argjson affected "$AFFECTED" '+ ($direct | any(. == "@activepieces/pieces-framework" or . == "@activepieces/pieces-common")) as $allPieces+ | [$affected[] | select((startswith("@activepieces/piece-") | not) or $allPieces or IN($direct[]))]')+ fi+ echo "all=$ALL" >> "$GITHUB_OUTPUT"+ echo "packages=$PACKAGES" >> "$GITHUB_OUTPUT"+ echo "all=$ALL"+ echo "packages=$PACKAGES"- - uses: oven-sh/setup-bun@v2+ lint:+ runs-on: ubuntu-latest+ needs: changes+ if: needs.changes.outputs.all == 'true' || needs.changes.outputs.packages != '[]'+ steps:+ - uses: actions/checkout@v5with:- bun-version: latest+ fetch-depth: 0- - uses: actions/cache@v4+ - uses: ./.github/actions/setupwith:- path: ~/.bun/install/cache- key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}- restore-keys: ${{ runner.os }}-bun-+ turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}+ turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}+ turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}+ turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}- - run: bun install-- - name: Turbo Cache- uses: rharkor/[email protected]- with:- provider: s3- s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- s3-region: auto- s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}- max-age: 3w- max-size: 20gb+ - name: Lint core packages+ if: needs.changes.outputs.all == 'true'+ run: npm run lint-core- - name: Check if framework or common pieces are changed- id: check-framework-common+ # Also on full runs: a PR that edits a workflow and pieces/framework in one go still needs+ # every piece linted, and the changes job's list is what knows that.+ - name: Lint affected packages+ env:+ AFFECTED_PACKAGES: ${{ needs.changes.outputs.packages }}run: |- CHANGED_FILES="$(git diff --name-only HEAD origin/main | tr '\n' ' ')"- if echo "$CHANGED_FILES" | grep -q "pieces/framework\|pieces/common"; then- echo "framework_or_common_changed=true" >> $GITHUB_OUTPUT- else- echo "framework_or_common_changed=false" >> $GITHUB_OUTPUT+ set -euo pipefail+ FILTERS=$(echo "$AFFECTED_PACKAGES" | jq -r '.[] | "--filter=" + .' | tr '\n' ' ')+ if [ -n "$FILTERS" ]; then+ npx turbo run lint $FILTERSfi- - name: Lint core projects- run: npm run lint-core-- - name: Lint all pieces projects- if: steps.check-framework-common.outputs.framework_or_common_changed == 'true'- run: npm run lint-pieces-- main:+ build-test:runs-on: ubuntu-latest- if: github.repository == 'activepieces/activepieces'+ needs: changes+ if: needs.changes.outputs.all == 'true' || needs.changes.outputs.packages != '[]'services:redis:image: redis:7-alpine@@ -75,11 +103,6 @@ jobs:ports:- 6379:6379env:- # packages/server/api/.env.tests pins AP_REDIS_HOST=redis, the alias the service container- # answers to inside the job's docker network, which a non-container job is not on. dotenv- # (vitest.setup.ts) does not override values already in the environment, so this wins and- # the tests reach the published port. AP_REDIS_HOST/PORT are in turbo.json- # globalPassThroughEnv; without that turbo's strict env mode would drop them.AP_REDIS_HOST: localhostAP_REDIS_PORT: "6379"steps:@@ -87,116 +110,83 @@ jobs:with:fetch-depth: 0- - uses: actions/setup-node@v6- with:- node-version: 24-- - uses: oven-sh/setup-bun@v2- with:- bun-version: latest-- - uses: actions/cache@v4+ - uses: ./.github/actions/setupwith:- path: ~/.bun/install/cache- key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}- restore-keys: ${{ runner.os }}-bun--- - run: bun install-- - name: Turbo Cache- uses: rharkor/[email protected]- with:- provider: s3- s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- s3-region: auto- s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}- max-age: 3w- max-size: 20gb-- - name: Get changed files- id: changed-files- run: echo "files=$(git diff --name-only HEAD origin/main | tr '\n' ' ')" >> $GITHUB_OUTPUT-- - name: Check if framework or common pieces are changed- id: check-framework-common- run: |- CHANGED_FILES="${{ steps.changed-files.outputs.files }}"- if echo "$CHANGED_FILES" | grep -q "pieces/framework\|pieces/common"; then- echo "framework_or_common_changed=true" >> $GITHUB_OUTPUT- else- echo "framework_or_common_changed=false" >> $GITHUB_OUTPUT- fi-- - name: Extract pieces package names from changed files- id: extract-pieces- run: |- PIECES=$(echo "${{ steps.changed-files.outputs.files }}" | grep -oE "packages/pieces/(community|core)/[^/]+" | awk -F'/' '{print $NF}' | sort -u | tr '\n' ',' | sed 's/,$//')- if [ -n "$PIECES" ]; then- FILTERS=$(echo "$PIECES" | tr ',' '\n' | sed 's/.*/{&}/' | tr '\n' ',' | sed 's/,$//')- echo "pieces_filters=$FILTERS" >> $GITHUB_OUTPUT- else- echo "pieces_filters=" >> $GITHUB_OUTPUT- fi-- - name: Typecheck web- run: npx turbo run typecheck --filter=web-- - name: Build core projects- run: npx turbo run build --filter=web --filter=worker --filter=api --filter=@activepieces/engine --filter=@activepieces/piece-http --filter=@activepieces/piece-data-mapper --filter=@activepieces/piece-approval --filter=@activepieces/piece-webhook --filter=@activepieces/piece-delay-- - name: Build changed pieces projects- if: steps.extract-pieces.outputs.pieces_filters != '' && steps.check-framework-common.outputs.framework_or_common_changed == 'false'- run: |- IFS=',' read -ra PIECES <<< "${{ steps.extract-pieces.outputs.pieces_filters }}"- FILTER_ARGS=""- for piece in "${PIECES[@]}"; do- piece_name=$(echo "$piece" | tr -d '{}')- if [ -f "packages/pieces/community/${piece_name}/package.json" ] || [ -f "packages/pieces/core/${piece_name}/package.json" ]; then- FILTER_ARGS="$FILTER_ARGS --filter=@activepieces/piece-${piece_name}"- fi- done- if [ -n "$FILTER_ARGS" ]; then- npx turbo run build $FILTER_ARGS- fi-- - name: Build all pieces projects- if: steps.check-framework-common.outputs.framework_or_common_changed == 'true'- run: npx turbo run build --filter='@activepieces/piece-*'-- - name: Run all tests and migration checks in parallel+ turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}+ turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}+ turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}+ turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}++ # One turbo invocation so every package builds once: the affected packages from the changes+ # job, plus the core set on full runs. --affected and --filter intersect in turbo, so the+ # union is built here as explicit filters. api is excluded because its `test` script runs+ # the three integration suites serially; the api-tests matrix covers those.+ - name: Typecheck, build and test+ env:+ AFFECTED_PACKAGES: ${{ needs.changes.outputs.packages }}+ RUN_ALL: ${{ needs.changes.outputs.all }}run: |set -euo pipefail- pids=()+ FILTERS=$(echo "$AFFECTED_PACKAGES" | jq -r '.[] | select(. != "api") | "--filter=" + .' | tr '\n' ' ')+ if [ "$RUN_ALL" = "true" ]; then+ FILTERS="$FILTERS $(npx tsx tools/scripts/test-filters.ts)"+ fi+ npx turbo run typecheck build test $FILTERS- npx turbo run test $(npx tsx tools/scripts/test-filters.ts) &- pids+=($!)+ - name: Check new migrations are rollback-safe+ run: npx tsx tools/scripts/check-migration-rollback.ts- npx turbo run test-unit test-ce test-ee test-cloud check-migrations --filter=api &- pids+=($!)+ # The api e2e tests import the worker's source, and the worker resolves @activepieces/sandbox+ # through its built dist, so the api jobs build worker too and also run when worker is affected.+ api-tests:+ name: api (${{ matrix.name }})+ runs-on: ubuntu-latest+ needs: changes+ if: needs.changes.outputs.all == 'true' || contains(needs.changes.outputs.packages, '"api"') || contains(needs.changes.outputs.packages, '"worker"')+ strategy:+ fail-fast: false+ matrix:+ include:+ - name: ce+ tasks: test-ce+ - name: cloud+ tasks: test-cloud+ - name: ee, unit, migrations+ tasks: test-ee test-unit check-migrations+ services:+ redis:+ image: redis:7-alpine+ options: >-+ --health-cmd "redis-cli ping"+ --health-interval 10s+ --health-timeout 5s+ --health-retries 5+ ports:+ - 6379:6379+ env:+ # .env.tests pins AP_REDIS_HOST=redis, the alias inside the job's docker network, which a+ # non-container job is not on. dotenv does not override values already in the environment.+ AP_REDIS_HOST: localhost+ AP_REDIS_PORT: "6379"+ steps:+ - uses: actions/checkout@v5- npx tsx tools/scripts/check-migration-rollback.ts &- pids+=($!)+ - uses: ./.github/actions/setup+ with:+ turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}+ turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}+ turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}+ turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}- status=0- for pid in "${pids[@]}"; do- if ! wait "$pid"; then- status=1- fi- done- exit $status+ - run: npx turbo run build ${{ matrix.tasks }} --filter=api --filter=worker- # Runs ONLY the tool-search integration tests against a real PostgreSQL + pgvector- # service container. The default `main` job above runs these on PGLITE, which papers- # over node-postgres-specific driver behaviour (e.g. TypeORM `.query()` returning- # `[rows, count]` instead of a plain rows array). This job exists to catch that class- # of bug. It is intentionally scoped and additive — it does NOT change how the main- # suite runs.+ # Only the tool-search integration tests, against real PostgreSQL + pgvector. The api-tests+ # matrix runs them on PGLITE, which papers over node-postgres driver behaviour.tool-search-postgres:name: tool-search (postgres)runs-on: ubuntu-latest- if: github.repository == 'activepieces/activepieces'+ needs: changes+ if: needs.changes.outputs.all == 'true' || contains(needs.changes.outputs.packages, '"api"')services:postgres:image: pgvector/pgvector:pg16@@ -212,8 +202,6 @@ jobs:ports:- 5432:5432env:- # dotenv (vitest.setup.ts) loads .env.tests WITHOUT overriding values already- # present in the environment, so these job-level vars win over the PGLITE defaults.AP_DB_TYPE: POSTGRESAP_POSTGRES_HOST: localhostAP_POSTGRES_PORT: "5432"@@ -223,56 +211,22 @@ jobs:AP_POSTGRES_USE_SSL: "false"steps:- uses: actions/checkout@v5- with:- fetch-depth: 0-- - uses: actions/setup-node@v6- with:- node-version: 24-- - uses: oven-sh/setup-bun@v2- with:- bun-version: latest-- - uses: actions/cache@v4- with:- path: ~/.bun/install/cache- key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}- restore-keys: ${{ runner.os }}-bun--- - run: bun install- - name: Turbo Cache- uses: rharkor/[email protected]+ - uses: ./.github/actions/setupwith:- provider: s3- s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}- s3-region: auto- s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}- s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}- s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}- max-age: 3w- max-size: 20gb+ turbo-s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }}+ turbo-s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }}+ turbo-s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }}+ turbo-s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }}- name: Enable pgvector extension- # The pgvector image ships the extension binary but does not auto-create it in the- # database. The tool_search_index migration skips table creation when `vector` is- # absent, and the DB-only test never boots the server path that would CREATE it,- # so create it explicitly before migrations run.run: |PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d activepieces \-c 'CREATE EXTENSION IF NOT EXISTS vector;'- - name: Build api- run: npx turbo run build --filter=api+ - run: npx turbo run build --filter=api+ # Serial: every file migrates the one shared service DB on DataSource.initialize().- name: Run tool-search integration tests on Postgresworking-directory: packages/server/api- # --no-file-parallelism: these files all point at the one shared `activepieces`- # service DB and each runs migrations on `DataSource.initialize()`. Vitest's default- # forked parallelism runs those migration passes concurrently, which collide on- # shared catalog objects (the migrations table, en_natural collation, added columns)- # and fail non-deterministically. Serial execution migrates once; later files skip- # via the migrations table. (PGLITE gives each file its own DB, so the default suite- # is unaffected — only this shared-Postgres job needs serializing.)run: npx vitest run test/integration/ce/tool-search --bail 1 --passWithNoTests=false --no-file-parallelismdiff --git a/.github/workflows/warm-ci-cache.yml b/.github/workflows/warm-ci-cache.ymlindex 5ad0b7c6730..5068063aa56 100644--- a/.github/workflows/warm-ci-cache.yml+++ b/.github/workflows/warm-ci-cache.yml@@ -1,6 +1,6 @@name: Warm CI cache# GitHub only lets a pull request restore caches created on the same PR or on the base branch.-# CI v2 runs on pull requests only, so this seeds the base-branch copies (bun downloads and the+# CI runs on pull requests only, so this seeds the base-branch copies (bun downloads and the# compiled redis-memory-server binary) that every new PR's first run restores.on:push:diff --git a/brain/knowledge/engineering/ci-pipeline.md b/brain/knowledge/engineering/ci-pipeline.mdindex acdbd443c5a..815370ca5d2 100644--- a/brain/knowledge/engineering/ci-pipeline.md+++ b/brain/knowledge/engineering/ci-pipeline.md@@ -4,7 +4,7 @@ icon: ⏱️# CI Pipeline-The PR checks that decide whether a change builds and passes tests. Lives in `.github/workflows/ci-v2.yml` (`ci.yml` runs beside it until the side-by-side comparison ends). The gates that shape *how a PR is reviewed* are on *CI PR Review Hygiene*.+The PR checks that decide whether a change builds and passes tests. Lives in `.github/workflows/ci.yml`; it replaced the original `ci.yml` on 2026-09-27 after running beside it as `ci-v2.yml`. The gates that shape *how a PR is reviewed* are on *CI PR Review Hygiene*.**changes job** — the first job. Runs `turbo ls --affected` to list the packages the PR touches plus everything that depends on them, and sets `all=true` when a file outside any package changed (workflows, root config, `tools/`). Every other job keys off those two outputs.@@ -23,14 +23,16 @@ The PR checks that decide whether a change builds and passes tests. Lives in `.g- api's `test` script runs ce+ee+cloud serially. Any `turbo run test` over many packages must exclude api (`--filter='!api'`; `tools/scripts/test-filters.ts` does the same).- The api e2e tests (`execute-flow-e2e`, `test-step-e2e`, `piece-options-e2e`) import the worker's source, and `worker.ts` imports `@activepieces/sandbox`, which resolves to `packages/server/sandbox/dist`. A job that builds only api fails those three files with "Failed to resolve entry for package @activepieces/sandbox". The api jobs build `worker` as well and also run when worker is affected.- A cache saved during a pull request run is visible only to that PR and to nothing else. Caches every PR should hit (bun downloads, the compiled Redis binary) must be created on `main`; `warm-ci-cache.yml` does that on every push to main.-- Two turbo invocations running at the same time in one job race on `cache: false` builds: the old `ci.yml` failed `api#build` with "@activepieces/shared has no exported member" for a member that exists, because a second invocation was rewriting `shared/dist` while api's tsc read it. One invocation per job.+- Two turbo invocations running at the same time in one job race on `cache: false` builds: the retired pipeline failed `api#build` with "@activepieces/shared has no exported member" for a member that exists, because a second invocation was rewriting `shared/dist` while api's tsc read it. One invocation per job.- `--affected` and `--filter` intersect in turbo; there is no union flag. To run "the affected packages plus this fixed set" in one invocation, pass the affected names (the `changes` job outputs them as JSON) as explicit `--filter=<name>` arguments alongside the fixed ones. Two invocations rebuild the shared dependency chain twice because `build` is uncached.- Pieces are the one place the pipeline overrides the dependency graph, by decision (2026-09-24). A piece runs when its own files changed; every piece runs when `pieces/framework` or `pieces/common` changed. A change to `core-piece-types`, `core-utils`, `core-formula` or `core-execution` does not pull the 700+ pieces in, although they depend on it, because that cost about 20 minutes per such PR (5 of the last 60). The accepted blind spot: a core type change that breaks piece compilation is caught when pieces are published (`release-pieces.yml`), not in the PR. The `changes` job computes this with two turbo listings, `ls --filter='[base...HEAD]'` (changed directly) and `ls --affected` (plus dependents).+- The engine's tests execute five pieces (`AP_DEV_PIECES` in `packages/server/engine/vitest.config.ts`: http, data-mapper, approval, webhook, delay), so those five are engine devDependencies. That edge is what makes `--affected` pull engine in when one of them changes; without it a pieces-only PR ran the piece's checks and skipped the engine tests that exercise it (caught on the retirement PR, 2026-09-27). Three lists name the same set and must move together: that `AP_DEV_PIECES`, `@activepieces/engine#test` `dependsOn` in `turbo.json`, and engine's devDependencies.- `TURBO_SCM_BASE` must be `origin/<base branch>` in CI. turbo's default base is `main`, which a CI checkout does not have, so without it every run degrades to "everything affected".+- Required status checks are set by a repo admin (branch ruleset on `main`) and match on job display name. A job its `if:` skips reports `skipped`, which GitHub counts as passing, so every job here can be required: `changes`, `lint`, `build-test`, `api (ce)`, `api (cloud)`, `api (ee, unit, migrations)`, `tool-search (postgres)`. A workflow-level skip (`on.paths`) leaves a required check pending forever, so keep the filtering inside the `changes` job. On 2026-09-27, when the old `ci.yml` was retired, nothing was required yet: `isRequired` was false on every check and the only ruleset enforced codeowner review.## Key files-- `.github/workflows/ci-v2.yml` — the PR pipeline+- `.github/workflows/ci.yml` — the PR pipeline- `.github/actions/setup` — shared install and cache steps- `tools/scripts/test-filters.ts` — every package with a `test` script, minus api- `tools/scripts/check-migration-rollback.ts` — new migrations must declare `breaking` and `down()`diff --git a/brain/knowledge/engineering/ci-pr-review-hygiene.md b/brain/knowledge/engineering/ci-pr-review-hygiene.mdindex 121f51ef361..e3b0f4e279a 100644--- a/brain/knowledge/engineering/ci-pr-review-hygiene.md+++ b/brain/knowledge/engineering/ci-pr-review-hygiene.md@@ -63,7 +63,7 @@ Enforcement is the **`Codeowners review` repository ruleset** (active on the def- **The same integration test can exist once per edition, so changing a shared service means grepping the assertion, not trusting the file you already edited.** `passwordless-authn.test.ts` lives under `test/integration/ce/authentication/` on main, and a branch may carry its own copy elsewhere — a behaviour change to `requestCode` or `signUp` has to update every copy. This bites hardest after rebuilding a branch onto a different base, which resurrects files the old base had moved: the edit list from the first attempt is then silently incomplete, and because api unit tests do not gate CI (below), the edition copy is the only thing that catches it. Grep the *assertion* (`DOMAIN_NOT_ALLOWED`, the fixture domain) across `test/` rather than the filename.- **When a refusal and a success deliberately share a status code, a status-only assertion passes for the wrong reason.** The invited-member test kept asserting `204` and kept passing after the guard it covered stopped running at all. Any silent-failure design has to be pinned on side effects — rows created, mail sent, spies called — because the response is by construction indistinguishable.- **In a vitest unit test, import the module under test statically — `vi.mock` is hoisted above imports.** The existing `worker-group.service.test.ts` reaches for `await import(...)` to load its subject after the mocks, which is unnecessary and, if you copy it to the *top level* of a file rather than inside a function, fails `tsc -p tsconfig.spec.json` with `TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to …`. Vitest itself runs it happily and lint says nothing, so the only thing that catches it is a typecheck nobody gates on. A plain `import { thing } from '…'` alongside the `vi.mock` calls works and typechecks.-- **A unit test added under `packages/server/api/test/unit/` never runs in CI.** `ci.yml` runs exactly two test commands: `turbo run test` filtered to engine/shared/sandbox/ai-providers/pieces-framework/web, and `turbo run test-ce test-ee test-cloud check-migrations --filter=api`. The api package *has* a `test-unit` script (`vitest run test/unit`), but no workflow invokes it and the root `test-unit` filter list does not include api — so the 10+ files already sitting in `test/unit/**` are dead weight, and a new one passes review while protecting nothing. `packages/core/execution` is in the same position. Until the wiring changes, put api coverage that must actually gate merges in `test/integration/ce|ee|cloud`, and if you do add a unit test, say in the PR that you ran it locally and paste the result.+- **`packages/server/api/test/unit/` runs in CI since 2026-09: the `api (ee, unit, migrations)` job runs `test-unit` whenever api or worker is affected.** Before the affected-package pipeline no workflow invoked api's `test-unit` script, so the files there rotted unseen. The root `npm run test-unit` still skips api; run `npx turbo run test-unit --filter=api` locally instead.- **`tools/scripts/` is outside the lint and test wiring.** ESLint ignores it, and `npm run test-unit` only covers engine/shared/web. A script there with real policy logic must run its own tests from its own workflow — `pr-size.yml` runs `bun test tools/scripts/pr-size-check.test.ts` as a step before the check itself.- **The api package's `lint` script is `eslint 'src/**/*.ts'`, so nothing under `packages/server/api/test/` is ever linted.** `npx turbo run lint --filter=api` reports 0 errors on a tree whose test files carry real `import-x/order` **errors** — `test/integration/ce/mcp/mcp-activity-recording.test.ts` has had three since it was written. Point ESLint at the test paths yourself when you touch them (`npx eslint test/integration/ce/<area>`), because neither CI nor `npm run lint-dev` will. Related: a lint run over a whole `src/app/<area>` tree OOMs at node's default heap in this repo — `NODE_OPTIONS=--max-old-space-size=8192` gets it through.- **Reopening a bot-closed external PR is futile until a core member adds `keep-open` first.** `close-external-prs.yml` triggers on `pull_request_target` `[opened, reopened]`, so every reopen re-runs the same comment-then-close step; its `if` exempts OWNER/MEMBER/COLLABORATOR, bots, and the `keep-open` label, and nothing else. A docs PR from an outside contributor ([#15031](https://github.com/activepieces/activepieces/pull/15031)) was reopened 13 times over two days and closed 13 times within seconds of each, until a member labelled it `keep-open` and reopened it once. The same job also runs a nightly `actions/stale` pass that closes any PR idle 60 days. The lasting fix for a change worth keeping is to re-open it from a branch owned by someone with write access — author association, not the diff, is what the gate reads.diff --git a/brain/knowledge/engineering/server-module-anatomy.md b/brain/knowledge/engineering/server-module-anatomy.mdindex 89f4672a17c..47bc8b45e58 100644--- a/brain/knowledge/engineering/server-module-anatomy.md+++ b/brain/knowledge/engineering/server-module-anatomy.md@@ -129,7 +129,7 @@ Queued work: add to `SystemJobName` or `WorkerJobType` in shared, register the hVerify with `npm run lint-dev` and `npm run test-api`.-**`packages/server/api/test/unit/**` runs in no pipeline — do not trust it as a safety net.** The package defines a `test-unit` script, but CI only runs `turbo run test-ce test-ee test-cloud check-migrations --filter=api` (`ci.yml`), and the root `npm run test-unit` filters to `engine`/`shared`/`sandbox`/`core-utils`/`server-utils`/`pieces-framework`/`web`/`ee-embed-sdk` — `api` is not in that list. So those specs are only ever run by hand, and they rot: measured Aug 2026 on a clean `main`, **18 tests across 4 files already failed** (`workers/job-queue/job-broker`, `workers/machine/machine-service`, `core/canary/worker-group.service`, `knowledge-base/file-service-delete`). Two consequences: put a server test you actually want enforced under `test/integration/ce`, and when a local `test/unit` run goes red, check `main` before assuming your branch caused it.+**`packages/server/api/test/unit/**` runs in CI since 2026-09 (the `api (ee, unit, migrations)` job, whenever api or worker is affected).** It ran in no pipeline before that and rotted: in Aug 2026, 18 tests across 4 files failed on a clean `main`. The root `npm run test-unit` still skips api; run `npx turbo run test-unit --filter=api`. When a `test/unit` run goes red locally, check `main` before assuming your branch caused it.## Gotchas- **A date-range query filter typed `z.string()` turns bad input into a 500, not a 400.** `createdAfter`/`createdBefore` bind straight into a `created >= :createdAfter` comparison against a `timestamp with time zone` column, so `?createdAfter=invalid` reaches PostgreSQL and surfaces as `invalid input syntax for type timestamp with time zone: "invalid"` — an internal error for ordinary malformed input. Type them `z.iso.datetime({ offset: true }).optional()` instead: that accepts everything a caller actually sends (`.toISOString()` and `+02:00` offsets alike) and rejects the garbage at the edge, where `fastify-type-provider-zod` already turns a querystring rejection into a 400. Note `z.string().datetime()` is deprecated in zod v4 — `z.iso.datetime()` is the replacement, and its default is Z-only, so omitting `{ offset: true }` also rejects legitimate offset timestamps. **The loose shape is still on `flow-run`, `audit-events` and health metrics**, so copying a date filter from any of them carries the hole along.diff --git a/bun.lock b/bun.lockindex a1ec9c4f088..c2203e15cbc 100644--- a/bun.lock+++ b/bun.lock@@ -165,7 +165,7 @@},"packages/core/shared": {"name": "@activepieces/shared",- "version": "0.180.0",+ "version": "0.181.0","dependencies": {"@activepieces/core-execution": "workspace:*","@activepieces/core-formula": "workspace:*",@@ -1066,7 +1066,7 @@},"packages/pieces/community/baserow": {"name": "@activepieces/piece-baserow",- "version": "0.10.0",+ "version": "0.11.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -3028,7 +3028,7 @@},"packages/pieces/community/facebook-pages": {"name": "@activepieces/piece-facebook-pages",- "version": "0.2.8",+ "version": "0.3.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -4652,7 +4652,7 @@},"packages/pieces/community/jira-cloud": {"name": "@activepieces/piece-jira-cloud",- "version": "0.4.0",+ "version": "0.5.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -6067,7 +6067,7 @@},"packages/pieces/community/monday": {"name": "@activepieces/piece-monday",- "version": "0.3.8",+ "version": "0.4.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -9809,7 +9809,7 @@},"packages/pieces/community/whatsapp": {"name": "@activepieces/piece-whatsapp",- "version": "0.2.7",+ "version": "0.3.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -10682,7 +10682,7 @@},"packages/pieces/core/webhook": {"name": "@activepieces/piece-webhook",- "version": "0.1.41",+ "version": "0.1.42","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -10890,6 +10890,11 @@"zod": "4.3.6",},"devDependencies": {+ "@activepieces/piece-approval": "workspace:*",+ "@activepieces/piece-data-mapper": "workspace:*",+ "@activepieces/piece-delay": "workspace:*",+ "@activepieces/piece-http": "workspace:*",+ "@activepieces/piece-webhook": "workspace:*","@types/node": "24.11.0","deno": "2.9.3","esbuild": "0.28.1",diff --git a/packages/server/engine/package.json b/packages/server/engine/package.jsonindex 045293f9d53..434293b666e 100644--- a/packages/server/engine/package.json+++ b/packages/server/engine/package.json@@ -33,6 +33,11 @@"deno": "2.9.3","form-data": "4.0.6","vitest": "3.2.6",- "esbuild": "0.28.1"+ "esbuild": "0.28.1",+ "@activepieces/piece-approval": "workspace:*",+ "@activepieces/piece-data-mapper": "workspace:*",+ "@activepieces/piece-http": "workspace:*",+ "@activepieces/piece-webhook": "workspace:*",+ "@activepieces/piece-delay": "workspace:*"}}diff --git a/turbo.json b/turbo.jsonindex 6d17453a330..b964bd7dbf0 100644--- a/turbo.json+++ b/turbo.json@@ -100,7 +100,8 @@"@activepieces/piece-http#build","@activepieces/piece-data-mapper#build","@activepieces/piece-approval#build",- "@activepieces/piece-webhook#build"+ "@activepieces/piece-webhook#build",+ "@activepieces/piece-delay#build"],"inputs": ["src/**", "test/**", "tsconfig*.json", "vitest.config.*"],"outputs": ["coverage/**"]