rstack-eco-ci-debug
Debug Rstack ecosystem CI failures for Rspack, Rsbuild, Rslib, Rspress, Rstest, and Rsdoctor, then attribute the real source PR or downstream change. Always use this skill when the user mentions Rstack eco-ci, rstack-ecosystem-ci, a suite turning red, a downstream regression, a green-to-red pivot, canary bisect, or daily eco-ci triage — even if they only ask "why is this suite failing", "which PR broke it", or "is this upstream project's fault". Use it to avoid over-blaming the first upstream commit that appears red in status data.
rstackjs · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add rstackjs/agent-skills --skill rstack-eco-ci-debug技能说明
name: rstack-eco-ci-debug description: Debug Rstack ecosystem CI failures for Rspack, Rsbuild, Rslib, Rspress, Rstest, and Rsdoctor, then attribute the real source PR or downstream change. Always use this skill when the user mentions Rstack eco-ci, rstack-ecosystem-ci, a suite turning red, a downstream regression, a green-to-red pivot, canary bisect, or daily eco-ci triage — even if they only ask "why is this suite failing", "which PR broke it", or "is this upstream project's fault". Use it to avoid over-blaming the first upstream commit that appears red in status data. metadata: internal: true
Rstack Eco CI Debug
Use this skill to debug Rstack ecosystem CI failures without over-blaming the first upstream commit that appears red in status data.
Supported ecosystems are rspack, rsbuild, rslib, rspress, rstest, and rsdoctor. Each maps to origin/data:<ecosystem>.json in rstack-ecosystem-ci.
Choose the ecosystem before investigating. In this skill:
selected ecosystemorupstreamis the project whose commit produced the status row, for examplerslibinrslib.json.suiteis a downstream project tested against that upstream artifact, for example therspresssuite insiderslib.json.- Never infer the selected ecosystem from the failing suite name.
Ecosystem Priority
Treat rspack as the primary ecosystem because it has the broadest downstream matrix and is normally the highest-volume source of eco-ci failures.
- For an all-ecosystem request, inspect and live-verify
rspackfirst, then continue throughrsbuild,rslib,rspress,rstest, andrsdoctor. - Put the Rspack row first in summary matrices and put current
rspack/<suite>failure sections before failures from other ecosystems. - Priority controls ordering and investigation attention, not coverage. Never stop after Rspack when the requested scope includes other ecosystems.
Preconditions
Use local checkout paths already supplied by the user or automation. If a required path is missing, ask for that specific path; do not assume machine-specific paths.
- Local upstream checkout — required for inspecting commits and reviewing PR diffs. Ask for the selected ecosystem's checkout before running
git -C <upstream-path>unless the user or automation already provided it. - Local downstream project checkout — required for reproduction edits. Ask for it before making approved temporary changes to
package.json,pnpm-lock.yaml, or equivalent package-manager files. - Local
rstack-ecosystem-cicheckout — optional. If available, useorigin/data:<ecosystem>.jsonas the first local status source. Pass the checkout path toscripts/ecosystem-status.sh --ecosystem <ecosystem> --repo <ecosystem-ci-path>. - GitHub access — prefer authenticated
ghfor the upstream repository andrstackjs/rstack-ecosystem-ci. Ifghis unavailable, use the matchingorigin/data:<ecosystem>.json, workflow/job URLs, and the GitHub connector or public pages where available; state any evidence gap in the report.
Fetch the local upstream repo before resolving commits:
git -C <upstream-path> fetch origin main --tags
- Treat GitHub Actions job logs as the source of truth for failure signatures.
- Do not modify project files unless the user explicitly asks for a fix or approves temporary reproduction edits. Temporary reproduction edits must be recorded and restored before reporting results unless the user asks to keep them.
Investigation Model
Each ecosystem CI runs a downstream project matrix against a freshly built artifact from the selected upstream. A suite turning red means that a specific combination failed:
current downstream project state + tested upstream artifact
It does not automatically mean the visible upstream pivot PR is the true root cause. Downstream dependency updates, snapshot changes, test logic changes, and release windows can all create misleading pivots.
Some eco-ci failures are flaky even when they appear as a clean green-to-red transition. Repeated selector timeouts, browser navigation waits, dev-server readiness failures, and network-idle waits must be checked against old commit comments, old failed runs, and automation memory before attributing them to the current pivot.
Always distinguish:
Surface attribution: the selected upstream commit/PR where status data first shows the suite red.Actual source: the PR, version window, or downstream change that actually introduced the failing condition.Failure signature: the stable error text, command, assertion diff, stack, or log block used to compare runs.
Optional Tools
Read the linked reference before using any of these tools. Do not ask the user generically "which tool do you want"; instead, suggest the specific tool that matches the situation. Only invoke a tool when its strict trigger conditions are met; do not run it "just in case".
-
Ecosystem status helper — use
scripts/ecosystem-status.sh --ecosystem <ecosystem> --repo <ecosystem-ci-path>when you need the latest and previous rows for one supported ecosystem, including failed suite names, job URLs, and suite-set delta. Pass--source <json-path-or-git-ref>for a snapshot or non-default ref.scripts/rspack-status.shremains as a compatibility wrapper for Rspack. The helper only summarizes status data; it does not inspect logs or attribute root causes. -
Rspack canary date bisect — use only when the selected ecosystem is
rspack, its commit window is too coarse to attribute a PR, and downstream causes have already been ruled out. Trigger this when all of the following are true:- The green-to-red pivot spans more than 3 Rspack commits or crosses a release/canary boundary.
- The failure signature is stable across the red rows in that window.
- The same Rspack commit does not appear in both green and red runs (which would indicate a downstream cause). Do not trigger