Skip to content

Scripts: pr_check refuses Code Llama, Codestral, QwQ and the like - #1137

Merged
theaustinayers merged 1 commit into
xcl-dev:mainfrom
emirduran707:pr-check-model-names
Nov 24, 2026
Merged

theaustinayers merged 1 commit into
xcl-dev:mainfrom
emirduran707:pr-check-model-names

Conversation

@emirduran707

Copy link
Copy Markdown
Contributor

CONTRIBUTING.md refuses PRs written with small and open-weight models, and pr_check.py enforces this by matching model names in the AI use section. The pattern \b(qwen|deepseek|llama|mistral|mixtral|gemma|phi-?\d) misses common names in these families:

  • CodeLlama, TinyLlama and CodeQwen: no word boundary before llama or qwen.
  • QwQ.
  • Mistral's Codestral, Devstral, Magistral, Ministral and Pixtral.
  • Phi 4, written with a space.

The PR that names one of these models passes the check.

What is in it

  • scripts/pr_check.py: BANNED_MODELS also matches a prefix before qwen and llama, plus qwq, the *stral names and phi followed by a space and a digit.
  • scripts/test_pr_check.py: BannedModelTests.
    • Nine family names are each refused.
    • Frontier model names and ordinary words pass: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6, Gemini 4, Codex, "Phil 2 checked the alphabet and graph 3".

This PR does not touch where the text is read from. #835 changes that, and the two PRs touch different lines.

Tested

  • Windows 11 Pro 26300, Python 3: python -m unittest discover -s scripts -p "test_*.py": OK, with the 11 subtests of BannedModelTests included.
  • Without the change to pr_check.py, 9 of these subtests fail: all nine family names pass the check.
  • More strings run against the pattern:
    • Matched: Llama 3, phi-4, Phi 4, QwQ-32B.
    • Not matched: Australia, graphite, philosophy, sophisticated 3D, alpha 2, GPT-5 and Gemini 3.
  • No runtime change, so no smoke run.

Not tested

  • The PR checks workflow on GitHub itself; it runs this file from main once the PR is merged.

AI use

  • Claude Code with Claude Opus 5.5: wrote the change, the tests and this description; I checked the pattern against the strings above.

🤖 Generated with Claude Code

CONTRIBUTING.md closes PRs written with Qwen, DeepSeek, Llama, Mistral,
Gemma, Phi and their distills, but the AI use pattern let their family
names through: "CodeLlama" and "TinyLlama" have no word boundary before
"llama", Mistral's Codestral / Devstral / Magistral / Ministral /
Pixtral and Qwen's QwQ / CodeQwen were not listed, and "Phi 4" has a
space where the pattern allowed only a hyphen.

"llama" and "qwen" now match at the end of a word, the Mistral and Qwen
family names are listed, and Phi takes a hyphen, a space or nothing
before its version. The word boundary stays at the start, so "Phil",
"alphabet" and frontier names (Claude, GPT, Gemini, Codex) still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DavidM1911

Copy link
Copy Markdown
Contributor

Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X; Python 3.

  • python scripts/test_pr_check.py: 11 tests OK — the banned-model regex now also covers Code Llama, Codestral, QwQ and similar, with tests for each.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

@futurepro62

Copy link
Copy Markdown

Tested exact head 38283a8, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_pr_check.py at the head: 11 passed, 23 subtests passed.
  • The PR's test file(s) against current main's script (930e8b4): 9 subtests of test_family_names_of_small_and_open_weight_models_are_refused fail (e.g. CodeLlama 34B, Codestral 22B, QwQ-32B, Phi 4). So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@theaustinayers
theaustinayers merged commit 2008399 into xcl-dev:main Nov 24, 2026
2 checks passed
gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
Brings in 20 newly merged upstream PRs (ivall#959, ivall#968, ivall#1079, ivall#1084, ivall#1091,
ivall#1099, ivall#1127, ivall#1133, ivall#1137, ivall#1150, ivall#1211, ivall#1223, ivall#1224, ivall#1265, ivall#1289,
ivall#1290, ivall#1330, ivall#1353, ivall#1354), including in-memory shader cache session
fallback (ivall#1211), CPU-invisible resource Map filtering (ivall#1099), DRED
partially executed list priority (ivall#1330), allocation info alignment
padding (ivall#1354), and DirectStorage status/error/cancel fixes (ivall#1127,
ivall#1223, ivall#1224).
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.

4 participants