PR checks: reject the Phi family in every common spelling #939

Closed
vedantdadhich21 wants to merge 1 commit from upstream-pr/945 into main
vedantdadhich21 commented 2026-11-24 09:21:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vedantdadhich21 on 2026-11-24T09:21:06Z.


CONTRIBUTING.md bans Phi and its distills, but the PR checker only matched Phi when it was followed immediately by an optional hyphen and digits. A description naming Phi, Phi 4, or PHI 3.5 therefore passed the model check.

What is in it

  • scripts/pr_check.py: match the Phi family name itself without changing the existing compact-name behavior of the other banned families.
  • scripts/test_pr_check.py: cover common Phi spellings, compact banned-family names, a Philip negative control, and allowed-model controls.

Tested

  • macOS arm64 (Darwin 27), Python 3.13.5, commit a1b5ecf47690767c4546fe362e4159bb7b95dca0.
  • python3 -B -m unittest discover -s scripts -p 'test_pr_check.py' -v: 7 passed, 0 failed.
  • Before the fix, the new Phi cases failed for Phi, Phi 4, Phi4, and PHI 3.5.
  • An initial regex revision regressed Qwen3, Llama3, and Gemma2; the final revision keeps those rejected and is covered by regression tests.
  • python3 -B -m py_compile scripts/pr_check.py scripts/test_pr_check.py: passed.
  • git diff --check origin/main...HEAD: passed.

Regression run

  • Not a runtime change; crates/xcl/src is untouched.

Not tested

  • The Rust workspace and GPU suite: this change is Python-only and the machine is macOS.
  • The GitHub PR checks workflow itself.

AI use

  • HungerG, an AI coding assistant (underlying model not disclosed): found the gap, wrote the fix and tests, ran the commands above, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:6578577353 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/945). Originally posted by [vedantdadhich21](https://github.com/vedantdadhich21) on 2026-11-24T09:21:06Z. --- `CONTRIBUTING.md` bans Phi and its distills, but the PR checker only matched `Phi` when it was followed immediately by an optional hyphen and digits. A description naming `Phi`, `Phi 4`, or `PHI 3.5` therefore passed the model check. **What is in it** - `scripts/pr_check.py`: match the Phi family name itself without changing the existing compact-name behavior of the other banned families. - `scripts/test_pr_check.py`: cover common Phi spellings, compact banned-family names, a `Philip` negative control, and allowed-model controls. **Tested** - macOS arm64 (Darwin 27), Python 3.13.5, commit `a1b5ecf47690767c4546fe362e4159bb7b95dca0`. - `python3 -B -m unittest discover -s scripts -p 'test_pr_check.py' -v`: 7 passed, 0 failed. - Before the fix, the new Phi cases failed for `Phi`, `Phi 4`, `Phi4`, and `PHI 3.5`. - An initial regex revision regressed `Qwen3`, `Llama3`, and `Gemma2`; the final revision keeps those rejected and is covered by regression tests. - `python3 -B -m py_compile scripts/pr_check.py scripts/test_pr_check.py`: passed. - `git diff --check origin/main...HEAD`: passed. **Regression run** - Not a runtime change; `crates/xcl/src` is untouched. **Not tested** - The Rust workspace and GPU suite: this change is Python-only and the machine is macOS. - The GitHub `PR checks` workflow itself. **AI use** - HungerG, an AI coding assistant (underlying model not disclosed): found the gap, wrote the fix and tests, ran the commands above, and drafted this description.
upstream-sync closed this pull request 2026-11-24 10:04:26 +00:00
ettehn commented 2026-11-24 10:04:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-24T09:24:33Z.


On Windows at afd1594, four regression cases fail: Phi4, Qwen3, Llama3, and Gemma2. The new trailing word boundary applies to every alternative, so it also changes existing behavior outside the Phi family.

Keeping the original family alternatives and limiting the new condition to phi(?=\b|\d) fixed all four locally. All six unittest methods then passed, including the existing spaced and hyphenated cases and a Philip negative control.

Verification assisted by OpenAI Codex (GPT-6.2 Astra).

<!-- greyfinch-sync:ivall/xcl:comment:7127373301 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/945#issuecomment-7127373301). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-24T09:24:33Z. --- On Windows at `afd1594`, four regression cases fail: `Phi4`, `Qwen3`, `Llama3`, and `Gemma2`. The new trailing word boundary applies to every alternative, so it also changes existing behavior outside the Phi family. Keeping the original family alternatives and limiting the new condition to `phi(?=\b|\d)` fixed all four locally. All six unittest methods then passed, including the existing spaced and hyphenated cases and a `Philip` negative control. Verification assisted by OpenAI Codex (GPT-6.2 Astra).
vedantdadhich21 commented 2026-11-24 10:04:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vedantdadhich21 on 2026-11-24T09:28:35Z.


Thanks for catching that. Fixed in a1b5ecf: the original family alternatives are unchanged, and only Phi gets the new boundary/digit lookahead. Added regression cases for Qwen3, Llama3, Gemma2, Phi4, and a Philip negative control. All 7 unittest methods pass on macOS.

<!-- greyfinch-sync:ivall/xcl:comment:7127465893 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/945#issuecomment-7127465893). Originally posted by [vedantdadhich21](https://github.com/vedantdadhich21) on 2026-11-24T09:28:35Z. --- Thanks for catching that. Fixed in a1b5ecf: the original family alternatives are unchanged, and only Phi gets the new boundary/digit lookahead. Added regression cases for Qwen3, Llama3, Gemma2, Phi4, and a Philip negative control. All 7 unittest methods pass on macOS.
vedantdadhich21 commented 2026-11-24 10:04:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vedantdadhich21 on 2026-11-24T09:30:07Z.


Closing this lower-impact policy-edge fix so review attention stays on the validation bypass fixed by #952.

<!-- greyfinch-sync:ivall/xcl:comment:7127502483 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/945#issuecomment-7127502483). Originally posted by [vedantdadhich21](https://github.com/vedantdadhich21) on 2026-11-24T09:30:07Z. --- Closing this lower-impact policy-edge fix so review attention stays on the validation bypass fixed by #952.

Pull request closed

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!939
No description provided.