Add collector parameter contract assertion convention to scorecard AGENTS.md
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
workspaces/scorecard/AGENTS.md から始め、PR #4474 を確認します。特に collector mock と fallback の議論を確認してください。完全な入力に対するアサーション、エラーパスのカバレッジ、レビュー・チェックリストの項目を含む、要求された collector インタラクションテストのサブセクションを追加してください。今後の DORA provider のテスト変更について、ガイダンスが存在し、提示された検証基準に一致していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened
In PR #4474, the review agent approved the test changes without flagging a test adequacy gap. Human reviewer gustavolira identified that the test mock for predecessor deployment collection only branched on input.from === DORA_PREDECESSOR_COLLECT_FROM, meaning that removing fetchItemsLimit: predecessorRange.fetchItemsLimit from the production code would leave the entire test suite green while production starts requesting 1000 deployments since 1970 on every DORA run.
The reviewer also noted that the catch/fallback path in collectSuccessfulProductionDeploymentsWithPreWindowBoundary had no test coverage — a transient rate limit during predecessor lookup would produce a misleading error message pointing at deployment data rather than the API.
The review agent's test assessment was limited to verifying that tests existed for the new functionality, not that they adequately covered the parameter contracts between callers and collectors.
What could go better
The scorecard workspace AGENTS.md has no guidance on what constitutes adequate test coverage for collector interactions. The existing mock pattern (mockResolvedValueOnce with conditional returns based on a single input field) makes it easy to add tests that pass without actually verifying the full contract between provider and collector.
The human reviewer caught this because they understood that fetchItemsLimit was the key behavioral difference between the normal collect and the predecessor collect — without it, the predecessor query degrades to an unbounded scan. This is a pattern-level issue: any time a provider passes structured input to a collector, tests should assert on the full input shape, not just the fields used for mock branching.
I am moderately confident this would help the review agent. The agent already reads and evaluates test files during review — giving it explicit criteria for what constitutes sufficient collector parameter testing would raise the bar from "tests exist" to "tests verify the contract." However, the agent's ability to reason about which parameters are behaviorally significant (vs. cosmetic) may still be limited without the pipeline context from proposal 1.
This proposal complements the pipeline guidance proposal — together, they give the agent both the domain context to understand why parameters matter and the testing convention to verify they're asserted.
Proposed change
Add a subsection to the proposed "DORA Collector Pipeline" section (or as a standalone section) in workspaces/scorecard/AGENTS.md titled "Testing conventions for collector interactions", covering:
-
Assert full collector input contracts: When a provider calls
collectorsService.collect(), tests must usetoHaveBeenCalledWith(or equivalent) to assert on the full input object — includingfrom,to,fetchItemsLimit, and any other parameters — not just the fields used for mock branching. Dropping a parameter from the production call must cause a test failure. -
Cover error/fallback paths: When collector calls are wrapped in try/catch with fallback behavior (e.g., falling back to fewer deployments on rate limit), add a test case using
mockRejectedValueOnceto verify that (a) the fallback produces the correct output and (b) the warning message distinguishes the failure type. -
Review checklist item: When reviewing test changes for DORA providers, verify that mock assertions cover the distinguishing parameters of each collector call. Flag tests where the mock branches on one field but the production code sends additional fields that affect behavior.
Validation criteria
On the next 2 PRs that modify DORA provider tests in the scorecard workspace, the review agent should flag collector mock assertions that only branch on input.from without verifying other behavioral parameters like fetchItemsLimit or to. The review agent should also flag new try/catch blocks around collector calls that lack corresponding test coverage for the error path.
Generated by retro agent from https://github.com/redhat-developer/rhdh-plugins/pull/4474
- 主要言語
- TypeScript
- スター
- 51
- フォーク
- 122
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 275
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redhat-developer/rhdh-plugins のほかの issue
-
dependencies triaged workspace/bulk-import
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugins#5456 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature fullsend ready-for-triage Review effort 1/5 triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugins#4799 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Add entity provider implementation conventions to ai-integrations AGENTS.md再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdocumentation ready-for-triage ready-to-code Review effort 1/5 workspace/ai-integrations
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
redhat-developer/rhdh-plugins#4781 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Add public export surface review guidance to scorecard AGENTS.md対応中かも @fullsend-ai-coder が 51 日前に担当しました。 オープンdocumentation ready-for-triage ready-to-code Review effort 1/5 workspace/scorecard
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
redhat-developer/rhdh-plugins#4777 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Add DORA collector pipeline and time-window boundary guidance to scorecard AGENTS.md対応中かも @fullsend-ai-coder が 52 日前に担当しました。 オープンdocumentation ready-for-triage ready-to-code workspace/scorecard
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
redhat-developer/rhdh-plugins#4733 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
redhat-developer/rhdh-plugins の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
appandflow/stim#5258 ·
メンテナーはふだん 1 日以内に返信
-
area/docs framework/hugo help wanted language/markdown
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
lingdojo/kana-dojo#33660 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
drizzle-team/drizzle-orm#6639 ·
メンテナーはふだん 4 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100