Skip to content

Restrict AI-Assisted CI check to PR commits on merge checkouts - #5145

Closed
polybassa wants to merge 1 commit into
secdev:masterfrom
polybassa:ci-ai-assisted-pr-scope
Closed

Restrict AI-Assisted CI check to PR commits on merge checkouts#5145
polybassa wants to merge 1 commit into
secdev:masterfrom
polybassa:ci-ai-assisted-pr-scope

Conversation

@polybassa

Copy link
Copy Markdown
Contributor

Summary

  • On pull_request, actions/checkout builds a merge of the PR into the base branch (HEAD^1 = base tip, HEAD^2 = PR tip).
  • check_commits.sh previously walked rev-list from HEAD, so it also validated base-branch tips and false-failed when those commits lacked an AI-Assisted trailer.
  • Restrict the check to HEAD^1..HEAD^2 when that merge topology is present; keep the existing dated/PR_FETCH_DEPTH fallback otherwise.

Split out of #5050 so the ASN.1 work stays independent of this CI fix.

Test plan

  • Confirm CI check_commits passes on a PR whose tip commits all have AI-Assisted trailers even if master tip lacks one
  • Confirm local / non-merge checkout still uses the dated rev-list fallback

actions/checkout builds a merge of the PR into the base branch, so
rev-list from HEAD was also validating base-branch tips. Use
HEAD^1..HEAD^2 when that merge topology is present.

AI-Assisted: yes (Cursor Agent)
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.64%. Comparing base (32852c0) to head (7f0ac2d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5145   +/-   ##
=======================================
  Coverage   80.64%   80.64%           
=======================================
  Files         390      390           
  Lines       96936    96936           
=======================================
  Hits        78175    78175           
  Misses      18761    18761           

see 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@polybassa polybassa closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant