Skip to content

fix(ci): preserve SCA compatibility and explain full-scan fallback - #31142

Merged
XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
XuPeng-SH:fix/ci-memory-main
Oct 26, 2026
Merged

XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
XuPeng-SH:fix/ci-memory-main

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Oct 25, 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:

Related to #29562.

What this PR does / why we need it:

Recent SCA job 121193349037 silently ran a full graph because Node was missing from the shell PATH, despite an existing incremental selector. Its frozen PR inputs would have selected 34 of 507 packages.

  • Preserve compatibility with deployed CI: when Node is absent, explicitly report the reason, validate the complete graph and run both analyzers over ./.... Node-present CI retains incremental selection; selector failures stay fatal. Local invocations still run the complete graph.
  • Explain conservative fallback decisions and report selected/total package counts on stderr, keeping stdout exclusively package arguments.
  • Reuse existing immutable-input selection, package ownership and reverse-import graph. Preserve full-scan overrides, discovery failures, analyzer failures and both analyzers' identical package scope.
  • Add regression coverage at the real Make/Go discovery boundary for missing runtime, dirty/ignored inputs, closure thresholds and transitive test imports.

Companion CI PR: matrixorigin/CI#469. It exposes the runner's existing Node without a download and safely restores incremental license selection. Both merge orders are supported; older CI uses complete checks until the runtime enhancement is deployed.

Validation

  • node --test .github/ci/*.test.cjs: 36 passed on the compatibility correction, including real Go discovery, missing-Node full execution, graph failure, and both analyzer failure paths.
  • Both configured analyzers passed in matched full/incremental experiments under 4 CPU / 8 GiB, with warmed compiled exports and separate cold analyzer caches: elapsed 313.54s → 113.54s (-63.8%); peak working set 7.95 GiB → 5.75 GiB (-27.6%); raw cgroup peak 8.00 GiB → 5.96 GiB; no OOM.
  • The benchmark uses PR fix(sql): keep foreign-key integrity through restore and deferred FK binding (#30615) #31105's historical changed-file list against the same frozen application source. It bypasses dirty-checkout rejection only to measure selection; the public-interface fixtures separately verify immutable provenance. These are local measurements, not promised hosted-CI timings.
  • git diff --check passed. No Go implementation changes, so Go race detection is not applicable; JavaScript fixture tests cover this delta.
  • Existing molint pin/rules, analyzer concurrency and GC settings are unchanged. Hosted CI remains pending. Coverage UT admission and linter-driver upgrades are separate work.

CI compatibility correction

Failed job 121266163435 used CI 30b0e58, before the companion PR exposed Node on PATH. The hard runtime prerequisite has been removed: missing Node now retains complete validation with an explicit diagnostic. Incremental savings require deployment of the companion runtime enhancement; this correction does not claim savings on older CI. Hosted verification of the correction remains pending.

@XuPeng-SH
XuPeng-SH requested a review from fengttt as a code owner October 25, 2026 19:18
@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 25, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 1a0eada94e13d6cf9abfc7f07e755ad718d5dbc4

Review completed. Read the assessment.

@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: 1a0eada94e13d6cf9abfc7f07e755ad718d5dbc4

Assessment: approve

Reviewed the complete five-file delta and affected callers. The design correctly enforces CI runtime availability at the existing Make entry point and adds diagnostics without duplicating package selection. Conservative fallbacks, local full scans and analyzer failure propagation remain intact. No actionable defects found.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

Validation:

  • All 36 CI-script tests passed with zero skips, including real Go discovery and Make-consumer checks for missing Node, local fallback, ignored inputs, selection thresholds and analyzer failures. Receipt: checks/1792956225336877045-3.json; log: node-tests.log.

  • Preflight and git diff --check passed. Frozen HEAD, unchanged source and command/source/exit receipts were independently reconciled.

  • Audit passed: checks/1792956330105100514-4.json. Detailed evidence is retained in /home/xupeng/.local/state/mo-bot/jobs/8aa6b82345d34a3aaa62d2a3/attempt-1/review-record.json.

  • Performance review found only bounded logging and a linear package-count pass over the existing inventory. Package-selection logic and database execution paths are unchanged.

Limitations:

  • Companion matrixorigin/CI PR #469 remains a declared rollout prerequisite; its deployed runtime and license behavior were outside the frozen evidence. Hosted SCA was pending.

  • Local fixtures ran with Node 20.19.2 and Go 1.25.5. Real-analyzer timing and memory claims were not independently reproduced or certified.

  • The supplied evidence did not include the full related issue #29562; this assessment closes the PR's runtime and diagnostic scope, not the broader optimization issue.

@XuPeng-SH XuPeng-SH changed the title fix(ci): require incremental SCA runtime and explain full-scan fallback fix(ci): preserve SCA compatibility and explain full-scan fallback Oct 25, 2026
@XuPeng-SH

XuPeng-SH commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 23e43adba95100174bd0216ebe8b02a449b8f01a

Review completed. Read the assessment.

@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: 23e43adba95100174bd0216ebe8b02a449b8f01a

Assessment: approve

Reviewed the complete five-file delta and affected callers. The design preserves full validation when Node is unavailable, keeps selector and analyzer failures fatal, and adds diagnostics through existing owners without duplicating selection logic. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1

Validation:

  • All 36 CI-script tests passed with zero skips, including real Go discovery and Make-consumer checks for missing Node, fallback, overrides and analyzer failures. Receipt: checks/1792957758000110189-3.json; log: node-tests.log.

  • Preflight, diff checks and evidence audit passed. Frozen HEAD, unchanged source, commands, exit receipts and retained logs were reconciled in attempt-1/review-record.json.

  • Performance review found bounded diagnostic output and one linear package-count pass. Package selection and database execution paths remain unchanged.

Limitations:

  • Hosted CI was incomplete in the frozen evidence. Companion CI #469 deployment and license behavior were outside this review.

  • Fixtures used Node 20.19.2 and Go 1.25.5 with recording analyzers; real-analyzer timing and memory claims were not independently certified.

  • Related issue #29562's full body was unavailable; this assessment covers the PR's compatibility and diagnostic scope.

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

Assessment: APPROVE / no blocking findings for 23e43adba95100174bd0216ebe8b02a449b8f01a, with companion CI #469 reviewed and its pagination deadline defect fixed in 1efca034308fff9990998baa82fa6721330ce6f6.

Reviewed all five MatrixOne files and the companion CI integration, including existing owners, Make consumers, conservative fallbacks, tests and documentation. Package selection remains in the existing immutable-source/import-graph path; the delta adds bounded diagnostics without a parallel selection/execution mechanism. Missing Node still validates the complete graph and runs both analyzers. Discovery and analyzer failures remain fatal. No database runtime or storage/protocol changes.

Evidence:

  • Reused exact-head 36-test evidence from the existing review; independently checked the hosted SCA success and its log. Run 40227637819 actually used CI 30b0e58 and the explicit missing-Node full fallback.
  • Exercised the actual SHA-pinned github-script bundle on Node 24.10.0, including Node PATH hand-off to a subsequent shell, real Octokit pagination, revision mismatches, incomplete lists and API errors.
  • Independently ran the companion workflow's actual shell consumer through ten argument/failure/fallback scenarios with recording commands, and four real license-eye v0.4.0 header checks. The current configuration and tool-recipe hashes match the new guard values.
  • The companion's originally ineffective pagination timeout was reproduced and corrected; its final actual-client regression passes and fails against the original implementation. All 23 scope tests pass through the pinned action bundle and the final hosted CI run: https://github.com/matrixorigin/CI/actions/runs/40254763201.

There were no outstanding review threads in either PR at intake. The earlier reviews' companion-scope gap is covered here. The published 63.8% analyzer benchmark was not independently reproduced; the existing green MatrixOne run proves full fallback, not the new companion's deployed incremental end-to-end speedup. Related issue #29562's broader UT performance target remains outside these PRs.

Submitted as COMMENT because the authenticated account is also the PR author; this is an approval recommendation, not a GitHub approval vote.

@XuPeng-SH
XuPeng-SH merged commit 5fe08a3 into matrixorigin:main Oct 26, 2026
35 of 36 checks passed
@XuPeng-SH
XuPeng-SH deleted the fix/ci-memory-main branch October 26, 2026 01:47

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/bug Something isn't working kind/enhancement kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants