Skip to content

test: repair CI TERM handshakes, port candidates, and TopN coverage - #29978

Merged
XuPeng-SH merged 5 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/roi-ci-contracts-20261012
Oct 12, 2026
Merged

XuPeng-SH merged 5 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/roi-ci-contracts-20261012

Conversation

@XuPeng-SH

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:

Fixes #29960
Fixes #29968

Related CI failure: #29921.

What this PR does / why we need it:

The TERM/PID fixture could acknowledge a signal before its trap returned. The sender then issued the next TERM too early and stalled waiting for an acknowledgment. A timeout's extra TERM could release the stall and misleadingly print TERMS 200. Acknowledgments now come from ordinary main-loop execution after the trap returns, with sequence/readiness assertions. A sender failure publishes its completion marker so the main process can join it and report the protocol error promptly.

Logservice test listener candidates previously overlapped automatic client-port allocation. Probes closed their sockets before service startup; outbound traffic could occupy a candidate in that gap. On Linux, the existing allocator now excludes the configured inclusive ip_local_port_range, choosing the larger remaining interval while preserving its probes, process-local uniqueness and bounded attempts. The existing gossip topology and restart/convergence assertions remain exercised.

TopN's unsupported-type regression used T_any, whose domainless NULL values now have a comparator. It now rejects T_tuple and positively exercises flat/constant all-NULL ANY keys across reset generations with source-row and mpool cleanup assertions. This adopts Lundomn's original #29975 commit fbc1abc9f7bfdda6d907904d03ef34cb4793eac8, preserving authorship, and closes partial batch-construction cleanup in a follow-up. The CI corrections are consolidated here as requested.

Validation

Linux/amd64, Go 1.27.1, CGo enabled, matrixone_test, bounded build/test concurrency. Matching native source/platform/profile provenance was verified before using the repository CGo test wrapper.

  • Full optools, pkg/logservice, and pkg/sql/colexec/partition packages pass in normal and race modes.
  • The three TERM/TopN regression tests pass with set coverage instrumentation; this is focused mode validation, not a full CI coverage-threshold verdict.
  • TERM regression passes 100 focused race repetitions; the gossip consumer including restart passes five focused race repetitions.
  • Modern PID and legacy fallback script controls complete all 200 signals. Mutating the same script to publish ACK inside the trap is rejected immediately with exit 98 in both controls.
  • Configured port-range, exhausted/invalid range, probe-error, occupied TCP/UDP, and socket cleanup controls pass.
  • Incremental repository lint reports zero issues; vet, gofmt and diff whitespace checks pass for the complete affected closure.
  • gpt-6.1-sol / xhigh produced the design and reviewed the complete final change. No unresolved material findings.

The fix adds no sleeps, retry loops, reduced topology, or skipped coverage. Port probing still has an interval before the actual bind, so independent explicit binders can race it. Non-Linux uses a conservative candidate ceiling suitable for default macOS ranges; customized non-Linux ephemeral ranges are not inspected. BVT is not applicable to these CI/test-fixture contracts. Remote CI is pending after publication.

@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 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · superseded

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

new same-head PR feedback/CI evidence requires a fresh task

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · failed

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

Coverage fails because TRUNCATE lifecycle tests do not expect Snapshot(). Independence from this PR lacks the required baseline/control evidence.

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · failed

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

Coverage aggregation fails because its upstream UT coverage producer failed. The upstream failure still lacks baseline/control evidence establishing independence from this PR.

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · done

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

Final review accepts the unchanged candidate and independent baseline-test diagnosis. Affected-package race and coverage tests and repository SCA pass. Overall CI still fails on the inherited TRUNCATE mock mismatch; reuse #29971 without an immediate rerun.

Cause issue: #30006

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · failed

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

unresolved or indeterminate merge conflict requires a rebase plan; an independent CI diagnosis does not resolve it

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · failed

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

Implementation is blocked by a coordinator handoff mismatch: the checkpoint reports rebased=true, but the checkout remains clean at the original head and lacks the diagnosed target commit. A coherent resolution patch is prepared in diagnostics; source remains unchanged.

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · done

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

Approved the exact committed candidate. Applicable validation is complete; no unresolved material findings.

Cause issue: #30006
Verified commit: 9c45883; fresh CI is pending

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot work · mo-bot-local · superseded

Commit: 842d80631c75c17c3361bc6afea7da80df296b6e

new same-head PR feedback/CI evidence requires a fresh task

@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 9c45883ae41ba1d8192463e59cbb3c908baf1126

Assessment: approve

Reviewed the complete four-file delta, affected callers, cleanup paths, and frozen comments. TERM sequencing, ephemeral-port exclusion, and TopN fixture ownership are sound. No actionable defects remain.

Model: gpt-6-astra / xhigh

Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0

Validation:

  • Verified HEAD, merge-base, patch identity, whitespace, and unchanged source checkout.

  • Traced TERM success, sender failure, timeout, and cleanup; port allocation/probe errors and gossip consumers; TopN partial construction, ownership transfer, reset, and cleanup.

  • A standard-library-only probe using extracted source passed 348,275 configured ranges, single-port exhaustion, and equal-interval controls. This was not a MatrixOne integration test.

  • Reused author-reported exact-candidate normal/race package tests, focused coverage tests, TERM stress and mutation controls, gossip restart repetitions, and static checks.

  • Recorded complete coverage and comment dispositions in attempt-1/review-evidence.json.

Limitations:

  • Fresh CI remained pending in the frozen snapshot. No pending check was counted as passing, and native package tests were not rerun.

  • Raw author logs and original linked-issue bodies were unavailable; validation reuse relies on the frozen reports identifying the verified commit.

  • Port probes still permit races with explicit binders, and customized non-Linux ephemeral ranges are not inspected. These limits are documented.

  • No performance benchmark or full coverage-threshold verdict was produced.

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

mo-bot review · mo-bot-local · review

Commit: 9c45883ae41ba1d8192463e59cbb3c908baf1126

Assessment: approve

Reviewed the complete four-file delta, affected callers, cleanup paths, and frozen comments. TERM sequencing, ephemeral-port exclusion, and TopN fixture ownership are sound. No actionable defects remain.

Model: gpt-6-astra / xhigh

Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0

Validation:

  • Verified HEAD, merge-base, patch identity, whitespace, and unchanged source checkout.

  • Traced TERM success, sender failure, timeout, and cleanup; port allocation/probe errors and gossip consumers; TopN partial construction, ownership transfer, reset, and cleanup.

  • A standard-library-only probe using extracted source passed 348,275 configured ranges, single-port exhaustion, and equal-interval controls. This was not a MatrixOne integration test.

  • Reused author-reported exact-candidate normal/race package tests, focused coverage tests, TERM stress and mutation controls, gossip restart repetitions, and static checks.

  • Recorded complete coverage and comment dispositions in attempt-1/review-evidence.json.

Limitations:

  • Fresh CI remained pending in the frozen snapshot. No pending check was counted as passing, and native package tests were not rerun.

  • Raw author logs and original linked-issue bodies were unavailable; validation reuse relies on the frozen reports identifying the verified commit.

  • Port probes still permit races with explicit binders, and customized non-Linux ephemeral ranges are not inspected. These limits are documented.

  • No performance benchmark or full coverage-threshold verdict was produced.

This branch had an error being deployed

1 failed deployment
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

3 participants