[quality] worker.ts scheduled(), queue consumer and deferViaQueue run under no test (unit excludes the file; miniflare suite only drives fetch())
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #630 @hivecommons-hive による — マージ済み
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
Start with __tests__/worker/worker.test.ts, src/server/worker.ts, and the existing Miniflare setup. Add coverage for scheduled(), the queue retry path, and deferred delivery as described in the issue, fixing the fake GitHub request log so concurrent config probes are retained. Done when the tests verify cron enqueueing and consumption, retry behavior, and the deferred run applying the missing label; linked pull request #630 is already open.
索引モデルが issue の本文から書いたものです。
説明
Finding
src/server/worker.ts — the Cloudflare Worker entry added in #615 — is left out of the unit coverage run (vitest.config.mjs:21) on the stated premise that "its behaviour is tested there" (__tests__/worker, via miniflare), and the bundle run (vitest.e2e-coverage.config.mjs) excludes src/server/** too. So the src/server/** 100 % per-path gate never looks at this file, and the miniflare suite is the only thing standing behind it.
That suite (__tests__/worker/worker.test.ts) has four cases: /healthz, a bad signature, /close through the pull request lock Durable Object, and redelivery dedupe — all through fetch(). Nothing drives:
scheduled()(worker.ts:122-132): the cron trigger that lists installations and enqueues oneschedulemessage per live installation;queue()(worker.ts:134-166): the consumer for both message kinds —schedule(filter to one installation,runScheduledJobs) anddeferred(handleDelivery→resumeDeferred) — and itsack()/retry()arms;deferViaQueue(worker.ts:72-80): whatplatform().defer()does on Workers, i.e. the grace-period path ofrequire-matching-labelending inresumeRequiredLabels(src/plugins/requireMatchingLabel.ts:126).
Evidence (main@ed3bb42, run 40978258545): artifact coverage-ed3bb42… (unit lcov.info) has no SF: record for src/server/worker.ts; artifact coverage-e2e-ed3bb42… has none for any src/server/** file. grep -n "scheduled\|queue\|defer" __tests__/worker/worker.test.ts matches only the Miniflare binding declarations. Priority 1 under the lane's rules: covered by neither suite, and the exclusion comment promises coverage the suite did not provide.
Recommendation
Extend __tests__/worker/worker.test.ts — the fake GitHub, the Miniflare options and three cases — so the Worker is tested as deployed:
-
scheduled()via Miniflare'sunsafeTriggerHandlers+GET /cdn-cgi/handler/scheduled: one message per live installation (suspended skipped, two repositories → one message), consumer runs the cron jobs for each unarchived repository under the installation token -
queue()retry arm viamf.getQueueProducer('PROW_QUEUE'): aschedulemessage whose run throws (installations listing 500s) is re-delivered, not acknowledged -
deferViaQueue→ delayeddeferredmessage →resumeDeferred: apull_requestopenedwithgrace_period_duration: 1sstops atdefer()and the resumed run applies the missing label
The fake GitHub's request log must stop being a single read-modify-write KV key: the org- and repo-tier config probes run concurrently and one of them is lost, which hides exactly the request the deferred case needs to see.
Priority
- Impact: high — the queue consumer and cron trigger are the App's only non-webhook entry points and are exercised by nothing
- Effort: low — one test file, no
src/change
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 202bce4
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- 主要言語
- TypeScript
- スター
- 132
- フォーク
- 24
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 228
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
code-yeongyu/senpi#5262 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
lingdojo/kana-dojo#33420 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] inspect_schema matches named container case-insensitively without preferring exact match対応中かも @Maaz2212 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
libredb/libredb-studio#2128 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Yeachan-Heo/gajae-code#7474 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
mastra-ai/mastra#29108 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信