feat(ai-review 對話收斂): 讀 PR review 留言判斷解決狀態並收斂 findings #42

Merged
jiantw83 merged 68 commits from ai-review-resolve/20260623-110950 into develop 2026-06-23 08:29:38 +00:00
Showing only changes of commit 1919433df1 - Show all commits
+9
View File
1
@@ -120,6 +120,15 @@ describe('judgeConversations', () => {
assert.deepEqual(verdicts, [{ idx: 0, verdict: 'open' }]); assert.deepEqual(verdicts, [{ idx: 0, verdict: 'open' }]);
}); });
it('treats an empty AI response array as all open (conservative)', async () => {
const items = [{ idx: 0 }, { idx: 1 }];
const verdicts = await judgeConversations(items, async () => []);
assert.deepEqual(verdicts, [
{ idx: 0, verdict: 'open' },
{ idx: 1, verdict: 'open' },
]);
});
it('ignores entries with unknown verdict or non-integer idx', async () => { it('ignores entries with unknown verdict or non-integer idx', async () => {
const items = [{ idx: 0 }, { idx: 1 }]; const items = [{ idx: 0 }, { idx: 1 }];
admin marked this conversation as resolved Outdated
Outdated
Review

嚴重等級🔵 建議
審查員:Maya
問題judgeConversations 的測試中,未對「AI 回傳空陣列」或「所有 Verdict 皆為空」的情境進行邊界驗證。
建議:補上邊界測試,驗證該情境下是否將所有對話歸類為 open(保守保留)。

**嚴重等級**:🔵 建議 **審查員**:Maya **問題**:`judgeConversations` 的測試中,未對「AI 回傳空陣列」或「所有 Verdict 皆為空」的情境進行邊界驗證。 **建議**:補上邊界測試,驗證該情境下是否將所有對話歸類為 `open`(保守保留)。
const chatFn = async () => [ const chatFn = async () => [