工作成果里摆着别单的资料:「这一单产出的」认本单碰过的行

放行存档(archiveAssetFiles)与在办列单(assetFilesOf)取行都用 taskView(where:{}) ——
那是「正式版全表 + 本单草稿」的合并视图,而资料常落在主数据上,整表里躺着别单放行过的行。
抽 assetRowsOf 两处同用,touched 为必填入参;e2e 补份数断言。
顺手清两笔:wake.test.ts 的 as unknown as(lint 红)、wake 契约的 api-report 快照(api:check 红)。
This commit is contained in:
xcs
2026-08-25 15:38:10 +08:00
parent 094386f02c
commit d788140548
9 changed files with 260 additions and 57 deletions
@@ -4,24 +4,26 @@
* 租约、开跑前那一刻才翻;那几秒里对话区与工作区读到的是两份相反的事实。
*/
import { describe, expect, it } from 'vitest';
import type { StaffId, TaskId } from '@contracts';
import type { LandedFacts, Task } from '../contract.ts';
import { createTaskService } from '../internal/usecase/task-service.ts';
import type { TaskServiceDeps } from '../internal/usecase/task-service.ts';
function harness(runtime: Task['runtime'], terminal?: Task['terminal']) {
const phases: string[] = [];
const task = {
id: 't-1',
const task: Task = {
id: 't-1' as TaskId,
activityId: 'e04',
ownerId: 's-1',
ownerId: 's-1' as StaffId,
title: 'x',
runtime,
terminal,
...(terminal === undefined ? {} : { terminal }),
envelope: {},
data: {},
caps: { steps: 40, tokens: 200000, humanCalls: 2, activeMinutes: 60 },
used: { steps: 0, tokens: 0, humanCalls: 0, activeMs: 0 },
startedAt: '2026-08-25T00:00:00.000Z',
} as unknown as Task;
};
const tasks = new Map<string, Task>([[task.id, task]]);
const deps: TaskServiceDeps = {
store: {