Skip to content

chore: fix zapi usage#307

Merged
spiral-ladder merged 5 commits intomainfrom
bing/zapi-update
Apr 8, 2026
Merged

chore: fix zapi usage#307
spiral-ladder merged 5 commits intomainfrom
bing/zapi-update

Conversation

@spiral-ladder
Copy link
Copy Markdown
Collaborator

fixes:

  • zapi namespace update
  • update to env.wrap() that allows new optional napi.Ref
  • new error message

@spiral-ladder spiral-ladder self-assigned this Apr 7, 2026
@spiral-ladder spiral-ladder requested a review from a team as a code owner April 7, 2026 14:16
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the project's integration with the ZAPI library. It involves migrating to a new namespace, adjusting function calls to accommodate updated API signatures, and refining error reporting in the test suite to improve debugging clarity.

Highlights

  • ZAPI Namespace Update: Updated the ZAPI dependency import and module configuration from 'zapi:napi' to 'zapi:zapi' across all binding files and build configurations.
  • API Usage Improvements: Updated 'env.wrap()' calls to support a new optional 'napi.Ref' parameter, ensuring compatibility with the updated ZAPI library.
  • Error Handling: Updated the error message in the shuffle test suite to 'Native callback failed' to better reflect the underlying issue.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the zapi dependency, renames the module import to zapi:zapi, and adjusts constructor calls to include a new argument. Feedback focuses on adhering to the style guide by clarifying null literals with inline comments (Rule 287), using newlines to group resource allocations (Rule 377), and adding assertions for function arguments (Rule 51). A regression in error message specificity was also identified in the test suite, which impacts developer experience.

Comment thread bindings/napi/BeaconStateView.zig
Comment thread bindings/napi/blst.zig
Comment thread bindings/napi/blst.zig
Comment thread bindings/napi/blst.zig
expect(() => {
innerShuffleList(invalidInput as any, seed, rounds, forwards);
}).toThrow("Invalid argument");
}).toThrow("Native callback failed");
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.

medium

The error message expectation has changed from 'Invalid argument' to 'Native callback failed'. This generic message is less descriptive and represents a regression in developer experience (Rule 207). Consider if the native bindings or the zapi library can be updated to propagate more specific error names to the JavaScript environment.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

think both messages are equally vague and should be fixed on the zapi level instead of here

@spiral-ladder spiral-ladder merged commit 5c50ab4 into main Apr 8, 2026
13 checks passed
@spiral-ladder spiral-ladder deleted the bing/zapi-update branch April 8, 2026 15:18
nazarhussain added a commit that referenced this pull request Apr 8, 2026
Resolve conflicts with 5c50ab4 (chore: fix zapi usage #307).
Main's changes (import rename to zapi:zapi, env.wrap extra param,
error message update) are all superseded by the DSL rewrite — kept
our version for all 15 conflicted files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants