Skip to content

test(api): add integration tests for cors, env, tar, and slack-client#11644

Open
SCARLETTXYAYA wants to merge 1 commit into
mainfrom
test/add-missing-integration-tests
Open

test(api): add integration tests for cors, env, tar, and slack-client#11644
SCARLETTXYAYA wants to merge 1 commit into
mainfrom
test/add-missing-integration-tests

Conversation

@SCARLETTXYAYA
Copy link
Copy Markdown
Contributor

Summary

  • Adds 38 integration tests across 4 new test files for API lib modules that were changed in recently merged PRs and had no corresponding test coverage
  • Fixes missing DATABASE_URL in the test env stub so modules with env validation at import time can be tested

Files Added

Test file Tests Covers
turbo/apps/api/src/lib/__tests__/cors.test.ts 13 corsMiddleware origin validation across all env modes
turbo/apps/api/src/lib/__tests__/env.test.ts 7 mockEnv/clearMockedEnv override lifecycle
turbo/apps/api/src/lib/__tests__/tar.test.ts 7 extractFileFromTarGz tar parsing
turbo/apps/api/src/lib/__tests__/slack-client.test.ts 10 listConversations, getFileInfo

Test Plan

  • All 38 new tests pass locally
  • All 23 existing lib tests continue to pass (61 total, 0 failures)
  • CI passes on this PR

🤖 Generated with Claude Code

Adds missing test coverage for files changed in recently merged PRs:

- cors.test.ts — 13 tests covering getAllowedOrigin across all env
  modes (development/preview/production), static allowed origins, vm0
  subdomains, vm6/vm7 preview domains, localhost, and preflight headers.
- env.test.ts — 7 tests for mockEnv / clearMockedEnv override
  lifecycle, Zod validation rejection, and partial override isolation.
- tar.test.ts — 7 tests for extractFileFromTarGz including exact
  matching, ./ stripping, missing files, empty archives, large files,
  and duplicate name handling.
- slack-client.test.ts — 10 tests for listConversations (pagination,
  auth headers, custom options, error handling) and getFileInfo.
- env-stub.ts — adds missing DATABASE_URL to test env stub so the
  env schema validates during module import.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

❌ 58 Tests Failed:

Tests completed Failed Passed Skipped
7977 58 7919 0
View the top 3 failed test(s) by shortest run time
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > zero token on routes without sandbox capability options > resolves a zero token on a route with no auth options
Stack Traces | 0.00144s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: d2317aa7-7d26-4979-9772-62a984693cff,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfNzA4ZjUzOWYtNmM1My00ODkzLWFhYmUtYWQwOGIxNzcwZTE4Iiwib3JnSWQiOiJvcmdfMzNiYWFjMWYtNGRhNC00ODA1LWFmZGMtMWRmYTVjODJjOWI3IiwidG9rZW5JZCI6ImQyMzE3YWE3LTdkMjYtNDk3OS05NzcyLTYyYTk4NDY5M2NmZiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.Xyf7WzoJ6Wk9XsWbmlqwH4Cb6oLAPTdihvaXDsWgFM8,user_708f539f-6c53-4893-aabe-ad08b1770e18,test token,2026-04-30T21:48:50.740Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:964:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'd2317aa7-7d26-4979-9772-62a984693cff', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfNzA4ZjUzOWYtNmM1My00ODkzLWFhYmUtYWQwOGIxNzcwZTE4Iiwib3JnSWQiOiJvcmdfMzNiYWFjMWYtNGRhNC00ODA1LWFmZGMtMWRmYTVjODJjOWI3IiwidG9rZW5JZCI6ImQyMzE3YWE3LTdkMjYtNDk3OS05NzcyLTYyYTk4NDY5M2NmZiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.Xyf7WzoJ6Wk9XsWbmlqwH4Cb6oLAPTdihvaXDsWgFM8', 'user_708f539f-6c53-4893-aabe-ad08b1770e18', 'test token', '2026-04-30T21:48:50.740Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:964:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > zero capability check > rejects a zero token whose capabilities omit the required one
Stack Traces | 0.00191s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 82357331-f104-467c-82ea-1345c74bbf02,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYjUzYmRmN2EtZDc4MC00NmJkLWJiOTMtNTc4MTY4MDcwZDY0Iiwib3JnSWQiOiJvcmdfZThkYjU4YmYtNTY3ZC00MDgwLWFmMzEtYmRlNTljNTIxNGZkIiwidG9rZW5JZCI6IjgyMzU3MzMxLWYxMDQtNDY3Yy04MmVhLTEzNDVjNzRiYmYwMiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.Rp2TD6_ekEN2_9T--bQfEgQ11n0Scmd2DxDxTvXMK8E,user_b53bdf7a-d780-46bd-bb93-578168070d64,test token,2026-04-30T21:48:50.738Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:908:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '82357331-f104-467c-82ea-1345c74bbf02', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYjUzYmRmN2EtZDc4MC00NmJkLWJiOTMtNTc4MTY4MDcwZDY0Iiwib3JnSWQiOiJvcmdfZThkYjU4YmYtNTY3ZC00MDgwLWFmMzEtYmRlNTljNTIxNGZkIiwidG9rZW5JZCI6IjgyMzU3MzMxLWYxMDQtNDY3Yy04MmVhLTEzNDVjNzRiYmYwMiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.Rp2TD6_ekEN2_9T--bQfEgQ11n0Scmd2DxDxTvXMK8E', 'user_b53bdf7a-d780-46bd-bb93-578168070d64', 'test token', '2026-04-30T21:48:50.738Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:908:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > Zero bearer > resolves a zero bearer token with admin orgRole
Stack Traces | 0.00192s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 6d0243ed-78b7-4b28-9566-88110ab18659,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZDU4ZDNmNDEtZDBjNS00OWVmLTkwMDgtZmU2YTIzMDVmM2VlIiwib3JnSWQiOiJvcmdfMzE2NjE4N2ItYTc5OS00NWI3LTliYWQtMjc5ZGFkNjRiYjc5IiwidG9rZW5JZCI6IjZkMDI0M2VkLTc4YjctNGIyOC05NTY2LTg4MTEwYWIxODY1OSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.FdY_CKqEeXoMyoAuRGEBuLl8wBwaO-f9PS-FNR_3qyM,user_d58d3f41-d0c5-49ef-9008-fe6a2305f3ee,test token,2026-04-30T21:48:50.647Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:615:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '6d0243ed-78b7-4b28-9566-88110ab18659', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZDU4ZDNmNDEtZDBjNS00OWVmLTkwMDgtZmU2YTIzMDVmM2VlIiwib3JnSWQiOiJvcmdfMzE2NjE4N2ItYTc5OS00NWI3LTliYWQtMjc5ZGFkNjRiYjc5IiwidG9rZW5JZCI6IjZkMDI0M2VkLTc4YjctNGIyOC05NTY2LTg4MTEwYWIxODY1OSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.FdY_CKqEeXoMyoAuRGEBuLl8wBwaO-f9PS-FNR_3qyM', 'user_d58d3f41-d0c5-49ef-9008-fe6a2305f3ee', 'test token', '2026-04-30T21:48:50.647Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:615:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/audio-transcriptions-v1.test.ts > POST /api/v1/audio/transcriptions > enforces the audio input feature switch before transcribing
Stack Traces | 0.00198s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 9273bd19-17d2-4a6f-82c6-c52d48763d64,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMmM1NDY3OTctMGRlYS00ZjlkLWJiNTQtNzZhYTU5MDE5YjlkIiwib3JnSWQiOiJvcmdfNTk4ZDRmZmUtZjgyMi00MTljLWE1ZGEtYzc0OWNhMWEwZmEwIiwidG9rZW5JZCI6IjkyNzNiZDE5LTE3ZDItNGE2Zi04MmM2LWM1MmQ0ODc2M2Q2NCIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.jE-ZEdnLh1rUTyvfEcXTjknSGRzh7Akr71KF_UcA3Yc,user_2c546797-0dea-4f9d-bb54-76aa59019b9d,test token,2026-04-30T21:48:52.921Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:270:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '9273bd19-17d2-4a6f-82c6-c52d48763d64', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMmM1NDY3OTctMGRlYS00ZjlkLWJiNTQtNzZhYTU5MDE5YjlkIiwib3JnSWQiOiJvcmdfNTk4ZDRmZmUtZjgyMi00MTljLWE1ZGEtYzc0OWNhMWEwZmEwIiwidG9rZW5JZCI6IjkyNzNiZDE5LTE3ZDItNGE2Zi04MmM2LWM1MmQ0ODc2M2Q2NCIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.jE-ZEdnLh1rUTyvfEcXTjknSGRzh7Akr71KF_UcA3Yc', 'user_2c546797-0dea-4f9d-bb54-76aa59019b9d', 'test token', '2026-04-30T21:48:52.921Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:270:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > org membership cache > removes a stale cache row when Clerk reports no membership and resolves without orgRole
Stack Traces | 0.00207s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 822c2739-e690-4bb2-81f8-bc59a8b1e177,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMGE2YzYwZDUtYmMxNC00NTM4LWJjNGItNzRjNWY0YTE2MWVjIiwib3JnSWQiOiJvcmdfNWFjN2MwMmMtZjRmMS00ZmFjLTg4OGEtMWU2ZWFiOTRkZWI1IiwidG9rZW5JZCI6IjgyMmMyNzM5LWU2OTAtNGJiMi04MWY4LWJjNTlhOGIxZTE3NyIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.oiXSojAFUgecLaYHdVqfsD8GyKsNYCi6CvhfJvPQipc,user_0a6c60d5-bc14-4538-bc4b-74c5f4a161ec,test token,2026-04-30T21:48:50.635Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:522:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '822c2739-e690-4bb2-81f8-bc59a8b1e177', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMGE2YzYwZDUtYmMxNC00NTM4LWJjNGItNzRjNWY0YTE2MWVjIiwib3JnSWQiOiJvcmdfNWFjN2MwMmMtZjRmMS00ZmFjLTg4OGEtMWU2ZWFiOTRkZWI1IiwidG9rZW5JZCI6IjgyMmMyNzM5LWU2OTAtNGJiMi04MWY4LWJjNTlhOGIxZTE3NyIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.oiXSojAFUgecLaYHdVqfsD8GyKsNYCi6CvhfJvPQipc', 'user_0a6c60d5-bc14-4538-bc4b-74c5f4a161ec', 'test token', '2026-04-30T21:48:50.635Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:522:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId/messages > returns 404 when the thread is owned by a different user
Stack Traces | 0.00212s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 83b720ca-e561-4db5-8aad-56c5dc74cdd3,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYzcwNTQ2ZGEtZTI0NC00YmUyLTg3MjMtMmI4MTczNTUxY2IwIiwib3JnSWQiOiJvcmdfMTdkYjQ5ZjQtYzZjYi00ZWMyLTgwYWEtMWE4NzY5OThiMzUwIiwidG9rZW5JZCI6IjgzYjcyMGNhLWU1NjEtNGRiNS04YWFkLTU2YzVkYzc0Y2RkMyIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.KwH27O9OzHc9sMB5NdSd0H5QG6feV4FNhZoMDPJuYUg,user_c70546da-e244-4be2-8723-2b8173551cb0,test token,2026-04-30T21:48:50.601Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:436:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '83b720ca-e561-4db5-8aad-56c5dc74cdd3', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYzcwNTQ2ZGEtZTI0NC00YmUyLTg3MjMtMmI4MTczNTUxY2IwIiwib3JnSWQiOiJvcmdfMTdkYjQ5ZjQtYzZjYi00ZWMyLTgwYWEtMWE4NzY5OThiMzUwIiwidG9rZW5JZCI6IjgzYjcyMGNhLWU1NjEtNGRiNS04YWFkLTU2YzVkYzc0Y2RkMyIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.KwH27O9OzHc9sMB5NdSd0H5QG6feV4FNhZoMDPJuYUg', 'user_c70546da-e244-4be2-8723-2b8173551cb0', 'test token', '2026-04-30T21:48:50.601Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:436:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/audio-transcriptions-v1.test.ts > POST /api/v1/audio/transcriptions > enforces the free voice input quota before transcribing
Stack Traces | 0.00215s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 471b5e10-c14a-48ca-b858-3b590fdeb641,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZDdkZDgxOTktNzllMy00MmNhLWIxMmMtNTUyMWY1YjVmNDA5Iiwib3JnSWQiOiJvcmdfNDU0MzU2NmMtZTg1YS00ZTYyLTlmODYtYjMzMzMzZGEwNzJjIiwidG9rZW5JZCI6IjQ3MWI1ZTEwLWMxNGEtNDhjYS1iODU4LTNiNTkwZmRlYjY0MSIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.wwg_SxR8ekNmy7LW2nKuO5ktTRgqmXVx_g6-UUYdPcc,user_d7dd8199-79e3-42ca-b12c-5521f5b5f409,test token,2026-04-30T21:48:52.919Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:230:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '471b5e10-c14a-48ca-b858-3b590fdeb641', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZDdkZDgxOTktNzllMy00MmNhLWIxMmMtNTUyMWY1YjVmNDA5Iiwib3JnSWQiOiJvcmdfNDU0MzU2NmMtZTg1YS00ZTYyLTlmODYtYjMzMzMzZGEwNzJjIiwidG9rZW5JZCI6IjQ3MWI1ZTEwLWMxNGEtNDhjYS1iODU4LTNiNTkwZmRlYjY0MSIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.wwg_SxR8ekNmy7LW2nKuO5ktTRgqmXVx_g6-UUYdPcc', 'user_d7dd8199-79e3-42ca-b12c-5521f5b5f409', 'test token', '2026-04-30T21:48:52.919Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:230:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > PAT bearer > resolves PAT without orgRole when the user is not a member of the org
Stack Traces | 0.00217s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: d9a51c1b-c625-4e2b-900b-6811ecd905df,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYzM4NzE1ZTgtMTYwZS00NDcwLWI4NDMtOTgxYzM2MGI4M2MyIiwib3JnSWQiOiJvcmdfNmNkZGIyNDgtYzU4Ny00ZDBmLWJhYzItYTA2MDM3YTE1YTUwIiwidG9rZW5JZCI6ImQ5YTUxYzFiLWM2MjUtNGUyYi05MDBiLTY4MTFlY2Q5MDVkZiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.QBSSY1oRqQnwoBCMQC1CFQMxS4fzKL2dqDl8wsJmaU0,user_c38715e8-160e-4470-b843-981c360b83c2,test token,2026-04-30T21:48:50.621Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:417:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'd9a51c1b-c625-4e2b-900b-6811ecd905df', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYzM4NzE1ZTgtMTYwZS00NDcwLWI4NDMtOTgxYzM2MGI4M2MyIiwib3JnSWQiOiJvcmdfNmNkZGIyNDgtYzU4Ny00ZDBmLWJhYzItYTA2MDM3YTE1YTUwIiwidG9rZW5JZCI6ImQ5YTUxYzFiLWM2MjUtNGUyYi05MDBiLTY4MTFlY2Q5MDVkZiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.QBSSY1oRqQnwoBCMQC1CFQMxS4fzKL2dqDl8wsJmaU0', 'user_c38715e8-160e-4470-b843-981c360b83c2', 'test token', '2026-04-30T21:48:50.621Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:417:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-voice-io-quota.test.ts > GET /api/zero/voice-io/quota > does not apply the free quota to paid tiers
Stack Traces | 0.0022s run time
Error: Failed query: insert into "org_metadata" ("org_id", "credits", "tier", "default_agent_id", "stripe_customer_id", "stripe_subscription_id", "subscription_status", "current_period_end", "cancel_at_period_end", "last_processed_invoice_id", "auto_recharge_enabled", "auto_recharge_threshold", "auto_recharge_amount", "auto_recharge_pending_at", "created_at", "updated_at") values ($1, default, $2, default, default, default, default, default, default, default, default, default, default, default, default, default)
params: org_7d6d968b-2472-4e7b-9591-56638a0e5bbc,pro
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-voice-io-quota.ts:34:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-voice-io-quota.test.ts:72:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "org_metadata" ("org_id", "credits", "tier", "default_agent_id", "stripe_customer_id", "stripe_subscription_id", "subscription_status", "current_period_end", "cancel_at_period_end", "last_processed_invoice_id", "auto_recharge_enabled", "auto_recharge_threshold", "auto_recharge_amount", "auto_recharge_pending_at", "created_at", "updated_at") values ($1, default, $2, default, default, default, default, default, default, default, default, default, default, default, default, default)', params: [ 'org_7d6d968b-2472-4e7b-9591-56638a0e5bbc', 'pro' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-voice-io-quota.ts:34:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-voice-io-quota.test.ts:72:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId/messages > paginates forward with sinceId
Stack Traces | 0.00225s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: fd3d06ef-18d6-47e1-8890-7040f171bbe0,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOTAzYWRhYzUtNDQyNC00YzU5LWI0YWUtMTI5YjM2ZTE3NTBhIiwib3JnSWQiOiJvcmdfYTdkZGMxOGQtYmU2Yy00NmQwLWIzZDAtODlmNWNiZjFjNzg4IiwidG9rZW5JZCI6ImZkM2QwNmVmLTE4ZDYtNDdlMS04ODkwLTcwNDBmMTcxYmJlMCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.G-0GQqlinnG--KuBNAwiCDAuFaQaQoH2Op4Gpd0MzTk,user_903adac5-4424-4c59-b4ae-129b36e1750a,test token,2026-04-30T21:48:50.597Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:356:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'fd3d06ef-18d6-47e1-8890-7040f171bbe0', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOTAzYWRhYzUtNDQyNC00YzU5LWI0YWUtMTI5YjM2ZTE3NTBhIiwib3JnSWQiOiJvcmdfYTdkZGMxOGQtYmU2Yy00NmQwLWIzZDAtODlmNWNiZjFjNzg4IiwidG9rZW5JZCI6ImZkM2QwNmVmLTE4ZDYtNDdlMS04ODkwLTcwNDBmMTcxYmJlMCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.G-0GQqlinnG--KuBNAwiCDAuFaQaQoH2Op4Gpd0MzTk', 'user_903adac5-4424-4c59-b4ae-129b36e1750a', 'test token', '2026-04-30T21:48:50.597Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:356:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > PAT bearer > resolves a PAT bearer token with member role
Stack Traces | 0.00227s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 8455c83e-2fb6-4495-9e12-de61db5bba56,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMjJiZTcyMmYtOTJiMi00MmFiLTk2MTctYTRlM2FiYmJmYTQzIiwib3JnSWQiOiJvcmdfM2I0ZDUwYTktZTU1OS00NWNkLWIxODUtNGQwOGRlODJjNzcxIiwidG9rZW5JZCI6Ijg0NTVjODNlLTJmYjYtNDQ5NS05ZTEyLWRlNjFkYjViYmE1NiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.MJ3wkMJ8qzgob6A5nopxAQ4zK1d5tP7_783q1JUiJd0,user_22be722f-92b2-42ab-9617-a4e3abbbfa43,test token,2026-04-30T21:48:50.601Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:358:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '8455c83e-2fb6-4495-9e12-de61db5bba56', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMjJiZTcyMmYtOTJiMi00MmFiLTk2MTctYTRlM2FiYmJmYTQzIiwib3JnSWQiOiJvcmdfM2I0ZDUwYTktZTU1OS00NWNkLWIxODUtNGQwOGRlODJjNzcxIiwidG9rZW5JZCI6Ijg0NTVjODNlLTJmYjYtNDQ5NS05ZTEyLWRlNjFkYjViYmE1NiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.MJ3wkMJ8qzgob6A5nopxAQ4zK1d5tP7_783q1JUiJd0', 'user_22be722f-92b2-42ab-9617-a4e3abbbfa43', 'test token', '2026-04-30T21:48:50.601Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:358:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId > returns 404 when the thread does not exist
Stack Traces | 0.00228s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 98234525-65e3-45d9-be24-8b9577d9aa18,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMDA3OTI0NWEtOTkzZi00NzFlLTk1Y2MtOWEwYTNjMGU0OGI3Iiwib3JnSWQiOiJvcmdfNjI1NzkxMmUtYzQ1NS00ZjI0LTk5N2UtYmYyOWY5MjhmMzM1IiwidG9rZW5JZCI6Ijk4MjM0NTI1LTY1ZTMtNDVkOS1iZTI0LThiOTU3N2Q5YWExOCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.GFX3FAVNbgdfsVS1L4kGaBOicyqNdE8SejMgJMnFtxs,user_0079245a-993f-471e-95cc-9a0a3c0e48b7,test token,2026-04-30T21:48:50.543Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:218:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '98234525-65e3-45d9-be24-8b9577d9aa18', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMDA3OTI0NWEtOTkzZi00NzFlLTk1Y2MtOWEwYTNjMGU0OGI3Iiwib3JnSWQiOiJvcmdfNjI1NzkxMmUtYzQ1NS00ZjI0LTk5N2UtYmYyOWY5MjhmMzM1IiwidG9rZW5JZCI6Ijk4MjM0NTI1LTY1ZTMtNDVkOS1iZTI0LThiOTU3N2Q5YWExOCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.GFX3FAVNbgdfsVS1L4kGaBOicyqNdE8SejMgJMnFtxs', 'user_0079245a-993f-471e-95cc-9a0a3c0e48b7', 'test token', '2026-04-30T21:48:50.543Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:218:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-chat-threads.test.ts > GET /api/zero/chat-threads/:threadId/messages > returns paged messages with S3-backed attachment metadata
Stack Traces | 0.00231s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: 6bd61278-2777-427a-9814-6d83901fbbff,user_c57ed085-c626-442d-8c4c-d2898227d0b0,compose-6bd61278,org_31cbfe52-5836-4f57-b453-847ac918bc60
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-chat-threads.ts:37:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-chat-threads.test.ts:102:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ '6bd61278-2777-427a-9814-6d83901fbbff', 'user_c57ed085-c626-442d-8c4c-d2898227d0b0', 'compose-6bd61278', 'org_31cbfe52-5836-4f57-b453-847ac918bc60' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-chat-threads.ts:37:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-chat-threads.test.ts:102:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId/messages > paginates backward with beforeId
Stack Traces | 0.00233s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 38c4cf83-3903-4cc0-9769-bd887ba82630,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYTczNGQ2MWEtMjEyOC00M2E2LTg1NzUtOWU5ZjIyYTk2NmY5Iiwib3JnSWQiOiJvcmdfYmM3N2JmMGEtN2FhNS00MzY4LWExYjQtZWNiOTA3ZDNiZWU5IiwidG9rZW5JZCI6IjM4YzRjZjgzLTM5MDMtNGNjMC05NzY5LWJkODg3YmE4MjYzMCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.yHvGskiuB5iYgyxI7RokFPhKX9cRgur9SipsjwxppYE,user_a734d61a-2128-43a6-8575-9e9f22a966f9,test token,2026-04-30T21:48:50.599Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:396:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '38c4cf83-3903-4cc0-9769-bd887ba82630', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYTczNGQ2MWEtMjEyOC00M2E2LTg1NzUtOWU5ZjIyYTk2NmY5Iiwib3JnSWQiOiJvcmdfYmM3N2JmMGEtN2FhNS00MzY4LWExYjQtZWNiOTA3ZDNiZWU5IiwidG9rZW5JZCI6IjM4YzRjZjgzLTM5MDMtNGNjMC05NzY5LWJkODg3YmE4MjYzMCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.yHvGskiuB5iYgyxI7RokFPhKX9cRgur9SipsjwxppYE', 'user_a734d61a-2128-43a6-8575-9e9f22a966f9', 'test token', '2026-04-30T21:48:50.599Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:396:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > zero capability check > accepts a zero token whose capabilities include the required one
Stack Traces | 0.00247s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: e6bb374d-137b-460d-90c0-ea02f1dcdc01,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfNDM4NTk3Y2ItZTAxZi00YzE1LWEyYTAtYTNjZDA0Yjc4Y2JjIiwib3JnSWQiOiJvcmdfMDVlY2M1NmQtMjIxYy00ZDQ0LThmZDctNzdhY2YyZWY1YTlhIiwidG9rZW5JZCI6ImU2YmIzNzRkLTEzN2ItNDYwZC05MGMwLWVhMDJmMWRjZGMwMSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.OLZVdirRYPYtyWLQG50XDzc0vTRT6bthcH3PLGVIo-k,user_438597cb-e01f-4c15-a2a0-a3cd04b78cbc,test token,2026-04-30T21:48:50.735Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:872:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'e6bb374d-137b-460d-90c0-ea02f1dcdc01', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfNDM4NTk3Y2ItZTAxZi00YzE1LWEyYTAtYTNjZDA0Yjc4Y2JjIiwib3JnSWQiOiJvcmdfMDVlY2M1NmQtMjIxYy00ZDQ0LThmZDctNzdhY2YyZWY1YTlhIiwidG9rZW5JZCI6ImU2YmIzNzRkLTEzN2ItNDYwZC05MGMwLWVhMDJmMWRjZGMwMSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.OLZVdirRYPYtyWLQG50XDzc0vTRT6bthcH3PLGVIo-k', 'user_438597cb-e01f-4c15-a2a0-a3cd04b78cbc', 'test token', '2026-04-30T21:48:50.735Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:872:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-queue-position.test.ts > GET /api/zero/queue-position > returns 404 for a run owned by another user
Stack Traces | 0.00265s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: 100fc0a5-a06f-42ff-8c54-5cc8b1951e83,user_b60ffe95-45c0-4e28-9715-1cb0b3f88fab,agent-100fc0a5,org_14d1a927-51e7-4cb4-af37-c50989549710
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-queue-position.ts:77:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-queue-position.test.ts:83:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ '100fc0a5-a06f-42ff-8c54-5cc8b1951e83', 'user_b60ffe95-45c0-4e28-9715-1cb0b3f88fab', 'agent-100fc0a5', 'org_14d1a927-51e7-4cb4-af37-c50989549710' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-queue-position.ts:77:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-queue-position.test.ts:83:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > PAT bearer > returns 401 when the PAT DB record has expired
Stack Traces | 0.00266s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 666d45d1-8075-4e8a-8d2e-37e8684eca0c,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYWRkNTc0MzctNmYzZC00MzhiLTg4NDUtZTBkYWFmOWFhZWJhIiwib3JnSWQiOiJvcmdfZGZkOTU0NTgtZDA0ZC00Njc4LTkyMmItMjJjNTYwYjg4N2Y2IiwidG9rZW5JZCI6IjY2NmQ0NWQxLTgwNzUtNGU4YS04ZDJlLTM3ZTg2ODRlY2EwYyIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.BiHugX05GTVFXu0vPd9PkHsan2xTY3_0uPRWnvzyZ94,user_add57437-6f3d-438b-8845-e0daaf9aaeba,test token,2026-04-30T21:46:50.619Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:400:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '666d45d1-8075-4e8a-8d2e-37e8684eca0c', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfYWRkNTc0MzctNmYzZC00MzhiLTg4NDUtZTBkYWFmOWFhZWJhIiwib3JnSWQiOiJvcmdfZGZkOTU0NTgtZDA0ZC00Njc4LTkyMmItMjJjNTYwYjg4N2Y2IiwidG9rZW5JZCI6IjY2NmQ0NWQxLTgwNzUtNGU4YS04ZDJlLTM3ZTg2ODRlY2EwYyIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.BiHugX05GTVFXu0vPd9PkHsan2xTY3_0uPRWnvzyZ94', 'user_add57437-6f3d-438b-8845-e0daaf9aaeba', 'test token', '2026-04-30T21:46:50.619Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:400:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > Zero bearer > resolves a zero bearer token with member orgRole
Stack Traces | 0.00272s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 56d431d2-5af9-46ca-b6d7-5672face17b5,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMTA1MWM0NTctZTNlYi00MzUyLWE3MWMtZWE5NjU4NGRkODI5Iiwib3JnSWQiOiJvcmdfNzIyNjgwMzUtY2Q1OC00N2RkLWIyMzAtY2IzZGM4ZmUzMTgwIiwidG9rZW5JZCI6IjU2ZDQzMWQyLTVhZjktNDZjYS1iNmQ3LTU2NzJmYWNlMTdiNSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.-WW2tcWufLy10t4bYNysWgdI0MRzebUznBk03BMmdCA,user_1051c457-e3eb-4352-a71c-ea96584dd829,test token,2026-04-30T21:48:50.645Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:585:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '56d431d2-5af9-46ca-b6d7-5672face17b5', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMTA1MWM0NTctZTNlYi00MzUyLWE3MWMtZWE5NjU4NGRkODI5Iiwib3JnSWQiOiJvcmdfNzIyNjgwMzUtY2Q1OC00N2RkLWIyMzAtY2IzZGM4ZmUzMTgwIiwidG9rZW5JZCI6IjU2ZDQzMWQyLTVhZjktNDZjYS1iNmQ3LTU2NzJmYWNlMTdiNSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.-WW2tcWufLy10t4bYNysWgdI0MRzebUznBk03BMmdCA', 'user_1051c457-e3eb-4352-a71c-ea96584dd829', 'test token', '2026-04-30T21:48:50.645Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:585:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId/messages > returns messages in chronological order
Stack Traces | 0.00318s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 2aa860b1-5b00-41c7-ba99-69143fa8b30b,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfNzY2M2U4ZGUtMDdkYy00ZmU0LThiNzgtNWQxOWUyNDU0YzFjIiwib3JnSWQiOiJvcmdfMzE5NGIyZDUtMDdmOC00ZGU3LTgxNjctMTJiYjA5NDIxMGZiIiwidG9rZW5JZCI6IjJhYTg2MGIxLTViMDAtNDFjNy1iYTk5LTY5MTQzZmE4YjMwYiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.NXamHK2IxYDvEWNsffrzEpGnN3DlKf3Qa3KMmEfKzU0,user_7663e8de-07dc-4fe4-8b78-5d19e2454c1c,test token,2026-04-30T21:48:50.594Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:319:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '2aa860b1-5b00-41c7-ba99-69143fa8b30b', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfNzY2M2U4ZGUtMDdkYy00ZmU0LThiNzgtNWQxOWUyNDU0YzFjIiwib3JnSWQiOiJvcmdfMzE5NGIyZDUtMDdmOC00ZGU3LTgxNjctMTJiYjA5NDIxMGZiIiwidG9rZW5JZCI6IjJhYTg2MGIxLTViMDAtNDFjNy1iYTk5LTY5MTQzZmE4YjMwYiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.NXamHK2IxYDvEWNsffrzEpGnN3DlKf3Qa3KMmEfKzU0', 'user_7663e8de-07dc-4fe4-8b78-5d19e2454c1c', 'test token', '2026-04-30T21:48:50.594Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:319:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-onboarding-status.test.ts > GET /api/zero/onboarding/status > returns completed onboarding with default agent metadata
Stack Traces | 0.00324s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: 64043b45-c9c3-498a-b908-4b9f1afd63bb,user_d050207a-9a7f-45b6-9ed5-68a42a90cc89,agent-64043b45,org_7f5eba80-7c5c-417d-b7e2-81da149d576f
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-onboarding-status.ts:41:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-onboarding-status.test.ts:77:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ '64043b45-c9c3-498a-b908-4b9f1afd63bb', 'user_d050207a-9a7f-45b6-9ed5-68a42a90cc89', 'agent-64043b45', 'org_7f5eba80-7c5c-417d-b7e2-81da149d576f' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-onboarding-status.ts:41:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-onboarding-status.test.ts:77:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/audio-transcriptions-v1.test.ts > POST /api/v1/audio/transcriptions > rejects an empty PCM body before transcribing
Stack Traces | 0.00344s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 3b04e952-0b70-4f0b-8239-e3140314f965,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOGQ0ZjZhYzMtZDAwMC00ZDc5LTkyYzUtYTU1MWNkZGFiMTA1Iiwib3JnSWQiOiJvcmdfZmJmNGZiMTQtYzg5YS00NTc3LTljNDUtMjFhNDZmYzM0ODZkIiwidG9rZW5JZCI6IjNiMDRlOTUyLTBiNzAtNGYwYi04MjM5LWUzMTQwMzE0Zjk2NSIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.YGCxRh20KKQfono1P5f-ds1kAb-cxuBshtqLfu4JpzE,user_8d4f6ac3-d000-4d79-92c5-a551cddab105,test token,2026-04-30T21:48:52.916Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:210:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '3b04e952-0b70-4f0b-8239-e3140314f965', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOGQ0ZjZhYzMtZDAwMC00ZDc5LTkyYzUtYTU1MWNkZGFiMTA1Iiwib3JnSWQiOiJvcmdfZmJmNGZiMTQtYzg5YS00NTc3LTljNDUtMjFhNDZmYzM0ODZkIiwidG9rZW5JZCI6IjNiMDRlOTUyLTBiNzAtNGYwYi04MjM5LWUzMTQwMzE0Zjk2NSIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.YGCxRh20KKQfono1P5f-ds1kAb-cxuBshtqLfu4JpzE', 'user_8d4f6ac3-d000-4d79-92c5-a551cddab105', 'test token', '2026-04-30T21:48:52.916Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:210:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId > returns 404 when the thread is owned by a different user
Stack Traces | 0.0035s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: af28e5a7-b9a1-43e5-a4cb-6eda27b3c79f,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOWYwYWYzYzItZGMyOS00MjAyLTgyMGYtYTFkYTcyYzBiNmRhIiwib3JnSWQiOiJvcmdfM2IyM2MwMTYtOTFkOC00ZTgwLWJiNTgtZmJhNjQ2OTljYzU1IiwidG9rZW5JZCI6ImFmMjhlNWE3LWI5YTEtNDNlNS1hNGNiLTZlZGEyN2IzYzc5ZiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.W8xLSymiK6DAe_JFMT-69R67OB7lWxggLpePnL9i78A,user_9f0af3c2-dc29-4202-820f-a1da72c0b6da,test token,2026-04-30T21:48:50.539Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:198:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'af28e5a7-b9a1-43e5-a4cb-6eda27b3c79f', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOWYwYWYzYzItZGMyOS00MjAyLTgyMGYtYTFkYTcyYzBiNmRhIiwib3JnSWQiOiJvcmdfM2IyM2MwMTYtOTFkOC00ZTgwLWJiNTgtZmJhNjQ2OTljYzU1IiwidG9rZW5JZCI6ImFmMjhlNWE3LWI5YTEtNDNlNS1hNGNiLTZlZGEyN2IzYzc5ZiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.W8xLSymiK6DAe_JFMT-69R67OB7lWxggLpePnL9i78A', 'user_9f0af3c2-dc29-4202-820f-a1da72c0b6da', 'test token', '2026-04-30T21:48:50.539Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:198:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-queue-position.test.ts > GET /api/zero/queue-position > returns zero position for an owned run that is not queued
Stack Traces | 0.00365s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: 8cca015e-b2fe-49cd-9709-15fd8d81566c,user_b80aceb8-62c7-4f2e-9803-83089c769326,agent-8cca015e,org_b8ba8436-d72d-4b24-b859-8e96a8d18313
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-queue-position.ts:77:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-queue-position.test.ts:56:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ '8cca015e-b2fe-49cd-9709-15fd8d81566c', 'user_b80aceb8-62c7-4f2e-9803-83089c769326', 'agent-8cca015e', 'org_b8ba8436-d72d-4b24-b859-8e96a8d18313' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-queue-position.ts:77:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-queue-position.test.ts:56:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-voice-io-quota.test.ts > GET /api/zero/voice-io/quota > blocks free tier users at the lifetime audio input quota
Stack Traces | 0.00445s run time
Error: Failed query: insert into "user_behavior_count" ("org_id", "user_id", "behavior_key", "count", "first_at", "last_at") values ($1, $2, $3, $4, default, default)
params: org_e58af108-6fa4-4799-982f-e612f8a79827,user_d301ee90-40ae-40cc-8ca5-fe155eee16a9,audio_input,10
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-voice-io-quota.ts:42:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-voice-io-quota.test.ts:49:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "user_behavior_count" ("org_id", "user_id", "behavior_key", "count", "first_at", "last_at") values ($1, $2, $3, $4, default, default)', params: [ 'org_e58af108-6fa4-4799-982f-e612f8a79827', 'user_d301ee90-40ae-40cc-8ca5-fe155eee16a9', 'audio_input', 10 ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-voice-io-quota.ts:42:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-voice-io-quota.test.ts:49:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > org membership cache > populates the cache from Clerk on cache miss and serves the next request from cache
Stack Traces | 0.00474s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: bbdcadbe-14cd-4d44-914b-7d774159b33e,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMjg5MjJjYTUtYmU3MC00Nzc0LTllNWYtMTUyMWM4ODczNGQyIiwib3JnSWQiOiJvcmdfMjA1ODM0OWYtOWYwZC00MWEzLWJmMjUtOTAyODAyZmJhOTU2IiwidG9rZW5JZCI6ImJiZGNhZGJlLTE0Y2QtNGQ0NC05MTRiLTdkNzc0MTU5YjMzZSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.xexc-Z2g-kRiGRLyX5J3iyz_DqJR_OEEOCWUzF-lr8o,user_28922ca5-be70-4774-9e5f-1521c88734d2,test token,2026-04-30T21:48:50.624Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:440:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'bbdcadbe-14cd-4d44-914b-7d774159b33e', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfMjg5MjJjYTUtYmU3MC00Nzc0LTllNWYtMTUyMWM4ODczNGQyIiwib3JnSWQiOiJvcmdfMjA1ODM0OWYtOWYwZC00MWEzLWJmMjUtOTAyODAyZmJhOTU2IiwidG9rZW5JZCI6ImJiZGNhZGJlLTE0Y2QtNGQ0NC05MTRiLTdkNzc0MTU5YjMzZSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.xexc-Z2g-kRiGRLyX5J3iyz_DqJR_OEEOCWUzF-lr8o', 'user_28922ca5-be70-4774-9e5f-1521c88734d2', 'test token', '2026-04-30T21:48:50.624Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:440:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/device-token/poll > returns approved credentials after the user confirms the code
Stack Traces | 0.00475s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: bd95772f-5188-49b3-9756-2597801c68b7,user_9b62ca1e-81b1-4a28-93e4-7aaac03199ef,agent-bd95772f,org_c11a5716-7743-4c2b-812f-bf327b4344d3
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedDefaultAgent .../routes/__tests__/device-token.test.ts:52:3
 ❯ .../routes/__tests__/device-token.test.ts:201:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ 'bd95772f-5188-49b3-9756-2597801c68b7', 'user_9b62ca1e-81b1-4a28-93e4-7aaac03199ef', 'agent-bd95772f', 'org_c11a5716-7743-4c2b-812f-bf327b4344d3' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedDefaultAgent .../routes/__tests__/device-token.test.ts:52:3
 ❯ .../routes/__tests__/device-token.test.ts:201:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > org membership cache > refreshes the cached role when Clerk reports a different role
Stack Traces | 0.00621s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: ea765d24-258f-43b3-b787-178301cd02a8,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZTBlYjIzYTUtZWI5My00MTYwLThjMWYtZDVlODIwMjI3ZjE5Iiwib3JnSWQiOiJvcmdfODUxNDczMWUtZTdkYy00ZmZkLThiMWItNzgxY2JhMmRjZDc5IiwidG9rZW5JZCI6ImVhNzY1ZDI0LTI1OGYtNDNiMy1iNzg3LTE3ODMwMWNkMDJhOCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.O4cG6ZeFyp69fDU0Ky9Fm-sf9xmXGGkXNcxqdAfc5yY,user_e0eb23a5-eb93-4160-8c1f-d5e820227f19,test token,2026-04-30T21:48:50.629Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:480:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'ea765d24-258f-43b3-b787-178301cd02a8', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZTBlYjIzYTUtZWI5My00MTYwLThjMWYtZDVlODIwMjI3ZjE5Iiwib3JnSWQiOiJvcmdfODUxNDczMWUtZTdkYy00ZmZkLThiMWItNzgxY2JhMmRjZDc5IiwidG9rZW5JZCI6ImVhNzY1ZDI0LTI1OGYtNDNiMy1iNzg3LTE3ODMwMWNkMDJhOCIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.O4cG6ZeFyp69fDU0Ky9Fm-sf9xmXGGkXNcxqdAfc5yY', 'user_e0eb23a5-eb93-4160-8c1f-d5e820227f19', 'test token', '2026-04-30T21:48:50.629Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:480:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > Clerk session fallback for Bearer requests > rejects a PAT whose tokenId is not in DB even when a valid Clerk cookie is present
Stack Traces | 0.0091s run time
Error: Server returned unexpected response. Expected one of: 200,401 got: 500
 ❯ Object.check ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ .../routes/__tests__/health-auth-probe.test.ts:707:24

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/device-token/poll > returns pending before the user confirms the code
Stack Traces | 0.0112s run time
Error: Server returned unexpected response. Expected one of: 200,400 got: 500
 ❯ Object.create ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ createDeviceCode .../routes/__tests__/device-token.test.ts:87:20
 ❯ createTrackedDeviceCode .../routes/__tests__/device-token.test.ts:175:21
 ❯ .../routes/__tests__/device-token.test.ts:181:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > Zero bearer > omits orgRole when the zero user is no longer an org member
