Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[quality] coverage-e2e names tide.ts:99 uncovered; the zero is the never-reached `options.initial ?? await getPull` fallback on line 98

オープン 初心者向け
#466 コメント 23 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
devtools, testing

調査の方向性

src/plugins/tide.ts、coverage-e2e/lcov.info のカバレッジ出力、FetchMergeabilityOptions の定義、および initial を指定せずに fetchMergeability を呼び出すユニットテストケースから始めます。initial を必須にし、フォールバックと、それだけを検証するテストケースを削除してから、dist/ を再ビルドします。npm run test:coverage:e2e を実行します。レポートで、この実行回数がゼロのフォールバックが tide.ts:99 に割り当てられなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing

Finding

npm run test:coverage:e2e (main @ 7f01721, local run) reports src/plugins/tide.ts as 99.56% Stmts / 93.98% Branch, with line 99 (for (const delay of unknownRetryDelaysMs)) listed as uncovered. That line is not uncovered: in the same coverage-e2e/lcov.info the loop body executes (DA:100,65).

What the zero really is: the ?? await getPull(...) fallback on line 98

let pr = options.initial ?? await getPull(octokit, context, number)

Both fetchMergeability call sites (evaluateMerge, tide.ts:198-201, and evaluateInQueue, tide.ts:307-310) pass initial: first, so the right-hand side never runs from dist/index.js:

coverage-e2e/lcov.info  SF:src/plugins/tide.ts
DA:98,60   BRDA:98,0,0,60   BRDA:98,0,1,0   DA:99,0   DA:100,65

V8/istanbul attributes that zero-count ?? range to the following line, which is why the report names 99. The unit run shows the same attribution (coverage/lcov.info: BRDA:98,0,1,7 and DA:99,7 while DA:100,135); it just is not visible there because the unit suite does call fetchMergeability without initial. Of the 52 for … of headers in src/, this is the only one the e2e report zeroes.

Only the unit tests exercise the fallback. It is the same shape as the arms #462 removed for #458 (retryIf default in this very function), and was not in that list.

Recommendation

Follow #462: make initial required in FetchMergeabilityOptions and drop the ?? await getPull(...) fallback (plus the unit cases that only reach it); rebuild dist/. After that, tide.ts no longer appears in the e2e "Uncovered Line #s" column for this reason, and the report stops pointing at a line that does run.

  • FetchMergeabilityOptions.initial required; line-98 fallback removed; dist/ repacked
  • npm run test:coverage:e2e no longer lists tide.ts:99

This is a production-code change, so no PR accompanies this issue. The related e2e-only behaviour gap in the same function (the !retryIf(pr) short-circuit never reached end-to-end) is covered by #465.

Priority

  • Impact: low
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 7f01721

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

主要言語
TypeScript
スター
132
フォーク
23
平均マージ
1日 19時間
マージ済み PR(30日)
166

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cncf/prow-github-actions のほかの issue

cncf/prow-github-actions の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。