Skip to content

[upstream #1137] Scripts: pr_check refuses Code Llama, Codestral, QwQ and the like - #25

Merged
ufoptg merged 1 commit into
mainfrom
upstream-pr/1137
Nov 24, 2026
Merged

ufoptg merged 1 commit into
mainfrom
upstream-pr/1137

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

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. xcl-dev#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


Mirror of xcl-dev#1137 (auto-synced, do not edit).

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>
@ufoptg
ufoptg merged commit 2008399 into main Nov 24, 2026
2 checks passed
ufoptg pushed a commit that referenced this pull request Nov 24, 2026
…nment

GetResourceAllocationInfo (#25) and GetResourceAllocationInfo2 (#108)
laid several resources out one after another, each at its own
alignment, but returned the end of the last one as the size. The PC's
docs for GetResourceAllocationInfo with several descriptions: "the C++
algorithm for calculating a structure size and alignment are used" - a
4 MiB-aligned resource between two 64 KiB-aligned ones takes 12 MiB,
first or last 8 MiB, the alignment 4 MiB. XCL answered 8 MiB + 64 KiB
and 4 MiB + 128 KiB: a title sizing one heap for the group from it got
a heap that does not end on the alignment its resources need.

The arithmetic of both is now one function, `allocation_of`, which pads
the total to the largest alignment when there is more than one
resource. One resource's info is still the driver's or XG's as it is
(#108 asks #25 for each one alone); the per-resource offsets #108
writes are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants