Repository navigation
fix: cover Traditional Chinese in injection-chinese-core-override - #63
Conversation
Extend the Chinese override rule to Traditional Chinese spellings (無視, 不要理會, 規則, 提示詞), the verb 忽視/忽视, the scope words 以上/上述/前面, 所有 placed before the scope word, and spaces, tabs or full-width spaces between words. Whitespace does not cross line breaks. Narrow the bare noun 提示 to 提示词/提示詞/提示语/提示語. In everyday Chinese 提示 is also a UI hint or notice, so installer and support text such as "可以忽略上面的提示" matched. Add a false-positive fixture file for the rule. Bump pipelock-community to 2026.10.0 and refresh the compatibility contract digest, diagrams, and rule catalog. Signed-off-by: eeee2345 <eeee2345@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
| Layer / File(s) | Summary |
|---|---|
Expand Chinese override detection rules/pipelock-community/injection/chinese-override.yaml, published/pipelock-community/bundle.yaml, fixtures/pipelock-community/injection/injection-chinese-core-override-*.txt, CHANGELOG.md |
The rule adds Chinese variants and spacing options. Positive and false-positive fixtures cover override language and benign references. The changelog records the detection changes and narrowed 提示 matching. |
Update bundle release metadata scripts/compile.sh, published/pipelock-community/bundle.yaml, compatibility/contract.yaml, docs/rule-catalog.md |
The community bundle version changes from 2026.07.0 to 2026.10.0. The compatibility digest and catalog version are updated. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: luckypipewrench
Merge Risk: 
Minimal · previous review 8d690
-
The expanded rule and 2026.10.0 release metadata are internally consistent, with no actionable merge risk identified.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (7 skipped: 7 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
-
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
-
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
76af28d1-61a5-4ff0-a8f0-8ca94894db5c
⛔ Files ignored due to path filters: 6
-
assets/diagram-coverage-dark.svg is excluded by !**/*.svg
assets/diagram-coverage-light.svg is excluded by !**/*.svg
assets/diagram-pipeline-dark.svg is excluded by !**/*.svg
assets/diagram-pipeline-light.svg is excluded by !**/*.svg
assets/diagram-stats-strip-dark.svg is excluded by !**/*.svg
assets/diagram-stats-strip-light.svg is excluded by !**/*.svg
📒 Files selected for processing: 8
-
CHANGELOG.md
compatibility/contract.yaml
docs/rule-catalog.md
fixtures/pipelock-community/injection/injection-chinese-core-override-false-positive.txt
fixtures/pipelock-community/injection/injection-chinese-core-override-true-positive.txt
published/pipelock-community/bundle.yaml
rules/pipelock-community/injection/chinese-override.yaml
scripts/compile.sh
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
76af28d1-61a5-4ff0-a8f0-8ca94894db5c
⛔ Files ignored due to path filters: 6
-
assets/diagram-coverage-dark.svgis excluded by!**/*.svgassets/diagram-coverage-light.svgis excluded by!**/*.svgassets/diagram-pipeline-dark.svgis excluded by!**/*.svgassets/diagram-pipeline-light.svgis excluded by!**/*.svgassets/diagram-stats-strip-dark.svgis excluded by!**/*.svgassets/diagram-stats-strip-light.svgis excluded by!**/*.svg
📒 Files selected for processing: 8
-
CHANGELOG.mdcompatibility/contract.yamldocs/rule-catalog.mdfixtures/pipelock-community/injection/injection-chinese-core-override-false-positive.txtfixtures/pipelock-community/injection/injection-chinese-core-override-true-positive.txtpublished/pipelock-community/bundle.yamlrules/pipelock-community/injection/chinese-override.yamlscripts/compile.sh
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
|
Thanks for the PR! The Traditional Chinese coverage and the false-positive examples are helpful. Could you sign the CLA linked by the bot so I can move this toward merge? I'll handle the bundle signing on my end. |
|
@luckyPipewrench Signed, sorry for the wait. The CLA check is green now. Ready for review whenever you have time. |
|
Thanks for signing the CLA! Could you keep the wider Traditional Chinese coverage and restore the bare |
Restore the bare 提示 match as requested in review, keep the Traditional Chinese widening, and keep 忽略先前的提示 as a positive fixture. Drop the hint-text false-positive fixtures that match again.
|
@luckyPipewrench Done in 5e9bd6a. The rule matches the bare 提示 again and the Traditional Chinese widening is unchanged. 忽略先前的提示 is back as a positive fixture, next to 忽略先前的提示词. Since bare 提示 matches again, five hint and installer lines in the false-positive fixture (可以忽略上面的提示 and similar) would now fail, so I removed them and left that case for the separate change you mentioned. If you'd rather keep them in the tree until then, for example as known false positives that change can pick up, I can restore them that way. The CHANGELOG entry now says the bare noun still matches. With those five removed and 忽略先前的提示词 added, the fixture checks go from 605 to 601, and the
|
Failure cases now assert the error that should reject them, so another guard cannot mask a regression. Adds a configured-digest-precedence case and a trusted base commit without an official key.
rules verify ignores hidden and .bak directories and succeeds on none, so stage only names it will check and fail when nothing is staged.
Summary
The Chinese override rule only matched Simplified spellings and one fixed word order, so common Traditional Chinese (zh-TW / zh-HK) override phrasings were missed. It also matched ordinary installer and support text, because 提示 on its own usually means a UI hint or notice.
This PR widens the rule to cover Traditional spellings and a few common word orders. It also narrows the bare 提示 noun. The rule stays experimental.
Rules Added/Changed
Missed before, matched now (examples):
Matched before, no longer matched (false positives):
Trade-off: the bare form 忽略先前的提示 (with 提示 meaning "prompt") no longer matches. 提示词/提示詞/提示语/提示語 still match, and the existing fixture line now uses 忽略先前的提示词. If you would rather keep the recall, I can drop the narrowing and keep only the widening. In that case 以上/上述/前面 + 提示 would also match hint text such as 可以忽略以上的提示訊息.
Out of scope on purpose: these are different techniques, and broad patterns for them would match normal text. Examples are 覆寫系統提示, 你現在是…, 不要遵守之前的規則 and 忽略之前的設定. 忘記/忘记 is also left out, because negations and ordinary questions would match, for example 不要忘記之前的指示 and 我忘記之前的指令怎麼打了. Both are now false-positive fixtures.
Known false positives:
A regex cannot tell these apart from an override instruction, which is one reason the rule stays experimental.
Still not covered:
Bundle
pipelock-communityhealthcare-phi-piiThe bundle version is bumped to 2026.10.0, because check-version-bumps requires a bump when rules change. This PR also updates the CHANGELOG entry, the compatibility contract digest, the regenerated assets/, and docs/rule-catalog.md. I can change the version if you would rather fold this into another bundle version.
I don't have signing access, so bundle.yaml.sig is unchanged. "Validate bundle" and "Verify published signatures" will stay red until a maintainer re-signs it.
Testing
BUNDLE_NAME=pipelock-community make compilesucceeds (28 rules)BUNDLE_NAME=pipelock-community make test-fixturespasses (300 passed, 0 failed)BUNDLE_NAME=pipelock-community make validatepasses (Pipelock 3.6.0)make diagrams/make check-diagramsOK,make preflightOKscripts/check-version-bumps.shagainst main passes, pre-commit passes, yamllint on the compiled bundle passespublished/<bundle>/bundle.yamlEvery example above was checked against the old and new regex with Go's regexp package, using the
(?i)prefix the same way the fixture runner does.Checklist
[ \t\x{3000}]*){type}-{provider/technique})Summary by CodeRabbit