Skip to content

ai: dmp analysis#1778

Merged
MistEO merged 4 commits intov2from
ai/dmp
Mar 31, 2026
Merged

ai: dmp analysis#1778
MistEO merged 4 commits intov2from
ai/dmp

Conversation

@MistEO
Copy link
Copy Markdown
Contributor

@MistEO MistEO commented Mar 31, 2026

Summary by Sourcery

添加专门的 Windows DMP 崩溃转储分析技能,并将其集成到 MaaEnd 的问题分析工作流中。

新功能:

  • 引入新的 .claude/skills/dmp-analysis 技能,记录针对 MaaEnd 及其依赖项分析 Windows .dmp 崩溃转储的完整工作流程。
  • 扩展 MaaEnd 问题日志分析技能,当存在 .dmp 文件时,要求并组织基于 DMP 的崩溃分析,包括一个专门用于 DMP 结果的输出部分。

增强:

  • 在分析崩溃时,明确并强化关于完整 DMP 堆栈输出、符号化以及与上游源码交叉引用的更严格指引和提醒。

构建:

  • 更新 issue-ai-analysis GitHub Actions 工作流,以安装自动化 DMP 分析所需的 minidump-stackwalkdump_syms 工具。
Original summary in English

Summary by Sourcery

Add a dedicated Windows DMP crash-dump analysis skill and integrate it into the MaaEnd issue analysis workflow.

New Features:

  • Introduce a new .claude/skills/dmp-analysis skill that documents a full workflow for analyzing Windows .dmp crash dumps for MaaEnd and its dependencies.
  • Extend the MaaEnd issue log analysis skill to require and structure DMP-based crash analysis when .dmp files are present, including a dedicated output section for DMP results.

Enhancements:

  • Clarify and enforce stricter guidance and reminders around complete DMP stack output, symbolization, and cross-referencing with upstream source when analyzing crashes.

Build:

  • Update the issue-ai-analysis GitHub Actions workflow to install minidump-stackwalk and dump_syms tools needed for automated DMP analysis.
Original summary in English

Summary by Sourcery

添加专门的 Windows DMP 崩溃转储分析技能,并将其集成到 MaaEnd 的问题分析工作流中。

新功能:

  • 引入新的 .claude/skills/dmp-analysis 技能,记录针对 MaaEnd 及其依赖项分析 Windows .dmp 崩溃转储的完整工作流程。
  • 扩展 MaaEnd 问题日志分析技能,当存在 .dmp 文件时,要求并组织基于 DMP 的崩溃分析,包括一个专门用于 DMP 结果的输出部分。

增强:

  • 在分析崩溃时,明确并强化关于完整 DMP 堆栈输出、符号化以及与上游源码交叉引用的更严格指引和提醒。

构建:

  • 更新 issue-ai-analysis GitHub Actions 工作流,以安装自动化 DMP 分析所需的 minidump-stackwalkdump_syms 工具。
Original summary in English

Summary by Sourcery

Add a dedicated Windows DMP crash-dump analysis skill and integrate it into the MaaEnd issue analysis workflow.

New Features:

  • Introduce a new .claude/skills/dmp-analysis skill that documents a full workflow for analyzing Windows .dmp crash dumps for MaaEnd and its dependencies.
  • Extend the MaaEnd issue log analysis skill to require and structure DMP-based crash analysis when .dmp files are present, including a dedicated output section for DMP results.

Enhancements:

  • Clarify and enforce stricter guidance and reminders around complete DMP stack output, symbolization, and cross-referencing with upstream source when analyzing crashes.

Build:

  • Update the issue-ai-analysis GitHub Actions workflow to install minidump-stackwalk and dump_syms tools needed for automated DMP analysis.

Copilot AI review requested due to automatic review settings March 31, 2026 08:33
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - 我发现了两个问题,并留下了一些高层次的反馈:

  • 运行 cargo binstall 的 workflow 步骤假设运行器上已经有可用的 Rust toolchain 和 cargo;可以考虑要么添加一个显式的 Rust 安装步骤(例如使用 actions-rs/toolchain),要么改为下载预构建好的 minidump-stackwalk/dump_syms 二进制文件,以避免依赖于工具链而导致的失败。
  • 你现在在 CI workflow 和新的 dmp-analysis skill 中都写了 minidump-stackwalk/dump_syms 的安装说明;如果能合并单一“事实来源”(source of truth),或者清晰区分“仅用于 CI 的说明”与“本地/手动安装说明”,会减少文档漂移和“究竟应该遵循哪条安装路径”的困惑。
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The workflow step that runs `cargo binstall` assumes a Rust toolchain and `cargo` are available on the runner; consider either adding an explicit Rust setup step (e.g. using `actions-rs/toolchain`) or switching to downloading prebuilt `minidump-stackwalk`/`dump_syms` binaries to avoid toolchain dependency failures.
- You now have installation instructions for `minidump-stackwalk`/`dump_syms` both in the CI workflow and in the new dmp-analysis skill; consolidating the source of truth (or clearly distinguishing CI-only vs local/manual instructions) would reduce drift and confusion over which setup path should actually be followed.

## Individual Comments

### Comment 1
<location path=".github/workflows/issue-ai-analysis.yml" line_range="29-31" />
<code_context>
       contents: read
       issues: write
     steps:
+      - name: Install DMP analysis tools
+        run: |
+          curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
+          cargo binstall -y --no-confirm minidump-stackwalk dump_syms
+
</code_context>
<issue_to_address>
**🚨 issue (security):** Piping a remote script to bash in CI introduces avoidable supply-chain risk; consider a safer, pinned installation method.

`curl ... | bash` gives an unpinned, remotely controlled script full CI permissions, so any upstream change (or compromise) immediately affects your pipeline. Prefer a deterministic approach: e.g., fetch a specific, checksum-verified release, use a maintained GitHub Action or prebuilt image that includes `cargo-binstall`, or vendor a vetted installer script into this repo. This reduces supply-chain exposure from `raw.githubusercontent.com` and keeps CI behavior stable over time.
</issue_to_address>

### Comment 2
<location path=".github/workflows/issue-ai-analysis.yml" line_range="32" />
<code_context>
+
+```bash
+curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
+cargo binstall -y --no-confirm minidump-stackwalk dump_syms
+```
+
</code_context>
<issue_to_address>
**suggestion (performance):** Consider pinning tool versions and/or caching `cargo binstall` artifacts to improve determinism and workflow performance.

Installing the latest `minidump-stackwalk` and `dump_syms` on every run can both slow CI and introduce breaking changes when upstream releases new versions. Pinning explicit versions (e.g., `minidump-stackwalk@<version>`) and caching them (via `actions/cache` or a pre-baked runner image) will keep runs reproducible and reduce unexpected CI failures.
</issue_to_address>

Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的审查。
Original comment in English

Hey - I've found 2 issues, and left some high level feedback:

  • The workflow step that runs cargo binstall assumes a Rust toolchain and cargo are available on the runner; consider either adding an explicit Rust setup step (e.g. using actions-rs/toolchain) or switching to downloading prebuilt minidump-stackwalk/dump_syms binaries to avoid toolchain dependency failures.
  • You now have installation instructions for minidump-stackwalk/dump_syms both in the CI workflow and in the new dmp-analysis skill; consolidating the source of truth (or clearly distinguishing CI-only vs local/manual instructions) would reduce drift and confusion over which setup path should actually be followed.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The workflow step that runs `cargo binstall` assumes a Rust toolchain and `cargo` are available on the runner; consider either adding an explicit Rust setup step (e.g. using `actions-rs/toolchain`) or switching to downloading prebuilt `minidump-stackwalk`/`dump_syms` binaries to avoid toolchain dependency failures.
- You now have installation instructions for `minidump-stackwalk`/`dump_syms` both in the CI workflow and in the new dmp-analysis skill; consolidating the source of truth (or clearly distinguishing CI-only vs local/manual instructions) would reduce drift and confusion over which setup path should actually be followed.

