- Home
- Skills
- APIs & Backend
- Repair Object Storage Integration Failures
More screenshots
Works with the AI Agents you already use
Repair Object Storage Integration Failures
Repair Object Storage Integration Failures is a bounded ToolForge Labs workflow.
$1
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
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.
Connects securely to your tools. The creator never sees your data.
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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Cannot verify production systems, external services, or facts that are not present in supplied evidence. With partial context it returns bounded diagnosis/review, explicit assumptions, and a deterministic validation plan rather than claiming successful execution.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago
Permissions
Use a clean branch or a controlled review workspace. Supply repository files, logs, traces, configuration, or evidence needed for the task. Review all patches/findings before merge or operational action; keep production credentials and destructive production actions out of the workflow.