@galda/cli 0.10.116 → 0.10.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +3 -1
- package/package.json +2 -2
package/CLAUDE.md
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
## テスト(Masa指示 2026-07-03・必須)
|
|
6
6
|
|
|
7
7
|
- `毎回、実装したものにはテストを書いて、実行する`。
|
|
8
|
-
- engine/ の変更 →
|
|
8
|
+
- engine/ の変更 → **`npm test`**(=`node --test --test-concurrency=1 --test-global-setup=engine/test/helpers/browser-setup.mjs 'engine/test/*.test.mjs'`)が緑になるまで完了と言わない。
|
|
9
|
+
- 🔴 **`--test-global-setup=…/browser-setup.mjs` を外さない**(2026-07-31 実測)。38ファイルがChromeを使う。付けると**スイート全体でChromeが1つ**になり、交互A/B実測で **825秒→231秒 / 416秒→261秒**、赤も **2件→1件**(ONで新しく壊れたテストはゼロ)。**外した時の実行時間は825秒と416秒で倍ぶれる**=「テストが遅い」ではなく「マシンの機嫌を測っている」状態に戻る。素の `node --test` を手打ちすると付き忘れるので `npm test` を使う。
|
|
10
|
+
- 🔴 **共有ブラウザを `close()` しない**。`getBrowser()` が返すのは**スイート全員のChrome**。閉じると以降の全ファイルが `connect ECONNREFUSED` で落ちる(2026-07-31 に実際にそうなっていて、この仕組みは実装済みなのに一度も動いていなかった)。終わりは必ず **`closeBrowser()`**=自分で起動した時だけ殺し、共有なら切断するだけ。自前で `puppeteer.connect` する場合も同じ(`later-list-new-ui.test.mjs` が手本)。
|
|
9
11
|
- 🔴 **`--test-concurrency=1` は必須**(Masa報告のカオス調査で発見・2026-07-16)。既定(CPUコア数)だと
|
|
10
12
|
58ファイルが同時に実サーバと Chrome を立てて**マシンを飽和させ、同じコードで赤が毎回入れ替わる**。
|
|
11
13
|
**「テスト緑」がコードの状態でなく運を報告している状態を放置しない**=規律の土台。
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galda/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.117",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Galda - hand off work to Claude Code or Codex, get proof back. Runs on your existing subscription, no extra API cost.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "node engine/server.mjs",
|
|
8
|
-
"test": "node --test --test-concurrency=1 'engine/test/*.test.mjs'"
|
|
8
|
+
"test": "node --test --test-concurrency=1 --test-global-setup=engine/test/helpers/browser-setup.mjs 'engine/test/*.test.mjs'"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"puppeteer-core": "^23.11.1",
|