Skip to content

ci: select affected static analysis packages on 4.2 - #32654

Merged
XuPeng-SH merged 3 commits into
4.2-devfrom
codex/42-sca-incremental-20261113
Nov 13, 2026
Merged

XuPeng-SH merged 3 commits into
4.2-devfrom
codex/42-sca-incremental-20261113

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 13, 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 #28100
Related to #32664 (test-variant closure; main counterpart #32666)
Related to #32652 (separate pre-existing molint exit-status defect)

What this PR does / why we need it:

The 4.2-dev SCA analysis target scans every Go package for every PR. Backport affected-package selection and correct the main selector's over-expansion of test dependencies. Both existing analyzers receive one shared package list from Go's resolved production/test variant graph. A changed production file seeds every active variant of its owner; reverse traversal preserves variant identity until results are grouped into owning packages. Test-only edits select their owner. Remove the redundant TestImports/XTestImports graph representation.

Unknown or unverified inputs, unsupported changes, broad affected closures and explicit full scans retain complete analysis. Discovery errors and analyzer failures remain fatal. The explicit full static-check target and existing license checks are preserved. The selector's contract tests run for CI changes.

Validation on 57 (Go 1.26.4):

  • All six selector/Make contract tests passed without skips. The existing eight-package real Go/Make fixture covers internal and external test imports, unaffected production consumers, shared analyzer arguments, full overrides, dirty/ignored files, missing Node, and analyzer/discovery failures. Both new regression checks fail before the fix.
  • A real clean-Git base/head and CLI counterexample selects only affected A/B after the fix. Go compilation still detects the changed API breaking B's tests, while unrelated C/D compile successfully.
  • On the actual 466-owner/1231-variant graph, queryservice narrows from a full 466-package scan to 39, protoc from full to 21, and hashmap from 229 to 210. These sets match Go's independently computed transitive Deps.
  • The pinned molint process and golangci-lint passed on the 39-package selection; golangci-lint also passed on full analysis. A same-revision x86 pair with warmed Go export cache, separate empty lint caches, two workers, GOFLAGS=-p=2 and GOMAXPROCS=4 measured 86.9s selected versus 155.2s full (44.0% lower). Golangci's sampled peak memory was 6225.7MB selected versus 8037.7MB full. This is one local pair, not an ARM CI prediction; graph discovery and export-cache preparation are outside that timing.
  • The main counterpart's 51 CI contract tests and actual dependency-graph oracle also passed. Source license headers and analyzer recipes are unchanged by the variant correction.

The actual PR paths do not change the Python SDK classifier/control file. Python SDK development and publication remain on main. New-head CI is pending; the earlier successful ARM SCA exercised the previous head's full fallback.

The legacy 4.2 molint invocation can report diagnostics while exiting zero. That existing defect remains tracked by #32652; successful process exit here does not establish a repaired diagnostic gate.

@XuPeng-SH
XuPeng-SH requested a review from fengttt as a code owner November 13, 2026 01:50
@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 →

@mergify

mergify Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH

XuPeng-SH commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 9a1960544551ea89a2e28bca40024ac9c74c12b5

Review linked issue or PR description changed before publication; a fresh contextual review is queued.

@XuPeng-SH

XuPeng-SH commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 9a1960544551ea89a2e28bca40024ac9c74c12b5

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: 9a1960544551ea89a2e28bca40024ac9c74c12b5

Assessment: approve

The selector preserves affected production/test-importer coverage and conservative full fallbacks while sharing one package list between existing analyzers. Go metadata and the narrow Make integration justify the added code; full static-check and license behavior remain intact. No actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

Validation:

  • Reviewed the complete four-file delta, baseline/current Make and lint owners, workflow consumers, all four discussion entries and all three linked issues.

  • Supplied preflight and Node syntax check passed. All five contract tests passed locally with Go 1.26.4, real Go/Make discovery and mocked analyzers; no skips or failures.

  • An independent all-pairs dependency oracle passed 512 deterministic production/test-root cases, including variants and full-scan thresholds.

  • Frozen source, patch, discussion coverage and command/source/exit receipts were reconciled with retained logs. Frozen CI contract and preflight checks also succeeded.

Limitations:

  • Pinned real-analyzer, license and timing results are author-reported; raw logs were unavailable and those runs were not independently repeated. The contract suite mocks analyzers.

  • ARM SCA and broader CI remained pending. No ARM speedup is claimed; external reusable classifier/workflow sources are outside the frozen checkout.

  • The pre-existing molint exit-status and 4.2 Python SDK workflow defects remain separate.

@XuPeng-SH

XuPeng-SH commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 2aaf3e02f2091399551338f01d7bda1acd8e5602

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: 2aaf3e02f2091399551338f01d7bda1acd8e5602

Assessment: approve

The shared variant-aware selector preserves affected-package coverage, conservative full fallbacks and existing 4.2 analyzer/license behavior. Direct use of Go metadata keeps the integration narrow. The earlier test-dependency over-expansion is corrected; no actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

Validation:

  • Reviewed the complete four-file delta, baseline Make/lint/workflow consumers, all six discussion entries and all three linked issues.

  • Preflight and syntax checks passed. All six contract tests passed with Go 1.26.4, real Go/Make discovery and mocked analyzers, including full/license and failure paths.

  • A separate 2,176-case forward all-pairs oracle passed against this frozen selector; its pre-fix parent reproduced the unnecessary full scan.

  • Frozen-head CI contract/preflight checks succeeded; source, discussion coverage, command receipts and retained logs were reconciled.

Limitations:

  • Real-analyzer, whole-graph and x86 timing/memory results remain author-reported. No ARM speedup is established.

  • The pre-existing molint exit-status defect remains separate. Broader CI was pending; external reusable workflow sources were unavailable in the frozen checkout.

@XuPeng-SH

XuPeng-SH commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 650d6f73ce8019d3d2f4f8b92e0c8658ed3b49f3

"interrupted"

@XuPeng-SH
XuPeng-SH merged commit 572217b into 4.2-dev Nov 13, 2026
@XuPeng-SH
XuPeng-SH deleted the codex/42-sca-incremental-20261113 branch November 13, 2026 05:12

This branch was successfully deployed

No deployments
ci — 650d6f73 Deployed Nov 13, 2026 by XuPeng-SH
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/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants