Skip to content

Remove the leftover automated benchmark runner from the demo - #52

Merged
jowens merged 1 commit into
mainfrom
remove-auto-benchmark
Aug 31, 2026
Merged

Remove the leftover automated benchmark runner from the demo#52
jowens merged 1 commit into
mainfrom
remove-auto-benchmark

Conversation

@jowens

@jowens jowens commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

The demo ships 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, recreating every GPU buffer, and logging progress banners to the console as it goes.

For a visitor this means the demo rearranges itself unprompted, ignores the slider, and can't 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

While investigating the black screen in #51, I measured particles confined to a horizontal band across the middle ~40% of the canvas, and flagged it as a suspected projection bug.

It isn't a bug. That band is the sort visualization working exactly as designed. 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 resting state. So my earlier note about a 40%-height rendering bug was a misdiagnosis — the render path is fine.

Verification

Density profile of the rendered canvas, 20 vertical buckets at 1200x800:

sample result
800ms (before the timer fires) all 20 buckets populated
5s, runner present buckets outside 30–70% empty
5s, runner removed all 20 buckets populated

Regression suite 31/31 and the demo smoke test still pass.

Note

This is independent of #51 (the maxTextureDimension2D clamp). They touch opposite ends of interactive_demo.mjs and merge cleanly in either order.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@jowens
jowens merged commit f0b468b into main Aug 31, 2026
2 checks passed
@jowens
jowens deleted the remove-auto-benchmark branch August 31, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant