Skip to content

Commit 2498173

Browse files
authored
Add automated structured code review (#199)
* Add automated structured code review * Harden automated review boundaries * Bind review policy to base revision
1 parent a925772 commit 2498173

5 files changed

Lines changed: 646 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"findings": {
5+
"type": "array",
6+
"maxItems": 20,
7+
"items": {
8+
"type": "object",
9+
"properties": {
10+
"title": {
11+
"type": "string",
12+
"maxLength": 80
13+
},
14+
"body": {
15+
"type": "string",
16+
"minLength": 1
17+
},
18+
"confidence_score": {
19+
"type": "number",
20+
"minimum": 0,
21+
"maximum": 1
22+
},
23+
"priority": {
24+
"type": "integer",
25+
"minimum": 0,
26+
"maximum": 3
27+
},
28+
"code_location": {
29+
"type": "object",
30+
"properties": {
31+
"absolute_file_path": {
32+
"type": "string",
33+
"minLength": 1
34+
},
35+
"side": {
36+
"type": "string",
37+
"enum": ["LEFT", "RIGHT"]
38+
},
39+
"line_range": {
40+
"type": "object",
41+
"properties": {
42+
"start": {
43+
"type": "integer",
44+
"minimum": 1
45+
},
46+
"end": {
47+
"type": "integer",
48+
"minimum": 1
49+
}
50+
},
51+
"required": ["start", "end"],
52+
"additionalProperties": false
53+
}
54+
},
55+
"required": ["absolute_file_path", "side", "line_range"],
56+
"additionalProperties": false
57+
}
58+
},
59+
"required": ["title", "body", "confidence_score", "priority", "code_location"],
60+
"additionalProperties": false
61+
}
62+
},
63+
"overall_correctness": {
64+
"type": "string",
65+
"enum": ["patch is correct", "patch is incorrect"]
66+
},
67+
"overall_explanation": {
68+
"type": "string",
69+
"minLength": 1
70+
},
71+
"overall_confidence_score": {
72+
"type": "number",
73+
"minimum": 0,
74+
"maximum": 1
75+
}
76+
},
77+
"required": ["findings", "overall_correctness", "overall_explanation", "overall_confidence_score"],
78+
"additionalProperties": false
79+
}

0 commit comments

Comments
 (0)