[quality] label-sync's refused-write and description-drift arms are never exercised end-to-end through dist/index.js

クローズ
#311 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

関連するプルリクエストがすでにマージされています。

  • #312 @hivecommons-hive による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
github-actions, typescript
領域
testing

調査の方向性

Read src/cronJobs/labelSync.ts and the existing tests/bundle suites, then inspect the linked pull request before starting because this work is already underway. The issue proposes tests/bundle/labelSyncFailureArms.test.ts; run npm run test:coverage:e2e and verify the refused writes, continued create attempts, description-only PATCH, and final failure are exercised through dist/index.js.

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

説明

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

Finding

src/cronJobs/labelSync.ts has three arms that no __tests__/bundle suite reaches, so the shipped bundle's behaviour on them is unmeasured:

  • lines 107-109: write()'s catch — a refused create/update is logged with core.error and recorded so the remaining labels are still attempted
  • line 94: the final N label(s) could not be synced: … error that fails the run once every label has been tried
  • line 134: drift() patching a label whose only difference is its description

Evidence

  • Unit: npx vitest run --coverage on main @ 3fc21f2 — labelSync.ts 100 % lines (__tests__/cronJobs/labelSync.test.ts).
  • End-to-end: npm run test:coverage:e2e on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.3, local run 2026-10-04) — labelSync.ts 85.41 % lines, uncovered 55,94,107-109,134.

Covered by unit tests but not end-to-end → medium.

Recommendation

  • __tests__/bundle/labelSyncFailureArms.test.ts: a workflow_dispatch jobs: label-sync run where POST /labels answers 403 for every built-in and kind/bug exists with the right colour but a stale description — asserts one core.error per refused label, every create still attempted, the description-only PATCH, and the single error handling cron job: Error: 16 label(s) could not be synced failure

Measured with that file: labelSync.ts 85.41 → 97.91 % e2e lines (only line 55 remains).

Priority

  • Impact: medium
  • Effort: low

Filed by quality agent (hold-gated mode)


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

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

主要言語
TypeScript
スター
135
フォーク
24
平均マージ
1日 6時間
マージ済み PR(30日)
232

環境構築

はじめの一歩

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

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

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

似ている issue

TypeScript の issue をもっと見る

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

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