Skip to content

Scope PR validation to affected repository surfaces - #601

Merged
GraciousGazelles merged 23 commits into
mainfrom
ci/path-aware-blocking-checks
Aug 16, 2026
Merged

GraciousGazelles merged 23 commits into
mainfrom
ci/path-aware-blocking-checks

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

Route pull-request validation according to the repository surfaces changed by the PR, while preserving broad validation for protected-branch pushes, merge-queue attempts, scheduled runs, manual runs, and changes to CI routing itself.

Changes

  • add a conservative changed-path classifier with unit tests
  • compute blocking-CI applicability once and pass it to reusable workflows
  • separate repository policy, packaging, README, and formatting validation
  • keep root README ASCII and ToC validation lightweight
  • run Cargo dependency-policy validation only when Cargo/dependency-policy inputs are affected
  • select Python and TypeScript SDK validation independently
  • select CodeQL PR languages from changed source surfaces
  • retain the complete CodeQL language matrix outside pull requests
  • fall back to broad validation whenever path classification cannot be established
  • make classifier and routing changes select broad validation so the routing mechanism validates itself

Motivation

A documentation-only change previously exercised several unrelated build, SDK, dependency, packaging, and language-analysis paths. This change keeps the checks that can establish properties affected by documentation while avoiding unrelated compute.

Validation model

The governing rule is: run a validation lane when the change can affect the property that lane establishes. Uncertain classification expands validation rather than reducing it.

Because this PR changes the classifier and CI routing, it is intentionally classified for broad validation itself.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a CI path classifier script (classify_ci_paths.py) and its corresponding unit tests to optimize workflow execution by targeting only the relevant CI scopes. The reviewer feedback focuses on critical robustness and performance improvements. Specifically, it is recommended to implement a fail-safe fallback that enables all CI scopes when no changed paths are detected, preventing accidental bypasses of CI. Additionally, the reviewer suggests optimizing path parsing by instantiating PurePosixPath once per loop iteration, reusing its properties to simplify file name checks, removing the redundant _suffix helper, and adding a unit test for the empty paths fallback scenario.

Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/scripts/classify_ci_paths.py Resolved
Comment thread .github/workflows/cargo-deny.yml Fixed
Comment thread .github/workflows/cargo-deny.yml Fixed
Comment thread .github/workflows/repo-checks.yml Fixed
Comment thread .github/workflows/repo-checks.yml Fixed
Comment thread .github/workflows/repo-checks.yml Fixed
Comment thread .github/workflows/repo-checks.yml Fixed
Comment thread .github/workflows/repo-checks.yml Fixed
Comment thread .github/workflows/sdk.yml Fixed
Comment thread .github/workflows/sdk.yml Fixed
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 16, 2026
Merged via the queue into main with commit 3bb37e4 Aug 16, 2026
77 checks passed
@GraciousGazelles
GraciousGazelles deleted the ci/path-aware-blocking-checks branch August 16, 2026 03:20
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.

2 participants