Stack Traces | 0.0114s run time
Error: Server returned unexpected response. Expected one of: 200,401 got: 500
 ❯ Object.check ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ .../routes/__tests__/health-auth-probe.test.ts:662:24

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > PAT bearer > returns 401 when the PAT tokenId is not in the DB
Stack Traces | 0.015s run time
Error: Server returned unexpected response. Expected one of: 200,401 got: 500
 ❯ Object.check ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ .../routes/__tests__/health-auth-probe.test.ts:391:24

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > Clerk session fallback for Bearer requests > returns 401 when invalid PAT and no cookie
Stack Traces | 0.017s run time
Error: Server returned unexpected response. Expected one of: 200,401 got: 500
 ❯ Object.check ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ .../routes/__tests__/health-auth-probe.test.ts:794:24

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/device-token/poll > returns expired after the device code expires
Stack Traces | 0.0224s run time
Error: Server returned unexpected response. Expected one of: 200,400 got: 500
 ❯ Object.create ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ createDeviceCode .../routes/__tests__/device-token.test.ts:87:20
 ❯ createTrackedDeviceCode .../routes/__tests__/device-token.test.ts:175:21
 ❯ .../routes/__tests__/device-token.test.ts:290:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/zero/devices/bb0/confirm > requires a user session
Stack Traces | 0.0254s run time
Error: Server returned unexpected response. Expected one of: 200,400 got: 500
 ❯ Object.create ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ createDeviceCode .../routes/__tests__/device-token.test.ts:87:20
 ❯ createTrackedDeviceCode .../routes/__tests__/device-token.test.ts:345:21
 ❯ .../routes/__tests__/device-token.test.ts:351:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/device-token/poll > returns invalid for a wrong poll token
Stack Traces | 0.0259s run time
Error: Server returned unexpected response. Expected one of: 200,400 got: 500
 ❯ Object.create ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ createDeviceCode .../routes/__tests__/device-token.test.ts:87:20
 ❯ createTrackedDeviceCode .../routes/__tests__/device-token.test.ts:175:21
 ❯ .../routes/__tests__/device-token.test.ts:273:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/zero-billing-auto-recharge.test.ts > GET /api/zero/billing/auto-recharge > returns the org auto-recharge config from the api implementation
Stack Traces | 0.0283s run time
Error: Failed query: insert into "org_metadata" ("org_id", "credits", "tier", "default_agent_id", "stripe_customer_id", "stripe_subscription_id", "subscription_status", "current_period_end", "cancel_at_period_end", "last_processed_invoice_id", "auto_recharge_enabled", "auto_recharge_threshold", "auto_recharge_amount", "auto_recharge_pending_at", "created_at", "updated_at") values ($1, default, default, default, default, default, default, default, default, default, $2, $3, $4, default, default, default)
params: org_599a905d-2610-4a35-9c64-fb69330b0baf,true,500,5000
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-billing-auto-recharge.ts:30:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-billing-auto-recharge.test.ts:28:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "org_metadata" ("org_id", "credits", "tier", "default_agent_id", "stripe_customer_id", "stripe_subscription_id", "subscription_status", "current_period_end", "cancel_at_period_end", "last_processed_invoice_id", "auto_recharge_enabled", "auto_recharge_threshold", "auto_recharge_amount", "auto_recharge_pending_at", "created_at", "updated_at") values ($1, default, default, default, default, default, default, default, default, default, $2, $3, $4, default, default, default)', params: [ 'org_599a905d-2610-4a35-9c64-fb69330b0baf', true, 500, 5000 ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-billing-auto-recharge.ts:30:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-billing-auto-recharge.test.ts:28:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/chat-threads-v1.test.ts > GET /api/v1/chat-threads/:threadId > returns 200 with thread metadata for the owning PAT
Stack Traces | 0.0297s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: a8054e6c-70d6-435f-8069-19866fa15e69,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOGUxZDdiNGMtYTk2Zi00NDVhLTg3YmItMzQ4OGI3ZDY2YjVjIiwib3JnSWQiOiJvcmdfZWYwNmI3ZDgtMWJjNy00ZDgyLTk0YTEtYTI1MzZmZWY3NmNjIiwidG9rZW5JZCI6ImE4MDU0ZTZjLTcwZDYtNDM1Zi04MDY5LTE5ODY2ZmExNWU2OSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.GAIVZj2mk3BpsrPcca34Yg7bcUzEKZf1pWw_40K55Ms,user_8e1d7b4c-a96f-445a-87bb-3488b7d66b5c,test token,2026-04-30T21:48:50.517Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:175:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ 'a8054e6c-70d6-435f-8069-19866fa15e69', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOGUxZDdiNGMtYTk2Zi00NDVhLTg3YmItMzQ4OGI3ZDY2YjVjIiwib3JnSWQiOiJvcmdfZWYwNmI3ZDgtMWJjNy00ZDgyLTk0YTEtYTI1MzZmZWY3NmNjIiwidG9rZW5JZCI6ImE4MDU0ZTZjLTcwZDYtNDM1Zi04MDY5LTE5ODY2ZmExNWU2OSIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.GAIVZj2mk3BpsrPcca34Yg7bcUzEKZf1pWw_40K55Ms', 'user_8e1d7b4c-a96f-445a-87bb-3488b7d66b5c', 'test token', '2026-04-30T21:48:50.517Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/chat-threads-v1.test.ts:56:3
 ❯ .../routes/__tests__/chat-threads-v1.test.ts:175:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-chat-threads.test.ts > GET /api/zero/chat-threads/:id > returns thread detail with S3-backed attachment metadata
Stack Traces | 0.0303s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: 96b7a8ca-9367-48f6-ba97-e640ae57e7fe,user_33c7c87c-4846-429b-b2a7-91d32ce39714,compose-96b7a8ca,org_5fbc145a-242b-438f-a204-4e3f1e915c90
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-chat-threads.ts:37:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-chat-threads.test.ts:30:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ '96b7a8ca-9367-48f6-ba97-e640ae57e7fe', 'user_33c7c87c-4846-429b-b2a7-91d32ce39714', 'compose-96b7a8ca', 'org_5fbc145a-242b-438f-a204-4e3f1e915c90' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-chat-threads.ts:37:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-chat-threads.test.ts:30:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/model-stats.test.ts > GET /api/internal/cron/aggregate-model-stats > aggregates hourly model usage and excludes connector usage
Stack Traces | 0.034s run time
Error: Failed query: insert into "usage_event" ("id", "run_id", "idempotency_key", "org_id", "user_id", "kind", "provider", "category", "quantity", "credits_charged", "status", "billing_error", "created_at", "processed_at") values (default, default, $1, $2, $3, $4, $5, $6, $7, $8, $9, default, $10, $11), (default, default, $12, $13, $14, $15, $16, $17, $18, $19, $20, default, $21, $22), (default, default, $23, $24, $25, $26, $27, $28, $29, $30, $31, default, $32, $33), (default, default, $34, $35, $36, $37, $38, $39, $40, $41, $42, default, $43, $44), (default, default, $45, $46, $47, $48, $49, $50, $51, $52, $53, default, $54, $55)
params: 2722f916-855b-4d45-b9dd-73bd916ba3f4,org_d3bc3a86-d0ad-421b-b106-a476d6405737,user_188d34d8-f64d-432d-9502-d71575e53a35,model,claude-sonnet-4-6,tokens.input,300,3,processed,2100-09-06T09:10:00.000Z,2100-09-06T09:10:00.000Z,7ece6a5a-342e-4f31-82af-7c0537070fc9,org_d3bc3a86-d0ad-421b-b106-a476d6405737,user_188d34d8-f64d-432d-9502-d71575e53a35,model,claude-sonnet-4-6,tokens.output,200,4,processed,2100-09-06T09:10:00.000Z,2100-09-06T09:10:00.000Z,de36bc7e-1c6e-4c7e-aadb-be89b1e3b9d8,org_d3bc3a86-d0ad-421b-b106-a476d6405737,user_188d34d8-f64d-432d-9502-d71575e53a35,connector,x-8dbb2e40-f6ff-465c-b8ad-ffc4aacefc26,tweet.read,999999,999,processed,2100-09-06T09:10:00.000Z,2100-09-06T09:10:00.000Z,abf03b2c-f626-40d1-83bc-a533686a983a,org_d3bc3a86-d0ad-421b-b106-a476d6405737,user_188d34d8-f64d-432d-9502-d71575e53a35,model,anthropic/claude-sonnet-4.6,tokens.input,25,1,processed,2100-09-06T09:10:00.000Z,2100-09-06T09:10:00.000Z,50cbaaf5-f027-42a8-8087-f73d42e311d0,org_d3bc3a86-d0ad-421b-b106-a476d6405737,user_188d34d8-f64d-432d-9502-d71575e53a35,model,unknown-model-dc34e9dd-ff2b-4a8d-adaf-44edb318e243,tokens.input,300000,3000,processed,2100-09-06T09:10:00.000Z,2100-09-06T09:10:00.000Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ .../routes/__tests__/model-stats.test.ts:62:5

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "usage_event" ("id", "run_id", "idempotency_key", "org_id", "user_id", "kind", "provider", "category", "quantity", "credits_charged", "status", "billing_error", "created_at", "processed_at") values (default, default, $1, $2, $3, $4, $5, $6, $7, $8, $9, default, $10, $11), (default, default, $12, $13, $14, $15, $16, $17, $18, $19, $20, default, $21, $22), (default, default, $23, $24, $25, $26, $27, $28, $29, $30, $31, default, $32, $33), (default, default, $34, $35, $36, $37, $38, $39, $40, $41, $42, default, $43, $44), (default, default, $45, $46, $47, $48, $49, $50, $51, $52, $53, default, $54, $55)', params: [ '2722f916-855b-4d45-b9dd-73bd916ba3f4', 'org_d3bc3a86-d0ad-421b-b106-a476d6405737', 'user_188d34d8-f64d-432d-9502-d71575e53a35', 'model', 'claude-sonnet-4-6', 'tokens.input', 300, 3, 'processed', '2100-09-06T09:10:00.000Z', '2100-09-06T09:10:00.000Z', '7ece6a5a-342e-4f31-82af-7c0537070fc9', 'org_d3bc3a86-d0ad-421b-b106-a476d6405737', 'user_188d34d8-f64d-432d-9502-d71575e53a35', 'model', 'claude-sonnet-4-6', 'tokens.output', 200, 4, 'processed', '2100-09-06T09:10:00.000Z', '2100-09-06T09:10:00.000Z', 'de36bc7e-1c6e-4c7e-aadb-be89b1e3b9d8', 'org_d3bc3a86-d0ad-421b-b106-a476d6405737', 'user_188d34d8-f64d-432d-9502-d71575e53a35', 'connector', 'x-8dbb2e40-f6ff-465c-b8ad-ffc4aacefc26', 'tweet.read', 999999, 999, 'processed', '2100-09-06T09:10:00.000Z', '2100-09-06T09:10:00.000Z', 'abf03b2c-f626-40d1-83bc-a533686a983a', 'org_d3bc3a86-d0ad-421b-b106-a476d6405737', 'user_188d34d8-f64d-432d-9502-d71575e53a35', 'model', 'anthropic/claude-sonnet-4.6', 'tokens.input', 25, 1, 'processed', '2100-09-06T09:10:00.000Z', '2100-09-06T09:10:00.000Z', '50cbaaf5-f027-42a8-8087-f73d42e311d0', 'org_d3bc3a86-d0ad-421b-b106-a476d6405737', 'user_188d34d8-f64d-432d-9502-d71575e53a35', 'model', 'unknown-model-dc34e9dd-ff2b-4a8d-adaf-44edb318e243', 'tokens.input', 300000, 3000, 'processed', '2100-09-06T09:10:00.000Z', '2100-09-06T09:10:00.000Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ .../routes/__tests__/model-stats.test.ts:62:5

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-secrets.test.ts > GET /api/zero/secrets > returns current user secret metadata sorted by name
Stack Traces | 0.0345s run time
Error: Failed query: insert into "secrets" ("id", "name", "encrypted_value", "description", "type", "user_id", "org_id", "created_at", "updated_at") values (default, $1, $2, $3, $4, $5, $6, $7, $8), (default, $9, $10, $11, $12, $13, $14, $15, $16)
params: Z_TOKEN,encrypted_Z_TOKEN,,connector,user_3700b6f6-981b-45b4-afdd-5b95d68f66a3,org_d7c7e249-c69d-4a80-be09-876fabfc8451,2026-01-02T03:04:05.000Z,2026-01-03T03:04:05.000Z,A_TOKEN,encrypted_A_TOKEN,alpha,user,user_3700b6f6-981b-45b4-afdd-5b95d68f66a3,org_d7c7e249-c69d-4a80-be09-876fabfc8451,2026-01-02T03:04:05.000Z,2026-01-03T03:04:05.000Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:111:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-secrets.test.ts:29:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "secrets" ("id", "name", "encrypted_value", "description", "type", "user_id", "org_id", "created_at", "updated_at") values (default, $1, $2, $3, $4, $5, $6, $7, $8), (default, $9, $10, $11, $12, $13, $14, $15, $16)', params: [ 'Z_TOKEN', 'encrypted_Z_TOKEN', null, 'connector', 'user_3700b6f6-981b-45b4-afdd-5b95d68f66a3', 'org_d7c7e249-c69d-4a80-be09-876fabfc8451', '2026-01-02T03:04:05.000Z', '2026-01-03T03:04:05.000Z', 'A_TOKEN', 'encrypted_A_TOKEN', 'alpha', 'user', 'user_3700b6f6-981b-45b4-afdd-5b95d68f66a3', 'org_d7c7e249-c69d-4a80-be09-876fabfc8451', '2026-01-02T03:04:05.000Z', '2026-01-03T03:04:05.000Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:111:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-secrets.test.ts:29:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/health-auth-probe.test.ts > GET /health/auth > PAT bearer > resolves a PAT bearer token with admin role
Stack Traces | 0.0364s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 9f4974c4-88ce-4df4-9b4c-aeebdb9b1eab,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZDMwM2ZlYjYtNGUyZS00NjZkLWE5Y2QtNmJkY2JmYmQ5ZGMwIiwib3JnSWQiOiJvcmdfMWMxNWMxYjYtZTMzZS00ZjYwLTlmNDctYWU3N2MyMTYzM2IxIiwidG9rZW5JZCI6IjlmNDk3NGM0LTg4Y2UtNGRmNC05YjRjLWFlZWJkYjliMWVhYiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.Nc3MjUa4zCt6hSFvoI3rhD4YcwvkVoXOPKWVR0pauxE,user_d303feb6-4e2e-466d-a9cd-6bdcbfbd9dc0,test token,2026-04-30T21:48:50.566Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:338:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '9f4974c4-88ce-4df4-9b4c-aeebdb9b1eab', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfZDMwM2ZlYjYtNGUyZS00NjZkLWE5Y2QtNmJkY2JmYmQ5ZGMwIiwib3JnSWQiOiJvcmdfMWMxNWMxYjYtZTMzZS00ZjYwLTlmNDctYWU3N2MyMTYzM2IxIiwidG9rZW5JZCI6IjlmNDk3NGM0LTg4Y2UtNGRmNC05YjRjLWFlZWJkYjliMWVhYiIsImlhdCI6MTc3NzU4NTY3MCwiZXhwIjoxNzc3NTg1NzMwfQ.Nc3MjUa4zCt6hSFvoI3rhD4YcwvkVoXOPKWVR0pauxE', 'user_d303feb6-4e2e-466d-a9cd-6bdcbfbd9dc0', 'test token', '2026-04-30T21:48:50.566Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/health-auth-probe.test.ts:64:3
 ❯ .../routes/__tests__/health-auth-probe.test.ts:338:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/audio-transcriptions-v1.test.ts > POST /api/v1/audio/transcriptions > wraps raw PCM as WAV and transcribes it with OpenAI
Stack Traces | 0.0388s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)
params: 4fa6bfe7-2b8a-4124-8c66-3981c144bdc6,vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOWRjZjMzZmItYTAyZi00OWQ4LTgyYjktNmFlZTdhMzlkZjZiIiwib3JnSWQiOiJvcmdfMTAxNzJlZDMtMGFjNi00NGI5LTg1OTgtZDA5MWUyMTVkMzFlIiwidG9rZW5JZCI6IjRmYTZiZmU3LTJiOGEtNDEyNC04YzY2LTM5ODFjMTQ0YmRjNiIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.pqutVHsv6j4WXGp0fDA_raQ1RWSuMjn5BQhuYVltS2M,user_9dcf33fb-a02f-49d8-82b9-6aee7a39df6b,test token,2026-04-30T21:48:52.858Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:136:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, default, default)', params: [ '4fa6bfe7-2b8a-4124-8c66-3981c144bdc6', 'vm0_pat_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNsaSIsInVzZXJJZCI6InVzZXJfOWRjZjMzZmItYTAyZi00OWQ4LTgyYjktNmFlZTdhMzlkZjZiIiwib3JnSWQiOiJvcmdfMTAxNzJlZDMtMGFjNi00NGI5LTg1OTgtZDA5MWUyMTVkMzFlIiwidG9rZW5JZCI6IjRmYTZiZmU3LTJiOGEtNDEyNC04YzY2LTM5ODFjMTQ0YmRjNiIsImlhdCI6MTc3NzU4NTY3MiwiZXhwIjoxNzc3NTg1NzMyfQ.pqutVHsv6j4WXGp0fDA_raQ1RWSuMjn5BQhuYVltS2M', 'user_9dcf33fb-a02f-49d8-82b9-6aee7a39df6b', 'test token', '2026-04-30T21:48:52.858Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ seedPatFixture .../routes/__tests__/audio-transcriptions-v1.test.ts:55:3
 ❯ .../routes/__tests__/audio-transcriptions-v1.test.ts:136:17

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/zero/devices/bb0/confirm > requires a default agent
Stack Traces | 0.0389s run time
Error: Server returned unexpected response. Expected one of: 200,400 got: 500
 ❯ Object.create ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ createDeviceCode .../routes/__tests__/device-token.test.ts:87:20
 ❯ createTrackedDeviceCode .../routes/__tests__/device-token.test.ts:345:21
 ❯ .../routes/__tests__/device-token.test.ts:372:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/zero-billing-auto-recharge.test.ts > GET /api/zero/billing/auto-recharge > returns the legacy default when the org metadata row does not exist
Stack Traces | 0.0429s run time
AssertionError: Expected API response status to be one of 200, received 500. Body: {"error":"Internal server error"}: expected [ 200 ] to include 500
 ❯ accept src/__tests__/test-helpers.ts:51:7
 ❯ .../routes/__tests__/zero-billing-auto-recharge.test.ts:66:22
