Skip to content

emrg: build-release 十八次修复 — smoke Windows daemon 用 cmd start(rant #13) - #386

Merged
argszero merged 1 commit into
masterfrom
feature/build-release-fixes18
Aug 4, 2026
Merged

emrg: build-release 十八次修复 — smoke Windows daemon 用 cmd start(rant #13)#386
argszero merged 1 commit into
masterfrom
feature/build-release-fixes18

Conversation

@argszero

@argszero argszero commented Aug 4, 2026

Copy link
Copy Markdown
Owner

第 18 次实跑:3/4 平台成功,Windows Inno 编译通过,smoke 8 pass / 3 fail(从 7/4 改善——emrg --version + python+deps 已过,DLL 修复生效)。

3 个 fail 均与 daemon 启动有关

    1. daemon did not write port file
    1. server stop(依赖 daemon)
    1. rant(daemon not running)

根因:smoke 用 nohup emrgd & 后台启动 bash 版 emrgd——Windows Git Bash 无完整 POSIX 进程模型,nohup 后台 bash 脚本立即退出 → daemon 未实际运行 → 不写 port 文件。GUI 实际用 emrgd.cmd(cmd 启动器)不受影响。

修复(R101):smoke-test.sh 两处 daemon 启动加平台分支——Windows(${WINDIR} 或存在 emrgd.cmd)用 cmd //c "start /b .../emrgd.cmd" 后台启动;POSIX 保持 nohup emrgd(与原来完全一致)。

验证

  • bash -n OK
  • 分支选择模拟:POSIX→nohup ✓;Windows→cmd ✓
  • pytest 464 passed;import checks OK

背景:rant #13 Phase 4 发布期。合并后重打 tag 第 19 次实跑,预期 4/4 全绿 → Release 发布。

第 18 次实跑:3/4 平台成功,Windows Inno 编译通过,smoke 8 pass / 3 fail
(从 7/4 改善——emrg --version + python+deps 已过,DLL 修复生效)。

3 个 fail 均与 daemon 启动有关:
  2. daemon did not write port file
  4. server stop(依赖 daemon)
  5. rant(daemon not running)

根因:smoke 用 `nohup emrgd & ` 后台启动 bash 版 emrgd——Windows Git
Bash 无完整 POSIX 进程模型,nohup 后台 bash 脚本立即退出 → daemon 未
实际运行 → 不写 port 文件。GUI 实际用 emrgd.cmd(cmd 启动器)不受影响。

修复(R101):smoke-test.sh 两处 daemon 启动加平台分支——
Windows(WINDIR 或存在 emrgd.cmd)用 `cmd //c start /b emrgd.cmd`
后台启动;POSIX 保持 nohup emrgd(与原来完全一致)。

验证:
- bash -n OK
- 分支选择模拟:POSIX→nohup ✓;Windows→cmd ✓
- pytest 464 passed;import checks OK
- 注:未本机跑完整 smoke(其 pkill 会杀宿主 daemon 影响会话)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260805-0085

审查内容:smoke-test.sh 两处 daemon 启动加 Windows 分支(cmd //c start /b emrgd.cmd),POSIX 保持 nohup。修第 18 次实跑 smoke 3 fail(daemon 未启动)。

验证:bash -n OK;分支模拟(POSIX→nohup / Windows→cmd)正确;pytest 464 passed。根因分析准确(Git Bash nohup 后台 bash 脚本立即退出)。

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260805-0086

第二次复核:diff 与上轮一致(smoke-test.sh 两处 daemon 启动加 Windows cmd 分支,POSIX 保持 nohup)。bash -n OK;分支模拟正确。无新增问题。

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260805-0087

第三次复核:diff 稳定(smoke-test.sh 两处 daemon 启动 Windows cmd 分支)。bash -n OK;分支模拟正确;pytest 464 passed。3 个不同 cycle(0085/0086/0087)连续 LGTM,满足合并条件。

@argszero
argszero merged commit 1ac2d76 into master Aug 4, 2026
1 check passed
argszero added a commit that referenced this pull request Aug 4, 2026
…387)

第 19 次实跑 4 平台全失败(exit 127)——PR #386 引入回归:
smoke-test.sh 的 Windows 判断 `[ -n "${WINDIR:-}" ] || [ -f .../emrgd.cmd ]`
在 macOS/Linux 误判为 Windows——build-runtime.sh 第 70 行跨平台复制
emrgd.cmd(POSIX 也有此文件)→ 文件探测恒真 → macOS 走 cmd 分支 →
macOS 无 cmd 命令 → exit 127。

修复:Windows 判断只保留 ${WINDIR} 环境变量(Windows Git Bash 必有,
macOS/Linux 无),去掉文件探测。2 处同步。

验证:
- bash -n OK
- macOS 模拟(无 WINDIR 但有 emrgd.cmd 文件)→ nohup ✓
- Windows 模拟(有 WINDIR)→ cmd ✓
- pytest 464 passed;import checks OK
@argszero
argszero deleted the feature/build-release-fixes18 branch August 5, 2026 06:18
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