fix(opencli): diagnose OPENCLI_DAEMON_PORT conflict instead of blaming node - #465
Closed
suyash-lyzr wants to merge 1 commit into
Closed
fix(opencli): diagnose OPENCLI_DAEMON_PORT conflict instead of blaming node#465suyash-lyzr wants to merge 1 commit into
suyash-lyzr wants to merge 1 commit into
Conversation
…g node opencli >=1.8 hard-exits (EX_CONFIG/78) when OPENCLI_DAEMON_PORT is set, even to the default port, and the guard runs before --version so every probe fails. The OpenCLIApp desktop build still injects this var, so a fresh macOS app install is dead-on-arrival and doctor reported a misleading 'node broken -> npm reinstall' hint. Detect the rejection from probe output and prescribe 'unset OPENCLI_DAEMON_PORT' instead, noting node is fine. Adds env_conflict to OpenCLIStatus, a dedicated summary line, and a regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
|
感谢定位 OPENCLI_DAEMON_PORT 环境冲突。main 已在子进程探测中剥离该变量并保留宿主环境,回归测试已覆盖,因此关闭。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On machines with the OpenCLIApp desktop build, every OpenCLI-backed channel (Reddit / Facebook / Instagram / XiaoHongShu / Bilibili) is reported as broken with a misleading fix:
The node environment is fine. The real cause:
opencli >=1.8hard-exits withEX_CONFIG(78) the momentOPENCLI_DAEMON_PORTis set — even to the correct default port — and the guard runs before--version, so every probe (including--version) fails. The OpenCLIApp desktop build still injectsOPENCLI_DAEMON_PORT=19825into the CLI's environment, so a fresh macOS app install is effectively dead-on-arrival, andnpm installdoes nothing to fix it.Fix
Detect the rejection from the probe output and prescribe the actual remedy (
unset OPENCLI_DAEMON_PORT), noting node is fine — instead of a useless reinstall.env_conflicttoOpenCLIStatus+ a dedicatedopencli_summarylineunset OPENCLI_DAEMON_PORT) rather than "reinstall node"Verification
Reproduced live against the real OpenCLIApp shim: exit code
78, output containsOPENCLI_DAEMON_PORT is no longer supported (received 19825). The patched probe now returnsenv_conflict=Trueand the summary/hint direct the user tounset OPENCLI_DAEMON_PORT.🤖 Generated with Claude Code