[quality] sweep.ts delayed-reviewers OWNERS guard (line 80 false arm) is covered by neither the unit nor the bundle suite
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- github-actions, typescript
- 領域
- ci-cd, testing-qa
調査の方向性
Read src/cronJobs/sweep.ts around line 80 and the existing sweep unit and delayed-reviewer bundle tests to follow their fixtures. Add the requested cases in __tests__/cronJobTest/sweepDelayWithoutOwners.test.ts and __tests__/bundle/blunderbussDelayWithoutOwners.test.ts, using an empty master tree and a pull request updated 70 minutes ago. Run the unit and bundle coverage suites; done means both cases pass and fail if the guard is removed. Pull request #561 is already open against this issue.
索引モデルが issue の本文から書いたものです。
説明
Finding
src/cronJobs/sweep.ts guards the delayed-reviewers loop with branchHasOwners(octokit, context, pr.base.ref) before calling requestReviewersIfDue. The false arm of that guard — a pull request that is due for delayed blunderbuss but whose base branch has no OWNERS files — is exercised by neither suite:
- Unit,
npm run test:coverageonmain@e3119ad(167 files / 2330 tests, 99.92 % lines / 99.35 % branches):coverage/lcov.inforecordsSF:src/cronJobs/sweep.ts BRDA:80,4,1,0(zero hits).__tests__/cronJobTest/sweep.test.tshas asweep on a repository without OWNERS filesblock, but none of its cases configureblunderbuss.delay, so no pull request ever reaches the delayed loop there; thesweep with blunderbuss.delayblock serves an OWNERS file onmasterin every case. - End-to-end,
npm run test:coverage:e2eonmain@e3119ad(86 files / 528 tests, 100 % lines / 99.46 % branches):coverage-e2e/lcov.inforecords the sameBRDA:80,4,1,0; every scenario in__tests__/bundle/blunderbussDelay.test.tsroutesgit/trees/masterwith anOWNERSblob.
Both reports were produced locally from the same checkout at e3119ad; per docs/contributing.md the two runs are deliberately not merged (vite vs. tsc+webpack maps), so they are read separately above. The nearby zero-hit records at sweep.ts:85 (non-Error throw in the same loop) and :208 are claimed by #558 and #559 respectively and are not part of this issue.
Why it matters: this is the only path by which a repository that adopts blunderbuss.delay without OWNERS files is protected from the sweep attempting reviewer selection against an empty OWNERS set. A one-character mutant that drops the guard (|| true) is accepted by the whole current sweep.test.ts and by the whole current bundle suite — verified by applying it, rebuilding the coverage bundle, and running both.
Recommendation
Add one case per suite, in new files so the held PRs #558 (__tests__/cronJobTest/sweep.test.ts) and #559 / #555 (__tests__/bundle/blunderbussDelay.test.ts) are not touched:
- Unit:
__tests__/cronJobTest/sweepDelayWithoutOwners.test.ts—blunderbuss.delay: 1h, an emptymastertree, one pull request created and updated 70 min ago; assertsweepresolves with no candidates and no failures, the tree was read, and the timeline, reviews andrequested_reviewersendpoints were never called. - Bundle:
__tests__/bundle/blunderbussDelayWithoutOwners.test.ts— the same scenario throughdist/index.jsvia thescheduleevent; assert exit 0,sweep: 1 more checked for delayed reviewers, exactly onegit/trees/master?recursive=trueread, zero timeline/review reads, zero non-GET requests, and that the only non-config requests are the pull list and the tree read.
Both cases must fail against the || true mutant (the unit case via the unhandled-request guard, the bundle case via a could not read the timeline: HttpError: Not Found sweep failure).
Priority
- Impact: medium (guard protects the delayed blunderbuss path on OWNERS-less repositories; covered by neither suite → coverage-gap priority 1 under the hive evidence rules)
- Effort: low
Decision taken by hive: new test files rather than edits to the two files held PRs already occupy, to keep every open test PR rebase-free.
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: e3119ad
— hive: agent=quality backend=copilot model=claude-fable-5.1
- 主要言語
- TypeScript
- スター
- 132
- フォーク
- 24
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 218
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cncf/prow-github-actions のほかの issue
-
[quality] Unit msw servers reject unhandled requests but no test fails when the code under test swallows the rejection (158 tests run through fallbacks)対応中かも @hivecommons-hive が 1 日前に担当しました。 オープンagent/quality needs-kind stage/040-covered-by-pr testing
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cncf/prow-github-actions#570 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
[quality] bundle fake answers unrouted requests with a plain 404; the harness should assert on unexpected traffic outside application fallbacks対応中かも @hivecommons-hive が 2 日前に担当しました。 オープンagent/quality needs-kind stage/040-covered-by-pr testing
難易度 3/5 半日 初心者へのやさしさ 48/100
cncf/prow-github-actions#568 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Follow-up: strengthen test contracts, CI enforcement, release delivery, and quality triage対応中かも @hivecommons-hive が 3 日前に担当しました。 オープンkind/cleanup quality stage/040-covered-by-pr tests
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
cncf/prow-github-actions#554 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[quality] Re-evaluate the e2e branch coverage floor after pending coverage work lands対応中かも @hivecommons-hive が 3 日前に担当しました。 オープンhive/claimed-by-quality kind/cleanup stage/040-covered-by-pr
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cncf/prow-github-actions#551 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
hive/advisory kind/cleanup
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
cncf/prow-github-actions#170 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
cncf/prow-github-actions の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
farion1231/cc-switch#8829 ·
メンテナーはふだん 1 日以内に返信
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverオープンdoc-audit enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100