Repository navigation
fix(browser): read transcript turns keyed by turn ids - #110
Merged
youdie006 merged 1 commit intoNov 17, 2026
Merged
Conversation
Every consult through the browser container failed with request_mismatch although the prompt posted and was answered (four in a row on 2026-11-17, the last a one-word probe). ChatGPT now keys each message unit as `<turn uuid>:<position>:<role>` where it used to write `fallback-turn-<n>:<position>:<role>`, and the container's transcript reader accepted only the numbered form. It counted no messages, took the move to the new conversation as acceptance, and found no user turn carrying the request marker. The unit selector now matches keys ending in :user or :assistant, the page script accepts a numbered or UUID turn, numbers UUID turns in page order, and still reads a page mixing both kinds of key as no transcript. The fake DOM in the tests mirrors the new selector. Verified: three new tests failed before the fix (0 messages; marker not acknowledged; mixed keys read one message) and pass after; reverting the src change turns them red again; tsc clean; full suite 2271 passed, 3 skipped. The fixed answerExpression and chatGptPromptPostedExpression, evaluated read-only on the live WSL container tab (click disabled), see 1 user and 1 assistant message, the request marker and the answer; the deployed code sees 0 and 0. main's reader (data-chatgpt-search- unit-key) already reads this page. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
Codex Review Summary: ✅ CompletedThis 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. |
What this touches
3 file(s), 87 line(s) changed. Tests changed. This is an automated first pass, not a review. CI is the gate; a person decides. |
youdie006
added a commit
that referenced
this pull request
Nov 17, 2026
0.40.52 (51da80d, PRs #100 and #105-#109) published on its first publish run and is installed on WSL, M3 and the Mac mini; the MacBook M4 did not answer ssh and still runs 0.40.51. The browser containers on WSL and M3 were rebuilt twice: from 58650ce (container PR #110), which fixes the request_mismatch every container consult hit once ChatGPT keyed transcript units by turn id, and then from 9969a64 (container PR #111), which ports this release's fixes. Each swap was gated on the send lock, and a smoke consult answered with its request verified on both hosts after each. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
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.
Problem
Every consult sent through the browser container failed with
request_mismatch("The latest visible user turn could not be verified against this prodex request"), although the prompt had posted and been answered. Four consults in a row from a Claude Code session on 2026-11-17 were blocked, the last a one-word probe whose answer ("OK") was sitting in the tab. The container's last successful consult was on 2026-11-04.Cause (measured read-only on the live WSL container tab)
[data-message-author-role]nodes. Each message unit carriesdata-content-search-unit-key="<turn uuid>:<position>:<role>"(user:0:user, assistant:2:assistant); the prefix is the turn's id (equal todata-content-search-turn-key), not the conversation id.fallback-turn-<n>:<position>:<role>, both inCHATGPT_FALLBACK_TRANSCRIPT_MESSAGE_SELECTORand in the page script'sfallbackMessageKeyPattern. The container's ownanswerExpression(), evaluated on the tab with its one click disabled, returneduserMessageCount: 0, assistantMessageCount: 0.requestMatchesfailed on an empty user turn, and the send threwrequest_mismatch(thehasChatGptPromptAcceptancebranch, which records no thread).data-chatgpt-search-unit-keyending in:user/:assistantand reads this page (1 user, 1 assistant, marker found), so npm installs are not affected.Fix
:useror:assistant; the page script accepts a numbered turn or a UUID turn, numbers UUID turns in page order, and keeps reading a page that mixes both kinds of key as no transcript.querySelectorAllintests/chatgpt-browser.test.tsmirrors the new selector.Verification
tests/chatgpt-browser.test.tsfailed before the fix (0 messages; marker not acknowledged; mixed keys read one message) and pass after; reverting only the src change turns them red again.npx tsc --noEmitclean; full suite 2271 passed, 3 skipped.answerExpression()andchatGptPromptPostedExpression()on the WSL container tab see 1 user and 1 assistant message, the request marker and the 2-character answer, and report the request as posted; the deployed code sees 0 and 0.