fix(stack-prisma): reclassify EQL install as additive so fresh-database db init passes, and pin eql-3.0.4 #430
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "FTA Complexity" | |
| # Blocking complexity gate for the EQL v3 core (stack) and the split adapter | |
| # packages (stack-drizzle, stack-supabase). Runs the Fast TypeScript Analyzer | |
| # (fta-cli) against each package's source and fails | |
| # the check when any file exceeds the score cap (`--score-cap` in the | |
| # `analyze:complexity` script). FTA is pure static source analysis, so this job | |
| # needs no build step, database, or credentials. | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'packages/stack/src/eql/v3/**' | |
| - 'packages/stack-drizzle/**' | |
| - 'packages/stack-supabase/**' | |
| # Shared match-index defaults live outside src/eql/v3 but shape every | |
| # emitted v3 match block (load-bearing `k`/`m` ciphertext params), so edits | |
| # here must trigger the v3 gate too. | |
| - 'packages/stack/src/schema/match-defaults.ts' | |
| - 'packages/stack/package.json' | |
| - '.github/workflows/fta-v3.yml' | |
| pull_request: | |
| branches: | |
| - "**" | |
| paths: | |
| - 'packages/stack/src/eql/v3/**' | |
| - 'packages/stack-drizzle/**' | |
| - 'packages/stack-supabase/**' | |
| - 'packages/stack/src/schema/match-defaults.ts' | |
| - 'packages/stack/package.json' | |
| - '.github/workflows/fta-v3.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| fta: | |
| name: Analyze v3 complexity | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6.0.9 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6.5.0 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| # node-pty's install hook falls back to `node-gyp rebuild` when no | |
| # linux-x64 prebuild matches. pnpm/action-setup v6 no longer ships | |
| # node-gyp on PATH, so install it explicitly. | |
| - name: Install node-gyp | |
| run: npm install -g node-gyp | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Non-zero exit (score above the cap) fails the check — this is the | |
| # blocking gate. No `continue-on-error`. | |
| # One step per package so a failure names the offending package. Each caps | |
| # at its current worst file (a ratchet, not an aspiration): stack src/eql/v3 | |
| # at 69, drizzle 89 (operators.ts, still a monolith), and supabase 71 | |
| # (query-encrypt.ts at 70.12, after the query-builder monolith was split | |
| # across column-map / query-encrypt / query-mutation / query-dbspace / | |
| # query-filters / query-results). Lower a cap whenever a file is refactored | |
| # below the next threshold; drizzle's operators.ts is the remaining debt to | |
| # whittle down toward stack's 69. | |
| # | |
| # NB supabase's top three now cluster tightly (query-encrypt 70.12, | |
| # query-builder 70.05, helpers 69.13), so 71 is a ~0.9 margin. A cap set | |
| # flush against its max is fragile — the 91 this replaced was 0.12 above | |
| # its max and a single refactor blew straight through it. If a formatting | |
| # reflow trips this step without a real complexity increase, re-measure | |
| # (`npx fta src --format table`) before assuming the code got worse. | |
| - name: Analyze stack (eql/v3) complexity | |
| run: pnpm --filter @cipherstash/stack run analyze:complexity | |
| - name: Analyze stack-drizzle complexity | |
| run: pnpm --filter @cipherstash/stack-drizzle run analyze:complexity | |
| - name: Analyze stack-supabase complexity | |
| run: pnpm --filter @cipherstash/stack-supabase run analyze:complexity |