From f12d86d55aae7f36d3e53b6d17bb1eea6ec2f6ab Mon Sep 17 00:00:00 2001 From: Tom Riglar Date: Mon, 3 Aug 2026 14:30:33 +0100 Subject: [PATCH] refactor(cloud): remove mitmproxy flags Drops the enterprise-only --mitmHost / --mitmPath flags and everything downstream of them: - environment.flags.ts: both flag definitions - cloud.ts: the arg reads and the "--mitmPath requires --mitmHost" check - test-submission.service.ts: TestSubmissionConfig fields, destructuring, and the two configPayload keys - run-cloud-test.ts: the doc comment listing what the MCP tool omits The submitted config payload is unchanged for existing runs: both keys were undefined when the flags were unset, and JSON.stringify drops undefined, so submissions that never passed them stay byte-identical. Co-Authored-By: Claude Opus 5 (1M context) --- src/commands/cloud.ts | 8 -------- src/config/flags/environment.flags.ts | 10 ---------- src/mcp/tools/run-cloud-test.ts | 2 +- src/services/test-submission.service.ts | 6 ------ 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/commands/cloud.ts b/src/commands/cloud.ts index 37803b5..52cefbb 100644 --- a/src/commands/cloud.ts +++ b/src/commands/cloud.ts @@ -237,8 +237,6 @@ export const cloudCommand = defineCommand({ collectRepeatedFlag(rawArgs, ['--metadata', '-m']), false, ); - const mitmHost = args.mitmHost as string | undefined; - const mitmPath = args.mitmPath as string | undefined; const moropoApiKey = args['moropo-v1-api-key'] as string | undefined; const name = args.name as string | undefined; const orientation = validateEnum( @@ -286,10 +284,6 @@ export const cloudCommand = defineCommand({ ); } - if (mitmPath && !mitmHost) { - throw new CliError('--mitmPath requires --mitmHost to be set'); - } - if (jsonFileName && !jsonFileFlag) { throw new CliError('--json-file-name requires --json-file'); } @@ -817,8 +811,6 @@ export const cloudCommand = defineCommand({ logger: (m: string) => out(m), maestroVersion: resolvedMaestroVersion, metadata: mergedMetadata, - mitmHost, - mitmPath, name, orientation, raw: [], diff --git a/src/config/flags/environment.flags.ts b/src/config/flags/environment.flags.ts index e15c3b3..f20ba7d 100644 --- a/src/config/flags/environment.flags.ts +++ b/src/config/flags/environment.flags.ts @@ -17,16 +17,6 @@ export const environmentFlags = { description: 'Arbitrary key-value metadata to include with your test run (format: key=value, may be repeated)', }, - mitmHost: { - type: 'string', - description: - 'used for mitmproxy support, enterprise only, contact support if interested', - }, - mitmPath: { - type: 'string', - description: - 'used for mitmproxy support, enterprise only, contact support if interested', - }, 'moropo-v1-api-key': { type: 'string', description: 'API key for Moropo v1 integration', diff --git a/src/mcp/tools/run-cloud-test.ts b/src/mcp/tools/run-cloud-test.ts index d33ccdf..2cb7072 100644 --- a/src/mcp/tools/run-cloud-test.ts +++ b/src/mcp/tools/run-cloud-test.ts @@ -34,7 +34,7 @@ const sleep = (ms: number) => * `waitTimeoutSeconds`. * * Mirrors the `dcd cloud` command's submission path but headless: no Expo URL - * download, mitm, GitHub metadata, or JSON-file output. Use the CLI for those. + * download, GitHub metadata, or JSON-file output. Use the CLI for those. */ export function registerRunCloudTest(server: McpServer): void { server.registerTool( diff --git a/src/services/test-submission.service.ts b/src/services/test-submission.service.ts index 678c66f..dc04b24 100644 --- a/src/services/test-submission.service.ts +++ b/src/services/test-submission.service.ts @@ -41,8 +41,6 @@ export interface TestSubmissionConfig { maestroChromeOnboarding?: boolean; maestroVersion: string; metadata?: string[]; - mitmHost?: string; - mitmPath?: string; name?: string; orientation?: string; raw?: unknown; @@ -93,8 +91,6 @@ export class TestSubmissionService { maestroVersion, deviceLocale, orientation, - mitmHost, - mitmPath, retry, continueOnFailure = true, report, @@ -283,8 +279,6 @@ export class TestSubmissionService { deviceLocale, googlePlay, maestroVersion, - mitmHost, - mitmPath, orientation, raw: JSON.stringify(raw), report,