Skip to content

feat: add opt-in host crash collection for Core uploads - #2

Open
JusterZhu wants to merge 4 commits into
mainfrom
justerzhu-bowl-crash-collection
Open

JusterZhu wants to merge 4 commits into
mainfrom
justerzhu-bowl-crash-collection

Conversation

@JusterZhu

Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 04:50

Copilot AI 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.

🟡 Changes recommended

The manifest violates the existing evidence-file contract by listing itself, and real ProcDump capture plus processAlive cancellation behavior lack integration coverage.

2 open issues
What changed in this PR

Adds opt-in Windows crash collection to Bowl.Host’s update supervision, reusing GeneralUpdate.Bowl to capture mini dumps and stage evidence for Core Client uploads. Default behavior remains metadata-only; the host does not upload crash artifacts.

Changes:

  • Adds request validation, updater/application capture, and per-target capture status.
  • Stages dump/report pairs outside rollback scope and publishes schema-2 crash cases.
  • Adds capture tests, a crash-capable test process, and deployment and operational documentation.
File Description
tests/​Bowl.TestPeer/​Program.cs Adds an intentional crash mode.
tests/​Bowl.Host.Tests/​CrashCollectionTests.cs Tests validation, publication, rollback preservation, and tool ownership.
src/​GeneralUpdate.Bowl/​InternalsVisibleTo.cs Grants Bowl.Host access to library internals.
src/​Bowl.Host/​Supervisor.cs Integrates capture startup, shutdown, and status persistence.
src/​Bowl.Host/​Protocol.cs Adds the opt-in flag and capture-status records.
src/​Bowl.Host/​Disk.cs Validates target versions before capture-enabled readiness.
src/​Bowl.Host/​CrashCollection.cs Implements capture sessions and crash-case publication.
src/​Bowl.Host/​CaptureJob.cs Adds Windows job-based ownership of capture tools.
src/​Bowl.Host/​Bowl.Host.csproj References the diagnostic library.
README.md Introduces optional capture and separate Client uploads.
docs/​protocol-v1.md Documents configuration, evidence lifecycle, and security requirements.
docs/​migration.md Updates guidance for the host’s optional diagnostics.

Review effort: Balanced

if (target.HasExited || !Processes.SameProcessStart(target.StartTime.ToUniversalTime(), identity.StartTimeUtc))
throw new InvalidDataException("Capture target exited before attach.");
using var job = CaptureJob.Create();
using var tool = Process.Start(info) ?? throw new InvalidOperationException("Capture tool failed to start.");
Comment thread src/Bowl.Host/CrashCollection.cs Resolved
@JusterZhu

Copy link
Copy Markdown
Contributor Author

@copilot 修复修改建议和CI失败

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

@copilot 修复修改建议和CI失败

已修复建议并补充 Windows ProcDump 崩溃发布及 processAlive 取消测试;同时修复 Linux CI 中 ProcessRunner 输出读取竞态。完整测试套件通过(260 项),提交为 b20ba63。新建的 GitHub Actions 运行显示 action_required,当前没有启动 jobs,需仓库批准后才能验证 CI。

@JusterZhu

Copy link
Copy Markdown
Contributor Author

@copilot CI失败

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

@copilot CI失败

已修复 Windows CI 失败:崩溃测试的更新超时现设为 30 秒,取消测试不再依赖 ProcDump 进程名。完整测试套件本地通过(260 项),提交 db0f48c。对应 GitHub Actions 当前为 action_required,仍需仓库批准后才能验证 Windows CI。

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

3 participants