feat(release): smoke test を ARK_PORT 固定 + readiness probe 方式に変更#197
Conversation
issue #181 対応。release.yml の Smoke test .app bootstrap が起動 stdout から 正規表現で localhost ポートを grep していたため、依存 binary や app stdout に 紛れた偽ログ経由で runner 内の別 listen process に curl してしまう抜けがあった (codex review P5 で [P2] 指摘済み)。 ## 変更 ### packages/desktop/src/main.ts - bootstrap 時に ARK_PORT 環境変数があればそれを採用し、なければ 従来通り getAvailablePort() で動的取得 - 0 / 範囲外 / 非数値の場合は無視して動的取得にフォールバック (誤設定耐性) ### .github/workflows/release.yml - Smoke test .app bootstrap step に env.ARK_PORT='4042' を追加して .app の listen ポートを workflow 側から固定 - 起動前に lsof で ARK_PORT が既に listen 中でないことを assert (runner image 側で別 process が同 port を取っている場合に CI を fail させて可視化) - readiness probe を「stdout から PORT を grep」→「ARK_PORT に curl」に変更し、 TCP 接続成立を listen 開始と見なす assertive な方式に - 旧 awk による grep / sanity check / PORT 変数の動的算出を撤廃
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
概要
issue #181 対応。
release.ymlの Smoke test .app bootstrap は、起動した.appの stdout からArk server running on http://localhost:<port>を grep してポートを抽出し、その値をcurlに渡していた。codex review で「依存 binary や app stdout に紛れた偽 URL で runner 内の別 listen
process に curl してしまう抜けがある」と
[P2]指摘あり (PR #182)。ログ依存の port 抽出を撤廃し、
ARK_PORTを 外側から固定 する assertive な方式に変更。変更
packages/desktop/src/main.tsARK_PORT環境変数があれば固定ポートで listen、未指定なら従来の動的取得ARK_PORTは CI smoke test だけでなくリバースプロキシ前提など外部固定ポート全用途の公開設定/^[1-9][0-9]*$/+1..65535のみ許容、不正値は silent fallback せず throw で fail-fast1e3) / 16 進表記 (0x50) / 小数 (1.5) を全て弾くNumber()単独だと1e3を1000として通すため、Number.isIntegerの前にパターンチェックを置く.github/workflows/release.ymlSmoke test .app bootstrap stepenv.ARK_PORT="4042"を追加し .app の listen ポートを workflow 側から固定lsofでARK_PORTが既に listen 中でないことを assert (runner image 側の競合を可視化)curl http://localhost:${ARK_PORT}/で HTTP 200 を要求」に変更 (TCP 接続だけ見ると 4xx/5xx も通るため codex[中]指摘反映)lsof -iTCP:${ARK_PORT} -sTCP:LISTENの listener PID が$PIDの process group (Electron Helper / Renderer 含む) に属することを確認 (TOCTOU 経路で別 process が後から同 port を掴むケースを検知、codex[中]指摘反映)$PORT参照を${ARK_PORT}に統一 (旧名残の reassignment 削除)codex review の反映履歴
[中]CI 専用 vs 製品経路、Number.isFinite弱い、命名Number.isInteger[高]Number()が1e3/0x50を通す、[中]silent fallback[中]HTTP 200 要求、空文字も fail、TOCTOU コメント[中]PID-port binding 未確認、[低]PORT 命名${ARK_PORT}直参照に統一関連
zip位置引数を削除 #190, fix(release): electron-builder の macOS zip 出力名-mac.zipに追従 + multi-match ガード #191, feat(release): v1.3.0+ から Cask 自動更新を有効化 #192