mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:45:18 +00:00
Fase 1: playwright bare (--list, extensão VS Code, runs ad-hoc) quebrava na coleta — next@15 sem exports não resolve 'next/cache' em ESM nativo e server-only exige a condição react-server; o script test:e2e carregava ambas via NODE_OPTIONS (por isso o CI passava). Hook de resolução ESM vitest-free (e2eEsmResolve.mjs) registrada no main via module.register + propagada aos workers via NODE_OPTIONS quando invocada bare; path do script intocado. Fase 2: a sequência persistente campaign_fixture_municipality_alloc nunca é resetada e um ciclo completo claima ~505 do catálogo de 435 — o wrap em todo ciclo em DB de worktree fazia dois runs concorrentes receberem o mesmo índice e purgarem as linhas vivas um do outro. Registry de claims compartilhado vitest-free (campaignMunicipalityAllocator.ts): INSERT ON CONFLICT DO NOTHING com skip de slot vivo, steal de claim stale (TTL 2h), release no cleanup dos dois fixtures, erro claro de exaustão. Guard estático no testMunicipalityAllocatorConventions + spec int de stress.
9 lines
392 B
JavaScript
9 lines
392 B
JavaScript
/**
|
|
* OPS46 — entry point that registers the Playwright ESM resolution hook
|
|
* (see `e2eEsmResolve.mjs`). Passed to worker processes as
|
|
* `NODE_OPTIONS=--import=<absolute path>` so bare `playwright test` runs
|
|
* resolve `next/cache` and `server-only` exactly like `pnpm test:e2e` does.
|
|
*/
|
|
import { register } from 'node:module'
|
|
|
|
register(new URL('./e2eEsmResolve.mjs', import.meta.url))
|