Repository navigation
studiobench parity: treat every data-*-id attribute as an instance id - #16464
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
oobabooga
pushed a commit
to oobabooga/unsloth
that referenced
this pull request
Nov 3, 2026
…othai#16468) Opening the same Studio session in two windows can log both windows out when their access tokens expire together. Refresh tokens are single-use, but refresh coordination was limited to each window: the losing 401 could clear shared credentials before the successful refresh saved its rotated pair. This branch includes the reviewed unslothai#16471 spacing fix as a shared frontend CI dependency. The Settings component is byte-identical to that PR. Merge unslothai#16471 first to keep the remaining diffs focused; the dependency is already present here for validation. Serialize refresh across same-origin windows using Web Locks, then reuse a peer's rotated token only within the same session. Lock acquisition is bounded without cancelling a submitted refresh request. Existing sessions retain their session marker, and logout and account-switch boundaries remain enforced. Browsers without Web Locks retain the existing behavior. Validation: - Matching-head scoped staging passes 21 Python auth/font checks and 75 Node checks on each of [Linux](https://github.com/LeoBorcherding/unsloth/actions/runs/41583927636), [Apple Silicon macOS](https://github.com/LeoBorcherding/unsloth/actions/runs/41583927585) and [Windows](https://github.com/LeoBorcherding/unsloth/actions/runs/41583927734), with zero failures or skips. Raw logs and exact source-head ancestry were checked. The real frontend/backend reproductions below provide the actual Studio UI evidence. - The current head also carries unslothai#16471's rich-paste badge correction for the font-contract CI regression introduced by unslothai#16298. Both Settings components are byte-identical to the parent. Local validation passes 21 Python checks, 75 Node checks and the full frontend suite: 14,747 passing, zero failing and one existing skip. Refreshed cross-platform checks include the Python font contract. The first expanded frontend run used symlinked dependencies outside Vite's root and is excluded; the passing run uses a normal local dependency installation. - Full Studio pages and the real backend refresh endpoint reproduce the race in Chromium. Seeded invalid access plus a real refresh token and a controlled two-second successful-response delivery delay produce base responses 401 / 200, both windows at `/login`, and credentials cleared. This branch produces one 200, both windows at `/chat`, and credentials retained. The delay forces ordering; it is not a claim about natural frequency or backend task survival. - Two real pages running the production auth modules against a single-use refresh endpoint reproduce the failure in Chromium, Firefox, WebKit and Edge. Base sends two refresh requests and loses credentials; this branch sends one, both pages return `ok`, and the rotated credentials remain stored. - Identical differential tests against refreshed merge base `242f14b1d`: base 27 pass / 6 fail; branch 33 pass / 0 fail / 0 skip. Five are behavioral fixes; one calls a new session helper and is counted as a new API check, rather than a repaired baseline defect. Base production sources and test-file hashes were verified. The broader original focused auth selection passes 72 tests. - The local switchboard reports `NO_REGRESSION` for auth, settings and route crawling: 38 same steps and one zero-pixel Hub DOM variation. The signed-in chat route, composer and stored session also survive a real reload on both sides. - Linux, macOS and Windows staging checks complete. Paired Studio journeys pass the functional gate on Linux and macOS Intel. The original Apple Silicon paired arms were cancelled before acquiring runners; macOS smoke checks ran separately. The final paired native run with the hardened test client passes all ten Desktop steps on both sides, with exact `rc=0` receipts and a passing strict evidence gate. One dropped body-text response is recovered on the base arm; navigation, clicks and assertions are not replayed. Earlier native transport failures remain recorded, and the client hardening is isolated in unslothai/scripts#790. One baseline route screenshot is missing after a dropped GET response; that visual comparison is not claimed. - The refreshed combined application tree with unslothai#16470 and unslothai#16471 passes its production build and all 62 actual Tauri command tests. Its frontend Git tree equals this branch's tested tree. - The CPU auth fixture now exports the two session helpers that its production module imports. Its nine redirect checks pass without relaxing their assertions. The merged parity normalizer from unslothai#16464 is included. Current organization CI remains queued or running; the completed owned staging results above provide scoped evidence. This fixes a demonstrated refresh race; the report of backend jobs actually being cancelled has not been reproduced. Plain HTTP LAN origins without Web Locks retain the existing race limitation. Core inference, notebooks, backend token rules and model prompts are unchanged. Two real Studio windows after the controlled refresh race:  The shared spacing dependency below is the exact unslothai#16471 change; this comparison validates that dependency.  The inherited rich-paste badge correction is also byte-identical to unslothai#16471. At the enlarged font setting it scales from the previous fixed 10 px to 15 px, with the feature and switch retained: 
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Parity verdict, scored against the nullfails on unrelated PRs whose base includes #16300 (d56738f404, the turn navigator at the chat's left edge). In the last two hours it failed on #16458 (a backend-only change) and on staging for #16463 and #16435, each time the same way:In the null control (the same build on both arms), every action's thread scaffold digest differs, even between two repetitions on the same arm, while its length stays equal (
thread scaffolding outside any message (24167->24167c)). That is an instance id leaking into the structural signature.#16300 renders the navigator inside the thread root, outside every message, as one button per turn with
data-turn-id={openerId}.openerIdis the turn's opening message id (thread-turns.tspushesmessage.id).scene/parity.jsalready drops the values ofdata-message-id,data-thread-idand the other id attributes it knew about, but not this new one. Studio's message ids are short and random, soID_REdoes not catch them in the value either.The product is fine; the instrument fell behind the DOM.
Change
tests/studio/studiobench/scene/parity.js: an attribute is volatile if it is inVOLATILE_ATTRS, or if its name matchesdata-*-id. A volatile attribute keeps its presence in the signature and loses only its value, as before.data-*-idin the frontend names an instance, e.g.data-turn-id,data-queue-item-id,data-bookmark-id,data-entry-id.data-turn,data-role,data-state, ...) still compare by value.tests/studio/studiobench/fixture/selftest/test_studiobench_parity_digest.py(these run the shippedparity.jsunder node):test_every_data_id_attribute_is_volatile: two differentdata-turn-idvalues sign the same, a button with the attribute still differs from one without it, and the same holds fordata-queue-item-id.test_a_data_attribute_that_is_not_an_id_still_moves_the_signature:data-turn="1"against"2"still differs.Testing
tests/studio/studiobench/fixture/selftest,sweep/selftestandanalysis/selftest: 606 passed.parity.js,test_every_data_id_attribute_is_volatilefails; the other new test passes on both.matchedcount on this PR, as the runs before Studio: turn navigator at the chat's left edge, building on #11668 #16300 did (28 or 29).