fix(storage): support bucket-scoped Spaces archives - #609
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The changes span storage signing, lifecycle security, deployment tooling, and CI, warranting final human review.
Pull request overview
Adds bucket-scoped DigitalOcean Spaces archive support by correcting SigV4 key encoding and introducing lifecycle attestations.
Changes:
- Preserves object-key separators while escaping literal percent signs.
- Adds lifecycle verification, atomic publication, and adapter validation.
- Extends tests, CI, and deployment documentation.
File summaries
| File | Description |
|---|---|
tests/unit/test_storage_archive.c |
Tests archive behavior, attestations, and key encoding. |
tests/unit/test_archive_operator.py |
Tests lifecycle helper validation and publication. |
tests/unit/s3_fixture.py |
Covers encoded separators and provider failures. |
tests/unit/CMakeLists.txt |
Registers the operator test suite. |
src/storage/storage_s3.c |
Implements corrected key encoding and attestation validation. |
docs/STORAGE_ARCHIVE.md |
Documents scoped credentials and refresh behavior. |
deployment/archive/verify_bucket_lifecycle.py |
Validates and atomically publishes lifecycle attestations. |
.github/workflows/integration-test.yml |
Runs the expanded test suite. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
DigitalOcean Spaces rejects the current archive adapter in two places: bucket-scoped credentials receive 403 for lifecycle inspection, and escaping object-key path separators produces
SignatureDoesNotMatchduring uploads.Preserve path separators while escaping literal percent signs and other key characters. For providers that deny lifecycle inspection, accept an optional operator verification file beside the scoped credentials. The file must have private permissions, bind the exact endpoint/region/bucket, contain safe lifecycle rules, and be less than one hour old. Readable unsafe rules, failed versioning checks, provider outages, and public object access still fail. Account-wide credentials stay in the control plane. The included operator helper validates bucket configuration and atomically publishes the file; deployment documentation explains refresh and the bounded configuration-check delay.
Validation:
%2F, spaces, expired/future verification, mismatched bucket/region/endpoint, unsafe rules, file permissions, symlinks, and provider failures.