Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add http gateway support#233

Open
nathanosdev wants to merge 7 commits intodfinity:main from
nathanosdev:nathan/http-gateway-support
Open

feat: add http gateway support #233
nathanosdev wants to merge 7 commits intodfinity:main from
nathanosdev:nathan/http-gateway-support

Conversation

@nathanosdev
Copy link
Contributor

@nathanosdev nathanosdev commented Feb 2, 2026

This PR adds support for pocket ic "live" mode. This will enable auto progress and run an HTTP Gateway.

Copilot AI review requested due to automatic review settings February 2, 2026 20:57
@nathanosdev nathanosdev requested a review from a team as a code owner February 2, 2026 20:57
Copy link

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 implements HTTP gateway support for PocketIC instances by introducing "live" mode functionality. This allows automated time progression and the ability to test HTTP canisters through an HTTP gateway instead of only the PIC actor interface.

Changes:

  • Added makeLive() and stopLive() methods to PocketIC to enable/disable auto progress and HTTP gateway
  • Created a new HTTP example demonstrating the live mode functionality
  • Updated the Todo example to showcase live mode usage with agent-js

Reviewed changes

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

Show a summary per file
File Description
packages/pic/src/pocket-ic.ts Added makeLive() and stopLive() methods with HTTP gateway port tracking
packages/pic/src/pocket-ic-client.ts Implemented HTTP gateway and auto-progress client methods
packages/pic/src/pocket-ic-client-types.ts Added type definitions for live mode requests/responses
packages/pic/src/http2-client.ts Enhanced response handling for boolean returns and empty bodies
examples/http/* New example demonstrating HTTP canister testing in live mode
examples/todo/tests/src/live-todo.spec.ts New test demonstrating live mode with agent-js
dfx.json Updated dfx version and added http canister configuration
package.json Updated pnpm version and added http example test scripts
Cargo.toml Added http example to workspace members
.node-version Updated Node.js version

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

raymondk
raymondk previously approved these changes Feb 3, 2026
@marc0olo marc0olo force-pushed the nathan/http-gateway-support branch from b3ca819 to 6adb217 Compare February 17, 2026 14:00
Copy link
Member

The HTTP test is skipped on macOS CI runners because *.localhost subdomains don't resolve there (mDNSResponder is disabled by GitHub Actions). The test runs fine on Linux CI and locally on macOS.

This could be resolved upstream if the PocketIC HTTP gateway supported ?canisterId= query param routing (like IC boundary nodes do), removing the need for subdomain-based DNS resolution entirely. (cc @mraszyk)

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

Reviewers

Copilot code review Copilot Copilot left review comments

@raymondk raymondk Awaiting requested review from raymondk

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Comments

AltStyle によって変換されたページ (->オリジナル) /