Skip to content

feat(python-cli-parity): skip source-only PR comparisons - #1809

Open
John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
feat/ci-skip-unchanged-manifests
Open

John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
feat/ci-skip-unchanged-manifests

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

The Socket Python CLI skips the scan when a pull request changes only source code. This PR adds that check to socket ci. If no package files changed, the command reports that it skipped the scan. If it can’t tell what changed, it runs the scan.

@cursor

cursor Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Skipping security scans on CI is security-sensitive if the Git/manifest heuristics misclassify a PR; the implementation fails closed on ambiguity, but reviewers should still validate edge cases (renames, generated manifests, monorepos).

Overview
Adds PR source-only skip to socket ci: on pull request runs (without --auto-manifest), the command can exit early before baseline selection and diff scanning when Git proves the working tree is clean, manifests are discoverable and tracked, and the PR range has no changes to org-supported manifest/lockfile patterns.

New logic lives in skip-unchanged-manifests.mts (checkCiManifestChanges via git diff --raw on base...HEAD, plus hasTrackedManifestInputs via git ls-files). Uncertain cases fall back to a full scan (missing/invalid base SHA, dirty tree, shallow history, symlinks/submodules, config files like socket.yml, manifest renames, empty change set, discovery errors). Success path logs { "ok": true, "skipped": true, "reason": "no-manifest-changes" }.

Docs in docs/commands/ci.md describe when skip applies vs when a normal scan runs; unit/integration-style tests cover the decision matrix and handleCi wiring.

Reviewed by Cursor Bugbot for commit ef47f91. Configure here.

@jdalton
John-David Dalton (jdalton) force-pushed the feat/ci-skip-unchanged-manifests branch from d50b1a8 to ef47f91 Compare December 2, 2026 18:08
@jdalton John-David Dalton (jdalton) changed the title feat(ci): skip source-only PR comparisons feat(python-cli-parity): skip source-only PR comparisons Dec 2, 2026
@jdalton
John-David Dalton (jdalton) force-pushed the feat/ci-skip-unchanged-manifests branch 2 times, most recently from 7c1621a to f6570d2 Compare December 2, 2026 18:48
@jdalton
John-David Dalton (jdalton) enabled stacked auto-merge (squash) December 2, 2026 18:49
@jdalton
John-David Dalton (jdalton) force-pushed the feat/ci-skip-unchanged-manifests branch 8 times, most recently from 410fd17 to dc87e32 Compare December 3, 2026 16:53
@jdalton
John-David Dalton (jdalton) force-pushed the feat/ci-skip-unchanged-manifests branch from dc87e32 to 633ce74 Compare December 3, 2026 17:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant