fix(logs-cleanup): listing active workspaces into mem + download time streaming lims#4692
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview
File upload and CSV import routes now read multipart bodies/files with size limits (supporting chunked uploads without Adds new internal tool routes for Google Slides export and Typeform file download that download with byte caps and store results as files (execution or copilot storage), and updates DocuSign, image, TTS, and video tool proxies to use bounded JSON/text/buffer reads, timeouts/abort propagation, and capped reference/media downloads; related block outputs gain a Also adds a reviewer skill doc ( Reviewed by Cursor Bugbot for commit 56116aa. Configure here. |
Greptile SummaryThis PR addresses memory and performance safety in the execution log cleanup pipeline, adds server-side proxy routes for Typeform and Google Slides file transfers, and introduces a new stream-size enforcement library used across all download routes.
Confidence Score: 3/5The log-compaction path can silently drop file references, causing permanent storage leaks for large executions; the cross-tenant reference scan gap in cleanup-logs.ts is also still present. The execution logger compacts trace span outputs exceeding 8 KB before extractFilesFromExecution runs, so file references in large span outputs are never written to the files column and are never deleted during log cleanup. This storage resource leak is introduced by the ordering of two new operations. The cross-tenant reference-scan narrowing was previously flagged and remains unaddressed. apps/sim/lib/logs/execution/logger.ts — file extraction must happen before compaction; apps/sim/background/cleanup-logs.ts — cross-tenant reference scan is still narrowed to only the deleting workspaces Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[dispatchCleanupJobs] --> B{isTriggerAvailable?}
B -- yes --> C[forEachCleanupChunk]
B -- no --> D{shouldExecuteInline?}
D -- yes --> C
D -- no --> E[JobQueue enqueue]
C --> F[listActiveWorkspaceCleanupScopeRowsPage]
F --> G[resolvePlanTypesByWorkspaceId]
G --> H[emit chunks per plan]
H --> I{dispatch path}
I -- Trigger.dev --> J[tasks.batchTrigger]
I -- inline --> K[runCleanupLogs]
I -- job queue --> E
K --> L[cleanupWorkflowExecutionLogs]
L --> M[chunkedBatchDelete]
M --> N[filterLargeValueKeys scoped to workspaceIds]
N --> O[deleteExecutionFiles from row.files]
N --> P[deleteLargeValueStorageKeys]
Reviews (8): Last reviewed commit: "more fixes" | Re-trigger Greptile |
|
@greptile |
|
bugbot run |
|
@greptile |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0b28132. Configure here.
|
bugbot run |
|
@greptile |
|
@greptile |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 55da2f6. Configure here.
|
bugbot run |
|
@greptile |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8d342ec. Configure here.
|
@greptile |
|
bugbot run |
|
@greptile |
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 56116aa. Configure here.

Summary
Type of Change
Testing
Tested manually
Checklist