CI: dedicated frontend-e2e-indexer-outage job (#215 follow-up) #219
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a dedicated CI job that runs Playwright market-data-down specs in isolation: indexer HTTP stopped (or unreachable), LocalTerra + Vite dev server up,
E2E_INDEXER_OUTAGE=1. Today these specs are opt-in only (#215) and not executed in default CI — regressions on trade/charts (and future/limits) outage UX are invisible in pipelines.Related: #215 (option B — stronger E2E), #201 (strict chain — must not flake),
gaps/GAP_1780023683.md§5.2.Current codebase
Opt-in Playwright specs (not in default CI)
e2e/trade-indexer-outage.spec.ts/trade/:pairtrade-indexer-outage-banner,trade-tape-unavailable,trade-chart-unavailable,trade-book-unavailable-bid/aske2e/charts-indexer-outage.spec.ts/chartscharts-market-data-outage-banner, no env URLsBoth use:
Manual run (documented in docs/testing.md § Frontend E2E — indexer outage):
CI today (
.github/workflows/test.yml)e2edeploy-dex-local.shonlynpm run test:e2e— strict tx + smoke; requires indexer up for indexer-backed smoke pathsfrontend-charts-integration:3001for Vitest integrationindexerGap: No job that (1) starts full stack including indexer, (2) verifies strict E2E still pass with indexer up, then (3) stops indexer and runs outage specs — or a separate job that only runs outage specs without touching the strict
e2ejob's assumptions.Playwright config
playwright.config.ts:workers: 5(do not change without stability review —.cursor/rules/playwright-workers.mdc)webServer: Vite on:3000;globalSetupprovisions LocalTerra dev wallet when chain requirede2e-smoke,e2e-tx— outage specs are not in a dedicated project today (they skip unless env set)Vitest coverage (CI)
npm run test:run(#215)Why this is needed
gaps/GAP_1780023683.mdlists opt-in outage E2E as a testing gap.Constraints and guardrails
e2ejob (#201): Outage specs must not run in the same job pass that expects indexer HTTP unless the job explicitly stops the indexer after indexer-dependent smoke tests — prefer a separate jobfrontend-e2e-indexer-outage(or similar).VITE_INDEXER_URLin CI failure artifacts beyond existing env patterns.deploy-dex-local.sh, charts job indexer start) — avoid duplicating 90s health loops without caching.E2E_INDEXER_OUTAGEis unset so localnpm run test:e2ebehavior unchanged.charts-indexer-outage+trade-indexer-outageat minimum; addlimits-indexer-outagewhen [#limits P2 issue] lands.Relevant files
CI / scripts
.github/workflows/test.yml— new job definitionscripts/deploy-dex-local.shscripts/test-charts-integration.sh(indexer bootstrap reference)Makefile— optionaltest-e2e-indexer-outagetargetfrontend-dapp/playwright.config.ts— optionale2e-indexer-outageproject withtestMatchglobSpecs
frontend-dapp/e2e/trade-indexer-outage.spec.tsfrontend-dapp/e2e/charts-indexer-outage.spec.tsDocs / skills
docs/testing.md— replace “opt-in only” with CI job name + local equivalentdocs/frontend.md§ Market data loading & outageskills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.mdskills/AGENTS_E2E_STRICT_CHAIN.md— clarify separation from outage jobRecommended direction
Option A — Separate workflow job (preferred)
frontend-e2e-indexer-outage(needs:frontendor standalone) with steps:deploy-dex-local.sh127.0.0.1:3001(reuse charts-integration indexer env:FACTORY_ADDRESS,CORS_ORIGINS, migrations + seed as needed for trade pair)npx playwright install chromiumpkill/ kill pid file)E2E_INDEXER_OUTAGE=1 npx playwright test e2e/trade-indexer-outage.spec.ts e2e/charts-indexer-outage.spec.tswithPLAYWRIGHT_BASE_URL/webServeras todayplaywrightprojecte2e-indexer-outagewithtestMatch: **/*-indexer-outage.spec.tsandgrepinvert on default projects sonpm run test:e2eunchanged.make test-e2e-indexer-outagefor local parity.Option B — Post-step in existing e2e job (higher risk)
npm run test:e2e, stop indexer and run outage specs — only if strict suite does not require indexer for final assertions. Not recommended without audit of all smoke specs.Indexer stop mechanism
nohupstart;killbefore outage tests; verify/api/v1/overviewreturns connection refused.Acceptance criteria
main(define trigger with existing workflowpathsfilters).E2E_INDEXER_OUTAGE=1and passes when indexer is stopped.e2ejob behavior unchanged (no new skips, no indexer stop).docs/testing.mddocuments job name, local reproduction, and env vars.e2e-indexer-outageproject (if added).Test plan (functional paths)
E2E_INDEXER_OUTAGE=1+ stopped indexercharts-market-data-outage-bannervisiblee2ejobE2E_INDEXER_OUTAGEnpm run test:e2ewithout envmake test-e2e-indexer-outage(if added)Test plan (attack vectors / misuse)
e2ejob 3× on same commitE2E_TRADE_PAIR/ factory deployVerification criteria
mainafter merge.e2ejob still green on same pipeline.docs/testing.md#frontend-e2e-indexer-outagelinks to CI job and supersedes “opt-in only” wording where appropriate.marked as related to #215
mentioned in commit
f6bc8c5645Implementation complete (merged to
main@f6bc8c5)Added a dedicated CI job for market-data-down Playwright so outage UX regressions are caught without touching the strict
e2ejob (#201).What changed
frontend-e2e-indexer-outagein.github/workflows/test.yml— Postgres + LocalTerra +deploy-dex-local.sh+ indexer build → sanityGET /api/v1/overview→ stop indexer →E2E_INDEXER_OUTAGE=1Playwright (trade-,charts-,limits-indexer-outagespecs via project glob).e2e-indexer-outage(**/*-indexer-outage.spec.ts); excluded frome2e-smoke/ defaultnpm run test:e2e.scripts/test-e2e-indexer-outage.sh,scripts/lib/e2e-trade-pair-from-deploy.sh(resolvesE2E_TRADE_PAIRfrom.qa-deploy-stamp/ factory LCD).make test-e2e-indexer-outagefor local parity with CI.docs/testing.md#frontend-e2e-indexer-outage,docs/frontend.md,gaps/GAP_1780023683.md§5.2,skills/AGENTS_E2E_INDEXER_OUTAGE.md(new), cross-links inAGENTS_E2E_STRICT_CHAIN.mdandAGENTS_FRONTEND_MARKET_DATA_OUTAGE.md.Verification checklist
frontend-e2e-indexer-outagegreen onmainpipeline forf6bc8c5e2ejob still green (no indexer stop, outage specs not in default projects)make test-e2e-indexer-outageafterdeploy-dex-local.sh+cargo build --releaseinindexer/curl -sf http://127.0.0.1:3001/api/v1/overviewfails after script stops indexer, before Playwrighttrade-indexer-outage-banner+ paneltrade-*-unavailabletestids visiblecharts-market-data-outage-bannervisible, no env URLs in DOMlimits-market-data-outage-bannervisible (#218)npm run test:e2ewithoutE2E_INDEXER_OUTAGE: outage specs not executed (project excluded)@brouie — please verify CI + spot-check local
make test-e2e-indexer-outagewhen you have a moment. Leaving this issue open until confirmed.mentioned in commit
578b61c9cfmentioned in commit
806ea78ca6Verification (#219) — fixes pushed to
main(578b61c)Verified GitLab #219 in worktree
verify/issue-219against running LocalTerra + Postgres QA stack. The dedicatedfrontend-e2e-indexer-outagejob and docs/skills were already onmain; localmake test-e2e-indexer-outageinitially failed — fixes merged below.What was wrong (fixed on
main)test-e2e-indexer-outage.shonly killed its own PID — with QA indexer on:3001, stop did not make the API unreachable. Addedscripts/lib/indexer-port.shto stop all listeners on the sanity port.:3001caused false greens during Playwright. After sanity on:3001, the browser now usesOUTAGE_E2E_INDEXER_URL(defaulthttp://127.0.0.1:39991, nothing listening).:3001when needed.VITE_E2E_INDEXER_OUTAGE=1disables query retries and shortens indexer fetch timeout for outage Playwright only.limits-indexer-outage.spec.tsusedgetByRole('option').first()(placeholder) — now usesselectLimitPairByFactoryIndex(page, 0).Local verification (pass)
make test-e2e-indexer-outage— 3/3 passed (trade, charts, limits indexer-outage specs)e2e-smokeproject listing withoutE2E_INDEXER_OUTAGEscripts/e2e-start-indexer.sh(QA stack left up; no frontend left running)Checklist for @brouie (CI + sign-off)
frontend-e2e-indexer-outagegreen onmainafter578b61ce2ejob still green (no outage specs, indexer not stopped)docs/testing.md#frontend-e2e-indexer-outagematches job +make test-e2e-indexer-outagedocs/**still triggers workflow when paths allowAgent / doc cross-links
skills/AGENTS_E2E_INDEXER_OUTAGE.md— invariants (sanity:3001, browser dead port, workers=5)skills/AGENTS_E2E_STRICT_CHAIN.md— separation from strict jobskills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.mdStatus: Leaving open — cannot confirm GitHub Actions green from this host (no GitHub remote /
ghrepo). Please close after CI checklist passes./cc @brouie
mentioned in issue #234
We are not using github actions/gitlab, so do not verify item one from checklist only 2, 34
Verification complete — GitLab #219
Verified in worktree
verify/issue-219@3e7a175against healthy LocalTerra + Postgres QA stack (infra restarted ~22m prior; RPC vialocalterra-host-curl.sh, indexer via:3001/api/v1/overview).Per maintainer note: GitHub Actions / GitLab CI not run on this host — skipped pipeline-only checklist items; all local acceptance + verification criteria pass.
What was verified
make test-e2e-indexer-outage*-indexer-outage.spec.ts, ~10s):3001OUTAGE_E2E_INDEXER_URL(:39991) after stopscripts/test-e2e-indexer-outage.she2e-smoke/ defaultnpm run test:e2eplaywright test --list --project=e2e-smokelists no*-indexer-outagespecse2e-indexer-outage+ workers=5frontend-dapp/playwright.config.tsmake test-e2e-indexer-outageMake targetMakefile→scripts/test-e2e-indexer-outage.shindexer-port.sh):3001, stopped all listenersdocs/testing.md#frontend-e2e-indexer-outage,docs/frontend.md,skills/AGENTS_E2E_INDEXER_OUTAGE.md,AGENTS_E2E_STRICT_CHAIN.md,AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md,gaps/GAP_1780023683.md.github/workflows/test.yml→frontend-e2e-indexer-outage(reference only)Post-run
scripts/e2e-start-indexer.sh—:3001overview OKChecklist for sign-off
make test-e2e-indexer-outagepasses after deploy + release indexer build:3001after script stop, before Playwrighttrade-indexer-outage-banner+trade-*-unavailabletestidscharts-market-data-outage-banner, no env URLs in DOMlimits-market-data-outage-banner(#218)npm run test:e2e/e2e-smokeunchanged (outage project excluded)docs/testing.md#frontend-e2e-indexer-outagedocuments job name, env vars, local reproAGENTS_E2E_INDEXER_OUTAGE.md)frontend-e2e-indexer-outagegreen onmain(external CI — not verified here)e2ejob still green (external CI — not verified here)No code changes required;
verify/issue-219merged tomain(already at3e7a175).