Skip to content

fix: forward MarmotClient capabilities to KeyPackageManager#74

Open
maddadder wants to merge 1 commit into
marmot-protocol:masterfrom
maddadder:master
Open

fix: forward MarmotClient capabilities to KeyPackageManager#74
maddadder wants to merge 1 commit into
marmot-protocol:masterfrom
maddadder:master

Conversation

@maddadder

@maddadder maddadder commented May 27, 2026

Copy link
Copy Markdown

The capabilities option on MarmotClient was stored on the instance but never passed to KeyPackageManager, so generateKeyPackage() always fell back to defaultCapabilities(). Custom capabilities (e.g. SelfRemove proposal 0x000A required by Amethyst for MDK interop) were silently ignored. Forward this.capabilities to KeyPackageManager and through to generateKeyPackage() in create() (which also covers rotate()).

See #73


Open in Stage

Summary by CodeRabbit

Release Notes

  • New Features
    • Client capabilities are now properly applied during key package generation, ensuring custom configuration is respected throughout the lifecycle.

Review Change Stack

The capabilities option on MarmotClient was stored on the instance but never passed to KeyPackageManager, so generateKeyPackage() always fell back to defaultCapabilities(). Custom capabilities (e.g. SelfRemove proposal 0x000A required by Amethyst for MDK interop) were silently ignored. Forward this.capabilities to KeyPackageManager and through to generateKeyPackage() in create() (which also covers rotate()).
@changeset-bot

changeset-bot Bot commented May 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 855891b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@internet-privacy/marmot-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stage-review

stage-review Bot commented May 27, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 3 individual chapters for you:

Title
1 Update KeyPackageManager to support custom capabilities
2 Forward MarmotClient capabilities to KeyPackageManager
3 Add changeset for capability forwarding fix
Open in Stage

Chapters generated by Stage for commit 855891b on May 27, 2026 3:17pm UTC.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9929be5c-15ed-4dda-b91a-7e6f13e9b65c

📥 Commits

Reviewing files that changed from the base of the PR and between 644f6d2 and 855891b.

📒 Files selected for processing (3)
  • .changeset/forward-client-capabilities-to-key-packages.md
  • src/client/key-package-manager.ts
  • src/client/marmot-client.ts

Walkthrough

This PR enables client capabilities to be forwarded to key package generation. KeyPackageManager gains an optional capabilities configuration field that is stored and passed to generateKeyPackage, and MarmotClient now passes its capabilities when constructing the manager.

Changes

Capabilities forwarding to key package generation

Layer / File(s) Summary
KeyPackageManager capabilities support
src/client/key-package-manager.ts
The Capabilities type is imported, an optional capabilities field is added to KeyPackageManagerOptions, a private field stores it, the constructor initializes it from options, and the field is passed to generateKeyPackage during key package creation.
Client capabilities forwarding and documentation
src/client/marmot-client.ts, .changeset/forward-client-capabilities-to-key-packages.md
MarmotClient passes this.capabilities when constructing KeyPackageManager, ensuring custom capabilities are applied to generated key packages. A changeset documents the behavioral update.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: forwarding MarmotClient capabilities to KeyPackageManager to fix a bug where custom capabilities were being ignored.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant