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

Closed
github-bot wants to merge 1 commit from gh-pr/945/head into gh-pr/945/base
Owner

@⁠vedantdadhich21 on GitHub · 2026-11-24 09:21 UTC · original
vedantdadhich21:scripts/ban-phi-family → main · +26 −1 · 2 files · 1 commits · closed without merging

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.
**@⁠vedantdadhich21** on GitHub · 2026-11-24 09:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/945) `vedantdadhich21:scripts/ban-phi-family` → `main` · +26 −1 · 2 files · 1 commits · closed without merging `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.
CONTRIBUTING.md bans Phi and its distills, but the model filter only matched Phi followed immediately by an optional hyphen and digits. Descriptions naming Phi or Phi 4 passed the check. Match the family name itself and cover common spellings plus allowed-model controls.

Assisted-by: HungerG
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:37:53 +00:00
github-bot closed this pull request 2026-11-26 04:37:53 +00:00
Author
Owner

@⁠ettehn on GitHub · 2026-11-24 09:24 UTC · original

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).

**@⁠ettehn** on GitHub · 2026-11-24 09:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/945#issuecomment-7127373301) 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).
Author
Owner

@⁠vedantdadhich21 on GitHub · 2026-11-24 09:28 UTC · original

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** on GitHub · 2026-11-24 09:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/945#issuecomment-7127465893) 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.
Author
Owner

@⁠vedantdadhich21 on GitHub · 2026-11-24 09:30 UTC · original

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

**@⁠vedantdadhich21** on GitHub · 2026-11-24 09:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/945#issuecomment-7127502483) Closing this lower-impact policy-edge fix so review attention stays on the validation bypass fixed by #952.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.