Skip to content

Trim comments in tests, scripts, CI helpers and unsloth_cli - #10113

Merged
danielhanchen merged 45 commits into
mainfrom
comment-trim-repo-tests
Sep 4, 2026
Merged

danielhanchen merged 45 commits into
mainfrom
comment-trim-repo-tests

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Comment-only pass over 634 files: everything under tests/ outside studio/backend, the studiobench harness, scripts/, .github/scripts/ and unsloth_cli.

before after change
comment lines 30,231 16,198 -46.4%
comment characters 2,113,559 1,201,624 -43.1%

What changed

Removed: fixture narration, restatements of the adjacent line, section banners and setup description. No comment line exceeds 120 columns. Comments naming the regression an assertion guards are kept.

The CI and packaging helpers were treated conservatively

.github/scripts/ and scripts/ are close to the original. Their comments are mostly measured constraints and ordering hazards rather than description, and a sample of candidate deletions there came back 85% load-bearing, against 41-47% for the test directories. Examples kept:

  • a nonzero exit does not raise, so the return code is the only thing separating a reclaimed Kaggle kernel from one still running and still billing
  • the cap on simultaneous batch GPU kernels per account, measured rather than documented
  • pins resolve last, as their own step, so they beat what the preceding groups resolved
  • read the pgid before the reap, because os.getpgid() raises once the child is waited on

Safety

Nothing outside comments changes. No code, docstrings, string literals, licence headers or pragmas are touched. Verified with an AST code-only signature of every file against the base commit; all 634 report code unchanged (comments only).

@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-04T20:33:35.980337Z dcf823a 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85a07f8dfb

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

Comment on lines 2 to 6
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the complete license notices

This comment-trimming pass removes substantive clauses from established license headers across 26 files, leaving fragments such as “either version 3 ... or / but WITHOUT ANY WARRANTY” without the omitted later-version option, grant/purpose text, or warranty wording; the same issue truncates Apache notices in tests/saving/test_gguf_disk_preflight.py, tests/test_prefetch_snapshot_scope.py, and tests/utils/test_q_galore.py. When these scripts or tests are copied or distributed independently, the resulting headers no longer communicate their licensing terms coherently, contrary to this change's stated intent not to touch license headers, so the complete notices should be excluded from comment trimming.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/verify_comment_only_diff.py is not part of this PR. git diff 1d2679f..565d507 touches 453 files and that path is not among them, and the PR adds no files at all. Its header is byte-identical to the base commit, so nothing here removed a notice from it.

@danielhanchen
danielhanchen marked this pull request as draft September 1, 2026 03:05
@danielhanchen

Copy link
Copy Markdown
Member Author

Moving this to draft. A check that was not run before opening it has now been run, and it fails.

Every verification behind this PR looked at what survived: the AST gate proves no code changed, the length rule proves no comment line is over 120 columns, and reading the diff shows sensible comments. None of those can see a fact that was dropped while a comment was being shortened, because the result still reads as a complete, well formed comment.

Measuring the other direction, comparing distinctive facts in the base commit's comments (identifiers, filenames, constants, issue references, measured values) against the text that survives, this PR has lost a material fraction of them. Sampling the losses with their original context shows they are not restatements that were correctly removed. Examples of the class:

  • write_bytes truncates first, so one shared directory lets a concurrent leg clobber another
  • n_tokens = 4096 and token_id=128009 survive redaction, which is the assertion's whole point
  • the mirror to /api/chat/settings is a 400ms debounce
  • token caches under $HF_HOME, ~/.netrc and XDG config are dropped from the child environment

These are the invariants and measured values the code cannot state, and they are exactly what the pass was supposed to protect.

I am running a restoration pass over the affected files and will push an update and mark this ready for review once the fact retention is measured and above threshold. Nothing here should be merged in its current state.

The underlying lesson, which is worth more than this PR: a comment-reduction pass cannot be validated by inspecting its output. It has to be validated by sampling what it discarded and what it rewrote, against the original.

@danielhanchen

Copy link
Copy Markdown
Member Author

Updated, and ready for review.

The fact-restoration pass described in the previous comment is now applied to both halves of this PR.

