Skip to content

Reduce the comments added by PR #9979 - #10107

Merged
danielhanchen merged 2 commits into
mainfrom
chore/reduce-9979-comments
Sep 1, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
chore/reduce-9979-comments

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Comment and docstring reduction over the code #9979 added. Two passes, prepared while that PR was open and finished just after it merged, so they missed the merge.

Behaviour-free by construction: 102 insertions against 221 deletions, and every hunk is a comment, a docstring or whitespace.

Numbers

before after cut
line comments 111 54 51%
docstrings 197 136 31%

No docstring is deleted. Every function that had one still has one; the reduction is entirely from collapsing multi-line rationale blocks. The longest surviving docstring in the set is 8 lines, down from 11, and the rest are 1 to 4.

AST gate

comment_tools.py check --changed --base origin/main --strip-docstrings reports 12/12 OK, exit 0. Every extension in the diff is .py, .ts or .tsx, all of which the tool parses, so nothing is skipped past the gate.

Worth recording for the next pass: with --strip-docstrings a docstring edit compares equal but a deletion does not, because the helper blanks the string value and keeps the Expr node. That is why this pass shortens docstrings and never removes them.

What was deliberately kept

Shorter was not the goal where a comment carried a fact the code does not state:

  • _choice_seed and its test keep the note that matching a literal -1 alone left choice 0 random and cached while choice 1 was offset into a fixed, uncached seed. That is the reason the comparison masks to uint32, and it is the alternative-is-wrong fact.
  • _binary_image_runs keeps the whole "exit code is not the verdict" half. llama-quantize answering --version with a non-zero exit is a live trap, and the deliberate fail-open on a timeout or failed spawn is an invariant nothing else records.
  • The S1..S12 marker shapes keep their date and PR citations. Nothing else records when each key arrived, which is the entire premise of a back-compat matrix.
  • test_a_pre_runtime_asset_windows_cuda_install_is_not_asked_for_the_cudart_trio keeps "every Windows CUDA install today predates runtime_asset". Without it the test reads as hypothetical rather than as a regression that would loop forever.

Verification

  • backend files touched: 553 passed
  • tests/studio/install/ and the zoo isolation suite: 3270 passed

The 11 failures in test_rocm_support.py visible in a local full run are unrelated and reproduce identically on main; they need an importable unsloth that the sandbox lacks.

Note

Touches tests/studio/install/test_keep_install_backcompat_9979.py, which #10106 also edits. Whichever lands second needs a trivial rebase.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-01T01:32:24.318514Z fd32e14 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. Already looking forward to the next diff.

Reviewed commit: 38d9cdb014

ℹ️ 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 force-pushed the chore/reduce-9979-comments branch from 38d9cdb to fd32e14 Compare September 1, 2026 01:28
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: fd32e14795

ℹ️ 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 7b8b64f into main Sep 1, 2026
82 checks passed
@danielhanchen
danielhanchen deleted the chore/reduce-9979-comments branch September 1, 2026 01:49
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