Skip to content

studiobench: overlap the completeness traversal stops on a windowed thread - #17577

Merged
danielhanchen merged 1 commit into
mainfrom
studiobench-overlapping-traversal
Nov 12, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studiobench-overlapping-traversal

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

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.

@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-12T06:05:14.286644Z 028c755 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. More of your lovely PRs please.

Reviewed commit: 028c755dc7

ℹ️ 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 b5e447c into main Nov 12, 2026
@danielhanchen
danielhanchen deleted the studiobench-overlapping-traversal branch November 12, 2026 06:20
danielhanchen added a commit that referenced this pull request Nov 12, 2026
…17581)

## Summary

Follow-up to #17577. That change capped the completeness traversal's
upward step at 3/4 of the viewport. On #17580 three of the four windowed
cells now reach full coverage, but one still came back unmeasured. That
was enough to fail `Parity verdict, scored against the null` again:

```
COMPLETENESS NOT ESTABLISHED: 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
outputs/parity-result: TOO LITTLE COMPARED: 12 of 32 pair(s) carry a verdict, below the floor of 16.
```

The run's payload shows the cap was applied (`traverse_step_px: 720` on
a 960px viewport) and the walk still skipped ordinal 13. So even a step
shorter than the viewport can carry past a row. The likely cause is the
windowed list re-anchoring `scrollTop` when rows above it mount at their
real height rather than their estimate, which moves the viewport further
than the step asked for. The payload does not record per-stop spans, so
this is inferred rather than observed. Either way, no fixed step size
can rule the gap out, so the walk now checks for it and closes it.

## Change

`TRAVERSE_JS` in `tests/studio/studiobench/runtime/readiness.py`:

- After each upward step, if the rows mounted at the new stop do not
touch the previous stop's rows, the walk steps back down in half steps
until the rows in between have mounted (at most 16 tries), then returns
to where the step landed and carries on. A thread with no such jump
never takes this path.
- `sweep_continuous` is now judged on the union of every stop's mounted
span, so those extra stops count. The meaning is the same as before: no
gap in the sweep where a row could hide. An ordinal still missing from a
continuous sweep is still reported as lost, and a hole inside one stop's
own window is still reported as a missing middle.

No app code changes.

## Guard

- New fixture mode `windowed_anchor_jump` in `thread_fixture.js`: once,
halfway up, the viewport jumps 600px further than the step, as a
re-anchoring list does. With the 300px capped step, that skips one row.
- New `test_a_scroll_anchor_jump_does_not_leave_coverage_unmeasured`:
the sweep must stay continuous and coverage complete. With the step-back
disabled, it fails (`sweep_continuous` is False), the same shape as the
CI cell.

## Testing

- `tests/studio/studiobench/runtime/selftest/` (including all live
browser cases), `test_studiobench_thread_reopen_gate.py`,
`test_studiobench_windowed_parity.py`: 412 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