mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 16:19:09 +00:00
Remove dead breakout-thread e2e scenario after dropping the tool
The merge resolution deferred upstream's Slack breakout-thread tool (slack_start_new_thread, #1638) since it depends on the #1621 dispatch module, but the e2e harness still scripted it. Removing the tool name from fake_llm.py's _tool_step call left a malformed scenario, crashing the langgraph-dev web server at import (TypeError: _tool_step() missing 'call_id') and failing Playwright E2E. Drop the "breakout" script scenario, its _is_breakout_request helper + ScriptRule, and the corresponding full_flow.spec.ts test.
This commit is contained in:
parent
eedef5f756
commit
5df29c81af
2 changed files with 0 additions and 44 deletions
|
|
@ -297,22 +297,6 @@ SCRIPT_LIBRARY: dict[str, tuple[StepSpec, ...]] = {
|
||||||
),
|
),
|
||||||
_dynamic_step(_reply_step),
|
_dynamic_step(_reply_step),
|
||||||
),
|
),
|
||||||
"breakout": (
|
|
||||||
_tool_step(
|
|
||||||
"Starting a separate Slack thread for the breakout task.",
|
|
||||||
{
|
|
||||||
"title": "Add greet() helper",
|
|
||||||
"instructions": "Please add a greet() helper and open a draft PR in the default repository. Use the current Slack request as context, and report progress in this new thread.",
|
|
||||||
},
|
|
||||||
"call-breakout",
|
|
||||||
),
|
|
||||||
_tool_step(
|
|
||||||
"Confirming the breakout thread was started.",
|
|
||||||
"slack_thread_reply",
|
|
||||||
{"message": "I started a separate Open SWE thread for that aspect."},
|
|
||||||
"call-breakout-reply",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"plan": (
|
"plan": (
|
||||||
_tool_step(
|
_tool_step(
|
||||||
"This is worth planning first — entering plan mode.",
|
"This is worth planning first — entering plan mode.",
|
||||||
|
|
@ -335,11 +319,6 @@ def _is_plan_request(text: str) -> bool:
|
||||||
return "plan" in text.lower()
|
return "plan" in text.lower()
|
||||||
|
|
||||||
|
|
||||||
def _is_breakout_request(text: str) -> bool:
|
|
||||||
t = text.lower()
|
|
||||||
return "break out" in t or "separate thread" in t or "split out" in t
|
|
||||||
|
|
||||||
|
|
||||||
def _is_approval(text: str) -> bool:
|
def _is_approval(text: str) -> bool:
|
||||||
t = text.lower()
|
t = text.lower()
|
||||||
return "approved" in t and "implement" in t
|
return "approved" in t and "implement" in t
|
||||||
|
|
@ -354,9 +333,6 @@ SCRIPT_RULES: tuple[ScriptRule, ...] = (
|
||||||
ScriptRule("implement", lambda ctx: _is_approval(ctx.last_text)),
|
ScriptRule("implement", lambda ctx: _is_approval(ctx.last_text)),
|
||||||
ScriptRule("plan", lambda ctx: _is_revision(ctx.last_text)),
|
ScriptRule("plan", lambda ctx: _is_revision(ctx.last_text)),
|
||||||
ScriptRule("plan", lambda ctx: ctx.human_count <= 1 and _is_plan_request(ctx.first_text)),
|
ScriptRule("plan", lambda ctx: ctx.human_count <= 1 and _is_plan_request(ctx.first_text)),
|
||||||
ScriptRule(
|
|
||||||
"breakout", lambda ctx: ctx.human_count <= 1 and _is_breakout_request(ctx.first_text)
|
|
||||||
),
|
|
||||||
ScriptRule("implement", lambda ctx: ctx.human_count <= 1),
|
ScriptRule("implement", lambda ctx: ctx.human_count <= 1),
|
||||||
ScriptRule("followup", lambda _ctx: True),
|
ScriptRule("followup", lambda _ctx: True),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -37,26 +37,6 @@ test.describe("Open SWE full flow", () => {
|
||||||
await expect(page.locator('.pr[data-pr="1"]')).toContainText("greet.py");
|
await expect(page.locator('.pr[data-pr="1"]')).toContainText("greet.py");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Slack breakout request starts a new top-level Open SWE thread", async ({ page }) => {
|
|
||||||
await page.locator("#text").fill("<@U0BOT> please break out adding a greet() helper into a separate thread");
|
|
||||||
await page.locator("#send").click();
|
|
||||||
|
|
||||||
const breakout = page
|
|
||||||
.locator(".msg.bot")
|
|
||||||
.filter({ hasText: /Open SWE breakout thread:\* Add greet\(\) helper/ });
|
|
||||||
await expect(breakout).toBeVisible({ timeout: 60_000 });
|
|
||||||
const breakoutThreadTs = await breakout.getAttribute("data-thread-ts");
|
|
||||||
expect(breakoutThreadTs).toBeTruthy();
|
|
||||||
|
|
||||||
const breakoutThreadMessages = page.locator(`.msg.bot[data-thread-ts="${breakoutThreadTs}"]`);
|
|
||||||
await expect(breakoutThreadMessages.locator('a[href*="/agents/"]')).toBeVisible({
|
|
||||||
timeout: 60_000,
|
|
||||||
});
|
|
||||||
await expect(
|
|
||||||
page.locator(".msg.bot").filter({ hasText: "I started a separate Open SWE thread" }),
|
|
||||||
).toBeVisible({ timeout: 60_000 });
|
|
||||||
});
|
|
||||||
|
|
||||||
test("a message that does not mention the bot produces no run and no PR", async ({ page }) => {
|
test("a message that does not mention the bot produces no run and no PR", async ({ page }) => {
|
||||||
await page.locator("#mention").uncheck();
|
await page.locator("#mention").uncheck();
|
||||||
await page.locator("#text").fill("just chatting with the team, nothing for the bot");
|
await page.locator("#text").fill("just chatting with the team, nothing for the bot");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue