Q121: a file id keeps the bytes it was recorded with; rewrites get new ids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 19:34:44 -04:00
1 parent 04c8cce0c4
commit 8f192eabe7
11 files changed
+143 -19

No files matched your search

+2
View File
@@ -1,5 +1,6 @@
import type { DatabaseSync } from "node:sqlite";
import { AuditService } from "../services/audit-service";
import { preserveRecordedFiles } from "../services/files/file-object-store";
const INTERRUPTED_MESSAGE = "Interrupted by application shutdown before completion.";
@@ -14,6 +15,7 @@ const INTERRUPTED_MESSAGE = "Interrupted by application shutdown before completi
* provider background worker needs to resume them.
*/
export function recoverInterruptedWork(db: DatabaseSync): void {
preserveRecordedFiles(db);
const now = new Date().toISOString();
const audit = new AuditService(db);
const runs = db.prepare("select id, org_id, task_id from task_runs where state = 'running'")