Skip to content

feat(upload): stamp backend-vended metadata onto uploaded objects#177

Merged
ben-miru merged 6 commits into
mainfrom
feat/store-upload-metadata
Jul 17, 2026
Merged

feat(upload): stamp backend-vended metadata onto uploaded objects#177
ben-miru merged 6 commits into
mainfrom
feat/store-upload-metadata

Conversation

@ben-miru

@ben-miru ben-miru commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The backend's create-upload response (UploadWithCredentials) vends a metadata map carrying object provenance (e.g. device_id, release_id, digest); the agent previously dropped it, so uploaded objects landed in the bucket without it. This threads the map generically — no key inspection — from the create-upload response through the ObjectTransfer seam onto the wire.
  • s3::Store stamps the map as x-amz-meta-* headers on PutObject and CreateMultipartUpload (parts/complete and resumed uploads inherit from initiation per S3 semantics); gcs::Store stamps it as custom object metadata in the object-resource JSON. An empty map adds no headers, keeping requests byte-identical to before.
  • Nothing is persisted in the job queue: a retried job mints a fresh upload and receives an equivalent map from the backend.
  • Integration tests assert the metadata lands on the wire for S3 single-part, S3 multipart, and GCS, plus an end-to-end test driving a mocked create-upload response through the production SdkTransfer against replayed S3.

Plan: plans/completed/20260717-store-upload-metadata.md

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

ben-miru and others added 6 commits July 17, 2026 14:30
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ben-miru
ben-miru marked this pull request as ready for review July 17, 2026 22:15
@ben-miru ben-miru changed the title feat(upload): stamp backend upload metadata onto uploaded objects (S3/GCS) feat(upload): stamp backend-vended metadata onto uploaded objects Jul 17, 2026
@ben-miru
ben-miru merged commit c1f68d0 into main Jul 17, 2026
3 checks passed
@ben-miru
ben-miru deleted the feat/store-upload-metadata branch July 17, 2026 22:43
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