muse
1156d3c754
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-03 02:49:25 +00:00
..
2026-11-03 02:48:54 +00:00
2026-11-03 02:49:25 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00
2026-11-03 02:48:54 +00:00