Skip to content

Conversation

@jiashengguo
Copy link
Member

@jiashengguo jiashengguo commented Jan 30, 2026

Summary by CodeRabbit

  • Chores

    • Version bumped to 0.2.7
    • Package metadata formatting cleaned
  • Changes

    • Default server port updated to 2311
  • Bug Fixes / Reliability

    • Improved startup error handling with clearer, colored error messages for port-in-use and missing generated model metadata

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 30, 2026 08:00
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Updates: package version bump and keywords reformat; CLI default port changed from 8008 to 2311; server startup now adds model-meta loading via try/catch, improved error handling (EADDRINUSE) and red console output; minor path handling refactor for zenstack resolution.

Changes

Cohort / File(s) Summary
Package Configuration
package.json
Version bumped from 0.2.6 to 0.2.7; keywords reformatted from single-line to multi-line; trailing newline status changed.
CLI Configuration
src/index.ts
Default CLI port changed: program.option('-p, --port <number>', ..., '2311') (was '8008').
Server startup & model loading
src/server.ts
Added red import for colored output; introduced zenstackAbsPath variable and unified model-meta loading via try/catch (load from zenstackAbsPath/model-meta or @zenstackhq/runtime/model-meta); throw CliError with guidance if missing; added HTTP server error listener to handle EADDRINUSE with red error and exit; preserved successful startup messages.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I nibbled at files, a gentle tweak,
Version hopped forward, ports hide-and-seek,
I stitched meta paths and colored the cry,
If ports are busy, I wave them goodbye —
Hooray for small fixes, a rabbit's cheeky peek!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title focuses on the port number change (8008 to 2311), but the changeset includes significant additional modifications: package version bump, keyword reformatting, and comprehensive error handling improvements in server startup. Update the title to reflect the full scope of changes, such as 'refactor: improve error handling and update default port to 2311' or keep it focused and create a summary documenting all changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jiasheng-dev

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.

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 updates the default port number for the ZenStack proxy server from 8008 to 2311 and bumps the package version from 0.2.6 to 0.2.7. The change also includes formatting improvements to the package.json file.

Changes:

  • Updated the default port number from 8008 to 2311 in the CLI options
  • Bumped package version from 0.2.6 to 0.2.7
  • Reformatted the keywords array in package.json for better readability

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/index.ts Changed the default port value from '8008' to '2311' in the command-line option definition
package.json Bumped version to 0.2.7 and reformatted keywords array to multi-line format

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/server.ts`:
- Around line 256-267: The error handler for server.on('error', (err:
NodeJS.ErrnoException) => { ... }) should not throw an exception because that
prevents the following process.exit(1) from running; replace the throw new
CliError(...) in the else branch with a console.error (including err.message or
err) so the error is logged and the function continues to reach process.exit(1);
reference the existing handler and symbols (server.on('error', ...), err.code,
options.port, CliError) and ensure the logged message provides context before
exiting.

@jiashengguo jiashengguo merged commit 9170e45 into dev Jan 30, 2026
3 checks passed
@jiashengguo jiashengguo deleted the jiasheng-dev branch January 30, 2026 12:15
@coderabbitai coderabbitai bot mentioned this pull request Jan 30, 2026
jiashengguo added a commit that referenced this pull request Jan 30, 2026
…#27)

* fix: update default port number for the server from 8008 to 2311

* fix: bump up version

* fix: enhance error handling for ZenStack module loading and server startup
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