给 app-server 关闭原因加可观测日志并定位 DirectProject 收尾 Killer
Project CI / AI game creator shell Rust crates (push) Successful in 1m40s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m10s
Project CI / Backend tests (push) Successful in 4m34s
Project CI / Frontend tests (push) Successful in 2m16s
Project CI / Native shell tests (push) Successful in 6m50s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 9m10s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 9m31s
Project CI / Repository checks (push) Successful in 2m28s
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Successful in 1m40s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m10s
Project CI / Backend tests (push) Successful in 4m34s
Project CI / Frontend tests (push) Successful in 2m16s
Project CI / Native shell tests (push) Successful in 6m50s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 9m10s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 9m31s
Project CI / Repository checks (push) Successful in 2m28s
Project CI / AI game creator shell web tests (push) Has been cancelled
- codex_app_server:shutdown_game_creator_codex_app_server_inner 在 GENARRATIVE_AGC_DIRECT_DEBUG=1 下打印关闭原因,避免以后再靠插桩区分「宿主收尾」与「通道自己断了」 - 用该日志定位到:夹具里是宿主自己的 shutdown_and_report(execution.rs:938,reason=宿主执行预算或交付收尾)先置 closed 再关 app-server,关进程给在途回合发 TransportClosed,于是 CLI 回合拿到「连接断开」、账本落 interrupted - 记录修复方向(宿主主动收尾时先交付结果、不向该回合发 TransportClosed)与影响面(CLI / 单回合宿主,GUI 常驻不走这条路) - DirectProject 里程碑与 pitfalls 同步:四层排除结论 + Killer 定位;两条运行时验收继续未勾选
This commit is contained in:
@@ -5208,6 +5208,11 @@ async fn shutdown_game_creator_codex_app_server_inner(
|
||||
inner: &Arc<CodexAppServerInner>,
|
||||
reason: &str,
|
||||
) -> Result<ProcessTreeExitProof, String> {
|
||||
// 关闭原因必须可观测:CLI / 单回合宿主会在回合收尾时主动关掉 app-server,
|
||||
// 分不清「宿主收尾」和「通道自己断了」时,排查只能靠猜(见 pitfalls 2026-09-28)。
|
||||
if std::env::var_os("GENARRATIVE_AGC_DIRECT_DEBUG").is_some() {
|
||||
eprintln!("agent.direct_codex.shutdown reason={reason}");
|
||||
}
|
||||
inner.closed.store(true, Ordering::Release);
|
||||
release_client_mcp_connection_for_inner(inner);
|
||||
for (_, pending) in inner.pending.lock().await.drain() {
|
||||
|
||||
Reference in New Issue
Block a user