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

Merged
emirduran707 merged 1 commit from upstream-pr/1137 into main 2026-11-24 15:50:57 +00:00
emirduran707 commented 2026-11-24 12:22:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T12:22:09Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:6581676503 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1137). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T12:22:09Z. --- 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](https://claude.com/claude-code)
DavidM1911 commented 2026-11-24 13:03:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:52:19Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7132033209 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1137#issuecomment-7132033209). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T12:52:19Z. --- 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 commented 2026-11-24 15:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:15:53Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7134096077 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1137#issuecomment-7134096077). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:15:53Z. --- 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.
upstream-sync closed this pull request 2026-11-24 16:05:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1128
No description provided.