Add frontend lint to CI; indexer-first Anvil E2E; workflow defaults (#322) #470

Merged
PlasticDigits merged 2 commits from issue-322-ci-lint-indexer-e2e into main 2026-06-13 14:10:23 +00:00
PlasticDigits commented 2026-06-13 13:05:00 +00:00 (Migrated from gitlab.com)

Summary

Implements GitLab #322: add npm run lint to the GitHub frontend-test job; extend scripts/e2e-anvil.sh with optional indexer-first mode (YIELDOMEGA_E2E_INDEXER=1); include anvil-referrals.spec.ts in the default Anvil Playwright suite; document the GitLab (issues/MRs) vs GitHub Actions (merge gate) split.

  • CI: frontend-test now runs typecheck → lint → npm test (21 ESLint warnings, 0 errors — warnings do not fail the job).
  • E2E defaults: e2e/anvil-arena-*.spec.ts + e2e/anvil-referrals.spec.ts; referrals spec updated for current UI copy (Claim cost, Register code).
  • Indexer-first E2E: YIELDOMEGA_E2E_INDEXER=1 starts native/Docker Postgres + indexer, inlines VITE_INDEXER_URL, runs e2e/anvil-indexer-first.spec.ts.
  • Docs: ci.md, e2e-anvil.md, invariants INV-CI-322-* / INV-ANVIL-E2E-322-*.

Acceptance checklist

Criterion Command / step Result
frontend-test runs lint .github/workflows/unit-tests.yml → npm run lint in frontend-test job PASS (local: cd frontend && npm run lint exit 0)
E2E documents + implements indexer-first mode docs/testing/e2e-anvil.md §301/#322; YIELDOMEGA_E2E_INDEXER=1 bash scripts/e2e-anvil.sh PASS
anvil-referrals.spec.ts in default flow bash scripts/e2e-anvil.sh (7 specs incl. referrals) PASS
ci.md explains GitLab/GitHub split docs/testing/ci.md §322 PASS
GitHub Actions log shows lint step Push branch → verify frontend-test job on GitHub SKIP (pending CI on push)

Verification for third parties

# Lint gate (same as CI frontend-test)
cd frontend && npm ci && npm run typecheck && npm run lint && npm test

# Default Anvil E2E (arena + referrals)
export PATH="$HOME/.foundry/bin:$PATH"
bash scripts/e2e-anvil.sh

# Optional indexer-first (#301 display smoke)
export PATH="$HOME/.foundry/bin:$PATH"
source /usr/local/cargo/env 2>/dev/null || true
bash scripts/bootstrap-cloud-postgres-native.sh   # if needed
YIELDOMEGA_E2E_INDEXER=1 bash scripts/e2e-anvil.sh

Static indexer-first policy (no browser RPC mirrors): cd frontend && npm test -- indexerFirstDisplay

Blockers

None for merge from local verification. GitHub frontend-test lint step awaits remote CI run after push.


Note

Low Risk
Changes are CI, E2E orchestration, and test/docs updates with no production auth or contract logic; indexer-first E2E adds optional Postgres/indexer dependency locally only.

Overview
Adds npm run lint to the GitHub frontend-test job (after typecheck, before Vitest) and aligns docs/testing/ci.md local parity with that order. Documents GitLab as the issue/MR host vs GitHub Actions as the merge gate (#322).

scripts/e2e-anvil.sh now runs e2e/anvil-referrals.spec.ts by default alongside arena specs; with YIELDOMEGA_E2E_INDEXER=1 it can start Postgres + the indexer, inline VITE_INDEXER_URL, and add e2e/anvil-indexer-first.spec.ts, including cleanup for the indexer process and a build stamp keyed by indexer mode. anvil-referrals.spec.ts selectors/copy were updated for the current referrals UI; new anvil-indexer-first.spec.ts asserts indexer-driven Arena display when ANVIL_E2E_INDEXER=1.

Testing docs and invariants record the new CI lint gate, default referrals E2E, indexer-first mode, and GitLab/GitHub CI split.

Reviewed by Cursor Bugbot for commit 3615a4fe35. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary Implements GitLab #322: add **`npm run lint`** to the GitHub **`frontend-test`** job; extend **`scripts/e2e-anvil.sh`** with optional indexer-first mode (`YIELDOMEGA_E2E_INDEXER=1`); include **`anvil-referrals.spec.ts`** in the default Anvil Playwright suite; document the GitLab (issues/MRs) vs GitHub Actions (merge gate) split. - **CI:** `frontend-test` now runs `typecheck` → **`lint`** → `npm test` (21 ESLint warnings, 0 errors — warnings do not fail the job). - **E2E defaults:** `e2e/anvil-arena-*.spec.ts` + **`e2e/anvil-referrals.spec.ts`**; referrals spec updated for current UI copy (`Claim cost`, `Register code`). - **Indexer-first E2E:** `YIELDOMEGA_E2E_INDEXER=1` starts native/Docker Postgres + indexer, inlines `VITE_INDEXER_URL`, runs **`e2e/anvil-indexer-first.spec.ts`**. - **Docs:** `ci.md`, `e2e-anvil.md`, invariants **`INV-CI-322-*`** / **`INV-ANVIL-E2E-322-*`**. ## Acceptance checklist | Criterion | Command / step | Result | |-----------|----------------|--------| | `frontend-test` runs lint | `.github/workflows/unit-tests.yml` → `npm run lint` in `frontend-test` job | **PASS** (local: `cd frontend && npm run lint` exit 0) | | E2E documents + implements indexer-first mode | `docs/testing/e2e-anvil.md` §301/#322; `YIELDOMEGA_E2E_INDEXER=1 bash scripts/e2e-anvil.sh` | **PASS** | | `anvil-referrals.spec.ts` in default flow | `bash scripts/e2e-anvil.sh` (7 specs incl. referrals) | **PASS** | | `ci.md` explains GitLab/GitHub split | `docs/testing/ci.md` §322 | **PASS** | | GitHub Actions log shows lint step | Push branch → verify `frontend-test` job on GitHub | **SKIP** (pending CI on push) | ## Verification for third parties ```bash # Lint gate (same as CI frontend-test) cd frontend && npm ci && npm run typecheck && npm run lint && npm test # Default Anvil E2E (arena + referrals) export PATH="$HOME/.foundry/bin:$PATH" bash scripts/e2e-anvil.sh # Optional indexer-first (#301 display smoke) export PATH="$HOME/.foundry/bin:$PATH" source /usr/local/cargo/env 2>/dev/null || true bash scripts/bootstrap-cloud-postgres-native.sh # if needed YIELDOMEGA_E2E_INDEXER=1 bash scripts/e2e-anvil.sh ``` Static indexer-first policy (no browser RPC mirrors): `cd frontend && npm test -- indexerFirstDisplay` ## Blockers None for merge from local verification. GitHub `frontend-test` lint step awaits remote CI run after push. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Changes are CI, E2E orchestration, and test/docs updates with no production auth or contract logic; indexer-first E2E adds optional Postgres/indexer dependency locally only. > > **Overview** > Adds **`npm run lint`** to the GitHub **`frontend-test`** job (after typecheck, before Vitest) and aligns **`docs/testing/ci.md`** local parity with that order. Documents GitLab as the issue/MR host vs GitHub Actions as the merge gate ([#322](https://gitlab.com/PlasticDigits/yieldomega/-/issues/322)). > > **`scripts/e2e-anvil.sh`** now runs **`e2e/anvil-referrals.spec.ts`** by default alongside arena specs; with **`YIELDOMEGA_E2E_INDEXER=1`** it can start Postgres + the indexer, inline **`VITE_INDEXER_URL`**, and add **`e2e/anvil-indexer-first.spec.ts`**, including cleanup for the indexer process and a build stamp keyed by indexer mode. **`anvil-referrals.spec.ts`** selectors/copy were updated for the current referrals UI; new **`anvil-indexer-first.spec.ts`** asserts indexer-driven Arena display when **`ANVIL_E2E_INDEXER=1`**. > > Testing docs and invariants record the new CI lint gate, default referrals E2E, indexer-first mode, and GitLab/GitHub CI split. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3615a4fe35cf3cafdd69093edb6f299d8bbc82ec. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
PlasticDigits (Migrated from gitlab.com) approved these changes 2026-06-13 13:05:00 +00:00
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:05:09 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:05:17 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:06:36 +00:00 (Migrated from gitlab.com)

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit 93c0cff974. Configure here.

<!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue. <!-- BUGBOT_FIX_ALL --> <a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aTozOTllOTkzZi05ZWNmLTQyY2ItOWZmMS03YjI5YTQxOGMxZWUiLCJlbmNyeXB0aW9uS2V5IjoiMzFpakFYWEMxMFRwSXlXeFdEYXlPUFYxZF9sWTVyS3h4ei01ZVFPNHhyNCIsImJyYW5jaCI6Imlzc3VlLTMyMi1jaS1saW50LWluZGV4ZXItZTJlIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoieWllbGRvbWVnYSJ9fQ" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix All in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a> <!-- /BUGBOT_FIX_ALL --> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot). A cloud agent has been kicked off to fix the reported issue. <!-- BUGBOT_AUTOFIX_AGENT_LINK --></sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 93c0cff9748434bc4f518cb404fbcd7def1f32bc. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:06:37 +00:00 (Migrated from gitlab.com)

Indexer wait ignores compile time

Medium Severity

With YIELDOMEGA_E2E_INDEXER=1, the script starts the indexer via cargo run --release and allows only 120 seconds for /v1/status, without a prior cargo build --release. On a fresh clone or clean target/, compilation can exceed that window and the run fails even when Postgres and deploy succeeded.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 93c0cff974. Configure here.

### Indexer wait ignores compile time **Medium Severity** <!-- DESCRIPTION START --> With `YIELDOMEGA_E2E_INDEXER=1`, the script starts the indexer via `cargo run --release` and allows only 120 seconds for `/v1/status`, without a prior `cargo build --release`. On a fresh clone or clean `target/`, compilation can exceed that window and the run fails even when Postgres and deploy succeeded. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: bf5c3f14-7c2a-4b32-97fe-8e229ac9a5fd --> <!-- LOCATIONS START scripts/e2e-anvil.sh#L172-L192 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjgwY2YxYmM5LWQ0ZDItNDcxNy1iODY0LWVhNjBjY2NlOTFiMCIsImVuY3J5cHRpb25LZXkiOiJ3RHF0dXV5a3Uzc3cyaEJYdGQ3a2FjNXcwM0F6aDBFeDFtYV8zWUJHbEtvIiwiYnJhbmNoIjoiaXNzdWUtMzIyLWNpLWxpbnQtaW5kZXhlci1lMmUiLCJyZXBvT3duZXIiOiJQbGFzdGljRGlnaXRzIiwicmVwb05hbWUiOiJ5aWVsZG9tZWdhIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjgwY2YxYmM5LWQ0ZDItNDcxNy1iODY0LWVhNjBjY2NlOTFiMCIsImVuY3J5cHRpb25LZXkiOiJ3RHF0dXV5a3Uzc3cyaEJYdGQ3a2FjNXcwM0F6aDBFeDFtYV8zWUJHbEtvIiwiYnJhbmNoIjoiaXNzdWUtMzIyLWNpLWxpbnQtaW5kZXhlci1lMmUiLCJyZXBvT3duZXIiOiJQbGFzdGljRGlnaXRzIiwicmVwb05hbWUiOiJ5aWVsZG9tZWdhIiwicHJOdW1iZXIiOjEwMCwiY29tbWl0U2hhIjoiOTNjMGNmZjk3NDg0MzRiYzRmNTE4Y2I0MDRmYmNkN2RlZjFmMzJiYyIsInByb3ZpZGVyIjoiZ2l0bGFiIiwiaG9zdG5hbWUiOiJnaXRsYWIuY29tIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 93c0cff9748434bc4f518cb404fbcd7def1f32bc. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
PlasticDigits commented 2026-06-13 13:06:55 +00:00 (Migrated from gitlab.com)

Security review — MR !470

Commit reviewed: 93c0cff9748434bc4f518cb404fbcd7def1f32bc
Scope: .github/workflows/unit-tests.yml (frontend lint gate), scripts/e2e-anvil.sh (optional indexer-first E2E), frontend/e2e/anvil-indexer-first.spec.ts, frontend/e2e/anvil-referrals.spec.ts selector updates, docs/invariants (#322).

Outcome: FINDINGS: 0 medium+

Summary: Reviewed attacker-controlled input paths in the modified diff. The CI change adds npm run lint to the existing frontend-test job (no new secrets, no runtime surface). The E2E indexer path is opt-in (YIELDOMEGA_E2E_INDEXER=1), binds the indexer to 127.0.0.1, uses local Anvil RPC and dev Postgres helpers consistent with existing verify/stack scripts, and does not ship to production. Contract addresses flow through jq --arg (parameterized) into a temp registry file. New Playwright specs are read-only UI assertions with env-gated skips. Referrals spec changes are selector/copy alignment only.

Prior threads: No prior security-review comments on this MR.

Inline findings: None — no block:security label applied.

## Security review — MR !470 **Commit reviewed:** `93c0cff9748434bc4f518cb404fbcd7def1f32bc` **Scope:** `.github/workflows/unit-tests.yml` (frontend lint gate), `scripts/e2e-anvil.sh` (optional indexer-first E2E), `frontend/e2e/anvil-indexer-first.spec.ts`, `frontend/e2e/anvil-referrals.spec.ts` selector updates, docs/invariants (#322). **Outcome:** `FINDINGS: 0` medium+ **Summary:** Reviewed attacker-controlled input paths in the modified diff. The CI change adds `npm run lint` to the existing `frontend-test` job (no new secrets, no runtime surface). The E2E indexer path is opt-in (`YIELDOMEGA_E2E_INDEXER=1`), binds the indexer to `127.0.0.1`, uses local Anvil RPC and dev Postgres helpers consistent with existing verify/stack scripts, and does not ship to production. Contract addresses flow through `jq --arg` (parameterized) into a temp registry file. New Playwright specs are read-only UI assertions with env-gated skips. Referrals spec changes are selector/copy alignment only. **Prior threads:** No prior security-review comments on this MR. **Inline findings:** None — no `block:security` label applied.
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:07:11 +00:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>3615a4fe - fix: build indexer before E2E status wait (#322)</li></ul> [Compare with previous version](/PlasticDigits/yieldomega/-/merge_requests/100/diffs?diff_id=1850327500&start_sha=93c0cff9748434bc4f518cb404fbcd7def1f32bc)
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:07:27 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-13 13:07:42 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
PlasticDigits commented 2026-06-13 14:10:18 +00:00 (Migrated from gitlab.com)

approved this merge request

approved this merge request
PlasticDigits commented 2026-06-13 14:10:23 +00:00 (Migrated from gitlab.com)

mentioned in commit 8dd5705214

mentioned in commit 8dd5705214196809a61134461e8b737f83eae5b7
PlasticDigits (Migrated from gitlab.com) merged commit 8dd5705214 into main 2026-06-13 14:10:23 +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
code/yieldomega!470
No description provided.