Skip to content

test(rules): verify embedded system rule integrity - #622

Closed
tomatotomata wants to merge 1 commit into
alibaba:mainfrom
tomatotomata:test/system-rules-integrity
Closed

test(rules): verify embedded system rule integrity#622
tomatotomata wants to merge 1 commit into
alibaba:mainfrom
tomatotomata:test/system-rules-integrity

Conversation

@tomatotomata

@tomatotomata tomatotomata commented Jul 31, 2026

Copy link
Copy Markdown

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.

@CLAassistant

CLAassistant commented Jul 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: No supported files changed.

@lizhengfeng101

Copy link
Copy Markdown
Collaborator

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

@tomatotomata

Copy link
Copy Markdown
Author

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.

@lizhengfeng101
lizhengfeng101 marked this pull request as ready for review July 31, 2026 12:02
@lizhengfeng101

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! This functionality was already merged via #629 — that's why you're seeing merge conflicts here. The integrity test is now in place on main.

Feel free to close this PR. We'd love to see you contribute to other areas of the project — check out the open issues if anything catches your eye!

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.

ci: add integrity test for system_rules.json and rule_docs consistency

3 participants