Skip to content

Studio CI: tighten long-chat gate allowances after the :has() rewrite - #16978

Merged
danielhanchen merged 3 commits into
mainfrom
studio-gate-tighten
Nov 7, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
studio-gate-tighten

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Follow-up to #16931. The long-chat gate carried allowances for costs main had when it landed. #16938 (the :has() rewrite), #16942 and #16957 removed most of those costs, so this lowers the allowances to today's readings so they cannot creep back.

Changes

  • tests/studio/has_subject_allowlist.txt: regenerated. 57 selectors are still allowed, 61 are gone. Lint on main: 197 :has() rules, 57 non-subject, 0 new, 0 stale.
  • tests/studio/_area_matrix.py:
    • All 9 per-area element-count ceilings are removed, so those areas get the normal 2x growth check. Studio: stop menus, sidebar and browser pane from restyling the whole chat #16938 fixed every one of them; none restyles the whole thread on open any more.
    • Glass ceilings lowered to about 1.2-1.3x the highest reading on current main.
    • A recheck page that fails to load or measure now keeps the first verdict instead of crashing the gate with a traceback. A recheck can only lower a reading, so this never hides a failure.

Count ceilings removed (elements restyled at 200 turns)

Area Old ceiling Now 200 vs 40 turns
model_picker 44000 459 0.99x
chat_options 17000 2091 1.45x
browser_pane 45000 1259 up to 2.55x
account_menu 30000 346 1.0x
organize_chats 30000 226 1.0x
chat_row_menu 32000 1817 1.55x
sidebar_sections 45000 163 up to 1.18x
sidebar_toggle 30000 365 1.06x
run_settings 45000 1214 2.13x

browser_pane and run_settings grow a little faster than 2x but stay under the 3000-element floor (about 4 elements per turn, not a whole-thread restyle).

Glass ceilings (ratio vs the default look)

Highest reading over 3 runs pinned to 4 CPUs and 7 runs on a loaded 36-core host.

Mode Old Highest New
frosted, other areas 10 5.79 7
blurred, other areas 10 5.50 7
liquid, other areas 10 5.65 7
liquid-3d, other areas 12 5.41 7
frosted, Settings scroll 28 9.69 12
blurred, Settings scroll 28 12.18 15
liquid, Settings scroll 28 10.08 13
liquid-3d, Settings scroll 28 9.60 12

Testing

  • Full gate on main: PASS 4 times (270-310 s).
  • Still fails when it should:
    • a planted subject-after-:has() rule is reported by name ("57 allowlisted, 1 new");
    • a synthetic Glass material with a 40px backdrop blur fails 8 cells at 4.0-15.7x, with no real mode failing.
  • test_area_matrix.py, test_has_lint.py, test_css_culprit.py: 58 passed.

