From 4ba3adecd8d777dfa05991d430819498ffc21fcf Mon Sep 17 00:00:00 2001 From: Reuven Date: Fri, 8 May 2026 21:15:55 -0400 Subject: [PATCH] ci: tolerate cross-package conflicts in regression-guard jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first attempt (commit 2ac256afb) decoupled the new jobs from the broken `build` job, but ran into two cross-package issues that didn't surface in local testing: 1. smoke-install-no-bsqlite — `npm install` rejected the workspace constraint. agentdb@3.0.0-alpha.10 declares peerOptional better-sqlite3@^11.8.1 while @claude-flow/memory@3.0.0-alpha.15 uses ^12.9.0 (intentional, fixes #1867). pnpm warns; npm errors. Fix: add --legacy-peer-deps. The peer is declared *optional* and the runtime fallback is exercised by the smoke test itself. 2. plugin-hooks-smoke + witness-verify — `pnpm --filter @claude-flow/cli...` built cli's deps but cli's source imports types from @claude-flow/swarm, which was *not* pulled in by the filter (cli's package.json doesn't declare it as a hard dep — only via TS path mapping). swarm's dist was missing, tsc emitted TS6305. Fix: use `pnpm --recursive --no-bail run build` and explicitly verify the specific dist files we need actually exist. This tolerates the pre-existing federation TS failure (1 fail / 22 pass) without skipping the cli/memory/security builds. Local pre-flight against this branch: ✓ 22 packages build (federation expectedly fails) ✓ @claude-flow/cli/bin/cli.js produced ✓ @claude-flow/cli/dist/src/commands/hooks.js produced ✓ @claude-flow/memory/dist/sqlite-backend.js produced ✓ @claude-flow/security/dist/password-hasher.js produced Co-Authored-By: RuFlo --- .github/workflows/v3-ci.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/v3-ci.yml b/.github/workflows/v3-ci.yml index 1c43dd2b0e..04bbeb6113 100644 --- a/.github/workflows/v3-ci.yml +++ b/.github/workflows/v3-ci.yml @@ -146,7 +146,10 @@ jobs: - name: Build @claude-flow/memory working-directory: v3/@claude-flow/memory run: | - npm install --no-audit --no-fund + # --legacy-peer-deps: agentdb@3.0.0-alpha.10 declares peerOptional + # better-sqlite3@^11 while we use ^12; npm errors without the flag. + # The peer is declared optional and runtime-tested elsewhere. + npm install --no-audit --no-fund --legacy-peer-deps npm run build - name: Pack tarball @@ -210,11 +213,18 @@ jobs: cache: 'pnpm' cache-dependency-path: v3/pnpm-lock.yaml - - name: Install + build cli (scoped, avoids unrelated workspace failures) + - name: Install + build cli (scoped, tolerates unrelated workspace failures) working-directory: v3 run: | pnpm install --frozen-lockfile - pnpm --filter @claude-flow/cli... build + # --no-bail keeps building past unrelated package failures + # (e.g. plugin-agent-federation TS error). We then assert the + # specific dist file we need was produced. + pnpm --recursive --no-bail run build || true + test -f @claude-flow/cli/bin/cli.js \ + || (echo "cli build did not produce bin/cli.js"; exit 1) + test -f @claude-flow/cli/dist/src/commands/hooks.js \ + || (echo "cli build did not produce hooks.js"; exit 1) - name: Run plugin hooks smoke against local CLI build run: | @@ -255,14 +265,15 @@ jobs: cache: 'pnpm' cache-dependency-path: v3/pnpm-lock.yaml - - name: Install + build packages witness markers reference (scoped) + - name: Install + build packages witness markers reference working-directory: v3 run: | pnpm install --frozen-lockfile - pnpm --filter @claude-flow/cli... \ - --filter @claude-flow/memory... \ - --filter @claude-flow/security... \ - build + # --no-bail tolerates unrelated package failures (e.g. federation + # TS errors). The witness `verify` command checks specific dist + # files exist; if a marker-cited file is missing, witness-verify + # itself fails the run with a clear message. + pnpm --recursive --no-bail run build || true - name: Verify witness manifest run: |