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
This commit is contained in:
Brennan Benson
2026-08-16 21:07:33 -07:00
committed by GitHub
parent 88b1a69824
commit 80b0ab16ff
2 changed files with 30 additions and 5 deletions
@@ -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> = {}): 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', () => {
@@ -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>): ProcessGoneCrashEvent =>
event({
source: 'child',