rspack-perf-codspeed-goal

Automates iterative Rspack performance optimization through GitHub PR and CodSpeed CI validation loops.

12.9k|843|Updated Apr 1, 2022
One-click install
npx skills add https://github.com/web-infra-dev/rspack --skill rspack-perf-codspeed-goal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rspack-perf-codspeed-goal
Source: https://github.com/web-infra-dev/rspack/tree/main/.agents/skills/rspack-perf-codspeed-goal
Command: npx skills add https://github.com/web-infra-dev/rspack --skill rspack-perf-codspeed-goal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Performance optimization in Rspack requires repeated cycles of code changes, correctness testing, CI validation, and CodSpeed benchmark interpretation, which is tedious and error-prone when done manually across many rounds.

Core Features & Use Cases

  • Autonomous Optimization Rounds: Runs up to 10 rounds of scoped code changes, local correctness checks, independent diff review, push, and CI/CodSpeed validation without asking for routine confirmation.
  • CI and Review Triage: Classifies GitHub check results, reruns flaky jobs, fixes related failures, and resolves Copilot and human review comments before trusting benchmark data.
  • Persistent Progress Tracking: Maintains a single fixed PR comment logging every round, commit SHA, change summary, and CodSpeed delta, plus a terminal @codspeedbot explain request when the final result improves.
  • Use Case: A maintainer asks to improve a specific Rspack benchmark by 5% within one crate; the agent iterates optimization commits, validates correctness locally, waits on 10-minute CI follow-ups, and stops only when CodSpeed confirms the threshold or the round limit is reached.

Quick Start

Use $rspack-perf-codspeed-goal to optimize the specified Rspack benchmark to the requested percentage threshold within the given crate or plugin scope.

Frequently Asked Questions about rspack-perf-codspeed-goal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize an Rspack benchmark with CodSpeed CI feedback?

Provide the target benchmark name, required percentage threshold, and scope such as a plugin or crate. The agent runs repeated rounds of scoped code changes, local correctness checks, pushes, and CodSpeed validation until the threshold is met or the round limit is reached.

How many optimization rounds does the CodSpeed goal workflow run?

The default maximum is 10 optimization rounds unless the user specifies another limit. Each round includes one local optimization attempt, correctness validation, independent review, push, CI and CodSpeed validation, and a continue-or-stop decision.

Can I run CodSpeed benchmarks locally for Rspack performance testing?

No, this workflow forbids local CodSpeed runs. Local commands are used only for correctness verification such as tests, clippy, and format checks, while all performance validation must come from CI CodSpeed results for the current PR head SHA.

What happens when a flaky CI test fails during a performance round?

Known flaky failures unrelated to the scoped change are rerun once for the same head SHA, while failures caused by the optimization are fixed locally and start a new round. CodSpeed results are treated as provisional until all test-related CI actions pass.

Does the workflow amend commits or force-push during optimization?

Normal rounds use append-only commits on top of the prior round. Force-push with --force-with-lease is reserved for explicit user-requested rebases or unavoidable history rewrites, not routine iteration.