Commit Graph
6 Commits
Author SHA1 Message Date
muse 1009e9d783 fix(host): _load_config_file 与 init 的 open() 改用 with 关闭
行号纠正:摘要的 2199/2443 是另一基线行号;origin/main
aebc623 上两处是 _load_config_file 的 json.load(open(path))
与 main() init 分支的 json.dump(init_cfg, open(...)),
2443 行在 aebc623 上是 if not args.repo: 并无 open。
只改资源关闭:open 参数、读写内容、错误语义(坏 JSON 仍
转 RuntimeError)均不变,不加 encoding、不改其它裸 open()。
回归:ConfigFileCloseTest(3 项),旧代码上 3 项全 fail、
新代码上全 pass(warnings 过滤 + gc 证明无 ResourceWarning)。
2026-11-04 20:56:06 +00:00
muse 714b83903a fix(host): _read_loop 跳过非 dict JSON 消息,不再静默死亡
收到合法 JSON 但值不是 dict(如 ""、123、[]、null)时,
旧代码走到 msg.get('params') 抛 AttributeError/TypeError,
被外层 except 吞掉后读线程退出,此后所有 request() 等到超时。
现校验后记 stderr 日志并跳过,读循环继续;脏消息不进
events、不当正常请求处理。畸形 JSON 本已由 json.loads 的
except continue 处理,本次未改动该路径。
回归:tests/test_host_bugfix_host.py ReadLoopNonDictTest(2 项)
2026-11-04 20:56:06 +00:00
muse e6e1e4b4f3 CI: install GNU tar on Alpine runner (deploy test uses tar --transform, BusyBox tar does not support it; apk tar gives GNU tar 1.35)
ci / test (push) Successful in 17m8s
2026-11-04 17:48:08 +01:00
muse fc20296847 CI: sleep BEFORE write_control in playwright race test (sleep after write does not change file mtime, so previous fix could not work; runner mtime lags wall clock ~1ms)
ci / test (push) Failing after 16m8s
2026-11-04 17:30:07 +01:00
muse c1cb3f3d82 CI: tolerate runner mtime lag and stream heartbeat race in 2 browser tests (test-only, no production code change; playwright: 0.05s sleep after write_control, runner mtime lags wall clock 0.2-1.0ms; stream: drain waiting heartbeats until EOF after terminal status)
ci / test (push) Failing after 16m9s
2026-11-04 17:11:23 +01:00
muse a2c539999e CI: install curl and gh on Alpine runner (monitor health check needs curl, PR tests need gh)
ci / test (push) Failing after 15m8s
2026-11-04 16:46:26 +01:00