Skip to content

wip: object versioning - #1310

Draft
TylerHillery wants to merge 10 commits into
masterfrom
tyler/feat/object-versioning
Draft

wip: object versioning#1310
TylerHillery wants to merge 10 commits into
masterfrom
tyler/feat/object-versioning

Conversation

@TylerHillery

@TylerHillery TylerHillery commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Not yet ready for review, still need to make a couple more passes over it myself, need to add tests, and plan on hard pushing to this branch after breaking up the WIP commit into more digestible chunks.

Opening as draft now so I can start leaving comments on specific parts of the diff so I can get input on those specific areas, not asking for a full review yet.

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Known gaps I am leaving for follow up PRs:

  • S3 protocol parity beyond PUT/DELETE (native protocol is the priority right now)

Will update this description once it's ready for review.

@blacksmith-sh

This comment has been minimized.

@TylerHillery
TylerHillery force-pushed the tyler/feat/object-versioning branch from bc1e440 to 2837f3d Compare August 8, 2026 13:48
@coveralls

coveralls commented Aug 8, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31519678713

Coverage decreased (-0.9%) to 80.008%

Details

  • Coverage decreased (-0.9%) from the base build.
  • Patch coverage: 153 uncovered changes across 11 files (194 of 347 lines covered, 55.91%).
  • 1 coverage regression across 1 file.

Uncovered Changes

Top 10 Files by Coverage Impact Changed Covered %
src/storage/database/pg.ts 176 82 46.59%
src/storage/object.ts 91 49 53.85%
src/http/routes/object/getObject.ts 10 6 60.0%
src/http/routes/object/getObjectInfo.ts 11 7 63.64%
src/storage/scanner/scanner.ts 3 1 33.33%
src/storage/uploader.ts 10 8 80.0%
src/http/routes/object/listObjects.ts 5 4 80.0%
src/http/routes/object/listObjectsV2.ts 3 2 66.67%
src/internal/errors/codes.ts 2 1 50.0%
src/internal/errors/storage-error.ts 6 5 83.33%
Total (23 files) 347 194 55.91%

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
src/storage/database/pg.ts 1 76.78%

Coverage Stats

Coverage Status
Relevant Lines: 13078
Covered Lines: 10914
Line Coverage: 83.45%
Relevant Branches: 7935
Covered Branches: 5898
Branch Coverage: 74.33%
Branches in Coverage %: Yes
Coverage Strength: 510.38 hits per line

💛 - Coveralls

@TylerHillery
TylerHillery force-pushed the tyler/feat/object-versioning branch 7 times, most recently from 3847293 to 94e5bbd Compare August 11, 2026 00:04
@TylerHillery
TylerHillery requested a balanced review from Copilot August 11, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces bucket-level object versioning across persistence, uploads, object operations, native HTTP routes, and partial S3/TUS protocol support.

Changes:

  • Adds versioning states, historical object rows, delete markers, version-aware pagination, and migration compatibility policies.
  • Extends upload, copy, move, delete, download, signed URL, search, and listing flows with version identifiers.
  • Updates schemas, errors, bucket APIs, protocol handlers, and existing tests for the new object model.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/test/uploader.test.ts Supplies versioning state to uploader tests.
src/test/tus.test.ts Updates expected persisted object fields.
src/test/scanner.test.ts Supplies versioning state during scanner setup.
src/storage/uploader.ts Selects version-aware write primitives and exposes version IDs.
src/storage/schemas/object.ts Adds versioning and delete-marker object fields.
src/storage/schemas/bucket.ts Adds bucket versioning status.
src/storage/protocols/s3/s3-handler.ts Integrates versioning into S3 upload paths.
src/storage/protocols/s3/s3-handler.test.ts Updates S3 handler mocks for bucket versioning.
src/storage/object.ts Implements version-aware object lifecycle operations.
src/storage/object-delete.test.ts Updates delete tests with bucket state lookup.
src/storage/database/pg.ts Implements version persistence, lookup, filtering, and pagination.
src/storage/database/columns.ts Adds migration-aware bucket column policies.
src/storage/database/adapter.ts Extends the database contract for versioning.
src/internal/errors/storage-error.ts Adds metadata to rendered storage errors.
src/internal/errors/codes.ts Adds the version delete-marker 405 error.
src/internal/database/migrations/types.ts Registers migration 62.
src/internal/auth/jwt.ts Adds signed URL version pinning.
src/http/routes/tus/lifecycle.ts Applies bucket versioning to resumable uploads.
src/http/routes/tus/lifecycle.test.ts Adds version-aware bucket mocks.
src/http/routes/s3/router.test.ts Updates multipart S3 test storage mocks.
src/http/routes/object/updateObject.ts Returns uploaded version IDs.
src/http/routes/object/moveObject.ts Supports moving a specific version.
src/http/routes/object/listObjectsV2.ts Adds version and exact-match listing filters.
src/http/routes/object/listObjects.ts Adds version-aware search filters.
src/http/routes/object/getSignedURL.ts Supports version-pinned signed URLs.
src/http/routes/object/getSignedObject.ts Resolves pinned signed URL versions.
src/http/routes/object/getObjectInfo.ts Supports version-specific object metadata lookup.
src/http/routes/object/getObject.ts Supports downloading specific versions.
src/http/routes/object/deleteObjects.ts Supports bulk deletion by version.
src/http/routes/object/deleteObject.ts Supports delete markers and version deletion.
src/http/routes/object/createObject.ts Returns created version IDs.
src/http/routes/object/copyObject.ts Supports copying a specific source version.
src/http/routes/bucket/updateBucket.ts Exposes versioning state transitions.
src/http/routes/bucket/getBucket.ts Returns bucket versioning state.
src/http/routes/bucket/getAllBuckets.ts Includes versioning state in bucket lists.
src/http/routes/bucket/createBucket.ts Supports enabling versioning at creation.
migrations/tenant/0062-object-versioning.sql Adds versioning columns, indexes, and SQL functions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/storage/object.ts Outdated
Comment thread src/storage/object.ts
Comment thread src/storage/database/pg.ts
Comment thread src/internal/errors/storage-error.ts Outdated
Comment thread migrations/tenant/0062-object-versioning.sql Outdated
Comment thread migrations/tenant/0062-object-versioning.sql Outdated
Comment thread src/storage/protocols/s3/s3-handler.ts
@TylerHillery
TylerHillery force-pushed the tyler/feat/object-versioning branch 4 times, most recently from 0ab12c9 to 4138f3a Compare August 11, 2026 15:25
@TylerHillery
TylerHillery force-pushed the tyler/feat/object-versioning branch from 4138f3a to 75a924c Compare August 11, 2026 17:50
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.

3 participants