Rabby Cloud agent verification for wrong-network QA (full path 7) #403

Closed
PlasticDigits wants to merge 637 commits from cursor/rabby-cloud-agent-verification-f604 into main
PlasticDigits commented 2026-06-02 14:32:51 +00:00 (Migrated from gitlab.com)

Summary

Playwright Anvil E2E uses VITE_E2E_MOCK_WALLET=1, which cannot switch wallet chains. That made GitLab #277 path 7 (wrong-network gate / #95) only verifiable as PASS (partial).

This MR adds Rabby-first documentation and automation so Cloud agents know how to reach a full PASS when verifying issues, MRs, implementations, or security reviews.

Update: Merged main (resolves !403 conflict in AGENTS.md). Rabby helpers hardened (extension warm-up, unlock popups, stale tab refresh, safer Chrome profile cleanup).

Changes

  • docs/testing/rabby-cloud-agent-qa.md — when Rabby is required vs mock Playwright, VM setup, stack + non-mock build, automated + manual workflows, profile-lock troubleshooting.
  • .cursor/skills/rabby-cloud-verification/SKILL.md — agent skill for verification loops.
  • scripts/lib/rabby_playwright.mjs — Playwright + unpacked Rabby helpers (launch profile, connect, chain switch, popup approve, warm-up, refreshAppPage).
  • scripts/qa/build-frontend-for-rabby.sh — production build without mock wallet.
  • scripts/qa/verify-rabby-chain-mismatch.mjs + scripts/verify-rabby-chain-mismatch.sh — automated #95 / path 7 checker (xvfb-headed).
  • Cross-links: AGENTS.md, guardrails §10, .cursor/skills/README.md, e2e-anvil.md, invariants (INV-FRONTEND-277-CHAIN-GATE-RABBY), scripts/qa/README.md.

Verification

Check Command Result
Merge main into MR branch git merge origin/main PASS
Doc anchors bash scripts/check-doc-anchors.sh PASS
Doc satellite count bash scripts/check-doc-satellite-retired-count.sh PASS
Rabby extension install sudo bash scripts/install-browser-extensions.sh PASS (VM)
Wallet import xvfb-run -a node scripts/setup-rabby-dev-wallets.mjs PASS (VM)
Rabby window.ethereum injection Playwright warm-up + http://127.0.0.1:5173 PASS (VM)
verify-rabby-chain-mismatch.sh bash scripts/verify-rabby-chain-mismatch.sh (Anvil + non-mock preview on :5173) FAIL (VM) — Rabby add/switch to Anvil (31337) still flakes; use manual steps in rabby-cloud-agent-qa.md for path 7 full PASS until network is saved in the Rabby profile

How agents should use this

  1. Mock Playwright for paths 1–6 / unit tests.
  2. bash scripts/qa/build-frontend-for-rabby.sh + preview on :5173.
  3. bash scripts/verify-rabby-chain-mismatch.sh OR manual launch-chrome-with-rabby.sh steps for path 7 full PASS.

Issue #277 left open per policy (automated path 7 not fully green on all VMs).

## Summary Playwright Anvil E2E uses `VITE_E2E_MOCK_WALLET=1`, which **cannot switch wallet chains**. That made GitLab #277 path 7 (wrong-network gate / #95) only verifiable as **PASS (partial)**. This MR adds **Rabby-first** documentation and automation so Cloud agents know how to reach a **full PASS** when verifying issues, MRs, implementations, or security reviews. **Update:** Merged `main` (resolves !403 conflict in `AGENTS.md`). Rabby helpers hardened (extension warm-up, unlock popups, stale tab refresh, safer Chrome profile cleanup). ## Changes - **`docs/testing/rabby-cloud-agent-qa.md`** — when Rabby is required vs mock Playwright, VM setup, stack + non-mock build, automated + manual workflows, profile-lock troubleshooting. - **`.cursor/skills/rabby-cloud-verification/SKILL.md`** — agent skill for verification loops. - **`scripts/lib/rabby_playwright.mjs`** — Playwright + unpacked Rabby helpers (launch profile, connect, chain switch, popup approve, warm-up, `refreshAppPage`). - **`scripts/qa/build-frontend-for-rabby.sh`** — production build **without** mock wallet. - **`scripts/qa/verify-rabby-chain-mismatch.mjs`** + **`scripts/verify-rabby-chain-mismatch.sh`** — automated #95 / path 7 checker (xvfb-headed). - Cross-links: `AGENTS.md`, guardrails §10, `.cursor/skills/README.md`, `e2e-anvil.md`, `invariants` (`INV-FRONTEND-277-CHAIN-GATE-RABBY`), `scripts/qa/README.md`. ## Verification | Check | Command | Result | |-------|---------|--------| | Merge `main` into MR branch | `git merge origin/main` | **PASS** | | Doc anchors | `bash scripts/check-doc-anchors.sh` | **PASS** | | Doc satellite count | `bash scripts/check-doc-satellite-retired-count.sh` | **PASS** | | Rabby extension install | `sudo bash scripts/install-browser-extensions.sh` | **PASS** (VM) | | Wallet import | `xvfb-run -a node scripts/setup-rabby-dev-wallets.mjs` | **PASS** (VM) | | Rabby `window.ethereum` injection | Playwright warm-up + `http://127.0.0.1:5173` | **PASS** (VM) | | `verify-rabby-chain-mismatch.sh` | `bash scripts/verify-rabby-chain-mismatch.sh` (Anvil + non-mock preview on `:5173`) | **FAIL** (VM) — Rabby add/switch to Anvil (31337) still flakes; use manual steps in `rabby-cloud-agent-qa.md` for path 7 **full PASS** until network is saved in the Rabby profile | ## How agents should use this 1. Mock Playwright for paths 1–6 / unit tests. 2. **`bash scripts/qa/build-frontend-for-rabby.sh`** + preview on `:5173`. 3. **`bash scripts/verify-rabby-chain-mismatch.sh`** OR manual `launch-chrome-with-rabby.sh` steps for path 7 **full PASS**. Issue **#277** left open per policy (automated path 7 not fully green on all VMs).
ghost1 commented 2026-06-02 15:12:50 +00:00 (Migrated from gitlab.com)

Security review (Cursor automation)

Commit reviewed: 92f37fd76e2f05bfd4d4ca491ae3fbf101779654 (branch cursor/rabby-cloud-agent-verification-f604)

Scope: Added Rabby Cloud-agent QA docs/skills, scripts/lib/rabby_playwright.mjs, scripts/qa/build-frontend-for-rabby.sh, scripts/qa/verify-rabby-chain-mismatch.mjs, scripts/verify-rabby-chain-mismatch.sh, and documentation cross-links. No production app, indexer, or contract runtime changes.

Outcome: FINDINGS: 0 (no medium, high, or critical issues on this diff)

Summary: Changes are local-dev QA automation and documentation. Anvil-only default keys and RABBY_DEV_PASSWORD match existing patterns; scripts bind to localhost, use parameterized Playwright page.evaluate (no injection), and document a safer pkill pattern for shared Chrome profiles. approveRabbyPopup auto-approves wallet prompts only in headed QA against the configured YIELDOMEGA_RABBY_BASE_URL (default http://127.0.0.1:5173) — expected for test harnesses, not deployed attack surface.

Inline comments: None (no findings to anchor).

## Security review (Cursor automation) **Commit reviewed:** `92f37fd76e2f05bfd4d4ca491ae3fbf101779654` (branch `cursor/rabby-cloud-agent-verification-f604`) **Scope:** Added Rabby Cloud-agent QA docs/skills, `scripts/lib/rabby_playwright.mjs`, `scripts/qa/build-frontend-for-rabby.sh`, `scripts/qa/verify-rabby-chain-mismatch.mjs`, `scripts/verify-rabby-chain-mismatch.sh`, and documentation cross-links. No production app, indexer, or contract runtime changes. **Outcome:** **FINDINGS: 0** (no medium, high, or critical issues on this diff) **Summary:** Changes are local-dev QA automation and documentation. Anvil-only default keys and `RABBY_DEV_PASSWORD` match existing patterns; scripts bind to localhost, use parameterized Playwright `page.evaluate` (no injection), and document a safer `pkill` pattern for shared Chrome profiles. `approveRabbyPopup` auto-approves wallet prompts only in headed QA against the configured `YIELDOMEGA_RABBY_BASE_URL` (default `http://127.0.0.1:5173`) — expected for test harnesses, not deployed attack surface. **Inline comments:** None (no findings to anchor).
ghost1 commented 2026-06-02 15:37:06 +00:00 (Migrated from gitlab.com)

added 10 commits

  • beab27ce...9eef35aa - 8 commits from branch main
  • ef531b18 - Merge origin/main into cursor/rabby-cloud-agent-verification-f604
  • 26df9ecf - Stabilize Rabby chain-mismatch verification helpers

Compare with previous version

added 10 commits <ul><li>beab27ce...9eef35aa - 8 commits from branch <code>main</code></li><li>ef531b18 - Merge origin/main into cursor/rabby-cloud-agent-verification-f604</li><li>26df9ecf - Stabilize Rabby chain-mismatch verification helpers</li></ul> [Compare with previous version](/PlasticDigits/yieldomega/-/merge_requests/33/diffs?diff_id=1830504708&start_sha=beab27ce8e011d47d4c9ca04188dd190ab1aab55)
PlasticDigits commented 2026-06-02 15:37:39 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits (Migrated from gitlab.com) closed this pull request 2026-06-03 02:08:12 +00:00

Pull request closed

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!403
No description provided.