Skip to content

fix: reliable upload and doctor exit statuses - #1

Merged
sunxiuguo merged 1 commit into
masterfrom
fix/cli-exit-status-regressions
Oct 5, 2026
Merged

sunxiuguo merged 1 commit into
masterfrom
fix/cli-exit-status-regressions

Conversation

@sunxiuguo

@sunxiuguo sunxiuguo commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Let successful uploads finish normally instead of always exiting with status 1.
  • Return failure status for invalid doctor/upload configuration and unavailable project configuration.
  • Return command promises and handle asynchronous errors at the CLI boundary, preserving errors for callers of MiniprogramCi.upload().
  • Use the actual CPU count, with a minimum of one upload thread.
  • Add 23 isolated regression tests, Node.js 22/24 CI, and Chinese/English troubleshooting documentation.

Verification

  • npm ci --cache /tmp/miniprogram-deploy-npm-cache --no-audit --no-fund: passed.
  • npm test: passed, 23 tests on Node.js 24.19.0. Includes schema regeneration and TypeScript compilation.
  • The same tests against unchanged baseline production code reproduced 15 failures.
  • git diff --check and JavaScript syntax checks: passed.
  • JSON schema is unchanged after regeneration.
  • GitHub Actions passed on Node.js 22 and 24 for commit f69ff7830a855b49c00eb62de6ab2856f79060e5: test run.

Scope and limitations

Tests replace the WeChat SDK, Git, and interactive input in isolated child processes. No real credentials are read and no real WeChat uploads are performed. Actual SDK/service compatibility still requires an authorized integration environment. The legacy SDK's worker managers use 10-second idle cleanup timers; the process may remain alive while those workers finish. Real SDK background-network shutdown is outside the mocked test suite.

This change keeps the current SDK/dependency versions, lockfile, package version, and ISC declaration. It does not publish an npm release.

中文说明

修复上传成功仍返回失败、配置检查失败却返回成功、异步错误无法传递和 CPU 线程数读取错误。新增回归测试与 CI,并补充中英文排障说明。真实微信上传不在本次测试范围内;依赖升级和版本发布另行处理。

@sunxiuguo
sunxiuguo marked this pull request as ready for review October 5, 2026 02:13
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@sunxiuguo
sunxiuguo merged commit a8608cc into master Oct 5, 2026
2 checks passed
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