Problem
Six .mjs smokes assume a running Next server (localhost:3001 by default) and fetch real routes:
tests/e2e_pages_smoke.mjs — homepage, dataset pages, ticker numbers
tests/e2e_admin_smoke.mjs — /api/admin/runs
tests/e2e_agent_smoke.mjs — /api/agent SSE
tests/e2e_reports_smoke.mjs — /reports/[slug]
tests/e2e_nav_consistency.mjs — header/footer
tests/specialists_smoke.mjs — app/lib/specialists.ts paths
Right now the only way to run them is manual: open one terminal with npm run dev, another with node tests/e2e_pages_smoke.mjs. Nothing in CI exercises the homepage, the admin console, or the SSE stream — meaning the visible-to-judges surfaces are protected only by the developer remembering to run the smokes locally.
Companion to the broader CI test-coverage issue, but separated because this one needs a different mechanism (background server + wait-for-port + cleanup) than fast unit tests.
Fix
Add an e2e-smoke job to .github/workflows/ci.yml:
npm ci
npm run build
PORT=3001 npx next start & (background)
npx wait-on http://localhost:3001/api/cache-stats (30s timeout)
node --test tests/e2e_pages_smoke.mjs tests/e2e_admin_smoke.mjs tests/e2e_reports_smoke.mjs tests/e2e_nav_consistency.mjs tests/specialists_smoke.mjs
- Skip
e2e_agent_smoke.mjs for now — it needs OPENAI_API_KEY and is the right candidate for a separate e2e-live job gated on secrets.OPENAI_API_KEY
Build env will need SUPABASE_URL, SUPABASE_KEY, DATABASE_URL etc. — set CI-only stub values that let the routes return shape-correct empty responses (matches what the .mjs smokes already assert).
Code pointers
.github/workflows/ci.yml
tests/e2e_pages_smoke.mjs:1-30 — has the usage docstring with the port pattern
tests/e2e_agent_smoke.mjs — flag as live-only
Acceptance
Problem
Six
.mjssmokes assume a running Next server (localhost:3001by default) and fetch real routes:tests/e2e_pages_smoke.mjs— homepage, dataset pages, ticker numberstests/e2e_admin_smoke.mjs—/api/admin/runstests/e2e_agent_smoke.mjs—/api/agentSSEtests/e2e_reports_smoke.mjs—/reports/[slug]tests/e2e_nav_consistency.mjs— header/footertests/specialists_smoke.mjs—app/lib/specialists.tspathsRight now the only way to run them is manual: open one terminal with
npm run dev, another withnode tests/e2e_pages_smoke.mjs. Nothing in CI exercises the homepage, the admin console, or the SSE stream — meaning the visible-to-judges surfaces are protected only by the developer remembering to run the smokes locally.Companion to the broader CI test-coverage issue, but separated because this one needs a different mechanism (background server + wait-for-port + cleanup) than fast unit tests.
Fix
Add an
e2e-smokejob to.github/workflows/ci.yml:npm cinpm run buildPORT=3001 npx next start &(background)npx wait-on http://localhost:3001/api/cache-stats(30s timeout)node --test tests/e2e_pages_smoke.mjs tests/e2e_admin_smoke.mjs tests/e2e_reports_smoke.mjs tests/e2e_nav_consistency.mjs tests/specialists_smoke.mjse2e_agent_smoke.mjsfor now — it needsOPENAI_API_KEYand is the right candidate for a separatee2e-livejob gated onsecrets.OPENAI_API_KEYBuild env will need
SUPABASE_URL,SUPABASE_KEY,DATABASE_URLetc. — set CI-only stub values that let the routes return shape-correct empty responses (matches what the .mjs smokes already assert).Code pointers
.github/workflows/ci.ymltests/e2e_pages_smoke.mjs:1-30— has the usage docstring with the port patterntests/e2e_agent_smoke.mjs— flag as live-onlyAcceptance
e2e-smokejob green on PR, exercising the 5 non-live smokestests/README.md(or AGENTS.md test section)