The :has() rewrite (#16938) and the Settings blur layer (#16942) removed most of the cost the
gate had to allow on main:

- Regenerate has_subject_allowlist.txt: 57 non-subject :has() rules remain (118 before).
- Drop the count ceilings for all 9 areas that used to restyle the whole thread on open
  (model picker, chat options, browser pane, account menu, organize chats, chat row menu,
  sidebar sections, sidebar toggle, run settings). Each now restyles at most 2.1k elements at
  200 turns, so the normal 2x growth check applies.
- Lower the glass ceilings to 1.2-1.3x the highest settled reading on current main: other
  areas 10-12x -> 6-7x, Settings scrolling 28x -> 12-15x.
- A recheck that cannot load or measure its page now keeps the first verdict instead of
  ending the gate with a traceback (seen on a heavily loaded host).
A later run on main read 5.8x for frosted on the API monitor, leaving 1.04x headroom under the
6x ceiling; 7x matches the other glass materials (1.2x the highest reading).
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T00:19:57.520955Z
We couldn’t complete this review. Comment @codex review to try again.
ad26b9c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@danielhanchen
danielhanchen merged commit 93e09c8 into main Nov 7, 2026
@danielhanchen
danielhanchen deleted the studio-gate-tighten branch November 7, 2026 01:14
danielhanchen added a commit to Etherll/unsloth that referenced this pull request Nov 7, 2026
…(Settings scroll) (unslothai#17003)

Follow-up to unslothai#16978. Its Glass ceiling of 7x per area was set from too
few readings and fails unrelated PRs.

## Problem

Staging for unslothai#16876 (which does not touch source cards) failed the
long-chat gate: `appearance mode frosted makes area source_card cost
1,111 ms CPU against 159 in the default appearance at 40 turns = 7.0x
(limit 7.0x)`. Across 7 local runs of the gate on main, several small,
cheap areas read close to or over 7x under Glass on main itself:

| Mode | Area | Highest reading on main |
|---|---|---|
| blurred | api_monitor | 7.8x |
| blurred | source_card | 7.0x |
| blurred | account_menu | 6.8x |
| liquid-3d | run_settings | 6.2x |
| blurred | reasoning_toggle | 6.1x |
| liquid | tool_toggle | 6.1x |

## Fix

The per-area Glass ceiling goes from 7x back to 10x, about 1.3x the
highest reading. The Settings scroll ceilings go from 12-15x to 18x:
staging for unslothai#16865 (which does not touch Settings or Glass) read
`frosted makes area settings_scroll cost 1,903 ms CPU against 141 ... =
13.5x (limit 12.0x)` on a GitHub runner, above the 9.7-12.2x seen
locally. A new appearance mode still has no allowance and is held to the
plain 4x limit, so a new slow material is still caught.

## Testing

- `test_area_matrix.py`: 28 passed.
danielhanchen added a commit that referenced this pull request Nov 7, 2026
…se (#17012)

## Summary

After #16978 lowered the long-chat gate's Glass ceilings to 7x for most
areas and 12-15x for scrolling Settings, the "Browser gate for long-chat
typing cost" step started failing on PRs that do not change what it
measures. For example, on #16998 (one TS file):

```
FAIL: appearance mode blurred makes area api_monitor cost 539 ms CPU against 75 in the default appearance at 40 turns = 7.2x (limit 7.0x ...)
FAIL: appearance mode liquid-3d makes area reasoning_toggle cost 576 ms CPU against 74 in the default appearance at 40 turns = 7.8x (limit 7.0x ...)
```

The same commit passed on rerun. #17003 has since put the ceilings back
to 10x and 18x, which fixes the red runs. This PR adds the guard, so the
ceilings cannot be tightened back into runner noise, or loosened until
they stop catching anything, without a test saying so.

The numbers come from the gate's own ratio table, which I parsed from 25
runs today on GitHub runners (ubuntu-24.04 and ubuntu-26.04):

| | spread on identical code (same PR, repeated runs) | highest reading
|
|---|---|---|
| Glass modes, other areas | 6.2x to 8.3x | 8.3x |
| Glass modes, Settings scrolling | 9.3x to 13.8x | 14.0x |

## Change

`tests/studio/test_area_matrix.py`:
`test_shipped_ceilings_clear_runner_noise_but_not_a_real_regression`
takes the highest runner reading for blurred thread scrolling (8.3x),
liquid-3d reasoning toggle (7.8x), blurred Settings scrolling (14.0x)
and frosted Settings scrolling (13.5x). It feeds each one through
`judge()` with the shipped `KNOWN_DEFAULT`. Each reading must pass, and
1.5x each reading must fail. No product or gate code changes.

## Testing

| `_area_matrix.py` ceilings | new test |
|---|---|
| main (10x / 18x, from #17003) | 4 passed |
| #16978's (7x / 12-15x) | 3 failed: 8.3x, 7.8x and frosted 13.5x read
as regressions |
| pre-#16978 Settings value, 28x | 2 failed: 1.5x the worst Settings
reading, about 21x, passes |

`test_area_matrix.py` in full: 32 passed.
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