apps/api/src/signals/routes/__tests__/zero-onboarding-status.test.ts > GET /api/zero/onboarding/status > requires admin onboarding when the org has no default agent
Stack Traces | 0.0434s run time
Error: Failed query: insert into "org_metadata" ("org_id", "credits", "tier", "default_agent_id", "stripe_customer_id", "stripe_subscription_id", "subscription_status", "current_period_end", "cancel_at_period_end", "last_processed_invoice_id", "auto_recharge_enabled", "auto_recharge_threshold", "auto_recharge_amount", "auto_recharge_pending_at", "created_at", "updated_at") values ($1, default, default, $2, default, default, default, default, default, default, default, default, default, default, default, default)
params: org_d91c5047-bb7a-4919-8316-ac98cbea89e5,
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-onboarding-status.ts:60:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-onboarding-status.test.ts:51:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "org_metadata" ("org_id", "credits", "tier", "default_agent_id", "stripe_customer_id", "stripe_subscription_id", "subscription_status", "current_period_end", "cancel_at_period_end", "last_processed_invoice_id", "auto_recharge_enabled", "auto_recharge_threshold", "auto_recharge_amount", "auto_recharge_pending_at", "created_at", "updated_at") values ($1, default, default, $2, default, default, default, default, default, default, default, default, default, default, default, default)', params: [ 'org_d91c5047-bb7a-4919-8316-ac98cbea89e5', null ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-onboarding-status.ts:60:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-onboarding-status.test.ts:51:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-api-keys.test.ts > GET /api/zero/api-keys > returns the current user's API keys sorted by creation time
Stack Traces | 0.0441s run time
Error: Failed query: insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, $6, $7), ($8, $9, $10, $11, $12, $13, $14)
params: fd8abf45-a0e5-419b-819c-5a4ed70636aa,vm0_pat_older_token,user_834bc4f8-0ecc-4acf-825c-378fb1574a07,Older,2026-04-01T00:00:00.000Z,,2026-03-01T00:00:00.000Z,592d9db8-981b-4487-ab42-8efe35049d3e,vm0_pat_newer_token,user_834bc4f8-0ecc-4acf-825c-378fb1574a07,Newer,2026-04-02T00:00:00.000Z,2026-03-03T00:00:00.000Z,2026-03-02T00:00:00.000Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-api-keys.ts:31:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-api-keys.test.ts:26:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "cli_tokens" ("id", "token", "user_id", "name", "expires_at", "last_used_at", "created_at") values ($1, $2, $3, $4, $5, $6, $7), ($8, $9, $10, $11, $12, $13, $14)', params: [ 'fd8abf45-a0e5-419b-819c-5a4ed70636aa', 'vm0_pat_older_token', 'user_834bc4f8-0ecc-4acf-825c-378fb1574a07', 'Older', '2026-04-01T00:00:00.000Z', null, '2026-03-01T00:00:00.000Z', '592d9db8-981b-4487-ab42-8efe35049d3e', 'vm0_pat_newer_token', 'user_834bc4f8-0ecc-4acf-825c-378fb1574a07', 'Newer', '2026-04-02T00:00:00.000Z', '2026-03-03T00:00:00.000Z', '2026-03-02T00:00:00.000Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-api-keys.ts:31:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-api-keys.test.ts:26:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-feature-switches.test.ts > GET /api/zero/feature-switches > returns persisted feature switch overrides
Stack Traces | 0.0449s run time
Error: Failed query: insert into "user_feature_switches" ("org_id", "user_id", "switches", "updated_at") values ($1, $2, $3, default)
params: org_7a2245d3-125a-4cee-88f7-9c7b0240ac39,user_30fc4078-d468-4523-a855-0766507b3f56,{"apiBackend":true,"audioInput":false}
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-feature-switches.ts:24:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-feature-switches.test.ts:28:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "user_feature_switches" ("org_id", "user_id", "switches", "updated_at") values ($1, $2, $3, default)', params: [ 'org_7a2245d3-125a-4cee-88f7-9c7b0240ac39', 'user_30fc4078-d468-4523-a855-0766507b3f56', '{"apiBackend":true,"audioInput":false}' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-feature-switches.ts:24:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-feature-switches.test.ts:28:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-variables.test.ts > GET /api/zero/variables > returns current user variables sorted by name
Stack Traces | 0.0451s run time
Error: Failed query: insert into "variables" ("id", "name", "value", "description", "user_id", "org_id", "created_at", "updated_at") values (default, $1, $2, $3, $4, $5, $6, $7), (default, $8, $9, $10, $11, $12, $13, $14)
params: Z_REGION,us-west-2,,user_d5a18860-609a-42cb-aced-2c230f4b4612,org_429082f7-f6e8-4fe4-bd3c-ff182f435352,2026-02-02T03:04:05.000Z,2026-02-03T03:04:05.000Z,A_ENDPOINT,https://api.example.test,endpoint,user_d5a18860-609a-42cb-aced-2c230f4b4612,org_429082f7-f6e8-4fe4-bd3c-ff182f435352,2026-02-02T03:04:05.000Z,2026-02-03T03:04:05.000Z
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:81:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-variables.test.ts:29:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "variables" ("id", "name", "value", "description", "user_id", "org_id", "created_at", "updated_at") values (default, $1, $2, $3, $4, $5, $6, $7), (default, $8, $9, $10, $11, $12, $13, $14)', params: [ 'Z_REGION', 'us-west-2', null, 'user_d5a18860-609a-42cb-aced-2c230f4b4612', 'org_429082f7-f6e8-4fe4-bd3c-ff182f435352', '2026-02-02T03:04:05.000Z', '2026-02-03T03:04:05.000Z', 'A_ENDPOINT', 'https://api.example.test', 'endpoint', 'user_d5a18860-609a-42cb-aced-2c230f4b4612', 'org_429082f7-f6e8-4fe4-bd3c-ff182f435352', '2026-02-02T03:04:05.000Z', '2026-02-03T03:04:05.000Z' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:81:7
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-variables.test.ts:29:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-queue-position.test.ts > GET /api/zero/queue-position > returns the queued run position within the org queue
Stack Traces | 0.0454s run time
Error: Failed query: insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)
params: 46ee6c29-f0b4-4a95-a120-58d0bafe8b34,user_8e9fc104-60da-49f9-a6e1-6b8b13aef7e6,agent-46ee6c29,org_a9e9bac4-fb9d-46b3-9897-cb7ac53b13c4
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-queue-position.ts:77:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-queue-position.test.ts:29:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "agent_composes" ("id", "user_id", "name", "head_version_id", "org_id", "created_at", "updated_at") values ($1, $2, $3, default, $4, default, default)', params: [ '46ee6c29-f0b4-4a95-a120-58d0bafe8b34', 'user_8e9fc104-60da-49f9-a6e1-6b8b13aef7e6', 'agent-46ee6c29', 'org_a9e9bac4-fb9d-46b3-9897-cb7ac53b13c4' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-queue-position.ts:77:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-queue-position.test.ts:29:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-secrets.test.ts > GET /api/zero/secrets > returns an empty list when the user has no secrets
Stack Traces | 0.0469s run time
Error: Failed query: delete from "org_members_metadata" where ("org_members_metadata"."org_id" = $1 and "org_members_metadata"."user_id" = $2)
params: org_776855a3-908a-469f-9707-547ed36ca753,user_d14e0ab1-e9ae-43fb-b7d6-c97b113bafd2
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:173:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'delete from "org_members_metadata" where ("org_members_metadata"."org_id" = $1 and "org_members_metadata"."user_id" = $2)', params: [ 'org_776855a3-908a-469f-9707-547ed36ca753', 'user_d14e0ab1-e9ae-43fb-b7d6-c97b113bafd2' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:173:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-user-preferences.test.ts > GET /api/zero/user-preferences > returns the persisted preferences for the current org member
Stack Traces | 0.0482s run time
Error: Failed query: insert into "org_members_metadata" ("org_id", "user_id", "timezone", "pinned_agent_ids", "send_mode", "onboarding_done", "credit_cap", "credit_enabled", "capture_network_bodies_remaining", "created_at", "updated_at") values ($1, $2, $3, $4, $5, default, default, default, $6, default, default)
params: org_d95c4574-7212-43b5-a87f-ebb0f6f466e6,user_fa19572c-8f46-47f7-a87a-18b499875c10,America/Los_Angeles,["agent_b","agent_a"],cmd-enter,3
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:57:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-user-preferences.test.ts:28:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'insert into "org_members_metadata" ("org_id", "user_id", "timezone", "pinned_agent_ids", "send_mode", "onboarding_done", "credit_cap", "credit_enabled", "capture_network_bodies_remaining", "created_at", "updated_at") values ($1, $2, $3, $4, $5, default, default, default, $6, default, default)', params: [ 'org_d95c4574-7212-43b5-a87f-ebb0f6f466e6', 'user_fa19572c-8f46-47f7-a87a-18b499875c10', 'America/Los_Angeles', '["agent_b","agent_a"]', 'cmd-enter', 3 ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:57:5
 ❯ .../__tests__/helpers/zero-route-test.ts:121:21
 ❯ .../routes/__tests__/zero-user-preferences.test.ts:28:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-queue-position.test.ts > GET /api/zero/queue-position > returns 404 for an unknown run
Stack Traces | 0.0579s run time
Error: Server returned unexpected response. Expected one of: 200,400,401,404 got: 500
 ❯ Object.getPosition ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ .../routes/__tests__/zero-queue-position.test.ts:112:22

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/zero-variables.test.ts > GET /api/zero/variables > returns an empty list when the user has no variables
Stack Traces | 0.0584s run time
Error: Failed query: delete from "org_members_metadata" where ("org_members_metadata"."org_id" = $1 and "org_members_metadata"."user_id" = $2)
params: org_017c3934-006d-48fe-a3fb-9f3a14610b03,user_6efe32af-9364-457b-af75-8135eed7f988
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:173:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'delete from "org_members_metadata" where ("org_members_metadata"."org_id" = $1 and "org_members_metadata"."user_id" = $2)', params: [ 'org_017c3934-006d-48fe-a3fb-9f3a14610b03', 'user_6efe32af-9364-457b-af75-8135eed7f988' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-user-data.ts:173:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-api-keys.test.ts > GET /api/zero/api-keys > returns an empty list when the user has no API keys
Stack Traces | 0.0591s run time
Error: Failed query: delete from "cli_tokens" where "cli_tokens"."user_id" = $1
params: user_e5585a72-6a90-4b15-963e-8f271fd6a750
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-api-keys.ts:58:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'delete from "cli_tokens" where "cli_tokens"."user_id" = $1', params: [ 'user_e5585a72-6a90-4b15-963e-8f271fd6a750' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-api-keys.ts:58:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
apps/api/src/signals/routes/__tests__/zero-user-preferences.test.ts > GET /api/zero/user-preferences > returns defaults when the org member metadata row does not exist
Stack Traces | 0.0626s run time
AssertionError: Expected API response status to be one of 200, received 500. Body: {"error":"Internal server error"}: expected [ 200 ] to include 500
 ❯ accept src/__tests__/test-helpers.ts:51:7
 ❯ .../routes/__tests__/zero-user-preferences.test.ts:68:22
apps/api/src/signals/routes/__tests__/zero-feature-switches.test.ts > GET /api/zero/feature-switches > returns empty switches when no override row exists
Stack Traces | 0.0715s run time
AssertionError: Expected API response status to be one of 200, received 500. Body: {"error":"Internal server error"}: expected [ 200 ] to include 500
 ❯ accept src/__tests__/test-helpers.ts:51:7
 ❯ .../routes/__tests__/zero-feature-switches.test.ts:66:22
apps/api/src/signals/routes/__tests__/device-token.test.ts > POST /api/device-token > creates a ten minute bb0 device code and device-only poll token
Stack Traces | 0.0795s run time
Error: Server returned unexpected response. Expected one of: 200,400 got: 500
 ❯ Object.create ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs:4844:15
 ❯ accept src/__tests__/test-helpers.ts:44:18
 ❯ .../routes/__tests__/device-token.test.ts:116:22

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { status: 500, body: { error: 'Internal server error' }, headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' } } }
apps/api/src/signals/routes/__tests__/zero-voice-io-quota.test.ts > GET /api/zero/voice-io/quota > defaults a missing org metadata row to the free quota
Stack Traces | 0.0937s run time
Error: Failed query: delete from "user_behavior_count" where ("user_behavior_count"."org_id" = $1 and "user_behavior_count"."user_id" = $2)
params: org_0b539895-97cb-43a6-82d9-ee1fbe21f780,user_ec958bf1-d49d-4be0-ae83-d4ca3cb654a9
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../src/pg-core/session.ts:73:10
 ❯ Object.write .../__tests__/helpers/zero-voice-io-quota.ts:62:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { query: 'delete from "user_behavior_count" where ("user_behavior_count"."org_id" = $1 and "user_behavior_count"."user_id" = $2)', params: [ 'org_0b539895-97cb-43a6-82d9-ee1fbe21f780', 'user_ec958bf1-d49d-4be0-ae83-d4ca3cb654a9' ] }
Caused by: Caused by: Caused by: Error: connect ECONNREFUSED 127.0.0.1:5432
 ❯ ../../node_modules/.pnpm/pg-pool@3.13.0_pg@8.20..../node_modules/pg-pool/index.js:45:11
 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/node-postgres/session.js:113:20
 ❯ NodePgPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.2_@neondatabase+serverless@1.0.2_@opentelemetry+api@1.9.1_@types+pg@8.20.0_pg@8.20.0_postgres@3.4..../drizzle-orm/pg-core/session.js:39:16
 ❯ Object.write .../__tests__/helpers/zero-voice-io-quota.ts:62:5
 ❯ .../__tests__/helpers/zero-route-test.ts:115:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant