记录 Direct GUI 事件投递失败
进度、活动回合和 manifest 事件的 IPC emit 失败写入应用诊断 补充 Direct 事件排障记录
This commit is contained in:
@@ -73,10 +73,16 @@ pub(crate) fn emit_direct_active_turns_changed() {
|
||||
let Some(app) = GAME_CREATOR_AGENT_RUNTIME_UPDATE_APP_HANDLE.get() else {
|
||||
return;
|
||||
};
|
||||
let _ = app.emit(
|
||||
if let Err(error) = app.emit(
|
||||
DIRECT_ACTIVE_TURNS_CHANGED_EVENT,
|
||||
serde_json::json!({ "revision": revision }),
|
||||
);
|
||||
) {
|
||||
app_log!(
|
||||
"agent.direct_events.emit_failed event={} revision={} detail={error}",
|
||||
DIRECT_ACTIVE_TURNS_CHANGED_EVENT,
|
||||
revision
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -88,14 +94,19 @@ pub(crate) fn emit_direct_game_creator_progress(root: &Path, stage: &str, messag
|
||||
let Some(app) = GAME_CREATOR_AGENT_RUNTIME_UPDATE_APP_HANDLE.get() else {
|
||||
return;
|
||||
};
|
||||
let _ = app.emit(
|
||||
if let Err(error) = app.emit(
|
||||
"game-creator-agent-progress",
|
||||
GameCreatorAgentProgressEvent {
|
||||
project_path: root.to_string_lossy().into_owned(),
|
||||
stage: stage.to_string(),
|
||||
message: message.to_string(),
|
||||
},
|
||||
);
|
||||
) {
|
||||
app_log!(
|
||||
"agent.direct_events.emit_failed event=game-creator-agent-progress stage={} detail={error}",
|
||||
stage
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -204,7 +215,11 @@ pub(crate) fn start_game_creator_manifest_invalidation_event_sink(
|
||||
if envelope.token != expected_token {
|
||||
continue;
|
||||
}
|
||||
let _ = app.emit("game-creator-manifest-invalidated", envelope.event);
|
||||
if let Err(error) = app.emit("game-creator-manifest-invalidated", envelope.event) {
|
||||
app_log!(
|
||||
"agent.direct_events.emit_failed event=game-creator-manifest-invalidated detail={error}"
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
.map_err(|error| format!("启动 manifest 失效事件接收端失败:{error}"))?;
|
||||
@@ -360,7 +375,11 @@ pub(crate) fn emit_game_creator_manifest_invalidated(root: &Path, agent_id: &str
|
||||
agent_id: agent_id.to_string(),
|
||||
};
|
||||
if let Some(app) = GAME_CREATOR_AGENT_RUNTIME_UPDATE_APP_HANDLE.get() {
|
||||
let _ = app.emit("game-creator-manifest-invalidated", event);
|
||||
if let Err(error) = app.emit("game-creator-manifest-invalidated", event) {
|
||||
app_log!(
|
||||
"agent.direct_events.emit_failed event=game-creator-manifest-invalidated detail={error}"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
let _ = relay_game_creator_manifest_invalidation(root, agent_id);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
MCP stdio 收到非法 JSON 时,JSON-RPC `-32700` 响应也要保留解析器正文(不回显原始请求),不能只返回一个无上下文的 `Parse error`。
|
||||
|
||||
Direct 的 Tauri 进度、活动回合和 manifest 事件不能忽略 `app.emit` 返回值;GUI IPC 投递失败时必须写入应用诊断日志,否则用户只会看到“没有中间过程”而诊断包没有传输失败事实。
|
||||
|
||||
## 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 上其实带着编辑器产物。
|
||||
|
||||
Reference in New Issue
Block a user