Skip to content

studiobench: residual stabilizer padding settles the windowed pin check - #17571

Merged
danielhanchen merged 1 commit into
mainfrom
studiobench-residual-stabilizer
Nov 12, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studiobench-residual-stabilizer

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

studiobench CI (Real-path session, every action ran) has failed on main since #17504, and so have Merge base vs head and Merge base vs itself, the null on PRs that touch the thread (e.g. #17565):

thread_reopen: ran EXPECT FAILED -- the reopened thread never reached a ready state: the thread was not ready in windowed mode: pin_settled (mounted 8 of 25; aria-setsize 25; aria-posinset 18..25 on 8 of 8 rows, 8 distinct; last row 'assistant'; 0px from the bottom)

#17504 switched these jobs to the windowed readiness gate (--windowed-arm), which is the only mode that checks pin_settled. That condition read "the autoscroll is still pinning" as "--aui-scroll-stabilizer is set on the viewport". But use-intent-aware-autoscroll.tsx leaves the stabilizer's last value in place as residual padding once the follow window ends, and drops it only when the user scrolls up ("Drop residual stabilizer padding once the user scrolls up so the bottom stays flush"). So a thread that has finished pinning can keep the property for as long as the reader stays at the bottom, and the gate times out on a page that is otherwise ready (in the log above, every other condition held for the whole wait).

This is not caused by the windowing itself. The null control on #17504 ran the merge base (fully mounted, before #17504) on both sides and failed the same way:

cell FAILED: ThreadNotReady: the thread was not ready in windowed mode: pin_settled (mounted 18 of 18; aria-setsize None; ...; 0px from the bottom)

The app behaves as designed, and #17504 is right to run the windowed gate. The gate's reading of the stabilizer is what is wrong.

Change

  • tests/studio/studiobench/runtime/readiness.py: the probe also returns the stabilizer's value. pin_settled holds when the property is absent, or when it carries the same value as on the previous probe and the page has settled (same mounted count, element count and scroll height). A value that is still changing, or a page whose height is still moving, still counts as mid-pin, and the gate still needs its consecutive settled samples before it passes.
  • INTERFACES.md: the pin_settled row says the same.
  • No app code changes, so nothing changes for Studio or Desktop users.

Guard

New test_residual_stabilizer_padding_settles_the_pin in test_studiobench_readiness_live.py:

  • residual padding unchanged across two settled probes passes;
  • the first probe, a changed value, or a moving scroll height does not pass;
  • a cleared stabilizer passes.

With the old pin_settled line, the test fails.

Testing

  • test_studiobench_readiness_live.py (including its live browser cases), test_studiobench_thread_reopen_gate.py, test_studiobench_windowed_parity.py, test_studiobench_completeness_gate_rows.py: 142 passed.
  • This PR's own studiobench CI run is the end-to-end check.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T03:17:10.057370Z 72bf792 Manual request
ℹ️ 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

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 72bf792a85

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit ea64e56 into main Nov 12, 2026
@danielhanchen
danielhanchen deleted the studiobench-residual-stabilizer branch November 12, 2026 04:25
danielhanchen added a commit that referenced this pull request Nov 12, 2026
…hread (#17577)

## Summary

`Parity verdict, scored against the null` (`studiobench-ui-parity.yml`)
fails on PRs that touch the Studio frontend, depending on the run (seen
on #17571, and earlier on #17504's own run):

```
outputs/parity-result: TOO LITTLE COMPARED: 12 of 32 pair(s) carry a verdict, below the floor of 16.
```

Every pair it could not score says the same thing:

```
cell r100K.base.rep0 FAILED its completeness gate: the head of the thread mounted, but coverage of the middle was NOT ESTABLISHED: 1 of 18 ordinals never mounted, but consecutive stops of the gesture did not overlap, so rows between two stops were never in view.
```

Since #17504, the thread mounts only the messages near the reader.
Before an arm's actions are scored, `probe_thread_completeness` scrolls
to the top to confirm every message can still be reached. It moves in
steps of 2,000px, but a windowed list mounts little more than the
viewport, which is about 700px in CI. A short user message sitting
between two tall replies can fall between two stops, so its ordinal is
never seen. The harness then correctly refuses to call that data loss
and marks coverage as unmeasured, and every pair in that cell is dropped
from the verdict. When enough cells hit this, the run falls below the
comparison floor.

The app is fine here: whether the probe sees that row depends on where
the 2,000px stops land, not on what the arm mounts. #17504 is right, and
the parity gate is right to refuse a verdict it cannot back. The probe's
step is what is too coarse.

## Change

- `tests/studio/studiobench/runtime/readiness.py`, `TRAVERSE_JS`: on the
way up, a step is at most 3/4 of the viewport's height, so each stop
shares at least one row with the one before it and the sweep is
continuous. The distance budget (`steps * step_px`, 800,000px by
default) stays the same, so the tallest rung still reaches the top, and
the walk still stops as soon as it gets there. The way back down keeps
the old step, since nothing is recorded from it.
- The probe now reports the step it actually used as `traverse_step_px`.
- No app code changes.

## Guard

`test_a_virtualised_thread_passes_the_completeness_probe` used to pin
the coarse default ("the default 2,000px step jumps straight past this
2,160px thread, so coverage is unmeasured"). It now asserts that the
default step is capped to 300px on the fixture's 400px viewport, that
the sweep is continuous, and that coverage is complete. With the cap
removed, it fails. The tests that check a lost middle is still caught
(`test_a_thread_that_lost_the_middle_...`) and that an unreached top is
still unmeasured are unchanged and pass.

## Testing

- `tests/studio/studiobench/runtime/selftest/` (including the live
browser cases), `test_studiobench_thread_reopen_gate.py`,
`test_studiobench_windowed_parity.py`: 411 passed, 1 skipped.
- This PR's own `studiobench-ui-parity` and `studiobench CI` runs are
the end-to-end check.
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