From 30a99b6ef791e8b40bfc333357be74209d358886 Mon Sep 17 00:00:00 2001 From: John Owens Date: Sun, 30 Aug 2026 20:48:28 -0700 Subject: [PATCH] Remove the leftover automated benchmark runner from the demo The demo shipped with debug scaffolding, commented "Automated benchmark runner for Antigravity agent", armed unconditionally on every page load: setTimeout(runAutomatedBenchmark, 1000); One second after the page opens it takes the demo over for roughly 45 seconds: waits 3s, runs a sort, forces the particle count to 50000 and sorts again, then to 100000 and sorts again, moving the slider and recreating every GPU buffer as it goes, and logging progress banners to the console throughout. For a visitor this means the demo rearranges itself unprompted, ignores the slider, and cannot be interacted with normally until the sequence finishes. It also quietly ramps a first-time visitor's GPU to 100000 particles regardless of hardware. This is also what made the demo look broken. Particles appeared confined to a horizontal band across the middle 40% of the canvas, which looked like a projection bug. It was not: that band is the sort visualization working exactly as designed, since applySorted sets destination.y = layoutInset + (hash(rank) * 0.5 + 0.25) * usableHeight which is the middle 50% by construction, with the horizontal gradient being destination.x = layoutInset + progress * usableWidth. Any screenshot taken more than ~4 seconds after load caught the auto-sort in progress rather than the demo's actual resting state. Verified with a density profile of the rendered canvas. Sampled at 800ms, before the timer fires, all 20 vertical buckets are populated. Sampled at 5s with the runner still present, buckets outside 30-70% are empty. With the runner removed, 5s is uniformly populated again. Regression suite 31/31 and the demo smoke test still pass. Co-Authored-By: Claude Opus 5 --- demos/interactive_demo.mjs | 45 -------------------------------------- 1 file changed, 45 deletions(-) diff --git a/demos/interactive_demo.mjs b/demos/interactive_demo.mjs index f8d9f2a..09c343e 100644 --- a/demos/interactive_demo.mjs +++ b/demos/interactive_demo.mjs @@ -1050,51 +1050,6 @@ reduceBtn.addEventListener("click", performReduce); initGPUResources(particleCount); render(); -// Automated benchmark runner for Antigravity agent -async function runAutomatedBenchmark() { - try { - console.log("=== STARTING AUTOMATED BENCHMARK ==="); - const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - - await sleep(3000); - console.log("--- 10K Baseline Complete ---"); - console.log("Triggering 10K Sort..."); - await performSort(); - await sleep(9000); - console.log("--- 10K Sort Complete ---"); - - console.log("Changing to 50K particles..."); - particleCount = 50000; - starSlider.value = 50000; - starCountDisplay.textContent = formatStarCount(50000); - initGPUResources(50000); - await sleep(3000); - console.log("--- 50K Baseline Complete ---"); - console.log("Triggering 50K Sort..."); - await performSort(); - await sleep(9000); - console.log("--- 50K Sort Complete ---"); - - console.log("Changing to 100K particles..."); - particleCount = 100000; - starSlider.value = 100000; - starCountDisplay.textContent = formatStarCount(100000); - initGPUResources(100000); - await sleep(3000); - console.log("--- 100K Baseline Complete ---"); - console.log("Triggering 100K Sort..."); - await performSort(); - await sleep(9000); - console.log("--- 100K Sort Complete ---"); - - console.log("=== AUTOMATED BENCHMARK FINISHED ==="); - } catch (err) { - console.error("BENCHMARK RUNNER CRASHED:", err); - console.error(err.stack); - } -} -setTimeout(runAutomatedBenchmark, 1000); - } catch (error) { console.error("CRITICAL RUNTIME ERROR IN OPTIMAL PATH SCRIPT:", error); console.error(error.stack);