Skip to content

Restore the facts the frontend comment trim reworded away - #10292

Merged
danielhanchen merged 5 commits into
mainfrom
fix-10114-facts
Sep 5, 2026
Merged

danielhanchen merged 5 commits into
mainfrom
fix-10114-facts

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

#10114 trimmed comments across 245 frontend files. It is comment-only and nothing executes differently, but in 32 blocks the rewrite kept the shape and the readability while dropping the one thing in the comment a maintainer could act on.

The shape of it:

- // Longer than the read can take (THREAD_READ_RETRIES retries, each bounded by
- // THREAD_READ_TIMEOUT_MS and spaced THREAD_READ_RETRY_MS apart, then a give-up
+ // Longer than the read can take (retries, timeouts, and a give-up that opens the gate)

True, shorter, and useless to anyone grepping for the constant.

What came back

  • Constants and fields. FORK_COUNT_REFRESH_DEBOUNCE_MS, reduced to "per debounce window". args._server_tool, the stamp that keeps a same-named user function from being treated as a builtin. thinkingConfig.thinkingLevel / thinkingConfig.thinkingBudget, left as the bare field names without the container that makes them findable.
  • Routes. /api/inference/status.active_model had become "mirrored by /status", which is not a route that exists. Also /api/chat/settings.
  • Enumerations the code below actually tests. The session-only drafter modes mtp / mtp+ngram / dspark / dflash. The non-terminal run states queued / running / cancelling. The On Device sort orders. The version literals qwen3.5 and qwen3.6, where the comment explains an anchored regex and the code tests both.
  • Consequences with their status codes. "checking only the first occurrence leaves Load enabled for a request that 400s"; "every retry 409s again".
  • Withdrawn repo ids and the CI check that guards them, gguf("QuantStack/HunyuanImage-2.1-GGUF") and model-catalog-network-check.
  • Four documentation URLs deleted outright (Gemini thinking, Gemini GenerationConfig, Kimi web search).

What I deliberately did not restore

The candidate list came from a heuristic, and seven of its hits are not defects:

  • Three path abbreviations, where the studio/backend/... prefix went but a basename that names the file uniquely stayed. That is the shortening this PR was for.
  • Three where a figure is still in the comment and only its adjacency to the unit changed, so the pattern stopped matching.
  • An illustrative filename and a pointer at a call two lines below, neither of which anyone greps.

Restoring those would have undone the trim rather than repaired it.

Scope and checks

Every change is a comment. comment_tools.py check reports 19/19 files code-unchanged against #10114's merge commit. No added line exceeds 120 columns, no em or en dashes. Restored text is taken verbatim from c44f0fa8b, the tree as it was before #10114 merged, so the wording is the original author's rather than mine.

Where #10114's rewrite was an improvement, it stays. This restores the factual clause into the shorter sentence rather than reverting the block, which is why the diff is 76 insertions against 49 deletions rather than a straight revert of 245 files.

One site needed more than a restoration: use-chat-model-runtime.ts had been left with two overlapping paraphrases of the same block, which are merged back into one.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T16:02:11.687147Z b252534 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.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 85a9ea27e6

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

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
Some tests locate a region of the frontend by indexing on a comment's
exact text, so to them a comment is an identifier and deleting one is
deleting a symbol. #10114 trimmed ten of them, and 71 tests in
tests/studio have been failing on main since it merged. Restored
verbatim from 7580935^, comments only.

Reflowing counts as deleting here. Most of these were not removed, they
were rewrapped onto one line or had a second line dropped, which reads
as harmless and breaks the lookup exactly the same way.

One was failing silently, which is worse. The deep research contract
splits the adapter on "// Project sources auto-scope" rather than
indexing it, and split does not raise when the marker is gone, it
returns the whole remainder. Four assertions were being checked against
about two thousand lines of unrelated source and passing. The suite was
green and proving nothing.

tests/studio: 7475 passed, 0 failed, from 7404 passed and 71 failed.
@danielhanchen

Copy link
Copy Markdown
Member Author

Pushed 6abcb20df, which changes what this PR is for, so flagging it rather than folding it in quietly.

main is currently broken and has been since #10114 merged. 71 tests in tests/studio fail on main today and passed at 758093580^.

The cause is that some tests locate a region of a frontend file by indexing on a comment's exact text, for example source.index("// Re-read store after auto-load / model-ready wait."). To those tests a comment is an identifier, so trimming one deletes a symbol. Our comment-only gate cannot see this by construction: it compares ASTs, and comments are exactly what it is built to ignore.

Ten anchors across three files, restored verbatim from 758093580^:

  • features/chat/api/chat-adapter.ts (7)
  • features/chat/hooks/use-chat-model-runtime.ts (1)
  • features/chat/shared-composer.tsx (2)

Most were not deleted outright, they were rewrapped onto one line or lost a second line. That reads as harmless and breaks the lookup identically.

One was failing open rather than loud. test_deep_research_frontend_contract.py uses .split("// Project sources auto-scope", 1)[0] instead of .index(...), and split does not raise when the marker is missing, it returns the whole remainder. Four assertions were running against roughly two thousand lines of unrelated source and passing. That test has been green and proving nothing since the merge.

tests/studio goes from 7404 passed / 71 failed to 7475 passed / 0 failed. Sources only, no test was edited: the tests encode the real contract and relaxing them would have hidden this.

I have not audited the other trim PRs for the same class yet. #10113 is clean on it, but #10112, #10115, #10116 and #10118 are not checked.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 6abcb20df1

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

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
#10297 fixed this properly: the studio slice tests now anchor on the
declaration each comment sat above, and slice_between refuses a comment
anchor outright rather than failing several frames later. Restoring the
comment text only re-synced the literals, which goes red again on the
next trim, as that PR sets out.

This returns the branch to its one job, the facts #10114 dropped.
@danielhanchen

Copy link
Copy Markdown
Member Author

Reverted my anchor restorations in e3d6cb021 and merged main. #10297 is the right fix and mine is superseded.

I had restored the deleted comment text so the old literal markers would resolve again. That gets main green and goes red on the next comment edit, which is exactly the edit #10114 made. #10297 anchors the slices on the declaration each comment sat above and makes slice_between refuse a comment anchor outright, so the class cannot come back. It also covers 30 anchors across 14 files, including ones that still matched and would have broken on the next trim, against the 10 I had found by chasing failures.

This branch is back to its one job, the facts #10114 dropped.

tests/studio: 7483 passed, 195 skipped, 0 failed on the merge.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: b252534c52

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

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 4, 2026
@danielhanchen
danielhanchen merged commit 55418be into main Sep 5, 2026
44 of 45 checks passed
@danielhanchen
danielhanchen deleted the fix-10114-facts branch September 5, 2026 00:19
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