Skip to content

test: tighten UT preparation ownership and cost diagnostics - #29026

Merged
XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/test-infrastructure-20260917
Sep 17, 2026
Merged

XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/test-infrastructure-20260917

Conversation

@XuPeng-SH

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

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Improvement
  • Test and CI

Which issue(s) this PR fixes:

#28419

What this PR does / why we need it:

Improve UT cost attribution and the existing infrastructure without removing test cases or increasing cluster concurrency.

  • Reuse Makefile-prepared native artifacts only after the existing provenance verifier validates source, platform and build mode. Direct script calls and stale artifacts still run make cgo.
  • Reclaim completed optional embedded-prebuild slots instead of waiting for the oldest child. Preserve bounded child ownership, cancellation, diagnostics and run-local artifact cleanup.
  • Keep the original full-scope go test as the sole embedded test executor, including its timeout and output-drain behavior. Prebuild remains cache warming and is off by default.
  • Make HAKeeper client attempts inherit the existing startup deadline and make retry waiting cancellation-aware. Healthy retry cadence and readiness criteria are unchanged.
  • Distinguish explicitly released cluster admission from a package-exit upper bound and incomplete captures. Do not attribute later startless captures to terminated processes.
  • Align the script's diagnostic timeout default with the existing Makefile 120-minute default. This does not increase the Makefile budget and is not a speedup claim.

The long Arrow admission waits in two historical CI runs overlapped DML holder work. Summing those waits is not a valid estimate of suite time savings. The separate transaction optimization in #29027 addresses actual holder work; this PR does not change DML tests or production transaction behavior.

Validation

Local macOS/arm64, Go 1.26.4:

  • Full optools: PASS (50.666s); go vet, shell syntax and diff checks pass.
  • Full embed: normal PASS (41.787s), race PASS (61.698s); readiness helper race stress ×100 passes.
  • Authoritative-execution/cancellation contracts: race ×8/×20 pass.
  • Native build/provenance contracts and holder-generation regressions pass.
  • Real native preparation: after make cgo, verified reuse takes 0.51s without another make; redundant incremental make control takes 4.46s. Local evidence only.
  • Separate GPT-6 medium design and final infrastructure review: approved, no remaining source blockers.

Existing case selection, data, assertions, race mode and package concurrency are preserved.

Performance and limits

No whole-suite Linux speedup is claimed. Optional scheduling defaults remain unchanged; promotion requires comparable complete-run wall-time and memory evidence. No CI wait or merge is requested by this delivery.

@XuPeng-SH
XuPeng-SH requested a review from fengttt as a code owner September 16, 2026 17:00
@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 for exact head aec1200.

Scope reviewed: all 12 changed files, including optools/run_ut.sh, ut_tools.bash, the scheduler/holder/native tests, the UT cost-attribution summarizer, pkg/embed/operator.go and its tests, Makefile/workflow provenance wiring, and the design document.

Conclusion: no evidence-backed P0/P1/P2 blocker.

  • The optional embedded prebuild is bounded and build-only; the authoritative full-scope go test remains the sole executor. Prebuild failures fall back to the authoritative run, and scheduler tests cover success, failure, cancellation, cleanup, report handling, and the exactly-once execution invariant.
  • Native-artifact reuse is gated by provenance (OS/arch, accelerator, optimization, SIMSIMD); stale or missing provenance falls back to make cgo.
  • HAKeeper retries inherit the owner deadline and are cancellation-aware. The successful client/context ownership contract is covered by tests.
  • Cost diagnostics distinguish explicit admission release from process-exit upper bounds and unresolved/truncated captures; overlapping holders are not presented as wall-time savings. The script timeout default is aligned with the Makefile 120-minute hard timeout.
  • Required CI is green, including Ubuntu UT, coverage, native build/contract, shared build, and BVT checks. The PR is mergeable with no conflict; it is only behind the base branch.

This is a comment-only review because the PR is authored by the review requester.

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

approve

@XuPeng-SH
XuPeng-SH merged commit 86cf463 into matrixorigin:main Sep 17, 2026
15 of 18 checks passed
@XuPeng-SH
XuPeng-SH deleted the codex/test-infrastructure-20260917 branch September 17, 2026 01:22
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…igin#29026)

## What type of PR is this?

- [x] Improvement
- [x] Test and CI

## Which issue(s) this PR fixes:

matrixorigin#28419

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

Improve UT cost attribution and the existing infrastructure without
removing test cases or increasing cluster concurrency.

