fix(proxy): strip client fetch metadata upstream

This commit is contained in:
2026-08-24 22:04:56 +08:00
parent f902edefd0
commit 34a4434cfb
3 changed files with 14 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ function parseArgs(argv, projectRoot = process.cwd()) {
};
for (let index = 0; index < argv.length; index += 1) {
const argument = argv[index];
if (argument === '--') continue;
const value = argv[index + 1];
if (!value || value.startsWith('--')) throw new Error(`${argument} requires a value`);
if (argument === '--runtime-root') options.runtimeRoot = resolve(value);
@@ -306,11 +307,15 @@ export async function runPackagedProductProof(options) {
|| beforeSubmitText.includes('正在重新连接本地 Agent')) {
throw new Error(`Packaged proxy first Conversation exposed a runtime banner: ${beforeSubmitText}`);
}
await page.getByTestId('coding-message-composer').evaluate(
(form) => form.requestSubmit(),
);
await page.getByRole('button', { name: '发送' }).click({ timeout: 30_000 });
const proxyStatus = await waitForActiveProxyProof(electronApplication);
let proxyStatus;
try {
proxyStatus = await waitForActiveProxyProof(electronApplication);
} catch (error) {
const bodyText = await page.locator('body').innerText().catch(() => '<unavailable>');
throw new Error(`${error instanceof Error ? error.message : String(error)}; UI=${bodyText}`);
}
assertPackagedMain(proxyStatus);
assertProxyStatus(proxyStatus.proxy);
await evaluateProof(electronApplication, 'proxy.release-child');