tests, scripts, CI helpers

  • distinctive-fact retention 67.7% -> 91.6%
  • 804 blocks restored, plus 47 trimmed licence headers restored verbatim from the base commit
  • hand-judged sample of 100 decisions: 81 correct

studiobench and unsloth_cli

  • distinctive-fact retention 81.1% -> 87.0%
  • 245 shortened comments judged individually, 153 restored; re-reading all 92 skips reversed 12, so 87% correct on first judgement, and those 12 are restored too
  • 63 of the 149 restorations are a measured quantity rather than an identifier, which is the category the pass had been under-weighting

Current totals against the base commit

before after change
comment lines 30,231 18,930 -37.4%
comment characters 2,113,559 1,396,528 -33.9%

Lower than the -43.1% first reported, and the difference is the restored material.

Gate: 623/623 files report code unchanged (comments only). No comment line exceeds 120 physical characters. Licence headers, docstrings and pragmas are byte-identical to the base commit.

What the restoration put back

The losses were concentrated in comments that were kept and then shortened, not in comments that were deleted. Examples now restored:

  • write_bytes truncates first, so one shared directory lets a concurrent leg clobber another
  • read the pgid BEFORE the reap, because os.getpgid() raises once the child is waited on
  • the mirror to /api/chat/settings is a 400ms debounce
  • sqlite3.connect creates 0644 files, which is why the 0700/0600 fix exists
  • that category is disabled-by-default-v8.cpu_profiler.hires

Note on the other PRs in this series

The sibling comment-trim PRs are still in draft pending the same pass. Two of them are being closed rather than repaired, because restoring their losses converges on the original text and leaves no useful reduction. This one is being marked ready because the reduction survives the restoration.

@danielhanchen
danielhanchen marked this pull request as ready for review September 1, 2026 03:23
@danielhanchen
danielhanchen force-pushed the comment-trim-repo-tests branch 2 times, most recently from 3d69ec3 to 1f74d3a Compare September 1, 2026 03:34
@danielhanchen

Copy link
Copy Markdown
Member Author

Second update. Two further defects found and fixed since the last push.

Slot 10 half re-run with the block-level method. The earlier pass judged against the single best-matching line, which under-represents a block that was compressed into three or four lines. Re-judged against the actual surviving block: all 210 compression cases judged individually, 19 further restorations, and a systematic re-audit of 100 of those decisions upheld 94 and reversed 6. The six reversals were restored, not just reported. They share one shape: a compression accepted because the headline claim survived, where the dropped clause was the evidence for the claim rather than decoration. Restored among them: the pacer's proof numbers (150 chunks, 3,581 characters, 73 ms cadence), the probe's runnable invocation, menu_open_ms is unaffected, and the not_digested residue clause.

Duplicate insertions from the restoration itself. Restoring a recovered sentence next to a surviving paraphrase produces two adjacent comment lines saying the same thing. Nothing in the AST gate, the length rule or a read of the diff can see this. A near-duplicate scan (token overlap at or above 0.75 between lines inside one comment block) found 4 in the studiobench half and 25 in the tests and scripts half. All are removed, keeping whichever line matches the base commit:

- # Fetch everything before writing anything:
- # Fetch everything before writing anything.
+ # Fetch everything before writing anything:

- # Exit 1 on a hard error or a NON-baselined finding at/above threshold.
- # Exit code: 1 on a hard error, or a NON-baselined finding at/above the threshold.
+ # Exit code: 1 on a hard error, or a NON-baselined finding at/above the threshold.

Current state

before after change
comment lines 30,231 18,955 -37.3%
comment characters 2,113,559 1,396,487 -33.9%

Retention: 91.6% and 92.7% on the two halves. Hand-judged: 81 of 100 and 94 of 100.

Gate: 623/623 code unchanged (comments only). No comment line over 120 physical characters. node --check clean on every JS and TS file in scope. Licence headers, docstrings and pragmas byte-identical.

@danielhanchen
danielhanchen force-pushed the comment-trim-repo-tests branch from 1f74d3a to 52b945d Compare September 1, 2026 03:39
@danielhanchen

