Skip to content

guard the frontend/backend endpoint contract end-to-end - #441

Open
0xgleb wants to merge 3 commits into
feat/visual-regression-testingfrom
feat/contract-e2e
Open

0xgleb wants to merge 3 commits into
feat/visual-regression-testingfrom
feat/contract-e2e

Conversation

@0xgleb

@0xgleb 0xgleb commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

Motivation

No test spans the frontend and backend, so when a backend route the frontend consumes is removed or changes shape, every suite stays green and the drift ships -- exactly how the removed GET /hyperliquid/markets (#429) blanked the Portfolio page's ALL SYMBOLS panel in prod.

Closes #438

Solution

  • Playwright drives the real frontend through the dev-server proxy against the real backend binary, with a deterministic mock Hyperliquid as the only stubbed system.
  • Asserts the Portfolio page renders the symbols the backend serves, plus the response shapes the frontend parsers require (including the order-routing assetIndex).
  • A new CI workflow runs the suite on every PR touching frontend/** or src/**.

This is part 1 of 3 in a stack made with GitButler:

@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/contract-e2e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

0xgleb added 3 commits August 17, 2026 12:22
Playwright drives the real frontend through the dev-server proxy
against the real backend binary, with a deterministic mock Hyperliquid
as the only stubbed system, and asserts the Portfolio page renders the
symbols the backend serves plus the response shapes the frontend
parsers require. Runs in CI on every PR touching either side, so a
backend route the frontend consumes can no longer vanish or change
shape unnoticed -- the drift class behind #429.
@0xgleb
0xgleb force-pushed the feat/contract-e2e branch from 98774f9 to 571c7c4 Compare August 17, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no test spans the frontend and backend, so endpoint-contract drift reaches prod unnoticed

1 participant