Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Dec 9, 2025

WHAT

Same as #1006, but for V8 Naga

TEST

...

Copilot AI review requested due to automatic review settings December 9, 2025 22:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds versioned key update support to the wrapped-keys package, enabling rotation of encrypted key ciphertext while preserving historical versions. This is part of the V8 Naga release and mirrors functionality from PR #1006.

Key Changes:

  • Adds updateEncryptedKey API function for rotating wrapped key ciphertext with version tracking
  • Extends metadata types to support optional updatedAt timestamps and versions history
  • Introduces includeVersions query parameter to optionally fetch version history

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/wrapped-keys/src/lib/types.ts Adds WrappedKeyVersion, UpdateEncryptedKeyParams, and UpdateEncryptedKeyResult types; extends existing metadata types with updatedAt and versions fields
packages/wrapped-keys/src/lib/service-client/types.ts Adds UpdateKeyParams interface and extends HTTP method union to include PUT
packages/wrapped-keys/src/lib/service-client/client.ts Implements updatePrivateKey function and adds includeVersions query parameter support to fetchPrivateKey
packages/wrapped-keys/src/lib/api/update-encrypted-key.ts New API wrapper function that orchestrates key updates using PKP session signatures
packages/wrapped-keys/src/lib/api/index.ts Exports the new updateEncryptedKey function
packages/wrapped-keys/src/lib/api/get-encrypted-key.ts Passes through includeVersions parameter to service client
packages/wrapped-keys/src/lib/service-client/index.ts Exports the new updatePrivateKey function
packages/wrapped-keys/src/index.ts Exports new API function and types for public consumption
packages/e2e/src/test-helpers/executeJs/wrappedKeys.ts Adds comprehensive E2E test validating update functionality and version history retrieval

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to +73
updatedAt?: string;
versions?: WrappedKeyVersion[];
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The new updatedAt and versions properties should be documented in the JSDoc comment above. Add property descriptions following the established pattern:

 * @property { string } [updatedAt] ISO 8601 timestamp of when the key was last updated
 * @property { WrappedKeyVersion[] } [versions] Array of historical versions of this key after update operations

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Ansonhkg and others added 2 commits December 10, 2025 16:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Anson <ansonox@gmail.com>
Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1009, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1010, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1011, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1012, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits December 10, 2025 16:37
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
…adata

Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
…rams

Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
[WIP] Address feedback on versioned key update support
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Ansonhkg
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

…r-one

[WIP] Address feedback on versioned key update support
[WIP] Address feedback on versioned key update support
Add detailed JSDoc documentation to UpdateEncryptedKeyResult interface
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1013, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1014, to work on those changes. Once the pull request is ready, I'll request review from you.

Ansonhkg and others added 7 commits December 10, 2025 17:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Anson <ansonox@gmail.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
Co-authored-by: Ansonhkg <4049673+Ansonhkg@users.noreply.github.com>
…re-time

Add test coverage for evmContractConditions in updateEncryptedKey
…-work

Add JSDoc documentation for UpdateEncryptedKeyParams type
@Ansonhkg
Copy link
Collaborator Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Dec 10, 2025

@Ansonhkg I've opened a new pull request, #1015, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants