Skip to content

Commit 5fea402

Browse files
committed
chore: trim adaptive uptime diagnostics
1 parent ecd4b9c commit 5fea402

3 files changed

Lines changed: 0 additions & 15 deletions

File tree

src/platforms/ios/__tests__/runner-command-retry.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ test('mutating commands include skipped readiness context in lost-response guida
319319
.mockRejectedValueOnce(
320320
new AppError('COMMAND_FAILED', 'fetch failed', {
321321
runnerReadinessPreflightSkipped: true,
322-
runnerReadinessPreflightSkipFreshnessMs: 10_000,
323322
runnerReadinessPreflightSkipReason: 'recent_successful_response',
324323
runnerReadinessPreflightSkippedAgeMs: 4,
325324
}),
@@ -334,7 +333,6 @@ test('mutating commands include skipped readiness context in lost-response guida
334333
assert.equal(error.details?.readinessPreflightSkipped, true);
335334
assert.equal(error.details?.readinessPreflightSkipReason, 'recent_successful_response');
336335
assert.equal(error.details?.readinessPreflightSkippedAgeMs, 4);
337-
assert.equal(error.details?.readinessPreflightSkipFreshnessMs, 10_000);
338336
assert.match(String(error.details?.hint), /skipped the uptime preflight/);
339337
assert.match(String(error.details?.hint), /status recovery confirmed/);
340338
assert.match(String(error.details?.hint), /snapshot -i/);

src/platforms/ios/runner-client.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ type RunnerReadinessPreflightRecoveryDetails = {
4444
readinessPreflightSkipped?: boolean;
4545
readinessPreflightSkipReason?: string;
4646
readinessPreflightSkippedAgeMs?: number;
47-
readinessPreflightSkipFreshnessMs?: number;
4847
};
4948

5049
const RUNNER_STATUS_RECOVERY_TIMEOUT_MS = 3_000;
@@ -491,8 +490,6 @@ function readReadinessPreflightRecoveryDetails(
491490
if (reason !== undefined) details.readinessPreflightSkipReason = reason;
492491
const ageMs = readNumberDetail(error, 'runnerReadinessPreflightSkippedAgeMs');
493492
if (ageMs !== undefined) details.readinessPreflightSkippedAgeMs = ageMs;
494-
const freshnessMs = readNumberDetail(error, 'runnerReadinessPreflightSkipFreshnessMs');
495-
if (freshnessMs !== undefined) details.readinessPreflightSkipFreshnessMs = freshnessMs;
496493
return details;
497494
}
498495

src/platforms/ios/runner-session.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,11 @@ type RunnerReadinessPreflightDecision =
5858
| 'conservative_command'
5959
| 'no_successful_response'
6060
| 'successful_response_stale';
61-
freshnessMs: number;
6261
lastSuccessfulRunnerResponseAgeMs?: number;
6362
}
6463
| {
6564
action: 'skip';
6665
reason: 'recent_successful_response';
67-
freshnessMs: number;
6866
lastSuccessfulRunnerResponseAgeMs: number;
6967
};
7068

@@ -500,7 +498,6 @@ export async function executeRunnerCommandWithSession(
500498
{
501499
command: runnerCommand.command,
502500
commandId: runnerCommand.commandId,
503-
freshnessMs: preflightDecision.freshnessMs,
504501
lastSuccessfulRunnerResponseAgeMs: preflightDecision.lastSuccessfulRunnerResponseAgeMs,
505502
reason: preflightDecision.reason,
506503
sessionReady: session.ready,
@@ -518,7 +515,6 @@ export async function executeRunnerCommandWithSession(
518515
data: {
519516
command: command.command,
520517
commandId: runnerCommand.commandId,
521-
freshnessMs: preflightDecision.freshnessMs,
522518
lastSuccessfulRunnerResponseAgeMs: preflightDecision.lastSuccessfulRunnerResponseAgeMs,
523519
reason: preflightDecision.reason,
524520
sessionReady: session.ready,
@@ -597,37 +593,32 @@ function resolveRunnerReadinessPreflightDecision(
597593
return {
598594
action: 'run',
599595
reason: 'startup',
600-
freshnessMs: RUNNER_TAP_PREFLIGHT_SKIP_FRESHNESS_MS,
601596
};
602597
}
603598
if (command.command !== 'tap' && command.command !== 'tapSeries') {
604599
return {
605600
action: 'run',
606601
reason: 'conservative_command',
607-
freshnessMs: RUNNER_TAP_PREFLIGHT_SKIP_FRESHNESS_MS,
608602
};
609603
}
610604
const lastSuccessAt = session.lastSuccessfulRunnerResponseAtMs;
611605
if (lastSuccessAt === undefined) {
612606
return {
613607
action: 'run',
614608
reason: 'no_successful_response',
615-
freshnessMs: RUNNER_TAP_PREFLIGHT_SKIP_FRESHNESS_MS,
616609
};
617610
}
618611
const lastSuccessfulRunnerResponseAgeMs = Date.now() - lastSuccessAt;
619612
if (lastSuccessfulRunnerResponseAgeMs > RUNNER_TAP_PREFLIGHT_SKIP_FRESHNESS_MS) {
620613
return {
621614
action: 'run',
622615
reason: 'successful_response_stale',
623-
freshnessMs: RUNNER_TAP_PREFLIGHT_SKIP_FRESHNESS_MS,
624616
lastSuccessfulRunnerResponseAgeMs,
625617
};
626618
}
627619
return {
628620
action: 'skip',
629621
reason: 'recent_successful_response',
630-
freshnessMs: RUNNER_TAP_PREFLIGHT_SKIP_FRESHNESS_MS,
631622
lastSuccessfulRunnerResponseAgeMs,
632623
};
633624
}
@@ -672,7 +663,6 @@ function markRunnerSkippedReadinessPreflightError(
672663
{
673664
...(appErr.details ?? {}),
674665
runnerReadinessPreflightSkipped: true,
675-
runnerReadinessPreflightSkipFreshnessMs: decision.freshnessMs,
676666
runnerReadinessPreflightSkipReason: decision.reason,
677667
runnerReadinessPreflightSkippedAgeMs: decision.lastSuccessfulRunnerResponseAgeMs,
678668
},

0 commit comments

Comments
 (0)