From 3890bddd9935bb716bdc08420c1c109dae670974 Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 6 May 2026 13:47:51 -0600 Subject: [PATCH 1/6] chore(ci): run on develop PRs and fail on lint/test failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI was gated to PRs targeting main and won't run for the typical feature -> develop flow used in this repo. Even when CI did run, both steps had continue-on-error: true so failures didn't block merges. Tests on develop have been broken since 601db2e (April 30) without anyone noticing. - Switch pull_request branches from main to develop - Drop continue-on-error from lint and test steps Also wires up two pieces needed for yarn test to actually run: - Root yarn test now runs turbo run test (was bare jest, which failed because there's no root jest config — turbo dispatches to each workspace's own test script and rebuilds shared-types beforehand via dependsOn ^build). - Adds a missing jest mock for utils/pricing in the verifier test setup. utils/pricing transitively pulls p-queue (ESM), the same reason @shapeshiftoss/swapper is already mocked. Drops the unused coverage outputs key from the turbo test task to silence its missing-output warning. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 4 +--- apps/swap-service/src/verification/__tests__/setup.ts | 7 ++++--- package.json | 2 +- turbo.json | 3 +-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a06ddf..4f1d7c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: pull_request: branches: - - main + - develop env: NODE_VERSION: '22.5.1' @@ -25,8 +25,6 @@ jobs: - name: Lint run: yarn lint - continue-on-error: true - name: Run tests run: yarn test - continue-on-error: true diff --git a/apps/swap-service/src/verification/__tests__/setup.ts b/apps/swap-service/src/verification/__tests__/setup.ts index e003543..e6bf8d4 100644 --- a/apps/swap-service/src/verification/__tests__/setup.ts +++ b/apps/swap-service/src/verification/__tests__/setup.ts @@ -19,9 +19,10 @@ jest.mock('../../env', () => ({ }, })) -// @shapeshiftoss/swapper transitively pulls chain-adapters → p-queue (ESM) → bigint-buffer. -// We don't exercise swapper internals here, so stub the module surface the verifier touches. -// Keep enum string values identical to the real module so production code paths match. +jest.mock('../../utils/pricing', () => ({ + getAssetPriceUsd: jest.fn(), +})) + jest.mock('@shapeshiftoss/swapper', () => ({ SwapperName: { Thorchain: 'THORChain', diff --git a/package.json b/package.json index f909357..9e128cc 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dev": "turbo run dev", "start": "turbo run start", "start:dev": "turbo run start:dev", - "test": "jest", + "test": "turbo run test", "lint": "eslint --cache \"{apps,packages}/**/*.ts\"", "lint:fix": "yarn lint --fix", "format": "prettier --check \"**/*.{ts,js,json,md}\"", diff --git a/turbo.json b/turbo.json index d43ed15..54baf02 100644 --- a/turbo.json +++ b/turbo.json @@ -23,8 +23,7 @@ "persistent": true }, "test": { - "dependsOn": ["^build"], - "outputs": ["coverage/**"] + "dependsOn": ["^build"] }, "//#db:generate": { "cache": false From f329b071c40693f5849f7389616200220285efdd Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 6 May 2026 14:15:20 -0600 Subject: [PATCH 2/6] chore(ci): speed up setup with built-in yarn cache and skip ^build for tests Use actions/setup-node's built-in yarn cache, generate the prisma client in the shared setup step so lint sees @prisma/client types, and drop the ^build dependency on test (ts-jest transpiles source directly). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../actions/setup-node-and-deps/action.yml | 24 +++++++------------ turbo.json | 4 +--- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/actions/setup-node-and-deps/action.yml b/.github/actions/setup-node-and-deps/action.yml index f22f12e..158e9fe 100644 --- a/.github/actions/setup-node-and-deps/action.yml +++ b/.github/actions/setup-node-and-deps/action.yml @@ -10,27 +10,15 @@ inputs: runs: using: composite steps: - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - - name: Enable Corepack shell: bash run: corepack enable - - name: Get yarn cache directory path - id: yarn-cache-dir-path - shell: bash - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - - name: Cache yarn dependencies - uses: actions/cache@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: ${{ inputs.node-version }} + cache: yarn - name: Cache Turbo uses: actions/cache@v4 @@ -43,3 +31,7 @@ runs: - name: Install dependencies shell: bash run: yarn install --immutable + + - name: Generate Prisma client + shell: bash + run: yarn db:generate diff --git a/turbo.json b/turbo.json index 54baf02..19a8836 100644 --- a/turbo.json +++ b/turbo.json @@ -22,9 +22,7 @@ "cache": false, "persistent": true }, - "test": { - "dependsOn": ["^build"] - }, + "test": {}, "//#db:generate": { "cache": false }, From 4784391457f1a641bdb0c251f48dba8c95f76824 Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 6 May 2026 14:15:24 -0600 Subject: [PATCH 3/6] chore(format): narrow prettier scope to json and md ESLint runs prettier on ts/js via eslint-plugin-prettier, so the format script only needs to cover the file types eslint doesn't lint. Co-Authored-By: Claude Opus 4.7 (1M context) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9e128cc..ff1e155 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "test": "turbo run test", "lint": "eslint --cache \"{apps,packages}/**/*.ts\"", "lint:fix": "yarn lint --fix", - "format": "prettier --check \"**/*.{ts,js,json,md}\"", - "format:fix": "prettier --write \"**/*.{ts,js,json,md}\"", + "format": "prettier --check \"**/*.{json,md}\"", + "format:fix": "prettier --write \"**/*.{json,md}\"", "docker:build": "docker-compose build", "docker:up": "docker-compose up -d", "docker:down": "docker-compose down", From ab807f581e48b19a1ad7fbea8334b3db17fec91e Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 6 May 2026 14:15:29 -0600 Subject: [PATCH 4/6] chore: trim unused gitignore entries and add claude local files Remove entries for tools and artifacts this repo doesn't produce (Pulumi, nyc, lerna, Eclipse, etc.) and ignore Claude Code's local-only files (settings.local.json, worktrees/) while leaving room to track shared settings, commands, and agents. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 66 +++++++++++------------------------------------------- 1 file changed, 13 insertions(+), 53 deletions(-) diff --git a/.gitignore b/.gitignore index 12a6b26..9abd83e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,68 +1,28 @@ -# compiled output +# Build artifacts dist node_modules -build .turbo +/generated/prisma -# TypeScript compiled JS alongside source (use dist/ instead) -apps/*/src/**/*.js -packages/*/src/**/*.js - +# Yarn (Berry) .yarn/* !.yarn/patches !.yarn/plugins !.yarn/sdks -# Logs -logs -*.log -npm-debug.log* -pnpm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# OS -.DS_Store - -# Tests -/coverage -/.nyc_output - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json +# Caches +.eslintcache -# dotenv environment variable files +# Env files .env* !.env.example -# temp directory -.temp -.tmp - -# Runtime data -pids -*.pid -*.seed -*.pid.lock +# OS +.DS_Store -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +# Editors +.vscode/ -Pulumi.*.yaml -/generated/prisma -*.db -.eslintcache +# Claude Code (local-only) +.claude/settings.local.json +.claude/worktrees/ From d6bb51891833ab3e034efaee327c4345f62c2c92 Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 6 May 2026 14:15:33 -0600 Subject: [PATCH 5/6] chore(swap-service): apply prettier to verification test fixtures Co-Authored-By: Claude Opus 4.7 (1M context) --- .../__tests__/fixtures/near/response.json | 11 +++-------- .../__tests__/fixtures/relay/response.json | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/apps/swap-service/src/verification/__tests__/fixtures/near/response.json b/apps/swap-service/src/verification/__tests__/fixtures/near/response.json index d10f279..06b747e 100644 --- a/apps/swap-service/src/verification/__tests__/fixtures/near/response.json +++ b/apps/swap-service/src/verification/__tests__/fixtures/near/response.json @@ -6,13 +6,8 @@ "depositedAmount": "1000000000000000", "depositedAmountUsd": "2.2886", "depositedAmountFormatted": "0.001", - "intentHashes": [ - "CyGhYmfjXbN7MAJLS5dpR2p8ANnuuXDGC5qCmFr1NGZT" - ], - "nearTxHashes": [ - "58TKUK7G2RGmR2YEKuqyQaxRfkQVH5XupDUnsXUj4dVH", - "GJxyXn2QihLDLC3JoRESSesj3ufdz1yhbMAzqZ5TfKHK" - ], + "intentHashes": ["CyGhYmfjXbN7MAJLS5dpR2p8ANnuuXDGC5qCmFr1NGZT"], + "nearTxHashes": ["58TKUK7G2RGmR2YEKuqyQaxRfkQVH5XupDUnsXUj4dVH", "GJxyXn2QihLDLC3JoRESSesj3ufdz1yhbMAzqZ5TfKHK"], "amountIn": "1000000000000000", "amountInFormatted": "0.001", "amountInUsd": "2.2886", @@ -84,4 +79,4 @@ "timeEstimate": 52 } } -} \ No newline at end of file +} diff --git a/apps/swap-service/src/verification/__tests__/fixtures/relay/response.json b/apps/swap-service/src/verification/__tests__/fixtures/relay/response.json index 4db58c8..0d18200 100644 --- a/apps/swap-service/src/verification/__tests__/fixtures/relay/response.json +++ b/apps/swap-service/src/verification/__tests__/fixtures/relay/response.json @@ -262,4 +262,4 @@ "updatedAt": "2026-04-28T18:35:37.930Z" } ] -} \ No newline at end of file +} From 2aaa8699d8c8f544e10b4dbf1837ced0b8d7398a Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 6 May 2026 14:21:14 -0600 Subject: [PATCH 6/6] chore(ci): build workspace packages in setup so lint can resolve types shared-utils and shared-types declare main/types at ./dist/, so without a build their consumers' types fall back to error and trigger no-unsafe-* in typed lint. Filter the build to packages/* (cheap, turbo-cached) and rely on the build task's existing dep on db:generate to also produce the prisma client. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/actions/setup-node-and-deps/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-node-and-deps/action.yml b/.github/actions/setup-node-and-deps/action.yml index 158e9fe..0271758 100644 --- a/.github/actions/setup-node-and-deps/action.yml +++ b/.github/actions/setup-node-and-deps/action.yml @@ -32,6 +32,6 @@ runs: shell: bash run: yarn install --immutable - - name: Generate Prisma client + - name: Build workspace packages shell: bash - run: yarn db:generate + run: yarn turbo run build --filter='./packages/*'