From 72223997dc2af732a223f738772c6d9b037b89db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 13:44:46 +0000 Subject: [PATCH 1/2] Initial plan From f2382d1e363ee632bbe4cfdb4cf9d2ba1bbcc70c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 13:48:42 +0000 Subject: [PATCH 2/2] Fix flaky strRemovePrefix property test Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com> --- tests/stats/string_ops.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/stats/string_ops.test.ts b/tests/stats/string_ops.test.ts index 435af513..76312f18 100644 --- a/tests/stats/string_ops.test.ts +++ b/tests/stats/string_ops.test.ts @@ -352,11 +352,12 @@ describe("strNormalize — properties", () => { }); describe("strRemovePrefix — properties", () => { - it("result never starts with prefix (when prefix non-empty)", () => { + it("removes exactly one occurrence of prefix when present, else returns str unchanged", () => { fc.assert( fc.property(fc.asciiString(), fc.asciiString({ minLength: 1 }), (str, prefix) => { const result = strRemovePrefix(str, prefix); - return !(result.startsWith(prefix) && str.startsWith(prefix)); + // Mirrors Python's str.removeprefix(): strips at most one leading occurrence. + return str.startsWith(prefix) ? prefix + result === str : result === str; }), ); });