## Individual Comments

### Comment 1
<location path=".github/workflows/issue-ai-analysis.yml" line_range="29-31" />
<code_context>
       contents: read
       issues: write
     steps:
+      - name: Install DMP analysis tools
+        run: |
+          curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
+          cargo binstall -y --no-confirm minidump-stackwalk dump_syms
+
</code_context>
<issue_to_address>
**🚨 issue (security):** Piping a remote script to bash in CI introduces avoidable supply-chain risk; consider a safer, pinned installation method.

`curl ... | bash` gives an unpinned, remotely controlled script full CI permissions, so any upstream change (or compromise) immediately affects your pipeline. Prefer a deterministic approach: e.g., fetch a specific, checksum-verified release, use a maintained GitHub Action or prebuilt image that includes `cargo-binstall`, or vendor a vetted installer script into this repo. This reduces supply-chain exposure from `raw.githubusercontent.com` and keeps CI behavior stable over time.
</issue_to_address>

### Comment 2
<location path=".github/workflows/issue-ai-analysis.yml" line_range="32" />
<code_context>
+
+```bash
+curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
+cargo binstall -y --no-confirm minidump-stackwalk dump_syms
+```
+
</code_context>
<issue_to_address>
**suggestion (performance):** Consider pinning tool versions and/or caching `cargo binstall` artifacts to improve determinism and workflow performance.

Installing the latest `minidump-stackwalk` and `dump_syms` on every run can both slow CI and introduce breaking changes when upstream releases new versions. Pinning explicit versions (e.g., `minidump-stackwalk@<version>`) and caching them (via `actions/cache` or a pre-baked runner image) will keep runs reproducible and reduce unexpected CI failures.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
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

该 PR 旨在为 Issue AI 分析流程补齐 Windows 崩溃转储(.dmp)的分析能力:在 CI 中安装 minidump 分析工具,并在 skill 文档中加入 DMP 处理流程与输出格式要求,从而提升崩溃类 Issue 的归因质量。

Changes:

  • 在 GitHub Actions workflow 中安装 minidump-stackwalk / dump_syms 用于 DMP 符号化与堆栈解析
  • 扩展 maaend-issue-log-analysis:发现 .dmp 时强制执行 DMP 分析步骤,并要求在最终报告中输出专门区块
  • 新增 dmp-analysis skill:提供从下载、符号下载、PDB→Breakpad .sym 转换到最终 stackwalk 的完整流程

Reviewed changes

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

File Description
.github/workflows/issue-ai-analysis.yml 在 issue 分析 workflow 中增加 DMP 分析工具安装步骤
.claude/skills/maaend-issue-log-analysis/SKILL.md 将 DMP 分析纳入强制流程,并补充最终报告的 DMP 输出区块规范
.claude/skills/dmp-analysis/SKILL.md 新增 Windows .dmp 分析 skill(含符号下载、符号化与堆栈解读指引)

@MistEO
Copy link
Copy Markdown
Contributor Author

MistEO commented Mar 31, 2026

@sourcery-ai review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - 我发现了 1 个问题,并且有一些整体性的反馈:

  • 这个 GitHub Actions 步骤通过 cargo-binstall 将远程 shell 脚本直接管道到 bash 执行;建议改用更可控的安装方式(固定版本、校验和或预构建二进制),以降低 CI 中的供应链风险。
  • 在每次工作流运行时安装 cargo-binstall 和这些基于 Rust 的工具,可能会比较慢且不稳定;可以考虑缓存 cargo 的 bin 目录,或使用预构建的 minidump-stackwalk/dump_syms 工件,以提升可靠性和性能。
  • DMP 分析技能假设 minidump-stackwalkdump_syms 已在 PATH 中,但工作流并没有显式导出 cargo 的 bin 路径;请确认这些工具在作业环境中确实是可访问的,或者显式更新 PATH。
给 AI Agents 的提示词
Please address the comments from this code review:

## Overall Comments
- 这个 GitHub Actions 步骤通过 `cargo-binstall` 将远程 shell 脚本直接管道到 `bash` 执行;建议改用更可控的安装方式(固定版本、校验和或预构建二进制),以降低 CI 中的供应链风险。
- 在每次工作流运行时安装 `cargo-binstall` 和这些基于 Rust 的工具,可能会比较慢且不稳定;可以考虑缓存 cargo 的 bin 目录,或使用预构建的 `minidump-stackwalk`/`dump_syms` 工件,以提升可靠性和性能。
- DMP 分析技能假设 `minidump-stackwalk``dump_syms` 已在 PATH 中,但工作流并没有显式导出 cargo 的 bin 路径;请确认这些工具在作业环境中确实是可访问的,或者显式更新 PATH。

## Individual Comments

### Comment 1
<location path=".github/workflows/issue-ai-analysis.yml" line_range="29-31" />
<code_context>
       contents: read
       issues: write
     steps:
+      - name: Install DMP analysis tools
+        run: |
+          curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
+          cargo binstall -y minidump-stackwalk dump_syms
+
</code_context>
<issue_to_address>
**🚨 issue (security):** 请避免将 curl 的输出直接管道给 bash,并且固定安装器版本以提高可复现性和安全性。

在 CI 中,通过 `curl … | bash` 这种方式盲目执行远程脚本,会带来安全和可复现性风险。请将安装器固定到一个特定的 tag/commit(或者使用 `cargo-binstall` 文档中带有版本的命令),并先下载脚本、验证脚本本身或其校验和,再执行,而不是直接通过管道传给 `bash`。
</issue_to_address>

Sourcery 对开源项目免费 —— 如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请对每条评论点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've found 1 issue, and left some high level feedback:

  • The GitHub Actions step pipes a remote shell script from cargo-binstall directly into bash; consider switching to a more controlled installation method (pinned version, checksum, or prebuilt binaries) to reduce supply-chain risk in CI.
  • Installing cargo-binstall and the Rust-based tools on every workflow run may be slow and brittle; consider caching the cargo bin directory or using prebuilt minidump-stackwalk/dump_syms artifacts to improve reliability and performance.
  • The DMP analysis skill assumes minidump-stackwalk and dump_syms are on PATH, but the workflow does not explicitly export cargo’s bin path; verify that the tools are actually reachable in the job environment or add an explicit PATH update.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The GitHub Actions step pipes a remote shell script from `cargo-binstall` directly into `bash`; consider switching to a more controlled installation method (pinned version, checksum, or prebuilt binaries) to reduce supply-chain risk in CI.
- Installing `cargo-binstall` and the Rust-based tools on every workflow run may be slow and brittle; consider caching the cargo bin directory or using prebuilt `minidump-stackwalk`/`dump_syms` artifacts to improve reliability and performance.
- The DMP analysis skill assumes `minidump-stackwalk` and `dump_syms` are on PATH, but the workflow does not explicitly export cargo’s bin path; verify that the tools are actually reachable in the job environment or add an explicit PATH update.

## Individual Comments

### Comment 1
<location path=".github/workflows/issue-ai-analysis.yml" line_range="29-31" />
<code_context>
       contents: read
       issues: write
     steps:
+      - name: Install DMP analysis tools
+        run: |
+          curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
+          cargo binstall -y minidump-stackwalk dump_syms
+
</code_context>
<issue_to_address>
**🚨 issue (security):** Avoid piping curl directly into bash and pin the installer version for reproducibility and security.

In CI, blindly executing a remote script via `curl … | bash` is both a security and reproducibility risk. Please pin the installer to a specific tag/commit (or use the versioned command from the `cargo-binstall` docs), and download the script first, verify it or its checksum, then execute it, rather than piping directly into `bash`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +29 to +31
- name: Install DMP analysis tools
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 issue (security): 请避免将 curl 的输出直接管道给 bash,并且固定安装器版本以提高可复现性和安全性。

在 CI 中,通过 curl … | bash 这种方式盲目执行远程脚本,会带来安全和可复现性风险。请将安装器固定到一个特定的 tag/commit(或者使用 cargo-binstall 文档中带有版本的命令),并先下载脚本、验证脚本本身或其校验和,再执行,而不是直接通过管道传给 bash

Original comment in English

🚨 issue (security): Avoid piping curl directly into bash and pin the installer version for reproducibility and security.

In CI, blindly executing a remote script via curl … | bash is both a security and reproducibility risk. Please pin the installer to a specific tag/commit (or use the versioned command from the cargo-binstall docs), and download the script first, verify it or its checksum, then execute it, rather than piping directly into bash.

@MistEO MistEO merged commit 5330248 into v2 Mar 31, 2026
3 checks passed
@MistEO MistEO deleted the ai/dmp branch March 31, 2026 09:41
Copy link
Copy Markdown
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Comment on lines +29 to +33
- name: Install DMP analysis tools
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y minidump-stackwalk dump_syms

Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

workflow 里通过 curl ... | bashmain 分支拉取安装脚本,且 cargo binstall 未固定版本/校验校验和,CI 的可复现性与供应链安全风险较高(脚本或上游发布物变更会导致行为漂移或被劫持)。建议改为固定 cargo-binstall/工具的版本并做校验(例如 pin 到 release tag/commit、校验 SHA256),或使用可信的 install action(能指定版本)来安装 minidump-stackwalk/dump_syms

Suggested change
- name: Install DMP analysis tools
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y minidump-stackwalk dump_syms
- name: Install minidump-stackwalk
uses: baptiste0928/cargo-install@v3
with:
crate: minidump-stackwalk
version: "0.15.1"
- name: Install dump_syms
uses: baptiste0928/cargo-install@v3
with:
crate: dump_syms
version: "1.9.0"

Copilot uses AI. Check for mistakes.
- 代码依据:如需指向具体实现,直接附远端 GitHub 行号链接


### DMP 崩溃分析
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

这里标题是 ### DMP 崩溃分析,但前文步骤 5(c) 与 Reminders 都强制要求最终报告包含 ## DMP 崩溃分析 区域(且 dmp-analysis skill 的 Output Format 也是 ##)。建议将模板中的标题级别改为 ## DMP 崩溃分析,避免分析输出按模板生成时不符合强制校验/约定。

Suggested change
### DMP 崩溃分析
## DMP 崩溃分析

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,225 @@
---
name: windows-dmp-analysis
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

本 skill 的 front-matter name: windows-dmp-analysis 与目录名 .claude/skills/dmp-analysis/ 不一致,而仓库内其他 skill 通常目录名与 name 保持一致(例如 .claude/skills/pipeline-guide/name: pipeline-guide)。建议二选一统一:要么把目录改为 windows-dmp-analysis/ 并同步更新引用路径,要么把 name 改为 dmp-analysis,避免后续按名称/路径索引 skill 时产生歧义。

Suggested change
name: windows-dmp-analysis
name: dmp-analysis

Copilot uses AI. Check for mistakes.

如果在日志包内或 issue 附件中发现了 `.dmp` 文件,**立即读取 `.claude/skills/dmp-analysis/SKILL.md` 并严格按其流程执行**。不要跳过这一步,不要只凭日志文本猜测崩溃原因。

a. 按照 `dmp-analysis/SKILL.md` 的完整流程完成崩溃转储分析,包括:
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

同一段里既写了“读取 .claude/skills/dmp-analysis/SKILL.md”,又写“按照 dmp-analysis/SKILL.md 的完整流程…”,路径表达不一致。建议统一为同一种写法(推荐完整路径 .claude/skills/dmp-analysis/SKILL.md),减少执行者在不同工作目录/上下文下理解偏差。

Suggested change
a. 按照 `dmp-analysis/SKILL.md` 的完整流程完成崩溃转储分析,包括:
a. 按照 `.claude/skills/dmp-analysis/SKILL.md` 的完整流程完成崩溃转储分析,包括:

Copilot uses AI. Check for mistakes.
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