Retain native task identity across partial progress notifications
This commit is contained in:
@@ -31,6 +31,19 @@ func TestNativeTaskSnapshotOutlivesForegroundAndSpool(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNativeTaskProgressWithoutIDRetainsCompletionAssociation(t *testing.T) {
|
||||
h := &host{}
|
||||
h.trackTasksLocked([]byte(`{"type":"system","subtype":"task_started","tool_use_id":"tool","task_id":"native"}`))
|
||||
h.trackTasksLocked([]byte(`{"type":"system","subtype":"task_progress","tool_use_id":"tool"}`))
|
||||
if h.tasks["tool"] != "native" {
|
||||
t.Fatal("progress erased native identity")
|
||||
}
|
||||
h.trackTasksLocked([]byte(`{"type":"system","subtype":"task_notification","task_id":"native","status":"completed"}`))
|
||||
if len(h.tasks) != 0 {
|
||||
t.Fatal("native completion did not clear running membership")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNativeTaskAliasesAndTextCompletion(t *testing.T) {
|
||||
h := &host{}
|
||||
h.trackTasksLocked([]byte(`{"type":"system","subtype":"task_progress","task_id":"native-agent"}`))
|
||||
|
||||
Reference in New Issue
Block a user