A desktop coding agent with free access to frontier models.
TypeScript
fix: match quality checklist edit and wrapper rules
ogsamrat60177a916a16
diff --git a/apps/app/src/app/lib/good-session.ts b/apps/app/src/app/lib/good-session.tsindex 0f02f41b..5a3f0cab 100644--- a/apps/app/src/app/lib/good-session.ts+++ b/apps/app/src/app/lib/good-session.ts@@ -150,7 +150,7 @@ export const FLOOR_ALONE_LINES = 150;/** Lines an edit put in (session_repro._written_lines; apply_patch: its added lines). */export function writtenLines(input: unknown): number {const value = record(input);- for (const key of ["content", "newString", "new_string", "new_str"]) {+ for (const key of ["content", "newString", "new_string", "new_str", "newText", "new_text"]) {if (typeof value[key] === "string") return (value[key] as string).split("\n").length;}if (Array.isArray(value.edits)) {@@ -174,7 +174,7 @@ const BUILD_TEST = new RegExp("i",);const ENV_ASSIGN = /^[A-Za-z_][A-Za-z0-9_]*=\S*$/;-const WRAPPERS = new Set(["sudo", "time", "nice", "env", "exec", "command", "timeout", "npx", "bunx", "pnpx"]);+const WRAPPERS = new Set(["sudo", "time", "nice", "env", "exec", "command", "timeout", "npx", "bunx", "pnpx", "uv", "poetry", "run"]);/** The commands of a shell line, each as its words (V2 `_split`/`_words`). */export function commandSegments(command: unknown): string[][] {diff --git a/apps/app/tests/good-session.test.tsx b/apps/app/tests/good-session.test.tsxindex 8084b880..2d460e58 100644--- a/apps/app/tests/good-session.test.tsx+++ b/apps/app/tests/good-session.test.tsx@@ -82,6 +82,7 @@ describe("code files mirror session_qc.is_code_path", () => {test("written lines like session_repro._written_lines; patches count added lines", () => {expect(writtenLines({ content: "a\nb\nc" })).toBe(3);expect(writtenLines({ newString: "x" })).toBe(1);+ expect(writtenLines({ edits: [{ oldText: "a", newText: "b\nc" }, { new_text: "d" }] })).toBe(3);expect(writtenLines({ edits: [{ newString: "a\nb" }, { newString: "c" }] })).toBe(3);expect(writtenLines({ patchText: "*** Update File: a.py\n@@\n-a\n+b\n+c\n" })).toBe(2);});@@ -91,7 +92,7 @@ describe("ran/tested is session_qc.BUILD_TEST only (WorkSize.test_runs)", () =>test("builds and tests count", () => {for (const command of ["npm test", "pnpm build", "cd api && pytest -q", "python3 -m pytest tests", "go test ./...", "cargo build --release",- "make", "npx tsc --noEmit", "tsc -p .", "FOO=1 npm run build", "bun test", "timeout 20 node --test", "npx vitest run",+ "make", "npx tsc --noEmit", "tsc -p .", "FOO=1 npm run build", "bun test", "timeout 20 node --test", "npx vitest run", "uv run pytest", "poetry run pytest -q",]) {expect(ranSomething(command)).toBe(true);}