Copy link
Copy Markdown
Member Author

Third update, and a correction to a claim in the PR description.

The description says pragmas are untouched. That was not true. A sweep across the whole batch found 81 functional pragmas deleted, of which this PR's files held some. All are restored and re-verified.

Deleted pragmas are invisible to the AST comment-only gate for the same reason a deleted licence header is: to the gate, # noqa: F401 is a comment. But it is load-bearing, and dropping it turns a passing lint run into a failing one. Examples restored:

import core.inference.llama_keepwarm  # noqa: F401
except BaseException as exc:  # noqa: BLE001 -- the assertion below pins the type
def do_GET(self):  # noqa: N802
except Exception as exc:  # pragma: no cover - only when training deps absent

One case was worse than a deletion. In tests/utils/test_packing.py a comment had been merged onto the # fmt: off line:

- # fmt: off Named to match the unsloth_zoo helper (sourced by name, ...).
+ # fmt: off
+ # Named to match the unsloth_zoo helper (sourced by name, ...).

# fmt: off has to be alone on its line to take effect, so that merge silently disabled the formatter suppression for the block below it while still looking like the pragma was present.

Gate re-run after the restoration: all files still report code unchanged (comments only).

@danielhanchen
danielhanchen marked this pull request as draft September 1, 2026 03:46
@danielhanchen

Copy link
Copy Markdown
Member Author

Back to draft, pending one more check.

Slot 5's pass found a limitation in the survivor detector this PR's verification relied on. The detector matches a baseline comment to its surviving shortened version by text prefix. Where a pass re-authored the OPENING of a comment rather than only trimming its tail, the current text no longer starts with any baseline phrase, so the matcher classifies the block as deleted or drops it entirely.

Measured on another slot, the prefix rule found 291 survivors where a DP alignment found 515, a 43% shortfall.

The hand-judged accuracy figures quoted above remain valid for the cases that were judged. They simply cover a smaller share of the damage than assumed, because a portion of the compression losses were never surfaced for judgement at all.

Re-running detection with a union rule, prefix match or Jaccard overlap over blocks or shared distinctive identifier, then judging and restoring whatever it surfaces. I will mark this ready again once the count is honest, or close it if restoring the newly surfaced population leaves no useful reduction, as happened with #10111.

@danielhanchen
danielhanchen force-pushed the comment-trim-repo-tests branch from 52b945d to 565d507 Compare September 1, 2026 03:51
@danielhanchen

Copy link
Copy Markdown
Member Author

Scope narrowed and ready for review.

This PR now covers only tests/ (excluding the studiobench harness), scripts/ and .github/scripts/. The studiobench and unsloth_cli half has been removed and will follow as its own PR once its verification finishes; the two sets are independent and there is no reason to hold this behind it.

Current state, 453 files

before after change
comment lines 17,749 10,635 -40.1%
comment characters 1,183,079 757,190 -36.0%
  • distinctive-fact retention against the base commit: 93.2%
  • hand-judged sample of 100 decisions: 98 correct
  • comment lines over 120 physical characters: 0
  • adjacent near-duplicate comment lines: 0
  • gate: 453/453 code unchanged (comments only)

What the verification actually covers now. The survivor detector was re-run with a union rule (prefix match, or Jaccard overlap over blocks, or shared distinctive identifier) rather than prefix alone, because a prefix rule cannot see a comment whose opening was re-authored. On these files that surfaced 62 additional cases out of 1,314, all judged and handled. The narrow rule worked here because the compression in this slot always kept the leading clause and dropped from the tail, so the surviving text still opens with a baseline phrase.

One correction worth recording for anyone doing similar work. The first restoration attempt used a composer that replaces the surviving comment run. It reported 51 blocks restored while the fact count went backwards by 44 net, because it overwrote lines an earlier round had already restored. A per-block progress count cannot see that. The working method appends the missing clause below the surviving run and never rewrites it, and both it and the duplicate scan skip any run containing a pragma, fmt:, SPDX or licence text.

The CI and packaging helpers under .github/scripts and scripts/ are close to the original by design. Their comments are mostly measured constraints and ordering hazards, and a stratified sample of candidate deletions there came back 85% load-bearing against 41-47% for the test directories.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen
danielhanchen marked this pull request as draft September 1, 2026 04:18
@danielhanchen

Copy link
Copy Markdown
Member Author

Moving this back to draft. An independent pass over the whole diff found a defect class that none of the checks I had been running can see, and it is not a handful of slips.

The two items above were real, and I fixed them in 9c4ba34. But they turned out to be a sample rather than the whole story. Counting comment blocks that read as sentence fragments, baseline to head: 98 -> 522. That is +424. I hand-checked 12 of the 522 at random against 1d2679f and 11 were genuine truncations, the twelfth a false positive on a section banner. The same measurement on the sibling PRs goes the other way (#10116: 57 -> 27, #10118: 39 -> 20), so this is specific to how this branch was reflowed, not an artifact of the detector.

The reflow did not only truncate, it re-anchored. Confirmed examples:

  • tests/studio/install/test_install_llama_prebuilt_logic.py: the comment explaining that an sha256-verified bundle SKIPS the smoke test while the flag is off now sits in the _runs_when_flag_enabled test, one line under _RUN_STAGED_PREBUILT_VALIDATION = True and above an assertion of {"quantize": 1, "server": 1}. It contradicts the line directly above it, and the test it belongs to has no comment left.
  • tests/version_compat/test_peft_pinned_symbols.py and the trl/transformers siblings: a whole-file off-by-one shift of the numbered banners, so banner 4 documents banner 5s test and a truncated banner 5 floats above nothing.
  • tests/notebooks/test_validator_fixtures.py: the R-INST-001 banner moved under the R-INST-005 header.
  • .github/scripts/kaggle_t4_ci/launch.py: two fabricated own-line # noqa: BLE001 markers with prose welded on after the code list. The noqa count across the diff went 261 -> 263 and these are the two.

Worth saying plainly why this got as far as it did. comment_tools.py check passes 453/453, every file parses, and no line is over 120 characters. All three of those inspect what survived. None of them can see a fact dropped or a comment relocated while the result still reads as a well formed sentence. The gate I needed was a sample of what the pass discarded and rewrote, and I did not run one until after opening the PR.

I would rather regenerate this from 1d2679f with a reflow that cannot drop a block trailing wrapped line than patch 400-odd sites. Leaving it in draft until then. #10116 and #10118 measure clean on the same detectors and stay open.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c4ba344d7

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

Comment thread .github/scripts/kaggle_t4_ci/gate.py Outdated
try:
survey = survey_kernels(api)
except Exception as exc: # noqa: BLE001
# An unreadable quota is not permission to spend it -- and it is not evidence of exhaustion either, so it stays

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the quota-failure rationale on the quota branch

When changing Kaggle gate failure policy, this comment now labels a survey_kernels exception as an unreadable quota and is truncated before explaining the resulting skip. The quota failure is handled by the preceding else, whereas this handler means concurrency could not be established; attaching the rationale here conflates two operational failures with different evidence.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not this PR. gate.py is byte identical between the merge base 31af9ab and this head, and the restructure you are reading came from #10121, which merged into main. The confusion is mine: this branch was cut at 1d2679f and 33 main commits have landed since, so a diff taken against that old base shows upstream work as if it were ours.

Comment thread .github/scripts/kaggle_t4_ci/legs.py Outdated
Comment on lines +127 to +128
# warn, measuring an environment Unsloth never claimed to support.
# One resolution with the zoo requirement present, so pip picks the newest release of each that zoo's

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reassemble the canary resolution explanation

When changing the experiment's dependency resolution, these two lines are reversed fragments of the original explanation: the first begins with the conclusion about pip warning, while the second ends before stating that a separate upgrade could violate Zoo's constraints. The resulting comments no longer explain why the canary installs ZOO and its upgrades in one resolution, making a future split into separate installs appear harmless.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legs.py is not in this PR. No commit in 31af9ab..d6bbbdb touches it. Same cause as the gate.py item: the finding was computed against the stale 1d2679f base rather than the real merge base.

@danielhanchen

Copy link
Copy Markdown
Member Author

Triaged all 14 items: 12 genuine (thumbs up, each one a real relocation, inversion or truncation), 2 rejected. The two rejects are my fault rather than a bad review: this branch was cut at 1d2679f and 33 main commits have landed since, so anything measured against that base reads upstream work as if it were ours. gate.py is byte identical between the real merge base 31af9ab and this head, and legs.py is not in the PR at all.

I am not going to fix the 12 and re-request review, because they are a sample rather than the population. Measuring the whole branch against the correct base:

fragment-ending comment blocks total blocks rate
base 31af9ab 246 10141 2.4%
head d6bbbdb 1581 9185 17.2%

A 6.4x increase while the total block count FELL, so it is not a volume artifact. 292 of the 448 changed files gained new fragments. A blind 30-block sample against base came back 20 damaged (67%, 95% CI roughly 49-81%): 10 fragments, 7 lost facts, 3 relocations.

The mechanism is that the 120-column rule was enforced by truncating rather than rewrapping. Not one added comment line exceeds 120 characters, and the tail clause is simply gone. A second mechanism shifted rewritten headers onto neighbouring functions, which is where the inversions come from: in test_heavy_thread_measurement_integrity.py a measured "0.25ms per call" was re-anchored to a different query, so the number is now false where it sits.

So this stays in draft. The right fix is to redo the trim from 31af9ab with a rewrap-not-truncate rule, plus a gate that rejects any comment block whose last line ends on a dangling function word or a bare colon. Patching 12 sites would leave roughly 1,300 damaged blocks behind and would read as fixed.

Unrelated, and worth its own PR: the failing "Build PR AppImage" check is not caused by this branch. studio/src-tauri/linux/prepare-complete-appimage-tools.sh pins a sha256 for linuxdeploy-plugin-appimage against the rolling continuous release tag. Upstream rebuilt that tag at 2026-09-01T03:53Z and the pinned digest no longer matches the live asset (0441769a... against the pinned a45d3e22...). The same step fails on unrelated branches. It wants either a digest bump or, better, an immutable release tag instead of continuous, otherwise every PR breaks each time upstream rebuilds.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 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. Breezy!

Reviewed commit: 7d03be5f24

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

One conflict, in the remote-connection contract. main tightened the
assertion to the gate's new active={!isAuthFlowRoute} form and added a
note about the chat page hydrating its own settings; this branch had
only rewrapped the comment above it. Took main's assertion and its new
comment, kept the rewrap.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: c6a1a83728

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

Twenty-five sites, and almost none of them were the trim's. Round nine
was called "move the row and branch notes back onto what they describe",
and it moved a good many onto things they do not describe: the xpu swap
tests had the pinned-mirror rationale on the test that asserts the index
is dropped, the cuda repair file had a whole run of rationales slid one
test upward, and several notes were duplicated onto a neighbour rather
than moved. Where a clause was already correct on its real anchor, the
copy is deleted rather than parked somewhere new.

Separately, this PR had been changing code, and the gate could not see
it. Five files: three where a repair split a tuple across lines to make
room for a restored trailing comment, two where the trim deleted a
trailing comment and then joined up the wrapping that existed only to
carry it. Parentheses and line breaks leave the parse tree untouched, so
an AST comparison calls all of it comments. Every one is back to base
byte for byte, with the comments that justified the wrapping restored.

scripts/code_reflow.py is the check for it: same tokens in a different
arrangement is a code change, whatever the AST says.
Both were split only to make room for a trailing comment. Round ten cut
those comments back to what is true of the row, the expressions now fit,
and the formatter joins them. Running it is not optional: pre-commit.ci
was red on exactly these two.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

One conflict, in the settings-tabs driver. main added the persisted
monitor assertion and the section 2 banner above the tab loop; this
branch had neither. Took main's side whole.
Five sites. Three were duplicates: the correct sentence still sits on
the test it describes, and a repair pass left a second copy on a
neighbour. Moving those would have been the fourth round of shuffling
one clause between two tests, so the copies are simply gone.

The mislabelling was the point in each case. An empty handover tag and
an absent one are different precedence rules, and the PowerShell 7.5
parsing note had been copied from the empty-string test onto the one
whose variable is unset. A non-zero-exit rationale sat on a parser test
that asserts a successful exit.

The other two are the trim's own: "#5854)," with its subject cut away,
and a regex description that stopped before naming the self. prefix it
matches, which is what explains the narrower filter below it.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Seven had moved one branch or one call down. The autocast one had landed
on the case that forces float32 and asserts dtype float16, directly
under a note saying there is no dtype at all; the JAX rationale sat on
the USE_FLAX env-var case, whose module map has no jax in it; the
kill-and-sentinel note sat on a test that only checks a GPU row regex.
Each is back on the assert it describes, with a tenth found in the same
file as the probe timeouts.

Two are the trim's own. A mid-block deletion in the settings-tabs driver
spliced two half sentences into "blocking a / error-handling regression
and was a stale constant"; the macOS slot table lost the only statement
of why macos-14 is absent from a set named for images GitHub still
schedules. The retirement dates are restored, verified against all three
workflows that carry them.

The settings-tabs note is shorter than base on purpose. It now says the
invariant, that blocking a panel must not collapse the dialog, and drops
the tab count, which nothing asserts.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

All twelve had slid onto an adjacent test or branch, and in each the
displaced note contradicted what it now sat on. The CPU-backend note
about a wheel being left alone had landed on the test asserting a repair
runs; the XPU one about a dispatched shard sat on the single-device
case; the redirect-body note sat in a test that never binds served; the
draft-state refusal sat on the test where the target is present and the
run returns 0.

One lost text on the way as well: the missing-target rationale had been
cut to its first two sentences, dropping the reason the draft and
prerelease refusal above it would otherwise degrade into no check.

Also a rewrap that duplicated its own tail instead of replacing it, so
the merge-budget note read "else a sharded own device, not GPU0, else a
sharded model OOMs".
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Eight reports, six defects: two pairs described the same misplacement
from either side.

One was worse than misplaced. "A comment naming a probe is not a probe"
had moved onto the metadata scan, whose predicate matches the raw line
with no comment handling at all, so it claimed an exemption that scan
does not implement. It belongs on the Test-Path scan, the only one that
splits on # before matching. Moved, not reworded.

The rest argued against the test they sat on. The lazy-trl note was on
a stub with no __getattr__ to raise; the bogus-variant note was above a
request sending a valid variant; the imported-TensorFlow note was on
the case that supplies no tensorflow and asserts the flag is cleared;
the 62-token rationale was on the test that asserts 12.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Seven had slid off their anchor, and in most the stray was also cut
short, so the fix was to restore the whole sentence where it is true and
delete the fragment. The torchao dependency reason sat on a test about
re-verification rather than on the --no-deps assertion it justifies; the
bitsandbytes heading sat on a test that fetches quantizers_utils.py; the
no-selection latch note sat on the delete block, which asserts nothing
reaches the action.

Two are the trim's own truncations. The stand-aside rationale in the
shortcut driver stopped at a colon, losing why Enter on a focused Deny
button would otherwise be defaulted away into approve. The kwargs-union
case stopped at a semicolon, and the trim had eaten the leading ** from
**kwargs as well.

One was about the driver rather than a test: the JSON note sat beside
the final print, where it described the document, instead of on the
stderr redirection that is what actually keeps stdout clean.
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: bba8cf1a41

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

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Nine sites. Most are the trim's own truncations: the dill fixture had
lost the property that makes lookup by reference fail, so an otherwise
unexplained __module__ = "builtins" sat there with no reason; the rope
drift test had two clauses spliced into "every buffer keeps scaling in a
buffer"; the playwright guard had lost the three command shapes it
matches and why the regex is not anchored on an engine list.

Three are a shape I had not seen. The reflow rewrote the `#:` variable
documentation markers in the fast-copy constructs to `# :`, and dropped
stray colons into the wrapped prose, leaving "text : node". Those
markers are syntax, not punctuation to be tidied.

One was misplacement rather than truncation. The dotted-import rationale
had moved onto the second copy of its case and lost its tail, leaving a
dangling "and" above a capitalised "Still caught" and the first row bare.
Restored where base has it, stray deleted.

lint_duplicate_definitions self-test still passes, 63 cases.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7fc2b7357

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

Comment thread tests/utils/test_qat.py Outdated
Comment on lines +170 to +171
# TODO: there are bad interactions across tests right now, need to figure out how to disable model caching before
# re-enabling this test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the TODO with the disabled full-model test

This TODO previously explained why _test_full_model_fake_quantize is disabled by its leading underscore, but it now sits on test_lora_model_fake_quantize, which pytest actively collects. The phrase “re-enabling this test” therefore describes the wrong function and leaves the actually disabled test unexplained, making maintainers likely to disable or re-enable the wrong QAT coverage.

Useful? React with 👍 / 👎.

# Let React process compositionstart and update isComposing.
page.wait_for_timeout(200)
send_btn_mac_enter = page.locator('button[aria-label="Send message"]')
# Switch TO Chinese: compositionstart fires but compositionend never arrives.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Put the IME-switch comment on the composition event

In the candidate-confirming Enter scenario, this comment now claims that the following call fires compositionstart, but that call actually dispatches a KeyboardEvent for Enter; the real CompositionEvent('compositionstart') is the preceding call. This also replaces the original explanation that Enter must be swallowed while composingRef is pinned, so the test's critical action is now mislabeled and its regression rationale is lost.

Useful? React with 👍 / 👎.

Comment on lines +746 to +747
# The short-circuit must not keep a version-matching install whose recorded digest is not the pin (old
# remote-SHASUMS install or a tampered artifact).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the fallback rationale on the fallback test

This test does not cover the initial short-circuit: it deliberately lets the verified download fail and checks the transient-failure fallback. Moving the short-circuit comment here removes the original distinction that a same-version install with the wrong pinned digest must be rejected while a different usable version may still be retained for offline resilience, making the fallback policy appear stricter than the behavior the surrounding tests preserve.

Useful? React with 👍 / 👎.

Comment on lines +854 to +855
# Default and namespace forms bind a name too, and it is the same ReferenceError when the harness lacks it.
# chat-adapter.ts has none today, so this is for the first one somebody adds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the import-form note with the matching regex

This note describes default and namespace imports, but it now precedes the second loop, whose regex extracts named imports inside {...}; those forms are handled by the first loop immediately above. The original explanation for this second regex's optional default-import prefix was removed, so a future import-syntax update is directed to the wrong matcher and can leave the harness missing a runtime binding.

Useful? React with 👍 / 👎.

@@ -697,6 +690,7 @@ class ClassifyCase:
"src: url(katex/dist/fonts/font.woff2);",
"css_url",
),
# CSS url() unquoted variant must classify the same as the quoted one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the unquoted-URL rationale on the unquoted fixture

