feat(storage): blob store with orphaned artifact cleanup (#3911)#3920
Open
jiangyj545 wants to merge 1 commit into
Open
feat(storage): blob store with orphaned artifact cleanup (#3911)#3920jiangyj545 wants to merge 1 commit into
jiangyj545 wants to merge 1 commit into
Conversation
…ration-agent#3911) Implements storage subsystem for tracking task artifacts with automatic cleanup of orphaned blobs from failed tasks. Components: - BlobStore: File-based blob storage with SHA-256 deduplication, task/run metadata tagging, and finalize/delete operations - OrphanedBlobCleanup: Background sweep worker that identifies and removes unreferenced intermediate artifacts after a grace period - Sweep report includes orphan count, bytes freed, referenced blob count - Thread-safe with locking for concurrent access Acceptance criteria: - Failed-task intermediate artifacts cleaned after grace period - Cleanup reports orphan counts and deleted bytes - Referenced final artifacts are never deleted by orphan sweep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a storage subsystem for tracking task artifacts with automatic cleanup of orphaned blobs left behind by failed tasks.
Problem
When a task fails after uploading intermediate artifacts but before writing final task state, those blobs become orphaned. The existing cleanup only follows completed task records, so:
Solution
BlobStore— File-based blob storagetask_id,run_id,content_typefinalize()marks blobs as referenced by completed tasksOrphanedBlobCleanup— Background sweep workerAcceptance Criteria
OrphanedBlobCleanup.sweep()format_report()finalizedcheck in sweepTest Results
Fixes #3911