[CL-CI] fix(deploy): исключить RLS-интеграционный тест из release-gate #865

Merged
andrei merged 1 commit from feature/claude-rls-gate-skip into master 2026-06-25 11:46:45 +00:00
Owner

Что сделано

Release-gate деплоя (Production Release Gate) исключает rls.security.test.ts из прогона vitest run (--exclude '**/rls.security.test.ts').

Зачем

Release-gate гоняет vitest run без Postgres-сервиса и DATABASE_URL. rls.security.test.ts — DB-интеграционный тест: при импорте ../config/prisma.js вызывается buildPgPool(), который кидает [Prisma] DATABASE_URL is not set на import-time → краш гейта (760 passed | 1 failed) → Deploy Static/API пропускаются → деплой заблокирован. Тест полностью покрыт CI-джобой API (там есть Postgres-сервис + DATABASE_URL). Исключаем его только из deploy-гейта.

План тестирования

  • vitest list --exclude '**/rls.security.test.ts': node_modules=0 (дефолтные excludes сохранены), rls=0 (исключён) — проверено локально
  • vitest run --exclude ... гоняет остальные тесты без краша
  • YAML валиден

Где могу ошибаться

  • Если у release-gate появится свой Postgres+DATABASE_URL — exclude можно снять, чтобы RLS гонялся и в деплой-гейте. Сейчас гейт остаётся build/typecheck/unit без интеграционной зависимости.
  • buildPgPool НЕ трогал (GitNexus impact: CRITICAL, 829 callers).

Разблокирует Deploy Static → доставка locale-фикса кошелька (#862) в прод.

## Что сделано Release-gate деплоя (`Production Release Gate`) исключает `rls.security.test.ts` из прогона `vitest run` (`--exclude '**/rls.security.test.ts'`). ## Зачем Release-gate гоняет `vitest run` без Postgres-сервиса и `DATABASE_URL`. `rls.security.test.ts` — DB-интеграционный тест: при импорте `../config/prisma.js` вызывается `buildPgPool()`, который кидает `[Prisma] DATABASE_URL is not set` на import-time → краш гейта (`760 passed | 1 failed`) → `Deploy Static/API` пропускаются → деплой заблокирован. Тест полностью покрыт CI-джобой `API` (там есть Postgres-сервис + `DATABASE_URL`). Исключаем его только из deploy-гейта. ## План тестирования - `vitest list --exclude '**/rls.security.test.ts'`: node_modules=0 (дефолтные excludes сохранены), rls=0 (исключён) — проверено локально - `vitest run --exclude ...` гоняет остальные тесты без краша - YAML валиден ## Где могу ошибаться - Если у release-gate появится свой Postgres+DATABASE_URL — exclude можно снять, чтобы RLS гонялся и в деплой-гейте. Сейчас гейт остаётся build/typecheck/unit без интеграционной зависимости. - `buildPgPool` НЕ трогал (GitNexus impact: CRITICAL, 829 callers). Разблокирует Deploy Static → доставка locale-фикса кошелька (#862) в прод.
[CL-CI] fix(deploy): исключить RLS-интеграционный тест из release-gate
Some checks failed
CI / API (pull_request) Failing after 14m27s
PR Janitor / janitor (pull_request) Failing after 25h4m8s
CI / Prisma Migrate Gate (pull_request) Failing after 25h6m5s
CI / Python SDK (pull_request) Failing after 25h6m45s
CI / Telegram Mini App (pull_request) Failing after 25h8m11s
CI / Contracts (pull_request) Failing after 25h10m8s
CI / App (pull_request) Failing after 25h13m28s
CI / Secrets Scan (pull_request) Failing after 25h11m7s
30471e340e
Production Release Gate гоняет 'vitest run' без Postgres-сервиса/DATABASE_URL.
rls.security.test.ts — DB-интеграционный: eager import ../config/prisma.js дёргает
buildPgPool() → throw '[Prisma] DATABASE_URL is not set' на import-time → краш
release-gate ('760 passed | 1 failed') → Deploy Static/API skip → деплой заблокирован.
Тест полностью покрыт CI 'API' job (Postgres + DATABASE_URL). Исключаем его из
deploy-гейта (--exclude расширяет дефолтные excludes, node_modules не затронут —
проверено vitest list). buildPgPool НЕ трогаем (GitNexus impact: CRITICAL/829).

Разблокирует Deploy Static → доставка locale-фикса кошелька (#862) в прод.
andrei scheduled this pull request to auto merge when all checks succeed 2026-06-25 11:45:06 +00:00
andrei merged commit 229c44e0d0 into master 2026-06-25 11:46:45 +00:00
andrei deleted branch feature/claude-rls-gate-skip 2026-06-25 11:46:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
europa-tech-srl/europatech!865
No description provided.