Skip to content

feat(cli): add official wire file support and build-web command#1455

Open
Nietzsche-Ubermensch wants to merge 1 commit intoMoonshotAI:mainfrom
Nietzsche-Ubermensch:agent/from-pathlib-import-path-import-re-p-pathmntdataki-75-l3-claude
Open

feat(cli): add official wire file support and build-web command#1455
Nietzsche-Ubermensch wants to merge 1 commit intoMoonshotAI:mainfrom
Nietzsche-Ubermensch:agent/from-pathlib-import-path-import-re-p-pathmntdataki-75-l3-claude

Conversation

@Nietzsche-Ubermensch
Copy link

@Nietzsche-Ubermensch Nietzsche-Ubermensch commented Mar 17, 2026

Related Issue

Resolve #(issue_number)

Description

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines 195 to 197
restrict_sensitive_apis=restrict_sensitive_apis,
lan_only=lan_only,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Missing ctx.invoked_subcommand guard causes build-web subcommand to never execute

The web() callback decorated with @cli.callback(invoke_without_command=True) unconditionally calls run_web_server(), which is a blocking call (it runs uvicorn.run() at src/kimi_cli/web/app.py:534). When a user runs kimi web build-web, Typer invokes the group callback first, so the web server starts and blocks forever — the build_web() command never executes. The established pattern in this codebase is to guard with if ctx.invoked_subcommand is not None: return, as done in src/kimi_cli/cli/__init__.py:325.

(Refers to lines 176-197)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 067b4408a3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +200 to +201
@cli.command(name="build-web")
def build_web(

Choose a reason for hiding this comment

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

P1 Badge Skip web callback when running build-web subcommand

This subcommand is registered under the same Typer/Click group whose callback unconditionally starts run_web_server, and there is no ctx.invoked_subcommand guard here; in Click groups, callbacks run before subcommands, so kimi web build-web will enter the server path first and the new build command will not run as intended. The top-level CLI already handles this pattern by returning early when a subcommand is invoked (src/kimi_cli/cli/__init__.py:325), so this should do the same.

Useful? React with 👍 / 👎.

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