mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-10-03 02:04:31 +10:00
* fix(ai): make provider test timeout configurable via AI_TEST_TIMEOUT_MS - Problem: the 30s hardcoded timeout is too short for self-hosted deployments with cold-start models (e.g. Ollama). Makes it impossible to pass the provider test (issue #3374). - Fix: read AI_TEST_TIMEOUT_MS from the environment, defaulting to 30_000. Zero behaviour change when the env var is absent. - Verification: existing test asserts "30 seconds" in the timeout message; default is unchanged so the test continues to pass. (CI needs Node 22+ — not available on this host.) * fix(ai): add AI_TEST_TIMEOUT_MS to turbo globalEnv so it reaches the API process - Problem: Turborepo filters env vars not listed in globalEnv, so AI_TEST_TIMEOUT_MS would always be undefined at runtime under turbo dev/start, making the override dead code. - Fix: add AI_TEST_TIMEOUT_MS to the globalEnv array. - Verification: turbo.json validates as valid JSON. * fix(ai): validate AI_TEST_TIMEOUT_MS as a finite non-negative integer * docs(ai): add JSDoc to timeout parser and test helper * test(ai): restore AI_TEST_TIMEOUT_MS after timeout tests - Problem: loadWithTimeout() mutates process.env.AI_TEST_TIMEOUT_MS but nothing restores it, so the last value tested ("999999999999") leaked to every test that runs after this describe block in the same file. - Fix: save the pre-test value and restore it in an afterEach hook. - Verification: pnpm exec vitest run src/features/ai/service.test.ts in packages/api — 18/18 passed. * test(api): isolate AI timeout environment cases --------- Co-authored-by: Amruth Pillai <im.amruth@gmail.com>
146 lines
2.8 KiB
JSON
146 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://v2-10-7.turborepo.dev/schema.json",
|
|
"ui": "stream",
|
|
"boundaries": {
|
|
"dependencies": {
|
|
"deny": ["web", "server"]
|
|
},
|
|
"implicitDependencies": [
|
|
"vitest",
|
|
"@testing-library/jest-dom",
|
|
"@testing-library/react",
|
|
"@testing-library/user-event"
|
|
],
|
|
"tags": {
|
|
"app:server": {
|
|
"dependencies": {
|
|
"deny": ["app:web", "runtime:browser"]
|
|
}
|
|
},
|
|
"runtime:server": {
|
|
"dependencies": {
|
|
"deny": ["app:web", "runtime:browser"]
|
|
}
|
|
},
|
|
"runtime:browser": {
|
|
"dependencies": {
|
|
"deny": ["app:server", "runtime:server"]
|
|
}
|
|
},
|
|
"runtime:universal": {
|
|
"dependencies": {
|
|
"deny": ["app:web", "app:server", "runtime:server"]
|
|
}
|
|
},
|
|
"role:domain": {
|
|
"dependencies": {
|
|
"deny": ["app:web", "app:server", "role:adapter", "role:infra"]
|
|
}
|
|
},
|
|
"role:ui": {
|
|
"dependencies": {
|
|
"deny": ["app:web", "app:server", "runtime:server", "role:infra"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"globalEnv": [
|
|
"PORT",
|
|
"SERVER_PORT",
|
|
"APP_URL",
|
|
"DATABASE_URL",
|
|
"AUTH_SECRET",
|
|
"BETTER_AUTH_API_KEY",
|
|
"BETTER_AUTH_INTERNAL_URL",
|
|
"GOOGLE_CLIENT_ID",
|
|
"GOOGLE_CLIENT_SECRET",
|
|
"GITHUB_CLIENT_ID",
|
|
"GITHUB_CLIENT_SECRET",
|
|
"LINKEDIN_CLIENT_ID",
|
|
"LINKEDIN_CLIENT_SECRET",
|
|
"OAUTH_PROVIDER_NAME",
|
|
"OAUTH_CLIENT_ID",
|
|
"OAUTH_CLIENT_SECRET",
|
|
"OAUTH_DISCOVERY_URL",
|
|
"OAUTH_AUTHORIZATION_URL",
|
|
"OAUTH_TOKEN_URL",
|
|
"OAUTH_USER_INFO_URL",
|
|
"OAUTH_SCOPES",
|
|
"SMTP_HOST",
|
|
"SMTP_PORT",
|
|
"SMTP_USER",
|
|
"SMTP_PASS",
|
|
"SMTP_FROM",
|
|
"SMTP_SECURE",
|
|
"LOCAL_STORAGE_PATH",
|
|
"S3_ACCESS_KEY_ID",
|
|
"S3_SECRET_ACCESS_KEY",
|
|
"S3_REGION",
|
|
"S3_ENDPOINT",
|
|
"S3_BUCKET",
|
|
"S3_FORCE_PATH_STYLE",
|
|
"REDIS_URL",
|
|
"ENCRYPTION_SECRET",
|
|
"FLAG_DISABLE_SIGNUPS",
|
|
"FLAG_DISABLE_EMAIL_AUTH",
|
|
"FLAG_DISABLE_IMAGE_PROCESSING",
|
|
"FLAG_DISABLE_API_RATE_LIMIT",
|
|
"FLAG_SHOW_SPONSORS",
|
|
"FLAG_ALLOW_UNSAFE_OAUTH_REDIRECT_URI",
|
|
"FLAG_ALLOW_UNSAFE_AI_BASE_URL",
|
|
"AI_TEST_TIMEOUT_MS"
|
|
],
|
|
"tasks": {
|
|
"transit": {
|
|
"dependsOn": ["^transit"]
|
|
},
|
|
"build": {
|
|
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/.env*"],
|
|
"outputs": ["dist/**", ".vercel/**"],
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"check": {
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"typecheck": {
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"test": {
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"test:coverage": {
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"test:ci": {
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"test:e2e": {
|
|
"cache": false
|
|
},
|
|
"test:agent": {
|
|
"dependsOn": ["transit"]
|
|
},
|
|
"dev": {
|
|
"cache": false,
|
|
"persistent": true
|
|
},
|
|
"start": {
|
|
"cache": false,
|
|
"persistent": true
|
|
},
|
|
"db:generate": {
|
|
"cache": false
|
|
},
|
|
"db:migrate": {
|
|
"cache": false
|
|
},
|
|
"db:studio": {
|
|
"cache": false,
|
|
"persistent": true
|
|
},
|
|
"lingui:extract": {
|
|
"cache": false
|
|
}
|
|
}
|
|
}
|