Skip to content

ci: select test suites for test-only and documentation changes - #28543

Merged
XuPeng-SH merged 1 commit into
matrixorigin:mainfrom
XuPeng-SH:codex/ci-change-scope-20260910
Sep 9, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:mainfrom
XuPeng-SH:codex/ci-change-scope-20260910

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fix #28419

What this PR does / why we need it:

This PR makes the MatrixOne PR entrypoint select the smallest complete CI scope for test-only and documentation-only changes, while failing closed for every ambiguous or unsafe case.

  • pkg/**/*_test.go only: run the existing UT/SCA workflow.
  • Distributed case .sql, .test, and .result files only: run the shared build and both complementary BVT workflows.
  • A narrow allowlist of documentation-only changes: run documentation whitespace and PR validation checks.
  • Production code, helpers, fixtures, configuration, dependencies, CI/workflow changes, mixed UT+BVT changes, deletions with unsafe classification, and unknown paths: run the full CI pipeline.

Renames inspect both old and new paths. Empty, incomplete, capped, duplicated, malformed, or unavailable file lists fall back to full CI. The PR head/base revision is checked before and after classification; a revision change fails the old run. CI_FORCE_FULL=true is supported as a repository Actions variable override.

The classification and aggregate gates execute trusted code from the PR base SHA. The documentation job checks the PR diff without executing PR code. Existing 3.0-dev routing is preserved. No branch-protection or CI-repository change is required.

The established required-check names remain present through six lightweight aggregate gates. Each gate requires PR validation, classification, and every suite selected for its scope to succeed; failed, cancelled, skipped, missing, or ineligible selected jobs cannot become a pass. Reusable workflow callers use distinct execution names to avoid duplicate status names.

Coverage is intentionally evaluated only for full-scope changes. Scoped test/documentation runs explicitly report that coverage was not evaluated and do not reuse or fabricate profiles from another commit. Existing BVT instrumentation is unchanged. Test deletion can still reduce coverage and should be reviewed with CI_FORCE_FULL=true.

The classifier and routing contract are covered by Node tests for path classification, rename/deletion handling, malformed and incomplete API results, revision races, failed/cancelled/skipped gates, coverage eligibility, workflow routing, and required-check names.

Validation

  • node --test .github/ci/change-scope.test.cjs
  • actionlint 1.7.12
  • git diff --check

Full MatrixOne UT/BVT was not run locally because this PR changes CI routing rather than MatrixOne production code. The actual Actions routing must be verified after rollout to the target branch; this PR itself is classified as full because it changes workflow and CI files.

@XuPeng-SH
XuPeng-SH requested a review from fengttt as a code owner September 9, 2026 17:41
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force review of current head f8453cd.

结论:未发现已确认的安全或正确性阻塞问题。分类器对未知、缺失、重复、截断、重命名和 revision 漂移采取 fail-closed;trusted base checkout 与无 secrets 的 scope contract workflow 方向正确,aggregate gate 也不会把 selected job 的 skipped、failed 或 missing 当成通过。

仍建议补充以下验收证据:

  • 在真实 pull_request_target 场景验证 fork PR、force-push/同步竞态、base 分支变更和 API 分页异常,确认旧 run 不会错误地产生绿色 required check;
  • 验证 GitHub branch protection 对矩阵 aggregate check 名称的实际呈现,尤其 docs、ut、bvt、full 四种 scope 下 skipped reusable workflow 与 ci-required 的组合;
  • 增加恶意重命名、删除测试、测试辅助代码以及 workflow 自身修改的端到端路由回归;
  • 明确 upgrade/utils 等未纳入 scope gate 的既有检查是否确实不属于 required contract,并补一份真实 Actions 前后耗时与 coverage 影响数据。当前主要是 Node contract tests,尚不能证明线上路由已生效。

按自有 PR 规则,本次仅提交 COMMENT。

@XuPeng-SH
XuPeng-SH merged commit 5f598e7 into matrixorigin:main Sep 9, 2026
54 of 56 checks passed
@XuPeng-SH
XuPeng-SH deleted the codex/ci-change-scope-20260910 branch September 9, 2026 17:59
XuPeng-SH added a commit that referenced this pull request Sep 9, 2026
## What type of PR is this?

- [x] Test and CI

## Which issue(s) this PR fixes:

fix #28419 

## What this PR does / why we need it:

Replace the six identical aggregate jobs introduced by #28543 with one
`CI Required` job. This removes five redundant runner allocations per
run and stops presenting the aggregate result under individual
UT/SCA/BVT/coverage names.

The existing dependency list, scope classifier, prerequisite verifier,
trusted-base checkout and cancellation behavior are unchanged. Actual
test jobs keep their current execution names. Contract tests enforce one
aggregate job and the complete dependency list, while retaining
failure/cancellation/skipping/missing-result and coverage-eligibility
cases.

Rollout: after merging, verify a new Actions run emits `CI Required`,
then replace the six former required contexts in main branch protection
with `CI Required` from GitHub Actions (app ID 15368). Preserve
strict/up-to-date and unrelated protections. The pull_request_target
workflow uses the target branch, so this PR itself still runs the old
gates. Until protection is switched, new runs may show the old required
names as pending. No CI-repository changes are needed.

Validation: all seven Node contract test groups passed (`node --test
.github/ci/change-scope.test.cjs`); `git diff --check` passed. No
database tests were needed for this workflow-only consolidation. Live
single-job check creation remains a post-merge rollout check.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…xorigin#28543)

## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fix matrixorigin#28419

## What this PR does / why we need it:

This PR makes the MatrixOne PR entrypoint select the smallest complete
CI scope for test-only and documentation-only changes, while failing
closed for every ambiguous or unsafe case.

- `pkg/**/*_test.go` only: run the existing UT/SCA workflow.
- Distributed case `.sql`, `.test`, and `.result` files only: run the
shared build and both complementary BVT workflows.
- A narrow allowlist of documentation-only changes: run documentation
whitespace and PR validation checks.
- Production code, helpers, fixtures, configuration, dependencies,
CI/workflow changes, mixed UT+BVT changes, deletions with unsafe
classification, and unknown paths: run the full CI pipeline.

Renames inspect both old and new paths. Empty, incomplete, capped,
duplicated, malformed, or unavailable file lists fall back to full CI.
The PR head/base revision is checked before and after classification; a
revision change fails the old run. `CI_FORCE_FULL=true` is supported as
a repository Actions variable override.

The classification and aggregate gates execute trusted code from the PR
base SHA. The documentation job checks the PR diff without executing PR
code. Existing 3.0-dev routing is preserved. No branch-protection or
CI-repository change is required.

The established required-check names remain present through six
lightweight aggregate gates. Each gate requires PR validation,
classification, and every suite selected for its scope to succeed;
failed, cancelled, skipped, missing, or ineligible selected jobs cannot
become a pass. Reusable workflow callers use distinct execution names to
avoid duplicate status names.

Coverage is intentionally evaluated only for full-scope changes. Scoped
test/documentation runs explicitly report that coverage was not
evaluated and do not reuse or fabricate profiles from another commit.
Existing BVT instrumentation is unchanged. Test deletion can still
reduce coverage and should be reviewed with `CI_FORCE_FULL=true`.

The classifier and routing contract are covered by Node tests for path
classification, rename/deletion handling, malformed and incomplete API
results, revision races, failed/cancelled/skipped gates, coverage
eligibility, workflow routing, and required-check names.

## Validation

- `node --test .github/ci/change-scope.test.cjs`
- `actionlint 1.7.12`
- `git diff --check`

Full MatrixOne UT/BVT was not run locally because this PR changes CI
routing rather than MatrixOne production code. The actual Actions
routing must be verified after rollout to the target branch; this PR
itself is classified as `full` because it changes workflow and CI files.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…#28547)

## What type of PR is this?

- [x] Test and CI

## Which issue(s) this PR fixes:

fix matrixorigin#28419 

## What this PR does / why we need it:

Replace the six identical aggregate jobs introduced by matrixorigin#28543 with one
`CI Required` job. This removes five redundant runner allocations per
run and stops presenting the aggregate result under individual
UT/SCA/BVT/coverage names.

The existing dependency list, scope classifier, prerequisite verifier,
trusted-base checkout and cancellation behavior are unchanged. Actual
test jobs keep their current execution names. Contract tests enforce one
aggregate job and the complete dependency list, while retaining
failure/cancellation/skipping/missing-result and coverage-eligibility
cases.

Rollout: after merging, verify a new Actions run emits `CI Required`,
then replace the six former required contexts in main branch protection
with `CI Required` from GitHub Actions (app ID 15368). Preserve
strict/up-to-date and unrelated protections. The pull_request_target
workflow uses the target branch, so this PR itself still runs the old
gates. Until protection is switched, new runs may show the old required
names as pending. No CI-repository changes are needed.

Validation: all seven Node contract test groups passed (`node --test
.github/ci/change-scope.test.cjs`); `git diff --check` passed. No
database tests were needed for this workflow-only consolidation. Live
single-job check creation remains a post-merge rollout check.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…xorigin#28543)

## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fix matrixorigin#28419

## What this PR does / why we need it:

This PR makes the MatrixOne PR entrypoint select the smallest complete
CI scope for test-only and documentation-only changes, while failing
closed for every ambiguous or unsafe case.

- `pkg/**/*_test.go` only: run the existing UT/SCA workflow.
- Distributed case `.sql`, `.test`, and `.result` files only: run the
shared build and both complementary BVT workflows.
- A narrow allowlist of documentation-only changes: run documentation
whitespace and PR validation checks.
- Production code, helpers, fixtures, configuration, dependencies,
CI/workflow changes, mixed UT+BVT changes, deletions with unsafe
classification, and unknown paths: run the full CI pipeline.

Renames inspect both old and new paths. Empty, incomplete, capped,
duplicated, malformed, or unavailable file lists fall back to full CI.
The PR head/base revision is checked before and after classification; a
revision change fails the old run. `CI_FORCE_FULL=true` is supported as
a repository Actions variable override.

The classification and aggregate gates execute trusted code from the PR
base SHA. The documentation job checks the PR diff without executing PR
code. Existing 3.0-dev routing is preserved. No branch-protection or
CI-repository change is required.

The established required-check names remain present through six
lightweight aggregate gates. Each gate requires PR validation,
classification, and every suite selected for its scope to succeed;
failed, cancelled, skipped, missing, or ineligible selected jobs cannot
become a pass. Reusable workflow callers use distinct execution names to
avoid duplicate status names.

Coverage is intentionally evaluated only for full-scope changes. Scoped
test/documentation runs explicitly report that coverage was not
evaluated and do not reuse or fabricate profiles from another commit.
Existing BVT instrumentation is unchanged. Test deletion can still
reduce coverage and should be reviewed with `CI_FORCE_FULL=true`.

The classifier and routing contract are covered by Node tests for path
classification, rename/deletion handling, malformed and incomplete API
results, revision races, failed/cancelled/skipped gates, coverage
eligibility, workflow routing, and required-check names.

## Validation

- `node --test .github/ci/change-scope.test.cjs`
- `actionlint 1.7.12`
- `git diff --check`

Full MatrixOne UT/BVT was not run locally because this PR changes CI
routing rather than MatrixOne production code. The actual Actions
routing must be verified after rollout to the target branch; this PR
itself is classified as `full` because it changes workflow and CI files.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…#28547)

## What type of PR is this?

- [x] Test and CI

## Which issue(s) this PR fixes:

fix matrixorigin#28419 

## What this PR does / why we need it:

Replace the six identical aggregate jobs introduced by matrixorigin#28543 with one
`CI Required` job. This removes five redundant runner allocations per
run and stops presenting the aggregate result under individual
UT/SCA/BVT/coverage names.

The existing dependency list, scope classifier, prerequisite verifier,
trusted-base checkout and cancellation behavior are unchanged. Actual
test jobs keep their current execution names. Contract tests enforce one
aggregate job and the complete dependency list, while retaining
failure/cancellation/skipping/missing-result and coverage-eligibility
cases.

Rollout: after merging, verify a new Actions run emits `CI Required`,
then replace the six former required contexts in main branch protection
with `CI Required` from GitHub Actions (app ID 15368). Preserve
strict/up-to-date and unrelated protections. The pull_request_target
workflow uses the target branch, so this PR itself still runs the old
gates. Until protection is switched, new runs may show the old required
names as pending. No CI-repository changes are needed.

Validation: all seven Node contract test groups passed (`node --test
.github/ci/change-scope.test.cjs`); `git diff --check` passed. No
database tests were needed for this workflow-only consolidation. Live
single-job check creation remains a post-merge rollout check.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…xorigin#28543)

## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fix matrixorigin#28419

## What this PR does / why we need it:

This PR makes the MatrixOne PR entrypoint select the smallest complete
CI scope for test-only and documentation-only changes, while failing
closed for every ambiguous or unsafe case.

- `pkg/**/*_test.go` only: run the existing UT/SCA workflow.
- Distributed case `.sql`, `.test`, and `.result` files only: run the
shared build and both complementary BVT workflows.
- A narrow allowlist of documentation-only changes: run documentation
whitespace and PR validation checks.
- Production code, helpers, fixtures, configuration, dependencies,
CI/workflow changes, mixed UT+BVT changes, deletions with unsafe
classification, and unknown paths: run the full CI pipeline.

Renames inspect both old and new paths. Empty, incomplete, capped,
duplicated, malformed, or unavailable file lists fall back to full CI.
The PR head/base revision is checked before and after classification; a
revision change fails the old run. `CI_FORCE_FULL=true` is supported as
a repository Actions variable override.

The classification and aggregate gates execute trusted code from the PR
base SHA. The documentation job checks the PR diff without executing PR
code. Existing 3.0-dev routing is preserved. No branch-protection or
CI-repository change is required.

The established required-check names remain present through six
lightweight aggregate gates. Each gate requires PR validation,
classification, and every suite selected for its scope to succeed;
failed, cancelled, skipped, missing, or ineligible selected jobs cannot
become a pass. Reusable workflow callers use distinct execution names to
avoid duplicate status names.

Coverage is intentionally evaluated only for full-scope changes. Scoped
test/documentation runs explicitly report that coverage was not
evaluated and do not reuse or fabricate profiles from another commit.
Existing BVT instrumentation is unchanged. Test deletion can still
reduce coverage and should be reviewed with `CI_FORCE_FULL=true`.

The classifier and routing contract are covered by Node tests for path
classification, rename/deletion handling, malformed and incomplete API
results, revision races, failed/cancelled/skipped gates, coverage
eligibility, workflow routing, and required-check names.

## Validation

- `node --test .github/ci/change-scope.test.cjs`
- `actionlint 1.7.12`
- `git diff --check`

Full MatrixOne UT/BVT was not run locally because this PR changes CI
routing rather than MatrixOne production code. The actual Actions
routing must be verified after rollout to the target branch; this PR
itself is classified as `full` because it changes workflow and CI files.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…#28547)

## What type of PR is this?

- [x] Test and CI

## Which issue(s) this PR fixes:

fix matrixorigin#28419 

## What this PR does / why we need it:

Replace the six identical aggregate jobs introduced by matrixorigin#28543 with one
`CI Required` job. This removes five redundant runner allocations per
run and stops presenting the aggregate result under individual
UT/SCA/BVT/coverage names.

The existing dependency list, scope classifier, prerequisite verifier,
trusted-base checkout and cancellation behavior are unchanged. Actual
test jobs keep their current execution names. Contract tests enforce one
aggregate job and the complete dependency list, while retaining
failure/cancellation/skipping/missing-result and coverage-eligibility
cases.

Rollout: after merging, verify a new Actions run emits `CI Required`,
then replace the six former required contexts in main branch protection
with `CI Required` from GitHub Actions (app ID 15368). Preserve
strict/up-to-date and unrelated protections. The pull_request_target
workflow uses the target branch, so this PR itself still runs the old
gates. Until protection is switched, new runs may show the old required
names as pending. No CI-repository changes are needed.

Validation: all seven Node contract test groups passed (`node --test
.github/ci/change-scope.test.cjs`); `git diff --check` passed. No
database tests were needed for this workflow-only consolidation. Live
single-job check creation remains a post-merge rollout check.

This branch was previously deployed

1 inactive deployment
ci — f8453cd6 Deployed Sep 9, 2026 by XuPeng-SH via Matrixone Utils CI / Coverage #52253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: UT coverage producer hits 60-minute timeout and cascades Coverage failure

3 participants