feat: journal reviewed multi-file changes and recover interrupted batches
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { assertChangeSetsResolved } from '../shared/contracts/change-sets.mjs';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { createHash, randomUUID } from 'node:crypto';
|
||||
import { createTwoFilesPatch, diffLines } from 'diff';
|
||||
@@ -68,6 +69,7 @@ export class GitDelivery {
|
||||
return result;
|
||||
}
|
||||
assertTask(session) {
|
||||
assertChangeSetsResolved(this.store, session.projectId, { includePrepared: true });
|
||||
if (!session.taskId || !session.runId) throw conflict('先发送一个项目任务,再准备本任务的Git交付。');
|
||||
const task = this.store.owned('task', session.taskId, session.id), run = this.store.owned('run', session.runId, session.id);
|
||||
if (run.taskId !== task.id) throw conflict('当前Task和Run归属不一致。');
|
||||
|
||||
Reference in New Issue
Block a user