From 63ce1d4c4e79ad7bb4a9aa012635072da3636fa6 Mon Sep 17 00:00:00 2001 From: Julia Ogris Date: Sat, 8 Feb 2025 11:46:00 +1100 Subject: [PATCH 1/3] e2e: Add slight pixel tolerance to no-diagonal test Add slight pixel tolerance to no-diagonal test to make test pass again on Mac. Even regenerating the mac specific screenshots did not resolve this as the no-dialog.png golden file is used in two instances and must render slightly differently in each one of them. --- e2e/play/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/play/test.js b/e2e/play/test.js index 8f86ab9b..2bd0fbd3 100644 --- a/e2e/play/test.js +++ b/e2e/play/test.js @@ -80,7 +80,7 @@ end test("dialogs", async ({ page, baseURL }, testInfo) => { await page.goto(baseURL) await page.waitForLoadState("networkidle") - await expect(page).toHaveScreenshot("no-dialog.png") + await expect(page).toHaveScreenshot("no-dialog.png", { maxDiffPixelRatio: 0.01 }) // show sidebar if (testInfo.project.name != "ios") { From 4d78d7427eeeabc31583366c5b894a4fc0829fb4 Mon Sep 17 00:00:00 2001 From: Julia Ogris Date: Sat, 8 Feb 2025 11:30:17 +1100 Subject: [PATCH 2/3] tools: Upgrade go Upgrade go to 1.23.6 to fix vulnerability only listed on linux. Vulnerability #1: GO-2025-3447 Timing sidechannel for P-256 on ppc64le in crypto/internal/nistec More info: https://pkg.go.dev/vuln/GO-2025-3447 Standard library Found in: crypto/internal/nistec@go1.23.5 Fixed in: crypto/internal/nistec@go1.23.6 Platforms: ppc64le Example traces found: #1: pkg/cli/runtime.go:89:21: cli.Platform.Cls calls exec.Command, which eventually calls nistec.P256Point.SetBytes We are not doing a full upgrade because the last one was just merged and I can't upgrade on mac without first fixing the rounding issue (chicken-egg). --- bin/{.go-1.23.5.pkg => .go-1.23.6.pkg} | 0 bin/go | 2 +- bin/gofmt | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename bin/{.go-1.23.5.pkg => .go-1.23.6.pkg} (100%) diff --git a/bin/.go-1.23.5.pkg b/bin/.go-1.23.6.pkg similarity index 100% rename from bin/.go-1.23.5.pkg rename to bin/.go-1.23.6.pkg diff --git a/bin/go b/bin/go index abaace17..8fb1c413 120000 --- a/bin/go +++ b/bin/go @@ -1 +1 @@ -.go-1.23.5.pkg \ No newline at end of file +.go-1.23.6.pkg \ No newline at end of file diff --git a/bin/gofmt b/bin/gofmt index abaace17..8fb1c413 120000 --- a/bin/gofmt +++ b/bin/gofmt @@ -1 +1 @@ -.go-1.23.5.pkg \ No newline at end of file +.go-1.23.6.pkg \ No newline at end of file From 6f2a6750181637891ad649199ef2680ea116271b Mon Sep 17 00:00:00 2001 From: Julia Ogris Date: Sat, 8 Feb 2025 10:50:47 +1100 Subject: [PATCH 3/3] labs: Rework random rectangle generation Rework random rectangle generation to avoid rounding differences on Mac and Linux. This is not going to the bottom of the problem, just making the build pass again on mac for now. --- frontend/lab/samples/ifs/img/randrect.evy | 16 +- frontend/lab/samples/ifs/img/randrect.svg | 420 ++++------------------ 2 files changed, 72 insertions(+), 364 deletions(-) diff --git a/frontend/lab/samples/ifs/img/randrect.evy b/frontend/lab/samples/ifs/img/randrect.evy index dee923da..337e833f 100644 --- a/frontend/lab/samples/ifs/img/randrect.evy +++ b/frontend/lab/samples/ifs/img/randrect.evy @@ -1,11 +1,19 @@ fill (hsl 270 100 50 10) width 0.2 for range 60 - x := (rand1) * 100 - y := (rand1) * 100 - s1 := (rand1) * 25 + 2 - s2 := (rand1) * 25 + 2 + x := roundedRand1 * 100 + y := roundedRand1 * 100 + s1 := roundedRand1 * 25 + 2 + s2 := roundedRand1 * 25 + 2 move x-s1*0.5 y-s2*0.5 rect s1 s2 end + +// roundedRand1 is a rounding rand1 function, to avoid rounding differences on +// Mac and Linux. +func roundedRand1:num + r := rand1 * 1024 + r = round r + return r / 1024 +end diff --git a/frontend/lab/samples/ifs/img/randrect.svg b/frontend/lab/samples/ifs/img/randrect.svg index 4533d72c..bc7b339f 100644 --- a/frontend/lab/samples/ifs/img/randrect.svg +++ b/frontend/lab/samples/ifs/img/randrect.svg @@ -9,365 +9,65 @@ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +