From 80b0ab16ff85aea4597cd216c36f8942998dfa04 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Sun, 16 Aug 2026 21:07:33 -0700 Subject: [PATCH] test(crash-reporting): keep ambiguous whole-tree kills reportable (#14667) * test(crash-reporting): keep ambiguous tree kills reportable * test(crash-reporting): drop the stale sibling-settle deferral comment --- .../process-gone-killed-one-ordering.test.ts | 28 ++++++++++++++++++- .../process-gone-recorder.test.ts | 7 ++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/main/crash-reporting/process-gone-killed-one-ordering.test.ts b/src/main/crash-reporting/process-gone-killed-one-ordering.test.ts index 7f47e794252..72c897088f5 100644 --- a/src/main/crash-reporting/process-gone-killed-one-ordering.test.ts +++ b/src/main/crash-reporting/process-gone-killed-one-ordering.test.ts @@ -17,6 +17,9 @@ import { import { ProcessGoneDedupe } from './process-gone-dedupe' import { recordProcessGoneCrash, type ProcessGoneCrashEvent } from './process-gone-recorder' +const noMinidump = async () => null +const attachDetails = async () => null + function event(overrides: Partial = {}): ProcessGoneCrashEvent { return { source: 'renderer', @@ -82,9 +85,32 @@ describe('recordProcessGoneCrash killed/1 ordering', () => { recordProcessGoneCrash({ record } as never, gpuKill, dedupe) recordProcessGoneCrash({ record } as never, networkServiceKill, dedupe) - recordProcessGoneCrash({ record } as never, rendererKill, dedupe) + recordProcessGoneCrash( + { record, attachDetails } as never, + rendererKill, + dedupe, + noMinidump + ) expect(record).toHaveBeenCalledOnce() + // Timing proximity is evidence, not authority to discard an ambiguous report. + expect(record).toHaveBeenCalledWith( + expect.objectContaining({ + breadcrumbs: expect.arrayContaining([ + expect.objectContaining({ + name: 'process_gone_suppressed', + data: expect.objectContaining({ source: 'child', processType: 'GPU' }) + }), + expect.objectContaining({ + name: 'process_gone_suppressed', + data: expect.objectContaining({ + source: 'child', + serviceName: 'network.mojom.NetworkService' + }) + }) + ]) + }) + ) }) it('suppresses the fleet sequence only after independent session-end intent', () => { diff --git a/src/main/crash-reporting/process-gone-recorder.test.ts b/src/main/crash-reporting/process-gone-recorder.test.ts index 8a0f77dd1e2..70e6ca93f04 100644 --- a/src/main/crash-reporting/process-gone-recorder.test.ts +++ b/src/main/crash-reporting/process-gone-recorder.test.ts @@ -436,10 +436,9 @@ describe('recordProcessGoneCrash', () => { } } - // Why child kills: the decode gate is source-agnostic, and a non-recoverable - // child persists synchronously on every branch of the crash-reporting stack - // (the renderer killed path defers behind a sibling-kill settle), so the - // platform stub is still in force when the gate reads process.platform. + // Why child kills: the decode gate is source-agnostic and reads + // process.platform synchronously at record time, so the platform stub is + // still in force when it runs. const nonRecoverableChildKill = (overrides: Partial): ProcessGoneCrashEvent => event({ source: 'child',