The comment says this case protects the unquoted url() variant, but it now sits on U45, whose input is explicitly quoted. U44 immediately above is the actual unquoted fixture and has lost this rationale, making U44 look redundant with U45 even though it covers a separate classifier form.

Useful? React with 👍 / 👎.

The trim slid several notes onto neighbouring tests, where they describe
something they no longer sit on:

- test_qat.py: the TODO moved off _test_full_model_fake_quantize, whose
  leading underscore is what keeps pytest from collecting it, onto a test
  that is collected and was never disabled.
- playwright_chat_ime_i18n.py: 6f carried a stray copy of 6e's
  compositionstart note above an Enter KeyboardEvent, and had lost its own
  rationale for why Enter reports isComposing=false while composingRef is
  pinned.
- test_install_node_prebuilt_logic.py: the short-circuit note landed on the
  transient-download-failure test, leaving the SHA-enforcement test bare and
  dropping the carve-out that a different usable version is still kept for
  offline resilience.
- test_chat_autoload_failure_gate.py: the default/namespace note moved onto
  the named-import loop, and the mixed-form note explaining that regex's
  optional prefix was dropped.
- test_frontend_dep_removal.py: the unquoted CSS url() note moved onto the
  quoted fixture, and the HTML package-name-boundary note moved off the
  script-src case onto the link-href case.

Comments only; the gate reports code unchanged on all five files.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: dcf823a58b

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants