feat(pic): add costSchedule option and bump PocketIC to v13 - #264
Merged
nikosxenakis merged 4 commits intoApr 14, 2026
Conversation
Add `costSchedule` on `ApplicationSubnetConfig` so application subnets can opt into the `Free` canister cycles cost schedule. The option is typed only on application subnets; the server rejects non-default values on other kinds, which is covered by a new test. Bump the bundled PocketIC server to v13.0.0 and send the new required `cloud_engine` field (empty, not user-configurable) in the create-instance request.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for selecting a canister cycles cost schedule for application subnets (notably Free), and updates the bundled PocketIC server integration to match the v13.0.0 server contract.
Changes:
- Add
costSchedule?: CanisterCyclesCostScheduletoApplicationSubnetConfigand introduce theCanisterCyclesCostScheduleenum. - Update create-instance request encoding to include
cost_scheduleon subnet specs and send the new requiredcloud_enginefield (empty array). - Bump the downloaded PocketIC server binary from v12.0.0 to v13.0.0 and add a test covering acceptance/rejection behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/pic/tests/src/cost-schedule.spec.ts | New tests validating default/Free cost schedule behavior and server-side rejection on non-application subnets |
| packages/pic/src/pocket-ic-types.ts | Public API typing: introduces CanisterCyclesCostSchedule and exposes costSchedule only on application subnets |
| packages/pic/src/pocket-ic-client-types.ts | Client-side request encoding: adds cost_schedule encoding and includes required cloud_engine field for v13 |
| packages/pic/postinstall.mjs | Bumps PocketIC binary download to v13.0.0 |
| CHANGELOG.md | Documents the new option and the PocketIC server bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses PR dfinity#264 review feedback. Move costSchedule off the base SubnetConfig onto ApplicationSubnetConfig only, route encoding through a dedicated application helper, rename the test suite to match, and drop the obsolete server-reject test now that enforcement is type-level.
nikosxenakis
previously approved these changes
Apr 14, 2026
nikosxenakis
left a comment
Contributor
There was a problem hiding this comment.
Looks good, some minor comments to address, accepting.
Add a comment in the default-schedule cost test clarifying that advancing time by 30 days accrues idle resource costs (memory and compute allocation), which is what drains the cycles balance under the Normal schedule.
nikosxenakis
previously approved these changes
Apr 14, 2026
github-actions
Bot
dismissed
nikosxenakis’s stale review
April 14, 2026 10:12
Review dismissed by automation script.
nikosxenakis
approved these changes
Apr 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Apr 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Apr 14, 2026
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.
Add
costScheduleonApplicationSubnetConfigso application subnets can opt into theFreecanister cycles cost schedule. The option is typed only on application subnets; the server rejects non-default values on other kinds, which is covered by a new test.Bump the bundled PocketIC server to v13.0.0 and send the new required
cloud_enginefield (empty, not user-configurable) in the create-instance request.