fix(worker): thread handler task id into list-handler kickoff prompts
Neither the initial nor the handoff kickoff ever told a list-handler
session its own handler task id, so handoff_list_handler(taskId, ...)
was unrenderable -- the handoff chain broke exactly where it was needed
(#200/#201 on 2026-08-21).
Add {handlerTaskId} to both MergeHelperInitialDefault and
MergeHelperHandoffDefault, thread a handlerTaskId parameter through
BuildForMergeHelperAsync (interface, WorkerHub.GetMergeHelperLaunchSpec,
IWorkerClient/WorkerClient, and the MissionControlViewModel call site,
which already had the id from CreateMergeHelperTaskAsync but never
passed it on), and render it in BuildForMergeHelperHandoffAsync from the
taskId parameter it already receives.
RenderTemplate leaves unknown/missing tokens untouched, so a
user-edited override without the new token still renders fine -- no
forced migration for override users.
This commit is contained in:
@@ -360,6 +360,13 @@ public class PromptFilesTests
|
||||
Assert.Contains("{tasks}", d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DefaultFor_merge_helper_initial_has_handler_task_id_token()
|
||||
{
|
||||
var d = PromptFiles.DefaultFor(PromptKind.MergeHelperInitial);
|
||||
Assert.Contains("{handlerTaskId}", d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RenderTemplate_merge_helper_initial_substitutes_scope_and_tasks()
|
||||
{
|
||||
@@ -382,6 +389,13 @@ public class PromptFilesTests
|
||||
Assert.Contains("{tasks}", d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DefaultFor_merge_helper_handoff_has_handler_task_id_token()
|
||||
{
|
||||
var d = PromptFiles.DefaultFor(PromptKind.MergeHelperHandoff);
|
||||
Assert.Contains("{handlerTaskId}", d);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DefaultFor_merge_helper_handoff_points_at_phase_3()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user