Skip to content

Lint: record the Mistral regex tokenizer owners in the risky loader baseline - #18677

Merged
danielhanchen merged 1 commit into
mainfrom
ci/risky-loader-baseline-mistral-regex
Nov 20, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/risky-loader-baseline-mistral-regex

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Source lint (Python + shell + YAML + JSON + safety nets) is red on main (seen on #18675, reproduced on current main). Its blocking step is No new risky loader call sites:

1 risky loader call site(s) not in the baseline:
  unsloth/import_fixes.py:1135  [dynamic-import] import_module

Cause

#18662 (keep tokenizers loading when the Hub rate limits the Mistral tag lookup) adds fix_transformers_mistral_regex_hub_error. It calls importlib.import_module(module_name) over a fixed literal tuple:

  • transformers.tokenization_utils_base
  • transformers.tokenization_utils_tokenizers

The call has the same shape as the four already-reviewed import_module(module_name) sites in import_fixes.py, so it lands in their baseline group (digest 59e72c01edb14c86) as a fifth instance. The gate reports one site over the recorded count; the line it names (1135) is simply the last one it counts. The new call is safe: the module names are written out in the source. The baseline just was not updated.

Change

scripts/risky_loaders_baseline.json, regenerated with python scripts/lint_risky_loaders.py --update:

  • the group's count goes from 4 to 5;
  • its reason now also names the two literal tokenizer owners of _patch_mistral_regex.

No other entry changes.

Testing

  • python scripts/lint_risky_loaders.py: exits 1 on main with the message above; with this change, ok: 122 risky loader call site(s), all recorded.
  • python scripts/lint_risky_loaders.py --self-test: ok.
  • tests/security/test_lint_risky_loaders.py: 46 passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T20:30:44.645448Z 9cd340f 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.

@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: 9cd340f4ab

ℹ️ 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 ad107cb into main Nov 20, 2026
@danielhanchen
danielhanchen deleted the ci/risky-loader-baseline-mistral-regex branch November 20, 2026 20:31
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