Repository navigation
Conversation
Node.js 24.21.0(undici 7.29.1)では、probe の spawnSync でイベントループが止まっている間に サーバー側で閉じられた keep-alive 接続を fetch が再利用し、probe 後最初の GET が fetch failed(cause: EPIPE / UND_ERR_SOCKET)になっていた。 - 接続の切断を示す cause(UND_ERR_SOCKET / EPIPE / ECONNRESET)の場合に限り、GET を 1 回だけ再試行する - POST と HTTP エラーは再試行しない - Unexpected evaluator error に error.cause の code / message を含める - 回帰テストと運用 docs(MECHANISM の対処表、再試行の仕様)を追加する Refs #322 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPszW4Rvm6ppEAvUWbRP6j
There was a problem hiding this comment.
This PR adds comprehensive test coverage and documentation for the GitHub API retry mechanism that addresses connection failures during Dependency Unblock Check execution. The changes are well-structured and thoroughly tested.
The 6 new test cases properly verify:
- Retry behavior for specific connection error codes (UND_ERR_SOCKET, EPIPE, ECONNRESET)
- No retry after 2 consecutive failures
- No retry for other error types or HTTP errors
- POST requests are never retried (prevents duplicate comments)
- Error description formatting includes cause details
- Integration test with realistic scenario
The documentation clearly explains the retry mechanism, conditions, and limitations. All test assertions are appropriate and the code follows existing patterns.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的(推奨)
Dependency Unblock Check の
schedule実行(2026-09-28 run 36388464626、2026-10-05 run 37275307924)が、probe 後の GitHub API 呼び出しで
MECHANISM: Unexpected evaluator error: fetch failedになっていた不具合を直す。原因は Node.js 24.21.0(undici 7.29.1、nodejs/undici#5769)で、
probe の
spawnSync中にサーバー側で閉じられた keep-alive 接続を fetch が再利用すること(詳細は #322)。変更内容(推奨)
scripts/ci/dependabot-unblock-check.mjscreateGitHubClient: GET に限り、cause がUND_ERR_SOCKET/EPIPE/ECONNRESETのfetch failedを 1 回だけ再試行する。POST と HTTP エラーは再試行しないdescribeUnexpectedErrorを追加し、Unexpected evaluator errorにerror.causeの code / message を含める(例:fetch failed (cause: EPIPE write EPIPE))scripts/ci/dependabot-unblock-check.test.mjs: 回帰テスト 6 本を追加(73 → 79 件)docs/operations/dependency-unblock-check.md: 「赤(MECHANISM)の理由と対処」表にUnexpected evaluator errorの行を追加し、再試行の仕様を追記影響範囲(推奨)
schedule/workflow_dispatchと、workflow_callの呼び出し側).github/workflows/**)、job name / inputs / permissions、台帳とdependabot.yml、他の評価器(npm / yarn audit 系)PRラベル(必須)
type:bugarea:ci-cd,area:docsrisk:lowcost:none影響メモ(必要時のみ)
コスト根拠(小/中/大の場合): なし
リスク根拠(Medium/Highの場合): 該当なし(
risk:low)。ただしマージ後のv1タグ付け替えで呼び出し側に影響するため、厳密運用として扱う可観測性/検証 条件付き
spawnSync90 秒 → GET」が修正前は失敗し修正後は成功するschedule実行が緑(OK: still blocked)であることを確認するrunFullに実クライアント + 偽 fetch を注入)と実 API での再現で確認しているUnexpected evaluator error: ... (cause: ...)で cause を確認できるロールバック 条件付き
v1タグをv1.7.1(8c179a4)に戻す(force push のため実行前にユーザー確認)。v1.7.2を参照させた呼び出し側は@v1.7.1に戻すテスト結果/検証手順
単体テスト(Node.js 24.18.0 / 24.20.0 / 24.21.0)
npm run test:dependency-unblock-check: 79 件 passnpm run test:dependency-audit-policy: 191 件 passnpm run test:workflow-input-contract: 9 件 passnode --test scripts/ci/*.test.mjs: 279 件 passGITHUB_REPOSITORY=kmryst/idp-golden-path node scripts/ci/dependabot-unblock-check.mjs sync: exit 0runFull統合の 4 件が失敗する(POST / 対象外 cause を再試行しない 2 件は修正前後とも pass)追加したテスト
ENOTFOUND)と HTTP 502 は再試行しないrunFull(UNBLOCKED のフィクスチャ)に実クライアントと偽 fetch を注入し、probe 後最初の GET をEPIPEで失敗させても、再試行してコメントを投稿し exit 10 になる実 API での再現(読み取りのみ。
getIssue/listLabeledOpenIssues→spawnSync("sleep", ["90"])→listIssueCommentBodies)fetch failed(EPIPE)CI について
pull_requestトリガーを持たない(セキュリティ契約、ADR-0013)ため、本 PR では評価器のテストは CI で走らない。上記のローカル実行で代替する.github/workflows/**は変更していないため、required status checks との関係は変わらないメモ(レビューポイント)
setImmediateを待つ案と非同期spawn案は採らなかった(理由は fix(ci): Dependency Unblock Check の probe 後の GitHub API 呼び出しを再試行し fetch failed の cause を出す #322 の補足)v1.7.2(patch)を作成し、v1タグを付け替える(force push を伴う)@v1.7.1に固定しているため、caller を@v1.7.2に更新する(同リポジトリの Issue / PR、または Dependabot の更新 PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01PPszW4Rvm6ppEAvUWbRP6j
Closes #322