Skip to content

Ignore empty crash report files - #14730

Draft
Sean McManus (sean-mcmanus) wants to merge 2 commits into
mainfrom
seanmcm/devbox2-wsl/agent79/fix-false-crash-telemetry
Draft

Ignore empty crash report files#14730
Sean McManus (sean-mcmanus) wants to merge 2 commits into
mainfrom
seanmcm/devbox2-wsl/agent79/fix-false-crash-telemetry

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

Summary

Prevent empty native crash-report placeholders from being classified and uploaded as crashes. Track delayed reads per file so a later write to the same file is still processed normally.

This PR was investigated and created by GitHub Copilot (in VS Code). Any message starting with ✨Copilot: was sent by Copilot.

Root cause

The crash watcher introduced in #11858 assumes every file change represents a completed report. The missing-signal fallback added in #13493 consequently classifies a zero-byte file as SIGMISSING, logs it as a crash, and deletes it. A report file can be observed before its crash header has been written, which can produce false telemetry and remove the path before a later real crash writes its report.

Fix

Use a per-file pending set only while a delayed read is scheduled. Release the filename before reading, and leave zero-byte files untouched without logging telemetry. A later write can then produce another change event and schedule normal processing, while non-empty crash-report parsing remains unchanged.

Copilot AI left a comment

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.

🟡 Changes recommended

Watcher re-registration can clear active reservations and cause duplicate crash processing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Prevents empty crash-report placeholders from generating false telemetry while allowing later writes to be processed.

Changes:

  • Tracks pending delayed reads per crash filename.
  • Leaves zero-byte crash reports untouched.
File summaries
File Description
Extension/src/LanguageServer/extension.ts Updates crash-file scheduling and empty-file handling.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Extension/src/LanguageServer/extension.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

2 participants