合并主分支并融合硬截止测试更新

同步主分支的游戏创作硬截止恢复测试修正。
保留角色动作素材分支的现有实现。
This commit is contained in:
2026-08-05 11:59:01 +08:00
@@ -63,7 +63,7 @@ async fn game_chat_absolute_deadline_returns_an_in_flight_result_before_expiry()
}
#[tokio::test]
async fn game_chat_absolute_deadline_preserves_external_generation_reconciliation() {
async fn game_chat_absolute_deadline_preserves_external_generation_for_same_action_resume() {
let root = std::env::temp_dir().join(format!(
"genarrative-game-chat-deadline-reconciliation-{}-{}",
std::process::id(),
@@ -234,38 +234,6 @@ async fn game_chat_absolute_deadline_preserves_external_generation_reconciliatio
assert!(agent_db.contains("agent.runtime.tool_action.needs_reconciliation"));
assert!(!agent_db.contains("test-operation-id"));
let resumed = resume_game_creator_agent_background_tasks_at(&root)
.expect("scan durable runtime state after simulated runner restart");
assert!(resumed.iter().any(|result| {
result.state.agent_id == runtime.agent_id
&& result.state.run_id == runtime.run_id
&& result.state.phase == "needs-reconciliation"
}));
let recovered_pending = read_game_creator_agent_runtime_pending_tool_action(
&root,
&runtime.agent_id,
&runtime.run_id,
)
.expect("read pending action after recovery scan");
assert_eq!(recovered_pending, durable_pending);
let recovered_batch = read_game_creator_agent_runtime_provider_action_batch(
&root,
&runtime.agent_id,
&runtime.run_id,
)
.expect("read provider action batch after recovery scan");
assert_eq!(recovered_batch, preserved_batch);
assert!(game_creator_agent_runtime_external_generation_exists(
&root,
&runtime.agent_id,
&runtime.run_id
));
assert_eq!(
fs::read_to_string(root.join(".agent/agent.db")).expect("agent db after recovery scan"),
agent_db,
"needs-reconciliation recovery barrier must not append a replay receipt"
);
fs::remove_dir_all(root).ok();
}