Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Sep 30, 2025

Summary

  • Replace dorny/paths-filter with cargo tree-based detection for more accurate dependency tracking in the conformance CI job
  • Extract common file detection and utility functions into reusable modules
  • Eliminate code duplication across CI scripts

Changes

New Files

  • .github/scripts/get-changed-files.js - Reusable module for detecting changed files from GitHub events (PR/push)
  • .github/scripts/check-conformance-changes.js - Conformance detection using cargo tree -p oxc_coverage -p oxc_transform_conformance -p oxc_prettier_conformance
  • .github/scripts/utils.js - Shared utilities:
    • exec() - Shell command execution with error handling
    • getCrateDependencies() - Generic cargo tree wrapper
    • checkFilesAffectCrates() - File-to-crate impact checking

Modified Files

  • .github/scripts/generate-benchmark-matrix.js - Refactored to use shared modules
  • .github/workflows/ci.yml - Conformance job now uses check-conformance-changes.js instead of dorny/paths-filter

Benefits

  • More accurate: Uses actual crate dependencies from cargo tree instead of static path patterns
  • Maintainable: Shared utilities eliminate code duplication
  • Extensible: Easy to add new scripts that need similar functionality
  • Consistent: Same file detection logic across all CI scripts

Test Plan

  • Verify CI workflow syntax is valid
  • Monitor first PR run to ensure conformance detection works correctly
  • Check that conformance is skipped when appropriate (e.g., linter-only changes)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings September 30, 2025 16:50
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 30, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Sep 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Refactors the CI conformance job to use cargo tree for dependency detection instead of static path filtering, while extracting common functionality into reusable modules.

  • Replace dorny/paths-filter with cargo tree-based detection for more accurate dependency tracking
  • Extract shared utilities and file detection logic into reusable modules
  • Eliminate code duplication across CI scripts by consolidating common functions

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Updates conformance job to use new check-conformance-changes.js script
.github/scripts/utils.js New shared utilities for command execution and crate dependency detection
.github/scripts/get-changed-files.js New reusable module for GitHub event-based file change detection
.github/scripts/generate-benchmark-matrix.js Refactored to use shared modules instead of duplicated code
.github/scripts/check-conformance-changes.js New conformance detection script using cargo tree dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 30, 2025
Copy link
Member Author

Boshen commented Sep 30, 2025

Merge activity

## Summary

- Replace `dorny/paths-filter` with `cargo tree`-based detection for more accurate dependency tracking in the conformance CI job
- Extract common file detection and utility functions into reusable modules
- Eliminate code duplication across CI scripts

## Changes

### New Files
- **`.github/scripts/get-changed-files.js`** - Reusable module for detecting changed files from GitHub events (PR/push)
- **`.github/scripts/check-conformance-changes.js`** - Conformance detection using `cargo tree -p oxc_coverage -p oxc_transform_conformance -p oxc_prettier_conformance`
- **`.github/scripts/utils.js`** - Shared utilities:
  - `exec()` - Shell command execution with error handling
  - `getCrateDependencies()` - Generic cargo tree wrapper
  - `checkFilesAffectCrates()` - File-to-crate impact checking

### Modified Files
- **`.github/scripts/generate-benchmark-matrix.js`** - Refactored to use shared modules
- **`.github/workflows/ci.yml`** - Conformance job now uses `check-conformance-changes.js` instead of `dorny/paths-filter`

## Benefits

- **More accurate**: Uses actual crate dependencies from `cargo tree` instead of static path patterns
- **Maintainable**: Shared utilities eliminate code duplication
- **Extensible**: Easy to add new scripts that need similar functionality
- **Consistent**: Same file detection logic across all CI scripts

## Test Plan

- [x] Verify CI workflow syntax is valid
- [ ] Monitor first PR run to ensure conformance detection works correctly
- [ ] Check that conformance is skipped when appropriate (e.g., linter-only changes)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app bot force-pushed the refactor-ci-conformance-detection branch from af4447a to 632652d Compare September 30, 2025 17:01
@graphite-app graphite-app bot merged commit 632652d into main Sep 30, 2025
19 checks passed
@graphite-app graphite-app bot deleted the refactor-ci-conformance-detection branch September 30, 2025 17:06
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants