feat: add @constructive-io/bucket-provisioner package#961
Merged
pyramation merged 2 commits intomainfrom Apr 3, 2026
Merged
Conversation
… bucket provisioning library
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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
New TypeScript library package
@constructive-io/bucket-provisionerthat programmatically provisions S3-compatible buckets with correct privacy configurations for the Constructive storage module.What it does:
private,public,temp)inspect()method to audit existing bucket configurationsPrivacy model:
privatepublictemp84 tests across 6 test suites, all passing. Build passes.
Updates since last revision
packages/bucket-provisionerandpackages/upload-clientto the CI test matrix inrun-tests.yaml. Both packages had passing tests locally but were not being picked up by the CI workflow (the matrix uses an explicitincludelist, not autodiscovery).Review & Testing Checklist for Human
provisioner.ts:124-180) — This is security-critical. Verify that private/temp buckets truly get full Block Public Access lockdown, public buckets get the right partial relaxation, and leftover policies are cleaned up on private/temp provision. Cross-reference withpolicies.ts:38-55.anycasts in error handling —provisioner.tsuseserr: anyin every catch block andas anycasts on lines 191 and 502. These are pragmatic for AWS SDK error shapes but could mask type issues. Decide if this is acceptable or if you'd prefer stricter typing (e.g., via@aws-sdk/smithy-clientServiceException).buildTempCleanupRule(0)andbuildAbortIncompleteMultipartRule(-5)will silently create rules with invalid expiration. Consider whether guard clauses are needed.pnpm-lock.yamldiff includes dependency deduplication (removing older@smithy/*duplicates). Verify these are benign and not introducing version conflicts.Suggested test plan: Import the library in an existing test or script, instantiate
BucketProvisionerwith MinIO credentials, and runprovision()+inspect()against a real MinIO instance to confirm the S3 commands actually work end-to-end.Notes
@constructive-io/upload-client(tsconfig structure, jest config, README header format).buildCloudFrontOacPolicyandbuildPresignedUrlIamPolicyare exported as standalone utilities but not used by the provisioner'sprovision()flow — they're reference implementations for DevOps setup.packages/upload-clientwas also missing from the CI matrix (merged in PR feat: add @constructive-io/upload-client package (Phase 2B) + README header fixes #960 without it); this PR adds it alongside bucket-provisioner.Link to Devin session: https://app.devin.ai/sessions/4c882ba2dfbf4045adf85fb83cde6f77
Requested by: @pyramation