Skip to content

Commit efc1822

Browse files
committed
fix
1 parent af5d2ac commit efc1822

1 file changed

Lines changed: 63 additions & 5 deletions

File tree

  • .agents/skills/testing-livepeer-fal-deploy

.agents/skills/testing-livepeer-fal-deploy/SKILL.md

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: testing-livepeer-fal-deploy
3-
description: End-to-end test harness for Scope's Livepeer cloud path against a deployed fal.ai app — the only supported cloud path going forward (the old cloud-relay / direct mode using `fal_app.py` + `CloudConnectionManager` is being deprecated). Primary path is a Playwright browser test that drives the full UI flow (camera → local scope WebRTC → livepeer trickle → fal runner → back), producing every session-lifecycle Kafka event. Secondary path is `test-cloud-connect.sh` — a bash/curl smoke test for the `/api/v1/cloud/connect` path only. TRIGGER any time a user says "test cloud", "test the fal deploy", "test cloud streaming", "run the e2e test", "run playwright", "verify cloud connect", "verify kafka events", "diagnose fal", "debug fal deploy", "did my stream work", "deploy-staging.sh", OR pastes any of these errors — "All orchestrators failed (N tried)", "ACCESS_DENIED", "did not receive ready message from websocket", "discover_orchestrators requires discovery_url", "cold start" — OR has just changed `src/scope/cloud/livepeer_fal_app.py` / `src/scope/cloud/livepeer_app.py` / `src/scope/server/livepeer.py` / `src/scope/server/livepeer_client.py`. Use `testing-livepeer` instead for a fully-local livepeer stack (prebuilt go-livepeer binary, no fal involvement).
3+
description: End-to-end test harness for Scope's Livepeer cloud path against a deployed fal.ai app — the only supported cloud path going forward (the old cloud-relay / direct mode using `fal_app.py` + `CloudConnectionManager` is being deprecated). Primary path is a Playwright browser test that drives the full UI flow (camera → local scope WebRTC → livepeer trickle → fal runner → back), producing every session-lifecycle Kafka event. Secondary path is `test-cloud-connect.sh` — a bash/curl smoke test for the `/api/v1/cloud/connect` path only. Has two modes: "deploy then test" (default — runs `deploy-staging.sh` first) and "test existing deploy" (skips deploy, points at whatever is already live, e.g. `scope-livepeer--prod`). TRIGGER any time a user says "test cloud", "test the fal deploy", "test cloud streaming", "run the e2e test", "run playwright", "verify cloud connect", "verify kafka events", "diagnose fal", "debug fal deploy", "did my stream work", "deploy-staging.sh", "test against prod", "test prod cloud", "test the prod deploy", "don't deploy", "skip deploy", "no deploy", "target the existing deploy", "target prod", "scope-livepeer--prod", OR pastes any of these errors — "All orchestrators failed (N tried)", "ACCESS_DENIED", "did not receive ready message from websocket", "discover_orchestrators requires discovery_url", "cold start" — OR has just changed `src/scope/cloud/livepeer_fal_app.py` / `src/scope/cloud/livepeer_app.py` / `src/scope/server/livepeer.py` / `src/scope/server/livepeer_client.py`. Use `testing-livepeer` instead for a fully-local livepeer stack (prebuilt go-livepeer binary, no fal involvement).
44
---
55

66
# Testing Livepeer fal Deploy
@@ -78,10 +78,23 @@ Do **not** use this skill for local-only livepeer testing — that's
7878

7979
## Running the Playwright test (primary)
8080

81-
When the user says "test cloud" (or any trigger in the description),
82-
**always deploy their current working tree before running Playwright**.
83-
Otherwise the test runs against whatever stale code was last deployed
84-
and can false-positive on their change.
81+
There are two modes. Pick by what the user said:
82+
83+
- **Deploy-then-test (default)** — user said "test cloud" / "test the
84+
fal deploy" / changed cloud code and wants to verify it. Run all
85+
steps below including Step 3 (deploy).
86+
- **Test-existing-deploy (no deploy)** — user said "test against
87+
prod", "don't deploy", "no deploy", "target the existing deploy",
88+
"scope-livepeer--prod", or otherwise made clear they want to test
89+
whatever is *already live*. **Skip Step 3 entirely.** See
90+
["Variant: target an existing deploy"](#variant-target-an-existing-deploy-no-deploy)
91+
below before running.
92+
93+
When the user says "test cloud" (or any trigger in the description)
94+
without indicating they want to skip deploy, **always deploy their
95+
current working tree before running Playwright**. Otherwise the test
96+
runs against whatever stale code was last deployed and can
97+
false-positive on their change.
8598

8699
### Step 0 — Ask the user where to deploy
87100

@@ -184,6 +197,51 @@ Stopping stream... ✅
184197
8. Stops the stream. Runner emits `session_closed` and eventually
185198
`websocket_disconnected` when the session is reaped.
186199

200+
### Variant: target an existing deploy (no deploy)
201+
202+
Use this when the user has made clear they do **not** want to deploy
203+
— typical phrasings: "test against prod", "don't deploy", "no
204+
deploy", "target the existing deploy", "test scope-livepeer--prod",
205+
"verify prod cloud". The point is to exercise whatever is already
206+
live (most often the prod fal app), not the user's working tree.
207+
208+
**Run order — Step 3 is omitted:**
209+
210+
1. Sanity-check `.env.local` (same as Step 1 above):
211+
`SCOPE_CLOUD_API_KEY` and `SCOPE_USER_ID` must be set.
212+
2. Free port :8000 (same as Step 2 above).
213+
3. *(Skipped — do NOT run `deploy-staging.sh`.)*
214+
4. Start scope pointed at the existing deploy, then run Playwright:
215+
216+
```bash
217+
# Terminal 1 — scope (port 8000), pointed at the live app
218+
SCOPE_CLOUD_APP_ID=daydream/<app>--<env>/ws ./run-app.sh
219+
220+
# Terminal 2 — test
221+
cd e2e && npx playwright test
222+
```
223+
224+
**Deriving `SCOPE_CLOUD_APP_ID` for common targets:**
225+
226+
| Target | `SCOPE_FAL_APP_NAME` | `SCOPE_FAL_ENV` | `SCOPE_CLOUD_APP_ID` |
227+
|---|---|---|---|
228+
| prod | `scope-livepeer` | `prod` | `daydream/scope-livepeer--prod/ws` |
229+
| preview | `scope-livepeer` | `preview` | `daydream/scope-livepeer--preview/ws` |
230+
| main (default env) | `scope-livepeer` | `main` | `daydream/scope-livepeer/ws` (no suffix) |
231+
232+
Same fal env-suffix rule as the deploy path: `main` has no suffix, all
233+
other envs include `--<env>`.
234+
235+
**Before running, surface this caveat to the user:**
236+
237+
> Heads up — this run tests whatever code is currently deployed to
238+
> `<app>--<env>`, not your local working tree. A green run is not
239+
> evidence your local diff works.
240+
241+
Everything else (success output, the 8-step "what the test does"
242+
explanation, common failure signatures) is identical to the
243+
deploy-then-test mode.
244+
187245
## Running the quick HTTP smoke (secondary)
188246

189247
```bash

0 commit comments

Comments
 (0)