open-code-review icon indicating copy to clipboard operation
open-code-review copied to clipboard

test(rules): verify embedded system rule integrity

Open tomatotomata opened this issue 4 months ago • 5 comments

Summary

Closes #620.

  • add an embedded-resource integrity test for system_rules.json and rule_docs/
  • detect duplicate path patterns by streaming the JSON object rather than decoding into a map
  • validate expanded doublestar patterns, missing rule files, and orphan Markdown files

Validation

  • go test ./internal/config/rules passes
  • git diff --check passes
  • go test -race could not run locally because this Windows environment has cgo disabled

The change is limited to the existing rules test file and uses the existing doublestar dependency.

tomatotomata avatar Jul 31 '26 03:07 tomatotomata

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 31 '26 03:07 CLAassistant

✅ OpenCodeReview: No supported files changed.

github-actions[bot] avatar Jul 31 '26 04:07 github-actions[bot]

@tomatotomata Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

lizhengfeng101 avatar Jul 31 '26 04:07 lizhengfeng101

I checked the CLA status on #622 and it is still pending on the check, so I am leaving the PR draft while that status updates. I also refreshed the PR with the current validation details: go test ./internal/config/rules passes locally, and the diff stays limited to the existing rules test file.

tomatotomata avatar Jul 31 '26 11:07 tomatotomata

I checked the CLA status on #622 and it is still pending on the check, so I am leaving the PR draft while that status updates. I also refreshed the PR with the current validation details: go test ./internal/config/rules passes locally, and the diff stays limited to the existing rules test file.

@tomatotomata It may be that the signed email account and the commit email account are inconsistent.

lizhengfeng101 avatar Jul 31 '26 12:07 lizhengfeng101