修复自主任务等待测试竞态
使用待处理任务夹具替代会启动后台 drain 的高层入口 避免 planning 与 waiting-for-manifest-tasks 并发写入同一 run 定向测试连续运行五十次通过
This commit is contained in:
@@ -317,24 +317,26 @@ fn autonomous_manifest_waiting_context_persists_without_finishing_parent_run() {
|
||||
let root = temporary.path().join("project");
|
||||
init_local_game_project_at(&root, "manifest-waiting-project", TASK)
|
||||
.expect("init manifest waiting project");
|
||||
start_game_creator_supervisor_background_task_for_session_at(
|
||||
let session_id = resolve_agent_conversation_session_id_at(
|
||||
&root,
|
||||
GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID,
|
||||
None,
|
||||
true,
|
||||
)
|
||||
.expect("resolve autonomous parent session");
|
||||
let task_record = append_unique_game_creator_agent_runtime_pending_task(
|
||||
&root,
|
||||
GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID,
|
||||
&session_id,
|
||||
TASK,
|
||||
RUN_ID,
|
||||
AGENT_RUNTIME_SUPERVISOR_CLI_SOURCE,
|
||||
AGENT_RUNTIME_RUN_PROFILE_AUTONOMOUS_GAME_BUILD,
|
||||
Some(AGENT_RUNTIME_RUN_PROFILE_AUTONOMOUS_GAME_BUILD),
|
||||
None,
|
||||
)
|
||||
.expect("queue autonomous parent task");
|
||||
update_manifest_task_status_at(&root, "design-director", GameCreationAppTaskStatus::Running)
|
||||
.expect("start first manifest task");
|
||||
let task_record = read_latest_game_creator_agent_runtime_task_by_run_id(
|
||||
&root,
|
||||
GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID,
|
||||
RUN_ID,
|
||||
)
|
||||
.expect("read autonomous parent task")
|
||||
.expect("autonomous parent task exists");
|
||||
let mut runtime = agent_runtime_state_from_task_record(&task_record);
|
||||
let mut observations = Vec::new();
|
||||
let continuation = AgentRuntimeContinuationContext::default();
|
||||
|
||||
Reference in New Issue
Block a user