Skip to content

perf(ci): parallelize plugin validation and add sha256 workspace caching - #247

Open
Louis1125 wants to merge 3 commits into
cursor:mainfrom
Louis1125:perf/parallel-validation
Open

perf(ci): parallelize plugin validation and add sha256 workspace caching#247
Louis1125 wants to merge 3 commits into
cursor:mainfrom
Louis1125:perf/parallel-validation

Conversation

@Louis1125

@Louis1125 Louis1125 commented Aug 22, 2026

Copy link
Copy Markdown

Summary of Changes

This Pull Request improves the performance and reliability of local plugin verification and repository workflow automation in cursor/plugins.

  1. Parallel Execution Engine (.github/scripts/validate.py): Replaced blocking sequential folder traversal with multi-threaded (ThreadPoolExecutor) parallel worker validation to significantly decrease validation execution time.
  2. SHA-256 Workspace Cache (.github/scripts/utils/cache_manager.py): Introduced an incremental workspace cache layer (.cache/plugin_validation.json). Unmodified plugin manifests and configurations are skipped automatically across repeated local runs.
  3. Asset & Schema Integrity Checks: Enhanced directory traversal logic to validate JSON formatting across nested skill/rule structures without throwing false positives on system directories.
  4. Automated Workflow Integration (.github/workflows/validate.yml): Added an automated GitHub Actions workflow configured with actions/cache to speed up CI runs on pull requests.
  5. Documentation Updates (README.md & .gitignore): Added local validation execution commands for contributors and ignored local .cache/ build artifacts.

Motivation & Performance Impact

As the number of plugins, skills (SKILL.md), and rules (*.mdc) grows in the marketplace repository, running validation sequentially during local development and pre-commit checks introduces unnecessary I/O latency.

  • Cold Runs: Multi-threaded traversal reduces execution time by taking advantage of parallel worker threads.
  • Warm/Incremental Runs: Content hashing with SHA-256 provides instant skip-validation feedback for unchanged plugin paths.

File Changes Checklist

github/scripts/utils/cache_manager.py — SHA-256 directory hashing and cache storage github/scripts/validate.py — Parallelized validation script engine
github/workflows/validate.yml — CI workflow with workspace caching support README.md — Updated local execution guidelines
gitignore— Added.cache/` path rule

How to Test

  1. Run validation locally:
    in bash(can be also in wsl/ubuntu)
    python3 .github/scripts/validate.py

Note

Medium Risk
Adds a new CI job on every push/PR that can fail builds, but the cache API is called without hashes so skip/update logic is broken and Actions cache keys include github.sha.

Overview
Adds a new Python validator that walks top-level plugin dirs in parallel, parses nested *.json files, and fails CI if any JSON is invalid. It also documents python3 .github/scripts/validate.py and ignores .cache/.

A ValidationCache plus SHA-256 directory hashing is introduced, but validate.py never computes hashes and calls is_cached / update with only a path, so incremental skip is not actually wired. The new validate.yml workflow runs on all main pushes/PRs (alongside the existing Node schema job) and restores .cache/plugin_validation.json with a key that includes github.sha, which limits cache reuse.

Reviewed by Cursor Bugbot for commit 388ea8c. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread .github/scripts/validate.py Outdated
Comment thread .github/workflows/validate.yml Outdated
Comment thread .github/scripts/utils/cache_manager.py Outdated

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 2686089. Configure here.

Comment thread .github/scripts/utils/cache_manager.py Outdated
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