Skip to content

feat(clawhub): use domestic mirror registry for zh language users#751

Open
su8su wants to merge 6 commits intomainfrom
feat/support_clawhub_cn
Open

feat(clawhub): use domestic mirror registry for zh language users#751
su8su wants to merge 6 commits intomainfrom
feat/support_clawhub_cn

Conversation

@su8su
Copy link
Copy Markdown
Contributor

@su8su su8su commented Apr 2, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@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: 091025e5b6

ℹ️ 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".

env.ELECTRON_RUN_AS_NODE = '1';
}
if (language?.startsWith('zh')) {
env.CLAWHUB_REGISTRY = 'http://mirror-cn.clawhub.com';
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.

P1 Badge Use HTTPS for mirror registry override

The new CLAWHUB_REGISTRY override points to http://mirror-cn.clawhub.com, which forces Chinese-language users onto cleartext transport for registry access. Because this service is used to search/install skills, an on-path attacker can tamper with registry responses or downloaded artifacts in transit, which is a production security regression introduced by this commit. Please switch to an HTTPS mirror URL (or avoid overriding when TLS is unavailable).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@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: 9756d763e9

ℹ️ 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 +159 to +160
if (language?.startsWith('zh')) {
env.CLAWHUB_REGISTRY = 'https://mirror-cn.clawhub.com';
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.

P2 Badge Preserve explicit CLAWHUB_REGISTRY overrides

Because env is initialized from process.env, an existing CLAWHUB_REGISTRY value is currently an explicit user/operator override; this change unconditionally replaces it for any zh* language. In deployments that set a private/internal registry (or a different reachable mirror), Chinese-language users will now fail to use that configured endpoint, which is a behavior regression from prior versions. Only applying the mirror when CLAWHUB_REGISTRY is unset would keep the locale default without breaking intentional overrides.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@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: 3f1c2cd5ab

ℹ️ 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 +159 to +160
if (language?.startsWith('zh')) {
env.CLAWHUB_REGISTRY = 'https://mirror-cn.clawhub.com';
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.

P2 Badge Preserve configured CLAWHUB_REGISTRY overrides

This unconditionally rewrites CLAWHUB_REGISTRY for any zh* UI language, even when operators have already set process.env.CLAWHUB_REGISTRY to a private or reachable registry endpoint. In deployments that rely on an explicit registry override, Chinese-language users will now be forced to the mirror and can lose access to skill search/install; gate this assignment so it only applies when no explicit registry is configured.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@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: d6439abcf0

ℹ️ 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 +150 to 153
const env: Record<string, string | undefined> = {
...baseEnv,
CI: 'true',
FORCE_COLOR: '0',
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.

P1 Badge Apply zh mirror registry before spawning ClawHub CLI

The feature in this commit is not actually implemented in runtime code: runCommand still builds the child process environment with only baseline vars and CLAWHUB_WORKDIR, but never sets CLAWHUB_REGISTRY based on the UI language. That means zh users continue to use the default registry, and the newly added tests/unit/clawhub-registry.test.ts expectations cannot pass because spawn receives no registry override for zh* locales.

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