fix(work-folders): preserve save status when activity logging fails

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-07 13:53:39 -05:00
1 parent 2962ebfdb7
commit b5fca70b80
4 files changed
+27 -6

No files matched your search

+3 -1
View File
@@ -16,6 +16,7 @@ import { workFolderRepositoryService } from "./work-folder-repositories.js";
import { startWorkFolderCheckpointer } from "./work-folder-checkpointer.js";
import { logActivity } from "./activity-log.js";
import { assertWorkFolderAccess } from "./work-folder-access.js";
import { logger } from "../middleware/logger.js";
function signature(entry: WorkTreeEntry | undefined) {
return entry ? JSON.stringify([entry.kind, entry.sha256, entry.executable]) : "missing";
@@ -284,7 +285,8 @@ export async function prepareSandboxWorkFolders(input: {
await logActivity(db, { companyId: input.companyId, actorType: "agent", actorId: input.agentId,
agentId: input.agentId, runId: input.runId, issueId: input.taskId,
responsibleUserIdOverride: input.responsibleUserId, action, entityType: "heartbeat_run", entityId: input.runId,
details: { scopes: WORK_FOLDER_SCOPES.filter((scope) => Boolean(folders[scope])), repositories: bindings.length } });
details: { scopes: WORK_FOLDER_SCOPES.filter((scope) => Boolean(folders[scope])), repositories: bindings.length } })
.catch((error) => logger.warn({ err: error, runId: input.runId }, "Work-folder activity could not be recorded"));
}
try {
await seedAttachments();