Repository navigation
Preserve external chat import recovery across checkpoint failures - #16458
danielhanchen merged 4 commits into
Conversation
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. Bravo. 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". |
|
The The other parity runs from the last few hours (#16449, #16450, #16451, #16452) matched 28 or 29 pairs each. Re-running the parity jobs should give it a real verdict. |
…#16464) ## Summary `Parity verdict, scored against the null` fails 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: ``` matched: 0 unstable actions differing: 32 (expected to vary; not a verdict) NOTHING WAS COMPARED. ... This is not a pass. ``` 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}`. `openerId` is the turn's opening message id (`thread-turns.ts` pushes `message.id`). `scene/parity.js` already drops the values of `data-message-id`, `data-thread-id` and the other id attributes it knew about, but not this new one. Studio's message ids are short and random, so `ID_RE` does 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 in `VOLATILE_ATTRS`, or if its name matches `data-*-id`. A volatile attribute keeps its presence in the signature and loses only its value, as before. - Every `data-*-id` in the frontend names an instance, e.g. `data-turn-id`, `data-queue-item-id`, `data-bookmark-id`, `data-entry-id`. - So the next one added inside the thread cannot silently empty the verdict the way this one did. - Non-id data attributes (`data-turn`, `data-role`, `data-state`, ...) still compare by value. - **`tests/studio/studiobench/fixture/selftest/test_studiobench_parity_digest.py`** (these run the shipped `parity.js` under node): - `test_every_data_id_attribute_is_volatile`: two different `data-turn-id` values sign the same, a button with the attribute still differs from one without it, and the same holds for `data-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/selftest` and `analysis/selftest`: 606 passed. - Sabotage: with main's `parity.js`, `test_every_data_id_attribute_is_volatile` fails; the other new test passes on both. - Not proven here: I did not rerun the full parity sweep locally. The PR's own parity job is the end-to-end check. On main's harness it should report a non-zero `matched` count on this PR, as the runs before #16300 did (28 or 29).
Failed external-chat imports can commit messages without their checkpoint, causing retries to skip later turns. This preserves the atomic message/checkpoint change from #16420 and also clears a deleted chat's obsolete checkpoint in the transaction that recreates its thread, so an interrupted reimport remains retryable.
The importer continues to preserve edits and message deletions in surviving threads. There is no schema migration or change to the import UI. Existing historical threads with missing checkpoints remain outside this change.
Validation:
The current head has review approval. Broad CI is still blocked by UI parity: the scorer reports zero stable differences and zero failed assertions, but excludes all 32 pairs as unstable against the null and exits with "NOTHING WAS COMPARED". That is an evidence gap to resolve before merging.
This includes the original contributor's commits from #16420. Maintainer pushes and a follow-up PR into that contributor's branch were both refused, so the correction is offered here for review.
Fixes #16419.