Skip to content

Commit 19ca145

Browse files
authored
fix(review): require late-finding schema field (#404)
1 parent f4bc900 commit 19ca145

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎schema/clawsweeper-decision.schema.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@
509509
"confidenceScore",
510510
"file",
511511
"lineStart",
512-
"lineEnd"
512+
"lineEnd",
513+
"lateFinding"
513514
],
514515
"properties": {
515516
"title": {
@@ -544,7 +545,7 @@
544545
},
545546
"lateFinding": {
546547
"type": "boolean",
547-
"description": "True when this finding targets code unchanged since an earlier reviewed head where the concern was equally visible but was not raised. Omit or use false for findings introduced by new commits or newly available evidence."
548+
"description": "True when this finding targets code unchanged since an earlier reviewed head where the concern was equally visible but was not raised. Use false for findings introduced by new commits or newly available evidence."
548549
}
549550
}
550551
}

‎test/review-prompt-policy.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ test("decision schema keeps draft and protected workflow state out of PR rank",
303303
);
304304
});
305305

306+
test("review finding schema requires every structured-output property", () => {
307+
const schema = JSON.parse(readFileSync("schema/clawsweeper-decision.schema.json", "utf8"));
308+
const finding = schema.properties.reviewFindings.items;
309+
310+
assert.deepEqual([...finding.required].sort(), Object.keys(finding.properties).sort());
311+
});
312+
306313
test("review prompt and schema describe positive-only feature showcase labels", () => {
307314
const prompt = readFileSync("prompts/review-item.md", "utf8");
308315
const schema = JSON.parse(readFileSync("schema/clawsweeper-decision.schema.json", "utf8"));

0 commit comments

Comments
 (0)