Skip to content

fix(workspace-source): retry blobs a sweep kept even when the next sweep starts in the same millisecond - #10256

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/staging-sweep-same-ms
Nov 20, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/staging-sweep-same-ms

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • sweepExpiredStagedBlobs moved a row whose object it couldn't delete to expiresAt = sweepStart, and the next sweep only takes rows with expiresAt < its own start. When the next sweep started in the same millisecond, the kept row was skipped. This failed staging.integration.ts ("a later sweep removes both") on an unrelated PR
  • Kept rows now move to sweepStart - 1ms, so any later sweep retries them. The current sweep excludes the ids it already kept, so it still never retries a failed delete within one sweep (same as before)
  • The re-mark only touches rows that are still expired, matching the delete's guard, so a renewed row is never pushed back into expiry

Type of Change

  • Bug fix

Testing

  • New staging.integration.ts case pins Date so both sweeps start in the same millisecond. It fails on the old code and passes with the fix (local Postgres + Redis, single file, 7/7)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 20, 2026 8:46pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Failed blob deletes now stay eligible for a later sweep, even when both sweeps start in the same millisecond.

  • Cleanup retries failed blob deletes when sweeps start in the same millisecond.

No new actionable issues were found. waleedlatif1 accepted keeping the exclusion without a dedicated full-batch test because that test would require hundreds of undeletable objects or a test-only batch-size setting. Greptile conceded the earlier comment.

Reviews (2) · Last reviewed commit: "fix(workspace-source): retry blobs a swe..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 merged commit 126da70 into staging Nov 20, 2026
84 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/staging-sweep-same-ms branch November 20, 2026 21:12

This branch was previously deployed

1 inactive deployment
Preview — 5e8db051 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant