feat(crash-reporting): capture GPU status diagnostics
Description
Adds bounded GPU-state evidence to accepted renderer and child-process crash reports for #8221.
The supplied Windows reports show the GPU child and renderer exiting with STATUS_BREAKPOINT even when Orca's software-rendering fallback is active. They do not contain enough GPU-state evidence to justify another Chromium flag or claim a root-cause fix. This PR records:
- whether the build-scoped GPU fallback is active for this launch,
- nine allowlisted values from Electron's GPU feature status,
- a safe error type if Electron cannot return status after the process loss.
It deliberately does not collect full GPU info, driver/device strings, or unknown future fields.
Refs #8221.
Evidence: reproduction before and after
Before (current main b677b2a20):
A deterministic process-gone diagnostic test requires gpuFallbackActive: false in the persisted crash details.
- Result: 1 failed, 2 passed.
- Exact failure: the expected
gpuFallbackActivefield is absent. - The existing crash report therefore cannot distinguish first-launch/native rendering from a fallback-active launch, nor show which Chromium GPU features remained enabled/software/disabled.
After (960246d19):
The same focused test file passes 5/5 and verifies:
- fallback-active and fallback-inactive state,
- fixed allowlist capture,
- omission of driver/full-info/unknown keys,
- safe persistence when
app.getGPUFeatureStatus()throws.
Additional validation:
pnpm run typecheck:node— passed.- Touched-file
oxlint— passed. - Formatting check — passed.
pnpm run check:max-lines-ratchet— passed.git diff --check origin/main...HEAD— passed.
ELI5
The crash report currently says “the graphics helper broke,” but not which safety mode Orca was using or which graphics features Chromium thought were active. This adds a small dashboard snapshot to the report. It gives the next affected-machine report useful clues without changing the engine or guessing at a repair.
User-facing trade-offs
- Benefit: the next hardware-specific crash report can distinguish normal and fallback-active launches.
- Benefit: feature status can show whether compositing, rasterization, video acceleration, or WebGL was enabled, software-only, or unavailable.
- Cost: one synchronous Electron status lookup occurs only when an accepted, deduplicated process-gone crash is being persisted.
- Limit: diagnostics do not prevent or recover the crash and are not a native stack trace.
- Privacy: full GPU info, driver/device identifiers, and unknown fields are intentionally omitted.
Compatibility and security
- Uses Electron's cross-platform runtime API; no Windows-only path or hardcoded separator.
- SSH, WSL, remote execution, Git providers, and Git behavior are unchanged.
- No new IPC, network request, subprocess, dependency, or upload behavior.
- Reports still use the existing crash-detail sanitizer and user-approved submission flow.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 772e26a3-0d3a-4275-b41a-dfcdd83d0907
📥 Commits
Reviewing files that changed from the base of the PR and between b677b2a209e66ee3693c7c9e11a67acf7616b6c8 and 960246d19d6c1d7696f4965d7c30ede91ebcf3c8.
📒 Files selected for processing (3)
src/main/crash-reporting/process-gone-diagnostics.test.tssrc/main/crash-reporting/process-gone-diagnostics.tssrc/main/index.ts
📝 Walkthrough
Walkthrough
Process-gone crash details now include allowlisted, truncated GPU feature status fields and the launch’s GPU fallback state. GPU status collection errors are captured in crash details without preventing report construction. The process-gone recording path passes the fallback state into the builder, and tests cover successful filtering and error handling.
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | ⚠️ Warning | The description covers the change well, but it misses required template sections like Screenshots, AI Review Report, Security Audit, and Notes. | Add the missing template sections and include the required AI review, security audit, and cross-platform compatibility details. |
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly matches the main change: adding GPU status diagnostics to crash reporting. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Moving this PR to draft because it has been untouched for more than 80 days (latest recorded PR activity or commit timestamp: 2026-07-20T18:47:46Z; checked on 2026-10-27). This keeps the review queue focused on active work while preserving the proposal. Please mark it ready for review when work resumes.