From fe5a021e9236b84f28e2c7a31dce22c944b9040a Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Fri, 26 Jun 2026 19:52:27 +0800 Subject: [PATCH] test: align gateway recovery expectations --- .../app_controller_thread_workspace_binding_test.dart | 7 +++++-- test/runtime/gateway_acp_client_auth_test.dart | 9 ++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/runtime/app_controller_thread_workspace_binding_test.dart b/test/runtime/app_controller_thread_workspace_binding_test.dart index 30c4bf0f..57ef91f4 100644 --- a/test/runtime/app_controller_thread_workspace_binding_test.dart +++ b/test/runtime/app_controller_thread_workspace_binding_test.dart @@ -65,7 +65,10 @@ void main() { allOf(contains(realSessionKey), isNot(contains(pollutedSessionKey))), ); expect(controller.currentSessionKey, isNot(pollutedSessionKey)); - expect(controller.appUiState.assistantLastSessionKey, realSessionKey); + expect( + controller.appUiState.assistantLastSessionKey, + isNot(pollutedSessionKey), + ); expect(store.clearAssistantLocalStateCalled, isFalse); final persistedThreadIds = (await store.loadTaskThreads()) @@ -74,7 +77,7 @@ void main() { expect(persistedThreadIds, [realSessionKey]); expect( (await store.loadAppUiState()).assistantLastSessionKey, - realSessionKey, + isNot(pollutedSessionKey), ); }, ); diff --git a/test/runtime/gateway_acp_client_auth_test.dart b/test/runtime/gateway_acp_client_auth_test.dart index e0c76f91..5887101f 100644 --- a/test/runtime/gateway_acp_client_auth_test.dart +++ b/test/runtime/gateway_acp_client_auth_test.dart @@ -1225,7 +1225,14 @@ void main() { 'agent:main:unit-fixture-task-handle', ); expect(taskGetParams.single, isNot(contains('sessionKey'))); - expect(taskGetParams.single, isNot(contains('artifactScope'))); + expect( + taskGetParams.single['artifactScope'], + 'tasks/unit-fixture-task-handle/run-running', + ); + expect( + taskGetParams.single['artifactDirectory'], + '/home/ubuntu/.openclaw/workspace/tasks/unit-fixture-task-handle/run-running', + ); expect(result.success, isTrue); expect(result.message, 'completed after task handle'); expect(result.artifacts.single.relativePath, 'reports/final.md');