Skip to content

Render gate: replace the perf wall-clock assertion with a deterministic op-count check #1471

Closed

Description

@mohidmakhdoomi

What

The render-gate perf test (render-gate.test.ts) asserts classification stays under a wall-clock budget (best-of-5 min). Because it's timing-based, it flakes on loaded CI runners — the whole-ring/seed-cap render measured 125–142ms against a 75ms local ceiling. It's currently mitigated (not fixed) with a CI-aware bound (process.env.CI ? 800 : 250 ms), which keeps a tight local steady-state signal while letting CI assert only a catastrophic-regression ceiling.

Replace the wall-clock assertion with a deterministic op-count check — count the work the classifier actually does (cells scanned / ring bytes rendered / viewport size) and assert on that, so the test measures algorithmic cost rather than machine speed.

Why

A wall-clock budget is inherently non-deterministic: it either flakes under load or is loosened until it no longer catches the regression it exists for. The gate's real cost guarantee is "O(viewport), not O(ring size)" — an op-count assertion pins that invariant directly and can't flake on a busy runner.

Notes

Activity

  1. added
    area/tower
    on Aug 17, 2026
  2. mohidmakhdoomi commented on Aug 17, 2026

    @mohidmakhdoomi
    CollaboratorAuthor

    On it! Working on a fix now.

  3. added 3 commits that reference this issue on Aug 17, 2026
    755b253
    52c18fe
    d4ac41a
  4. added a commit that references this issue on Sep 3, 2026
    a6ed826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/tower

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions