Skip to content

Commit 0ddad16

Browse files
Programcodeclaude
andcommitted
test(live): answer the Current Debate prompt and pin Muse Spark 1.3 Contributor
The live journeys were never updated for Current Debate (#72): Actions was out of minutes from 2026-09-27 to 2026-09-30, so the first real live-e2e run was on 2026-10-01. Five journeys stopped at "Which debate is this for?" or, in the Library, at a disabled Add Source button with no current debate. They now answer the prompt the way the full-stack specs do, and the Library journey starts a debate first. The live gate's default model is now meta/muse-spark-1.3-contributor ($0.10/$0.20 per million tokens, against $0.15/$0.50 for GLM 5.3 Flash). It supports every parameter the app sends. It is test-only and stays out of the app catalog. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent fe6100a commit 0ddad16

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎.superset/db-gate.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ FAKE_PROVIDER=debatelab-fake-openrouter
1818
# the fake provider. It needs LIVE_OPENROUTER_API_KEY and LIVE_EXA_API_KEY.
1919
# LIVE_MODEL=as-requested runs e2e/model-matrix instead: one case per catalog model.
2020
LIVE_PROVIDERS="${LIVE_PROVIDERS:-0}"
21-
# GLM Flash is inexpensive and has broad endpoint coverage, so OpenRouter's
22-
# default balanced routing can fail over between providers during this gate.
23-
LIVE_MODEL="${LIVE_MODEL:-z-ai/glm-5.3-flash}" # empty also means default
21+
# Muse Spark 1.3 Contributor is the cheapest model that supports every request
22+
# parameter the app sends. It is a test-only model: it is not in the app catalog.
23+
LIVE_MODEL="${LIVE_MODEL:-meta/muse-spark-1.3-contributor}" # empty also means default
2424
if [ "$LIVE_PROVIDERS" = 1 ] && { [ -z "${LIVE_OPENROUTER_API_KEY:-}" ] || [ -z "${LIVE_EXA_API_KEY:-}" ]; }; then
2525
echo "LIVE_PROVIDERS=1 requires LIVE_OPENROUTER_API_KEY and LIVE_EXA_API_KEY" >&2
2626
exit 1

‎docs/testing.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ These journeys do not prove live provider behavior, web research (the local stac
193193
LIVE_PROVIDERS=1 LIVE_OPENROUTER_API_KEY=... LIVE_EXA_API_KEY=... ./.superset/db-gate.sh
194194
```
195195

196-
Live mode uses the same locked stack but skips pgTAP and the fake-provider specs. It runs `e2e/live/` on desktop Chromium against real OpenRouter, Jev, and Exa. Imported web pages are fetched live too. The fake provider becomes a recording proxy. It forwards every chat call to OpenRouter with the model pinned to `LIVE_MODEL` (default `z-ai/glm-5.3-flash`; CI reads the `LIVE_MODEL` repository variable), passes Jev decisions through unchanged, and refuses calls past `MAX_UPSTREAM_CALLS` (200). The default is inexpensive and broadly hosted, so requests can use OpenRouter's balanced provider routing instead of depending on one endpoint.
196+
Live mode uses the same locked stack but skips pgTAP and the fake-provider specs. It runs `e2e/live/` on desktop Chromium against real OpenRouter, Jev, and Exa. Imported web pages are fetched live too. The fake provider becomes a recording proxy. It forwards every chat call to OpenRouter with the model pinned to `LIVE_MODEL` (default `meta/muse-spark-1.3-contributor`; CI reads the `LIVE_MODEL` repository variable, which is unset), passes Jev decisions through unchanged, and refuses calls past `MAX_UPSTREAM_CALLS` (200). The default is the cheapest model that supports every request parameter the app sends, including `response_format` and reasoning effort. It is test-only and not in the app catalog, so users cannot pick it. Meta is its only provider, so an outage there fails the gate instead of failing over.
197197

198198
The specs cover web-researched case generation, verified Factoids citations, Ask with web search, URL import, streamed Ask, Attack, Brainstorm, a judged sparring round, and Crossfire with live Jev signals. Outputs vary, so tests assert structure rather than text:
199199

‎e2e/live/models.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { admin, expect, fake, stackReady, test } from "../full-stack/stack";
1+
import { admin, chooseForMotion, expect, fake, stackReady, test } from "../full-stack/stack";
22
import { aiResponse, expectProviderCallsHealthy, LIVE_TIMEOUT } from "./live";
33

44
test.skip(!stackReady, "Live gate is required (LIVE_PROVIDERS=1 ./.superset/db-gate.sh)");
@@ -33,6 +33,7 @@ test("Attack and Brainstorm return valid structured analyses", async ({ signedIn
3333
await page.getByLabel("Motion / Topic *").fill("Universal basic income should replace targeted welfare");
3434
const brainstorm = aiResponse(page, "brainstorm");
3535
await page.getByRole("button", { name: "Start Brainstorming" }).click();
36+
await chooseForMotion(page, "once");
3637
expect(((await brainstorm).output.topFive as unknown[]).length).toBeGreaterThan(0);
3738
await expectProviderCallsHealthy(["attack", "brainstorm"]);
3839
});
@@ -43,6 +44,7 @@ test("a live sparring round is judged and saved", async ({ signedIn: page, user
4344
await page.getByRole("combobox", { name: "Round format" }).click();
4445
await page.getByRole("option", { name: /Lincoln-Douglas · 5 speeches/ }).click();
4546
await page.getByRole("button", { name: "Start round" }).click();
47+
await chooseForMotion(page, "create");
4648

4749
const speeches = [
4850
["Affirmative constructive", "Universal access removes the direct price barrier to participation in work, school, and civic life."],
@@ -70,6 +72,7 @@ test("Crossfire answers live and produces a debrief", async ({ signedIn: page })
7072
await page.getByTestId("crossfire-argument").fill("Private cars create congestion and unsafe streets.");
7173
await page.getByTestId("mode-question-ai").click();
7274
await page.getByTestId("start-crossfire").click();
75+
await chooseForMotion(page, "create");
7376

7477
await page.getByTestId("crossfire-input").fill("What evidence links fewer private cars to safer streets?");
7578
const turn = aiResponse(page, "crossfire");

‎e2e/live/research.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { admin, expect, stackReady, test } from "../full-stack/stack";
1+
import { admin, chooseForMotion, expect, stackReady, startDebate, test } from "../full-stack/stack";
22
import { aiResponse, expectProviderCallsHealthy, LIVE_TIMEOUT } from "./live";
33

44
test.skip(!stackReady, "Live gate is required (LIVE_PROVIDERS=1 ./.superset/db-gate.sh)");
@@ -11,6 +11,7 @@ test("case generation researches the web and cites what it found", async ({ sign
1111
await page.getByRole("textbox", { name: "Motion / Topic *" }).fill("This House would make public transport free at the point of use");
1212
const response = aiResponse(page, "generate");
1313
await page.getByRole("button", { name: "Generate Debate Case" }).click();
14+
await chooseForMotion(page, "once");
1415
const body = await response;
1516

1617
// Standard length asks for exactly three contentions.
@@ -63,6 +64,8 @@ test("Ask with web search shows the sources it used", async ({ signedIn: page })
6364

6465
test("a web page imports into the Library", async ({ signedIn: page, user }) => {
6566
const url = "https://en.wikipedia.org/wiki/Free_public_transport";
67+
// Sources belong to a debate, so the Library needs a Current Debate first.
68+
await startDebate(page, "This House would make public transport free");
6669
await page.goto("/app/library");
6770
await page.getByRole("button", { name: "Add Source" }).click();
6871
await page.getByRole("textbox", { name: "Import from URL" }).fill(url);

0 commit comments

Comments
 (0)