mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 05:11:49 +01:00
Fix completed-history owner receipts and verified attachment cleanup
Use truthful storage absence receipts for MCP deletion and preserve replay fences. Qualify retained chat controls and provider submissions through their actual owners, retain voice and registration obligations, and bound delivery receipt lookup. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
aaf55692c4
commit
56acdfdffa
31 files changed
+1849
-98
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { confirmMcpAttachmentCleanup, recordMcpAttachmentCleanup, type McpAttachmentCleanup } from "../services/public-mcp/upload-cleanup.js";
|
||||
import { notifyDeferredExecutionWork } from "../services/deferred-execution-notifications.js";
|
||||
import { notifyNativeRecoveryNotices } from "../services/native-recovery-notice-notifications.js";
|
||||
import { notifyNativeStatusReassessment } from "../services/native-status-reassessment-notifications.js";
|
||||
@@ -16254,6 +16255,7 @@ export function issueRoutes(
|
||||
for (const attachment of attachments) {
|
||||
try {
|
||||
await storage.deleteObject(attachment.companyId, attachment.objectKey);
|
||||
await recordMcpAttachmentCleanup(db, await confirmMcpAttachmentCleanup(db, storage, attachment));
|
||||
} catch (err) {
|
||||
logger.warn(
|
||||
{ err, issueId: id, attachmentId: attachment.id },
|
||||
@@ -20138,8 +20140,10 @@ export function issueRoutes(
|
||||
if (!(await assertDeliverableMutationAllowedByRunContext(req, res, issue)))
|
||||
return;
|
||||
|
||||
let mcpCleanup: McpAttachmentCleanup | null = null;
|
||||
try {
|
||||
await storage.deleteObject(attachment.companyId, attachment.objectKey);
|
||||
mcpCleanup = await confirmMcpAttachmentCleanup(db, storage, attachment);
|
||||
} catch (err) {
|
||||
logger.warn(
|
||||
{ err, attachmentId },
|
||||
@@ -20147,7 +20151,7 @@ export function issueRoutes(
|
||||
);
|
||||
}
|
||||
|
||||
const removed = await svc.removeAttachment(attachmentId);
|
||||
const removed = await svc.removeAttachment(attachmentId, { mcpCleanup });
|
||||
if (!removed) {
|
||||
res.status(404).json({ error: "Attachment not found" });
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user