[quality] approve.github_review refusal paths in src/plugins/approveReview.ts are unit-covered but never driven through dist/index.js
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #286 @hivecommons-hive による — マージ済み
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
- 領域
- build-system, testing
調査の方向性
Start with src/plugins/approveReview.ts and the existing tests/bundle suite; run npm run test:coverage:e2e to see the current bundle coverage. Add cases that drive /approve and /approve cancel through dist/index.js, then verify each warning or ::error:: result, exit status, and that the approved label write happens first.
索引モデルが issue の本文から書いたものです。
説明
Finding
src/plugins/approveReview.ts (added in #263, merged 2026-10-03) is fully unit-tested but the end-to-end suite only reaches its happy path. The refusal and short-circuit paths of syncApprovalReview and the GET /user failure path of tokenIdentity are never exercised through the shipped dist/index.js:
createReviewanswered 422 "not permitted to approve pull requests" →notPermittedWarning(L203–206)createReviewanswered any other 403 →forbiddenWarning(L208–210)createReviewanswered 422 "approve your own pull request" → self-approval warning (L203–205)createReviewanswered any other error →could not submit the approval review, run fails (L212–214)- token is a user who authored the PR → warning, no review attempted (L185–186)
- draft PR → no review submitted (L173)
- own review already on the head → nothing submitted (L164–165)
dismissReviewrefused on/approve cancel→could not dismiss the approval review <id>, run fails (L181–182)GET /useranswers neither 2xx nor 403/404 →could not identify the token for approve.github_review, run fails (L42)
docs/commands.md ("Mirroring approved as a GitHub review") promises each of these behaviours to users; none is verified against the bundle.
Evidence
- Unit:
npx vitest run --coverageonmain@ 3fc21f2 (Node v26.10.0, vitest 5.0.1):approveReview.ts100 % stmts / 100 % branch / 100 % funcs / 100 % lines (1648 tests). - End-to-end:
npm run test:coverage:e2eonmain@ 3fc21f2 (the config #274 added; 142 tests in__tests__/bundle):approveReview.ts64.19 % stmts / 52 % branch / 78.57 % funcs / 65.38 % lines; uncovered lines 42, 101, 111, 156–157, 164–165, 173, 181–182, 185–186, 189–190, 203–216, 222, 230 (from the run'slcov.info). - The two figures are reported separately on purpose (see #235: the vite and tsc+webpack statement maps do not line-merge); the per-line list above is the e2e one.
Recommendation
- Add a bundle suite that drives
/approveand/approve cancelthroughdist/index.jswithapprove.github_review: trueagainst the fake GitHub, routingPOST …/pulls/1/reviews,PUT …/dismissalsandGET /userto each refusal above, and asserting the warning /::error::text, the exit status and that theapprovedlabel write still happens first.
Priority
- Impact: medium (covered by unit tests, not end-to-end; feature merged today — regression risk)
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- 主要言語
- TypeScript
- スター
- 132
- フォーク
- 23
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 122
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cncf/prow-github-actions のほかの issue
-
[quality] test.yml never runs on main after a tide merge — github.token merges don't trigger push; add workflow_dispatch + schedule対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンagent/quality hive/hosted-available-lke648397-260827-5q9t kind/failing-test quality testing
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
cncf/prow-github-actions#329 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[quality] bundle e2e never drives plain /close or the /milestone refusals through dist/index.js対応中かも @hivecommons-hive が 5 日前に担当しました。 オープンagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cncf/prow-github-actions#295 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[quality] the cron dispatcher's jobs-input error arms and the push event route are never driven through dist/index.js対応中かも @hivecommons-hive が 1 日前に担当しました。 オープンagent/quality hive/hosted-available-lke648397-260827-5q9t hive/verified-open needs-kind quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
cncf/prow-github-actions#241 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[quality] test.yml runs build-test twice per commit on every PR branch — narrow push to main and add a concurrency group対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンagent/quality hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
cncf/prow-github-actions#213 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup needs-decision quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cncf/prow-github-actions#209 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
cncf/prow-github-actions の issue をすべて見る
似ている issue
-
area: backend bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
snapotter-hq/SnapOtter#2254 ·
メンテナーはふだん 1 日以内に返信
-
bug ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cratestack/cratestack#1154 ·
メンテナーはふだん 1 日以内に返信
-
server 消息处理器 cmd 分支补显式错误回报——竞态非法命令现走未处理拒绝対応中かも @openaddr が今日担当しました。 オープンready-for-agent refactor wayfinder:task
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openaddr/dafung-web#428 ·
メンテナーはふだん 1 日以内に返信
-
Flaky: mongodb-memory-server 'Port already in use' when another process starts a mongod concurrentlyオープンarea:testing bug effort:S priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
lens:agent lens:process process
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
thebristolsound/birdbrain#1772 ·
メンテナーはふだん 1 日以内に返信