diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index bba4416c4..dbe32d86d 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -88,7 +88,10 @@ import { type ResourceReferenceInsertManyEventDetail, } from './features/project-workspace/resourceReferences'; import { RuntimeConfigDialog } from './features/runtime-config/RuntimeConfigDialog'; -import { visibleClientErrorMessage } from './services/errorReporting'; +import { + appendWebviewLog, + visibleClientErrorMessage, +} from './services/errorReporting'; import { setAgcPluginProjectPath, startAvailableAgcEditorPlugins, @@ -254,7 +257,12 @@ export function App({ return () => { active = false; if (nextProjectPath || previousProjectPath) { - void setAgcPluginProjectPath(null).catch(() => undefined); + void setAgcPluginProjectPath(null).catch((error) => { + appendWebviewLog('error', [ + '[AGC] 编辑器插件项目路径清理失败', + visibleClientErrorMessage(error), + ]); + }); } localProjectPathRef.current = null; }; @@ -785,7 +793,12 @@ export function App({ event, commandId, }), - ).catch(() => undefined); + ).catch((error) => { + appendWebviewLog('error', [ + '[AGC] 本地权限审计日志写入失败', + visibleClientErrorMessage(error), + ]); + }); } catch { // 权限日志只是审计旁路,写失败不能阻塞对话。 } diff --git a/docs/project-memory/shared-memory/pitfalls.md b/docs/project-memory/shared-memory/pitfalls.md index 2c04c35cd..d2e8fb827 100644 --- a/docs/project-memory/shared-memory/pitfalls.md +++ b/docs/project-memory/shared-memory/pitfalls.md @@ -30,6 +30,8 @@ Direct 的 Tauri 进度、活动回合和 manifest 事件不能忽略 `app.emit` 插件向宿主发起 RPC 后,宿主回写响应失败必须终止这条插件 RPC 读取循环并把写失败正文传给等待方;继续读而不收口会让插件调用看起来像无响应。 +插件项目路径清理和本地权限审计属于旁路,但失败仍要写 WebView 诊断;旁路不阻断业务不等于可以静默丢失 IPC/I/O 事实。 + ## 2026-10-03 AGC 随包 plugins 的 feature 档位必须与消费方一致,且门禁会因 build.rs 未重跑而假通过 - **现象**:Windows 本机 `npm run check:generated-bindings`(`npm run lint` 链内,`scripts/check-repository-ci.sh` 的 Repository checks 也走它)在 `build.rs:167:29` panic:`插件随包资源校验失败:随包插件存在未声明文件:.../src-tauri/resources/plugins/agc-godot-editor/native/gdextension/bin/win-x64/agc_godot_editor.dll(目标 x86_64-pc-windows-msvc 与当前 feature 组合不允许;请先执行随包资源准备步骤)`;树上换成 `agc-unity-editor/dotnet/publish/win-x64/Agc.Unity.Attach.exe` 时报同一类错。反向还有更隐蔽的形态:门禁 2 秒就 exit 0 说「通过」,但 tree 上其实带着编辑器产物。