From b5a0dac694d6400436ed22ce0222a8c1a67258c2 Mon Sep 17 00:00:00 2001 From: cte Date: Wed, 2 Apr 2025 16:52:06 -0700 Subject: [PATCH 1/3] Fix typos --- evals/apps/web/src/app/runs/new/settings-diff.tsx | 4 ++-- evals/packages/db/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evals/apps/web/src/app/runs/new/settings-diff.tsx b/evals/apps/web/src/app/runs/new/settings-diff.tsx index 2b4c5b87cf8..774ee4680f3 100644 --- a/evals/apps/web/src/app/runs/new/settings-diff.tsx +++ b/evals/apps/web/src/app/runs/new/settings-diff.tsx @@ -28,7 +28,7 @@ export function SettingsDiff({ const isDefault = JSON.stringify(defaultValue) === JSON.stringify(customValue) return isDefault ? null : ( - & { customValue?: string } -export function SetttingDiff({ name, defaultValue, customValue, ...props }: SettingDiffProps) { +export function SettingDiff({ name, defaultValue, customValue, ...props }: SettingDiffProps) { return (
{name}
diff --git a/evals/packages/db/README.md b/evals/packages/db/README.md index d5cca7332cc..cd5edc3f232 100644 --- a/evals/packages/db/README.md +++ b/evals/packages/db/README.md @@ -6,7 +6,7 @@ Update `src/schema.ts` as needed, and then run: pnpm db:generate ``` -Inspect the generated sql in the migration filed added to `drizzle/`. +Inspect the sql in the migration file added to `drizzle/`. If it looks okay, then run: From 706975e9e20b7c0c52cff0515dc5f0116167b26e Mon Sep 17 00:00:00 2001 From: cte Date: Wed, 2 Apr 2025 16:55:09 -0700 Subject: [PATCH 2/3] Fix exec calls --- evals/apps/web/src/lib/server/processes.ts | 49 +++++++++++++--------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/evals/apps/web/src/lib/server/processes.ts b/evals/apps/web/src/lib/server/processes.ts index c2fdd1903ca..fdf2f22b377 100644 --- a/evals/apps/web/src/lib/server/processes.ts +++ b/evals/apps/web/src/lib/server/processes.ts @@ -3,32 +3,33 @@ import psTree from "ps-tree" import { exec } from "child_process" -export const getProcessList = async (pid: number) => { - const promise = new Promise((resolve, reject) => { - exec(`ps -p ${pid} -o pid=`, (err, stdout, stderr) => { - if (err) { - reject(stderr) +const asyncExec = (command: string): Promise<{ stdout: string; stderr: string }> => + new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + reject(error) + } else { + resolve({ stdout, stderr }) } - - resolve(stdout) }) }) +export const getProcessList = async (pid: number) => { try { - await promise - } catch (_) { - return null - } + await asyncExec(`ps -p ${pid} -o pid=`) - return new Promise((resolve, reject) => { - psTree(pid, (err, children) => { - if (err) { - reject(err) - } + return new Promise((resolve, reject) => { + psTree(pid, (err, children) => { + if (err) { + reject(err) + } - resolve(children.map((p) => parseInt(p.PID))) + resolve(children.map((p) => parseInt(p.PID))) + }) }) - }) + } catch (_) { + return null + } } export const killProcessTree = async (pid: number) => { @@ -39,8 +40,16 @@ export const killProcessTree = async (pid: number) => { } if (descendants.length > 0) { - await exec(`kill -9 ${descendants.join(" ")}`) + try { + await asyncExec(`kill -9 ${descendants.join(" ")}`) + } catch (error) { + console.error("Error killing descendant processes:", error) + } } - await exec(`kill -9 ${pid}`) + try { + await asyncExec(`kill -9 ${pid}`) + } catch (error) { + console.error("Error killing main process:", error) + } } From 323164a70f99d26aeacc4a1aa5165fc1ff114565 Mon Sep 17 00:00:00 2001 From: cte Date: Wed, 2 Apr 2025 17:03:33 -0700 Subject: [PATCH 3/3] Fix flake --- e2e/src/suite/task.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/src/suite/task.test.ts b/e2e/src/suite/task.test.ts index e83f2734d1f..434d1fcc4f9 100644 --- a/e2e/src/suite/task.test.ts +++ b/e2e/src/suite/task.test.ts @@ -23,11 +23,11 @@ suite("Roo Code Task", () => { await waitUntilCompleted({ api, taskId }) - const completion = messages.find(({ say, partial }) => say === "completion_result") - assert.ok( - completion?.text?.includes("My name is Roo"), - `Completion should include "My name is Roo" - ${completion?.text}`, + !!messages.find( + ({ say, text }) => (say === "completion_result" || say === "text") && text?.includes("My name is Roo"), + ), + `Completion should include "My name is Roo"`, ) }) })