- Reuse Makefile-prepared native artifacts only after the existing
provenance verifier validates source, platform and build mode. Direct
script calls and stale artifacts still run `make cgo`.
- Reclaim completed optional embedded-prebuild slots instead of waiting
for the oldest child. Preserve bounded child ownership, cancellation,
diagnostics and run-local artifact cleanup.
- Keep the original full-scope `go test` as the sole embedded test
executor, including its timeout and output-drain behavior. Prebuild
remains cache warming and is **off by default**.
- Make HAKeeper client attempts inherit the existing startup deadline
and make retry waiting cancellation-aware. Healthy retry cadence and
readiness criteria are unchanged.
- Distinguish explicitly released cluster admission from a package-exit
upper bound and incomplete captures. Do not attribute later startless
captures to terminated processes.
- Align the script's diagnostic timeout default with the existing
Makefile 120-minute default. This does not increase the Makefile budget
and is not a speedup claim.

The long Arrow admission waits in two historical CI runs overlapped DML
holder work. Summing those waits is not a valid estimate of suite time
savings. The separate transaction optimization in matrixorigin#29027 addresses
actual holder work; this PR does not change DML tests or production
transaction behavior.

### Validation

Local macOS/arm64, Go 1.26.4:

- Full `optools`: PASS (50.666s); `go vet`, shell syntax and diff checks
pass.
- Full `embed`: normal PASS (41.787s), race PASS (61.698s); readiness
helper race stress ×100 passes.
- Authoritative-execution/cancellation contracts: race ×8/×20 pass.
- Native build/provenance contracts and holder-generation regressions
pass.
- Real native preparation: after `make cgo`, verified reuse takes 0.51s
without another make; redundant incremental make control takes 4.46s.
Local evidence only.
- Separate GPT-6 medium design and final infrastructure review:
approved, no remaining source blockers.

Existing case selection, data, assertions, race mode and package
concurrency are preserved.

### Performance and limits

No whole-suite Linux speedup is claimed. Optional scheduling defaults
remain unchanged; promotion requires comparable complete-run wall-time
and memory evidence. No CI wait or merge is requested by this delivery.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…igin#29026)

## What type of PR is this?

- [x] Improvement
- [x] Test and CI

## Which issue(s) this PR fixes:

matrixorigin#28419

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

Improve UT cost attribution and the existing infrastructure without
removing test cases or increasing cluster concurrency.

- Reuse Makefile-prepared native artifacts only after the existing
provenance verifier validates source, platform and build mode. Direct
script calls and stale artifacts still run `make cgo`.
- Reclaim completed optional embedded-prebuild slots instead of waiting
for the oldest child. Preserve bounded child ownership, cancellation,
diagnostics and run-local artifact cleanup.
- Keep the original full-scope `go test` as the sole embedded test
executor, including its timeout and output-drain behavior. Prebuild
remains cache warming and is **off by default**.
- Make HAKeeper client attempts inherit the existing startup deadline
and make retry waiting cancellation-aware. Healthy retry cadence and
readiness criteria are unchanged.
- Distinguish explicitly released cluster admission from a package-exit
upper bound and incomplete captures. Do not attribute later startless
captures to terminated processes.
- Align the script's diagnostic timeout default with the existing
Makefile 120-minute default. This does not increase the Makefile budget
and is not a speedup claim.

The long Arrow admission waits in two historical CI runs overlapped DML
holder work. Summing those waits is not a valid estimate of suite time
savings. The separate transaction optimization in matrixorigin#29027 addresses
actual holder work; this PR does not change DML tests or production
transaction behavior.

### Validation

Local macOS/arm64, Go 1.26.4:

- Full `optools`: PASS (50.666s); `go vet`, shell syntax and diff checks
pass.
- Full `embed`: normal PASS (41.787s), race PASS (61.698s); readiness
helper race stress ×100 passes.
- Authoritative-execution/cancellation contracts: race ×8/×20 pass.
- Native build/provenance contracts and holder-generation regressions
pass.
- Real native preparation: after `make cgo`, verified reuse takes 0.51s
without another make; redundant incremental make control takes 4.46s.
Local evidence only.
- Separate GPT-6 medium design and final infrastructure review:
approved, no remaining source blockers.

Existing case selection, data, assertions, race mode and package
concurrency are preserved.

### Performance and limits

No whole-suite Linux speedup is claimed. Optional scheduling defaults
remain unchanged; promotion requires comparable complete-run wall-time
and memory evidence. No CI wait or merge is requested by this delivery.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement kind/test-ci size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants