Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive storage anchor service that provides encrypted object storage with PUT, GET, DELETE, and SEARCH operations. The implementation includes client-side encryption via EncryptedContainer, path-based access control policies, public/private visibility with pre-signed URLs, and quota enforcement with configurable limits.
Changes:
- Server implementation with authenticated HTTP endpoints and validation framework
- Client SDK with provider discovery and session-based API
- Memory backend with atomic operations and upload reservation system
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/storage/test-utils.ts | Test utilities including TestPathPolicy for path validation and MemoryStorageBackend for testing |
| src/services/storage/test-utils.test.ts | Comprehensive test suite for MemoryStorageBackend operations and path traversal prevention |
| src/services/storage/server.ts | HTTP server implementation with PUT/GET/DELETE/SEARCH endpoints and pre-signed URL support |
| src/services/storage/server.test.ts | Server integration tests covering authorization, validation, and security scenarios |
| src/services/storage/lib/validators.ts | Namespace validator framework for content validation with glob pattern matching |
| src/services/storage/lib/validators.test.ts | Tests for validator pattern matching and content validation logic |
| src/services/storage/common.ts | Shared types, error classes, and backend interfaces for storage service |
| src/services/storage/common.test.ts | Tests for path policy validation and parsing |
| src/services/storage/client.ts | Client SDK with provider discovery, session API, and operation methods |
| src/services/storage/client.test.ts | Client integration tests covering CRUD operations, search, quota, and sessions |
| src/lib/utils/tests/node.ts | Added setResolverInfo helper for test setup |
| src/lib/resolver.ts | Added storage service type definitions and lookup implementation |
| src/lib/resolver.test.ts | Refactored to use shared setResolverInfo helper |
| src/lib/http-server/index.ts | Added wildcard route support with priority for exact matches |
| src/lib/http-server/index.test.ts | Tests for wildcard routing behavior |
| src/lib/error.ts | Registered storage error classes for deserialization |
| src/client/index.ts | Exported Storage namespace with client config and class |
Comments suppressed due to low confidence (1)
src/services/storage/server.ts:1
- Parameter prefixed with
_ignoresuggests it's intentionally unused, but the parameter nameoperationwould be clearer if the underscore prefix is removed or the entire parameter name is_operationto match project conventions for unused parameters.
import type { ServiceMetadata } from '../../lib/resolver.ts';
3340788 to
8053c1a
Compare
b787490 to
627be64
Compare
627be64 to
7d5652c
Compare
sephynox
commented
Feb 3, 2026
Comment on lines
+206
to
+212
| quotas?: { | ||
| maxObjectSize: number; | ||
| maxObjectsPerUser: number; | ||
| maxStoragePerUser: number; | ||
| maxSearchLimit: number; | ||
| maxSignedUrlTTL: number; | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
TODO: Determine if these should be here.
sephynox
commented
Feb 3, 2026
Comment on lines
+298
to
+300
| 'storage': { | ||
| /* No search criteria - TODO? */ | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
TODO: How should we search?
sephynox
commented
Feb 3, 2026
| * Full storage backend combining all capabilities. | ||
| * Use this type when a backend supports CRUD, search, and quota management. | ||
| */ | ||
| export type FullStorageBackend = StorageBackend & SearchableStorage & QuotaManagedStorage; |
Contributor
Author
There was a problem hiding this comment.
TODO: Support partial backends?
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
This PR introduces a new storage anchor service:
PathPolicyhandles policies for anchor path managementEncryptedContainerwith optional author signing (RFC 5652 CMS SignerInfo)Key Changes