Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/design/2026-09-15-sdk-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ AndroidLaunchOptions extends … videoMode, logsUseAllSources, the detect.exit
family, triggerByNotification/Broadcast, ndk,
maxPendingReports/ReportAge, …
IOSLaunchOptions extends … captureAVPlayer, machExceptions, bluetoothStatus,
diskSpace, killDetection, style, …
diskSpace, style, …
```

`createDefaultLaunchOptions()` selects by `Platform.OS`, unchanged.
Expand Down
41 changes: 9 additions & 32 deletions examples/bare/e2e/option-effects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
} from './harness';
import { LUMA_BRIGHT_MIN, LUMA_DARK_MAX, imageSize, regionLuma } from './media';
import { beginRetainingSuite, endRetainingSuite, frameCount } from './observe';
import { type DeviceLog, type LogLine, adbStatus, devicectl, devicePidsOfApp, pidOf } from './scenario';
import { type DeviceLog, type LogLine, adbStatus, devicePidsOfApp, pidOf } from './scenario';
import { centreRegion, uiDump } from './screen';
import { type StubServer, deviceStubUrl, releaseDeviceStub, startStubServerFor } from './stub-server';

Expand Down Expand Up @@ -238,9 +238,9 @@ describeDevice(`launch option effects on ${TARGET_NAME}`, () => {
});

// -------------------------------------------------------------------------
// Exit and kill detection
// Exit detection

on(['A'])('[OPT-094][OPT-027][FLOW-46] detect.exit.user_requested: a force-stop is reported at the next launch, not without it', async () => {
on(['A'])('[OPT-093][OPT-027][FLOW-46] detect.exit.user_requested: a force-stop is reported at the next launch, not without it', async () => {
const after = async (name: string): Promise<PulledBundle[]> => {
await clearBundles();
const first = await launch(name, 'idle');
Expand All @@ -262,29 +262,6 @@ describeDevice(`launch option effects on ${TARGET_NAME}`, () => {
expect(exit.length).toBeGreaterThan(0);
});

/**
* iOS 7.0.0-beta5: nothing in the library reads detect.kill -- it is only
* registered (BGSOptionsDescriptors.m) -- and a SIGKILL while running
* files nothing at the next launch (XS, 2026-10-07). Filed: bugsee-cocoa#203.
*/
(HERE === 'X' ? it.failing : it.skip)('[OPT-068] detect.kill: a SIGKILL is reported at the next launch [known: iOS beta5 never reads detect.kill (bugsee-cocoa#203)]', async () => {
await clearBundles();
const first = await launch('kill', 'idle');
await apiMarker(log!, 'eff idle case=kill', first.run.scenario.nonce, 10_000, first.run.start);
await new Promise(resolve => setTimeout(resolve, 5_000));
for (const pid of await devicePidsOfApp()) {
await devicectl('process', 'signal', '--pid', String(pid), '--signal', 'SIGKILL');
}
expect(await waitForExit(15_000)).toBe(true);
await launch('kill', 'idle');
await new Promise(resolve => setTimeout(resolve, 20_000));
const names = await listBundles();
const bundles = names.length === 0 ? [] : await awaitBundles(names.length, 1_000);
await stopApp();
report('kill bundles', bundles.map(b => ({ type: b.request.type, summary: b.request.summary })));
expect(bundles.length).toBeGreaterThan(0);
});

// -------------------------------------------------------------------------
// Hang and HTTP error detection

Expand Down Expand Up @@ -550,7 +527,7 @@ describeDevice(`launch option effects on ${TARGET_NAME}`, () => {
// -------------------------------------------------------------------------
// Android: all sources, FLAG_SECURE, handler timeout

on(['A'])('[OPT-070] capture.logs.allsources: another process\'s logcat line reaches the report only with the option', async () => {
on(['A'])('[OPT-069] capture.logs.allsources: another process\'s logcat line reaches the report only with the option', async () => {
const has = async (name: string): Promise<{ other: boolean; tags: string[] }> => {
const key = `${name}--ready`;
if (!cache.has(key)) {
Expand Down Expand Up @@ -583,7 +560,7 @@ describeDevice(`launch option effects on ${TARGET_NAME}`, () => {
expect(extra.length).toBeGreaterThan(0);
});

on(['A'])('[OPT-071] capture.respect-flag-secure: a FLAG_SECURE window is blacked out by default and recorded when off', async () => {
on(['A'])('[OPT-070] capture.respect-flag-secure: a FLAG_SECURE window is blacked out by default and recorded when off', async () => {
const centre = async (name: string): Promise<number> => {
const outcome = await uploaded(name, 'secure');
const shot = (own(outcome, name).binaries.get('screenshot') ?? [])[0];
Expand All @@ -597,7 +574,7 @@ describeDevice(`launch option effects on ${TARGET_NAME}`, () => {
expect(ignored).toBeGreaterThanOrEqual(LUMA_BRIGHT_MIN);
});

on(['A'])('[OPT-080] config.report-handler-callback-timeout lowers the live handler deadline', async () => {
on(['A'])('[OPT-079] config.report-handler-callback-timeout lowers the live handler deadline', async () => {
const deadline = async (name: string): Promise<number> => {
const outcome = await uploaded(name, 'handler');
const lines = log!.all(/BugseeRN.*report handler rh-\d+ phase=\w+ deadline=(\d+)/, outcome.run.start);
Expand Down Expand Up @@ -643,15 +620,15 @@ describeDevice(`launch option effects on ${TARGET_NAME}`, () => {
return cache.get(key)!;
};

on(['A'])('[OPT-081] config.report-processing-in-process=false reads back as set', async () => {
on(['A'])('[OPT-080] config.report-processing-in-process=false reads back as set', async () => {
const { options } = await outOfProcess();
expect(jsonAfter(options.text, 'values')).toEqual({ 'com.bugsee.option.config.report-processing-in-process': false });
});

on(['A'])('[OPT-081] config.report-processing-in-process=false still files the report (network on, dead endpoint)', async () => {
on(['A'])('[OPT-080] config.report-processing-in-process=false still files the report (network on, dead endpoint)', async () => {
const { run, bundles } = await outOfProcess();
expect(bundles.map(b => b.request.summary)).toContain(`api-eff-out-of-process-${run.scenario.nonce}`);
});

it.skip('[OPT-098][FLOW-05b] reporting.triggers.broadcast: not covered -- the receiver is not exported and needs a signature permission; no in-app sender exists', () => {});
it.skip('[OPT-097][FLOW-05b] reporting.triggers.broadcast: not covered -- the receiver is not exported and needs a signature permission; no in-app sender exists', () => {});
});
2 changes: 1 addition & 1 deletion examples/bare/e2e/options-readback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* `config.data-encryption` (iOS) is read back by option-effects.test.ts
* (`env-diff`), not here: it would encrypt this run's bundle. Likewise
* `config.report-processing-in-process` (Android, OPT-081): off, it files no
* `config.report-processing-in-process` (Android, OPT-080): off, it files no
* report, and this run needs one.
*/
import { type PulledBundle } from './bundles';
Expand Down
5 changes: 1 addition & 4 deletions examples/bare/scenarios/api-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const READBACK_ANDROID: Readonly<Record<string, unknown>> = {
[`${P}config.max-pending-reports`]: 9,
[`${P}config.report-handler-callback-timeout`]: 12,
// config.report-processing-in-process=false files no report on the
// WOD_LX1 (option-effects.test.ts OPT-081), which this run needs for the
// WOD_LX1 (option-effects.test.ts OPT-080), which this run needs for the
// environment record: read back there instead.
[`${P}detect.anr.sampling`]: false,
[`${P}detect.exit.bg_low_memory_as_error`]: true,
Expand Down Expand Up @@ -123,7 +123,6 @@ export const READBACK_IOS: Readonly<Record<string, unknown>> = {
[`${P}config.build-type`]: 'api-e2e-type',
[`${P}detect.crash.fill_empty_exception_stacks`]: true,
[`${P}detect.crash.swift_async_stacktraces`]: false,
[`${P}detect.kill`]: true,
/** BugseeStyleDusk (1); the default is BugseeStyleSystem (3). */
[`${P}reporting.ui.style`]: 1,
};
Expand Down Expand Up @@ -161,7 +160,6 @@ export const ACCESSOR_KEYS = {
captureAVPlayer: `${P}capture.avplayer`,
captureMachExceptions: `${P}capture.mach-exceptions`,
captureDiskSpace: `${P}capture.disk-space`,
detectAndReportKill: `${P}detect.kill`,
},
} as const;

Expand Down Expand Up @@ -192,7 +190,6 @@ export const EFFECT_OPTIONS: Readonly<Record<string, Readonly<Record<string, unk
'crash-off': { [`${P}detect.crash`]: false },
exit: { [`${P}detect.exit`]: true, [`${P}detect.exit.user_requested`]: true },
'exit-control': { [`${P}detect.exit`]: true, [`${P}detect.exit.user_requested`]: false },
kill: { [`${P}detect.kill`]: true },
hang: { [`${P}detect.hang`]: true, [`${P}detect.hang.level.fair`]: 2000 },
'hang-control': { [`${P}detect.hang`]: false },
'http-errors': { [`${P}detect.http-errors`]: true },
Expand Down
7 changes: 0 additions & 7 deletions packages/react-native/src/options/IOSLaunchOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,4 @@ export class IOSLaunchOptions extends BugseeLaunchOptions {
set captureDiskSpace(value: boolean | undefined) {
this.$set('com.bugsee.option.capture.disk-space', value);
}

get detectAndReportKill(): boolean | undefined {
return this.$get('com.bugsee.option.detect.kill');
}
set detectAndReportKill(value: boolean | undefined) {
this.$set('com.bugsee.option.detect.kill', value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const IOS: [string, string, unknown][] = [
['captureAVPlayer', 'com.bugsee.option.capture.avplayer', true],
['captureMachExceptions', 'com.bugsee.option.capture.mach-exceptions', true],
['captureDiskSpace', 'com.bugsee.option.capture.disk-space', true],
['detectAndReportKill', 'com.bugsee.option.detect.kill', true],
];

const ANDROID: [string, string, unknown][] = [
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/src/options/option-keys.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"com.bugsee.option.config.data-encryption",
"com.bugsee.option.detect.crash.fill_empty_exception_stacks",
"com.bugsee.option.detect.crash.swift_async_stacktraces",
"com.bugsee.option.detect.kill",
"com.bugsee.option.reporting.ui.style"
],
"android": [
Expand Down
Loading