review(OPS88): mirror gate-ci alinha reset/needsDb ao modo curated (OPS86)

This commit is contained in:
Francisco Solla 2026-08-24 15:45:40 -03:00
parent 09e2eaef8e
commit 24f3bc26f6

View file

@ -126,7 +126,10 @@ const main = async () => {
// --- Phase 2 (expensive) — only when phase 1 would have been green ---
const needsDb =
scope.test.mode !== 'none' || scope.build.mode !== 'none' || scope.e2e.mode === 'selected'
scope.test.mode !== 'none' ||
scope.build.mode !== 'none' ||
scope.e2e.mode === 'selected' ||
scope.e2e.mode === 'curated'
if (needsDb) {
console.log('\n[gate:ci] ▶ preflight (teqo_test)')
const dbOk = await diagnoseDatabaseTarget({
@ -162,7 +165,11 @@ const main = async () => {
// the e2e build gets in CI, instead of int fixture residue. Same condition
// as the CI step. (The gate still builds the default `.next`, not
// `.next-e2e` — e2e never runs here, OPS72.)
if (scope.build.mode !== 'none' || scope.e2e.mode === 'selected') {
if (
scope.build.mode !== 'none' ||
scope.e2e.mode === 'selected' ||
scope.e2e.mode === 'curated'
) {
run('db:reset', 'pnpm', ['db:reset'], dbEnv)
} else {
console.log('\n[gate:ci] ⊘ db:reset skipped (no build/e2e phase)')