收口宿主导航诊断日志

微信小程序导航失败日志改为固定标签

移动 WebView 进程失败日志不再输出 detail 对象

补充门禁和共享决策记录
This commit is contained in:
2026-06-21 16:51:40 +08:00
parent fcd1d30869
commit c0624e1576
7 changed files with 20 additions and 28 deletions
+5 -10
View File
@@ -1526,7 +1526,7 @@ for (const snippet of [
'MOBILE_WEBVIEW_PROCESS_FAILURE_WINDOW_MS',
'MOBILE_WEBVIEW_PROCESS_FAILURE_RELOAD_LIMIT',
'handleWebViewProcessFailure',
"console.warn('mobile WebView process failed'",
'mobile WebView process failed for',
"handleWebViewProcessFailure('content_process_terminated')",
"handleWebViewProcessFailure('render_process_gone')",
'normalizeMobileShellLoadFailure',
@@ -1608,13 +1608,8 @@ if (shellAppSource.includes('catch(() => undefined)')) {
throw new Error('mobile shell ShellApp must not hide async navigation failures');
}
if (
shellAppSource.includes("console.warn('mobile WebView process failed', {") &&
shellAppSource.includes(
"console.warn('mobile WebView process failed', {\n count: nextFailureWindow.count,\n label,\n url: webUrl,",
)
) {
throw new Error('mobile shell WebView process diagnostics must not log H5 URLs');
if (shellAppSource.includes("console.warn('mobile WebView process failed', {")) {
throw new Error('mobile shell WebView process diagnostics must not log detail objects');
}
if (!shellAppTestSource.includes('blocked WebView file downloads are logged for host diagnostics')) {
@@ -2750,10 +2745,10 @@ for (const snippet of [
'runtime deep link rejections are logged and fall back to a safe WebView URL',
"'mobile shell deep link failed for runtime_url.rejected'",
'first WebView process failure reloads the current page once',
'mobile WebView process failed',
'mobile WebView process failed for content_process_terminated',
'repeated WebView process failures show the load failure panel and retry clears the failure window',
"expect(screen.getByText('页面已停止')).toBeTruthy()",
"expect(warnSpy).toHaveBeenCalledWith('mobile WebView process failed', {",
'mobile WebView process failed for render_process_gone',
]) {
if (!shellAppTestSource.includes(snippet)) {
throw new Error(`mobile shell ShellApp HostBridge event test missing ${snippet}`);