修复合并后的前端门禁与测试竞态
整理资源工作台与画布编辑模块导入顺序 移除画布测试未使用类型导入 等待最终化审计落盘后再断言后台恢复状态
This commit is contained in:
@@ -3008,11 +3008,23 @@ async fn background_task_recovers_when_assistant_message_cannot_persist() {
|
||||
.messages
|
||||
.iter()
|
||||
.all(|message| message.role != "assistant"));
|
||||
let agent_db = fs::read_to_string(root.join(".agent/agent.db")).expect("agent db");
|
||||
let audit_records = agent_db
|
||||
.lines()
|
||||
.filter_map(|line| serde_json::from_str::<Value>(line).ok())
|
||||
.collect::<Vec<_>>();
|
||||
let mut audit_records = Vec::new();
|
||||
for _ in 0..100 {
|
||||
let agent_db = fs::read_to_string(root.join(".agent/agent.db")).expect("agent db");
|
||||
audit_records = agent_db
|
||||
.lines()
|
||||
.filter_map(|line| serde_json::from_str::<Value>(line).ok())
|
||||
.collect::<Vec<_>>();
|
||||
if audit_records.iter().any(|record| {
|
||||
record.get("recordType").and_then(Value::as_str)
|
||||
== Some("agent.runtime.background_task.finalization_pending")
|
||||
&& record.get("runId").and_then(Value::as_str)
|
||||
== Some("assistant-conversation-write-failure-run")
|
||||
}) {
|
||||
break;
|
||||
}
|
||||
std::thread::sleep(Duration::from_millis(20));
|
||||
}
|
||||
assert!(audit_records.iter().any(|record| {
|
||||
record.get("recordType").and_then(Value::as_str)
|
||||
== Some("agent.runtime.background_task.finalization_pending")
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { ProjectSupervisorComponentProps } from '../../src/features/app-shell/model';
|
||||
import { WorkspaceLauncherShell } from '../../src/features/app-shell/WorkspaceLauncher';
|
||||
import {
|
||||
act,
|
||||
cleanup,
|
||||
@@ -20,8 +22,6 @@ import {
|
||||
waitFor,
|
||||
within,
|
||||
} from './harness';
|
||||
import { WorkspaceLauncherShell } from '../../src/features/app-shell/WorkspaceLauncher';
|
||||
import type { ProjectSupervisorComponentProps } from '../../src/features/app-shell/model';
|
||||
|
||||
export function registerClientHomeTests() {
|
||||
it('projects Supervisor manifest updates into the open workbench without reopening the project', async () => {
|
||||
|
||||
@@ -12,7 +12,6 @@ import userEvent from '@testing-library/user-event';
|
||||
import JSZip from 'jszip';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import type { EditorProjectResourceSnapshot } from '../../services/image-editor/editorProjectClient';
|
||||
import type { EditorAgentConversationClient } from './EditorAgentConversation/useEditorAgentConversation';
|
||||
import {
|
||||
ApiClientError,
|
||||
|
||||
@@ -39,8 +39,8 @@ import {
|
||||
DEFAULT_CANVAS_BACKGROUND_COLOR,
|
||||
generationInputsOrNull,
|
||||
isInlineEditorMediaSource,
|
||||
resolveLayerResourceAssetKind,
|
||||
resolveContextMenuPosition,
|
||||
resolveLayerResourceAssetKind,
|
||||
} from './ImageCanvasEditorModel';
|
||||
import { ImageCanvasEditorShellView } from './ImageCanvasEditorShellView';
|
||||
import type {
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
createCanvasLayerClipboard,
|
||||
duplicateCanvasLayers,
|
||||
flipCanvasLayers,
|
||||
getCanvasLayersByIds,
|
||||
getCanvasLayerCopyBlockReason,
|
||||
getCanvasLayersByIds,
|
||||
groupCanvasLayers,
|
||||
moveCanvasLayers,
|
||||
removeCanvasLayers,
|
||||
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
createCanvasLayerClipboard,
|
||||
duplicateCanvasLayers,
|
||||
flipCanvasLayers,
|
||||
getCanvasLayersByIds,
|
||||
getCanvasLayerCopyBlockReason,
|
||||
getCanvasLayersByIds,
|
||||
groupCanvasLayers,
|
||||
moveCanvasLayers,
|
||||
removeCanvasLayers,
|
||||
|
||||
Reference in New Issue
Block a user