- Home
- Skills
- APIs & Backend
- Repair Object Storage Integration Failures
More screenshots
Works with the AI tools you already use
Repair Object Storage Integration Failures
Repair Object Storage Integration Failures is a bounded ToolForge Labs workflow.
$8.99
Repair Object Storage Integration Failures
Example session with this skill installed
Our S3 multipart uploads are occasionally stalling without cleanup, leaving orphaned parts. We use the AWS SDK for Go. Check the lifecycle and provide a repair for the completion/abort logic.
- Read your context and instructions
- Compiled the repair object storage
- Generated the document
I have analyzed the multipart upload lifecycle and identified a risk where the AbortMultipartUpload call is bypassed during specific context cancellations, leading to orphaned parts and increased storage costs.
Multipart Upload Reliability Repair
The following implementation ensures a canonical invariant: every initiated upload must either reach a Complete state or be explicitly Aborted regardless of the failure mode.
func UploadWithReliableCleanup(ctx context.Context, svc *s3.S3, input *s3.CreateMultipartUploadInput, data io.Reader) error {
// 1. Initiate upload and capture UploadID immediately
out, err := svc.CreateMultipartUploadWithContext(ctx, input)
if err != nil {
return fmt.Errorf("initiation failed: %w", err)
}
uploadID := out.UploadId
// 2. Define cleanup closure to handle all exit paths
var completed bool
defer func() {
if !completed {
abortInput := &s3.AbortMultipartUploadInput{
Bucket: input.Bucket,
Key: input.Key,
UploadId: uploadId,
}
// Use a background context for cleanup to ensure it runs even if ctx is cancelled
_, _ = svc.AbortMultipartUploadWithContext(context.Background(), abortInput)
}
}()
// 3. Part processing logic (omitted for brevity)
// ... logic to upload parts and populate completedParts slice ...
// 4. Finalization
completeInput := &s3.CompleteMultipartUploadInput{
Bucket: input.Bucket,
Key: input.Key,
UploadId: uploadId,
MultipartUpload: &s3.CompletedMultipartUpload{Parts: completedParts},
}
_, err = svc.CompleteMultipartUploadWithContext(ctx, completeInput)
if err == nil {
completed = true
}
return err
}
Deterministic Test Plan
| Test Case | Strategy | Expected Outcome |
|---|---|---|
| Context Cancellation | Cancel ctx mid-stream | AbortMultipartUpload is called exactly once. |
| Network Timeout | Mock 504 on Complete | Retry logic triggers; if exhausted, Abort is attempted. |
| Zero-byte Parts | Pass empty reader | Invariant check prevents initiation or forces immediate Abort. |
Next steps
- Verify if your S3 bucket has a
LifecycleConfigurationto automatically clean up failed multipart uploads after 7 days as a secondary safety net. - Audit the
MaxRetriessetting in your SDK Session configuration to ensure it matches your downstream timeout requirements. - Apply the background context pattern to the
Abortcall to prevent cleanup truncation during SIGTERM.
repair-object-storage-integration-failur.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Repair Object Storage Integration Failures is a bounded ToolForge Labs workflow. Repair object/blob storage reliability across uploads, downloads, multipart state, checksums, retries, metadata, signed URLs, finalization, listing assumptions, and cleanup. Works from repositories or partial client/log evidence. Produces bounded repairs and deterministic tests while preserving authorization, encryption, retention, integrity, and tenant isolation. It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 21 days ago
- Passed all security checks, Safe to install