pruneguard 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,278 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ReviewReport",
4
+ "description": "Branch review report for CI/agent branch gating.",
5
+ "type": "object",
6
+ "required": [
7
+ "advisoryFindings",
8
+ "blockingFindings",
9
+ "changedFiles",
10
+ "newFindings",
11
+ "trust"
12
+ ],
13
+ "properties": {
14
+ "advisoryFindings": {
15
+ "description": "Findings that are advisory (medium/low confidence, or info severity).",
16
+ "type": "array",
17
+ "items": {
18
+ "$ref": "#/definitions/Finding"
19
+ }
20
+ },
21
+ "baseRef": {
22
+ "description": "Base ref used for comparison.",
23
+ "type": [
24
+ "string",
25
+ "null"
26
+ ]
27
+ },
28
+ "blockingFindings": {
29
+ "description": "Findings that should block merge (high confidence errors/warnings).",
30
+ "type": "array",
31
+ "items": {
32
+ "$ref": "#/definitions/Finding"
33
+ }
34
+ },
35
+ "changedFiles": {
36
+ "description": "Files changed on this branch.",
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "newFindings": {
43
+ "description": "All new findings introduced on this branch.",
44
+ "type": "array",
45
+ "items": {
46
+ "$ref": "#/definitions/Finding"
47
+ }
48
+ },
49
+ "recommendations": {
50
+ "description": "Concise recommendations for the branch author.",
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "trust": {
57
+ "description": "Trust summary for this review.",
58
+ "allOf": [
59
+ {
60
+ "$ref": "#/definitions/ReviewTrust"
61
+ }
62
+ ]
63
+ }
64
+ },
65
+ "definitions": {
66
+ "ConfidenceCounts": {
67
+ "type": "object",
68
+ "required": [
69
+ "high",
70
+ "low",
71
+ "medium"
72
+ ],
73
+ "properties": {
74
+ "high": {
75
+ "type": "integer",
76
+ "format": "uint",
77
+ "minimum": 0.0
78
+ },
79
+ "low": {
80
+ "type": "integer",
81
+ "format": "uint",
82
+ "minimum": 0.0
83
+ },
84
+ "medium": {
85
+ "type": "integer",
86
+ "format": "uint",
87
+ "minimum": 0.0
88
+ }
89
+ }
90
+ },
91
+ "Evidence": {
92
+ "description": "Evidence supporting a finding.",
93
+ "type": "object",
94
+ "required": [
95
+ "description",
96
+ "kind"
97
+ ],
98
+ "properties": {
99
+ "description": {
100
+ "description": "Description of this evidence.",
101
+ "type": "string"
102
+ },
103
+ "file": {
104
+ "description": "File path involved.",
105
+ "type": [
106
+ "string",
107
+ "null"
108
+ ]
109
+ },
110
+ "kind": {
111
+ "description": "Type of evidence.",
112
+ "type": "string"
113
+ },
114
+ "line": {
115
+ "description": "Line number, if applicable.",
116
+ "type": [
117
+ "integer",
118
+ "null"
119
+ ],
120
+ "format": "uint",
121
+ "minimum": 0.0
122
+ }
123
+ }
124
+ },
125
+ "Finding": {
126
+ "description": "A single finding from analysis.",
127
+ "type": "object",
128
+ "required": [
129
+ "category",
130
+ "code",
131
+ "confidence",
132
+ "id",
133
+ "message",
134
+ "severity",
135
+ "subject"
136
+ ],
137
+ "properties": {
138
+ "category": {
139
+ "description": "Category of the finding.",
140
+ "allOf": [
141
+ {
142
+ "$ref": "#/definitions/FindingCategory"
143
+ }
144
+ ]
145
+ },
146
+ "code": {
147
+ "description": "Machine-readable code (e.g. `unused-export`, `cycle`, `boundary-violation`).",
148
+ "type": "string"
149
+ },
150
+ "confidence": {
151
+ "description": "Confidence level for this finding.",
152
+ "allOf": [
153
+ {
154
+ "$ref": "#/definitions/FindingConfidence"
155
+ }
156
+ ]
157
+ },
158
+ "evidence": {
159
+ "description": "Evidence supporting the finding.",
160
+ "type": "array",
161
+ "items": {
162
+ "$ref": "#/definitions/Evidence"
163
+ }
164
+ },
165
+ "id": {
166
+ "description": "Stable deterministic ID for this finding.",
167
+ "type": "string"
168
+ },
169
+ "message": {
170
+ "description": "Human-readable message.",
171
+ "type": "string"
172
+ },
173
+ "package": {
174
+ "description": "Package this finding belongs to, if applicable.",
175
+ "type": [
176
+ "string",
177
+ "null"
178
+ ]
179
+ },
180
+ "ruleName": {
181
+ "description": "Name of the rule that produced this finding, if any.",
182
+ "type": [
183
+ "string",
184
+ "null"
185
+ ]
186
+ },
187
+ "severity": {
188
+ "description": "Severity level.",
189
+ "allOf": [
190
+ {
191
+ "$ref": "#/definitions/FindingSeverity"
192
+ }
193
+ ]
194
+ },
195
+ "subject": {
196
+ "description": "The subject of the finding (file path, export name, etc.).",
197
+ "type": "string"
198
+ },
199
+ "suggestion": {
200
+ "description": "Suggested fix.",
201
+ "type": [
202
+ "string",
203
+ "null"
204
+ ]
205
+ },
206
+ "workspace": {
207
+ "description": "Workspace this finding belongs to, if applicable.",
208
+ "type": [
209
+ "string",
210
+ "null"
211
+ ]
212
+ }
213
+ }
214
+ },
215
+ "FindingCategory": {
216
+ "type": "string",
217
+ "enum": [
218
+ "unused-export",
219
+ "unused-file",
220
+ "unused-package",
221
+ "unused-dependency",
222
+ "cycle",
223
+ "boundary-violation",
224
+ "ownership-violation",
225
+ "impact"
226
+ ]
227
+ },
228
+ "FindingConfidence": {
229
+ "type": "string",
230
+ "enum": [
231
+ "high",
232
+ "medium",
233
+ "low"
234
+ ]
235
+ },
236
+ "FindingSeverity": {
237
+ "type": "string",
238
+ "enum": [
239
+ "error",
240
+ "warn",
241
+ "info"
242
+ ]
243
+ },
244
+ "ReviewTrust": {
245
+ "description": "Trust summary within a review report.",
246
+ "type": "object",
247
+ "required": [
248
+ "baselineApplied",
249
+ "confidenceCounts",
250
+ "fullScope",
251
+ "unresolvedPressure"
252
+ ],
253
+ "properties": {
254
+ "baselineApplied": {
255
+ "description": "Whether a baseline was applied.",
256
+ "type": "boolean"
257
+ },
258
+ "confidenceCounts": {
259
+ "description": "Confidence counts for new findings.",
260
+ "allOf": [
261
+ {
262
+ "$ref": "#/definitions/ConfidenceCounts"
263
+ }
264
+ ]
265
+ },
266
+ "fullScope": {
267
+ "description": "Whether full-scope analysis was performed.",
268
+ "type": "boolean"
269
+ },
270
+ "unresolvedPressure": {
271
+ "description": "Unresolved specifier pressure ratio.",
272
+ "type": "number",
273
+ "format": "double"
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "SafeDeleteReport",
4
+ "description": "Safe-delete report for deletion approval workflows.",
5
+ "type": "object",
6
+ "required": [
7
+ "blocked",
8
+ "needsReview",
9
+ "safe",
10
+ "targets"
11
+ ],
12
+ "properties": {
13
+ "blocked": {
14
+ "description": "Targets that should not be deleted.",
15
+ "type": "array",
16
+ "items": {
17
+ "$ref": "#/definitions/SafeDeleteCandidate"
18
+ }
19
+ },
20
+ "deletionOrder": {
21
+ "description": "Recommended deletion order (safe targets only).",
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "evidence": {
28
+ "description": "Supporting evidence.",
29
+ "type": "array",
30
+ "items": {
31
+ "$ref": "#/definitions/Evidence"
32
+ }
33
+ },
34
+ "needsReview": {
35
+ "description": "Targets that need manual review before deletion.",
36
+ "type": "array",
37
+ "items": {
38
+ "$ref": "#/definitions/SafeDeleteCandidate"
39
+ }
40
+ },
41
+ "safe": {
42
+ "description": "Targets safe to delete.",
43
+ "type": "array",
44
+ "items": {
45
+ "$ref": "#/definitions/SafeDeleteCandidate"
46
+ }
47
+ },
48
+ "targets": {
49
+ "description": "Targets that were evaluated.",
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ }
54
+ }
55
+ },
56
+ "definitions": {
57
+ "Evidence": {
58
+ "description": "Evidence supporting a finding.",
59
+ "type": "object",
60
+ "required": [
61
+ "description",
62
+ "kind"
63
+ ],
64
+ "properties": {
65
+ "description": {
66
+ "description": "Description of this evidence.",
67
+ "type": "string"
68
+ },
69
+ "file": {
70
+ "description": "File path involved.",
71
+ "type": [
72
+ "string",
73
+ "null"
74
+ ]
75
+ },
76
+ "kind": {
77
+ "description": "Type of evidence.",
78
+ "type": "string"
79
+ },
80
+ "line": {
81
+ "description": "Line number, if applicable.",
82
+ "type": [
83
+ "integer",
84
+ "null"
85
+ ],
86
+ "format": "uint",
87
+ "minimum": 0.0
88
+ }
89
+ }
90
+ },
91
+ "FindingConfidence": {
92
+ "type": "string",
93
+ "enum": [
94
+ "high",
95
+ "medium",
96
+ "low"
97
+ ]
98
+ },
99
+ "SafeDeleteCandidate": {
100
+ "description": "A candidate in a safe-delete evaluation.",
101
+ "type": "object",
102
+ "required": [
103
+ "target"
104
+ ],
105
+ "properties": {
106
+ "confidence": {
107
+ "description": "Confidence in the safety assessment.",
108
+ "anyOf": [
109
+ {
110
+ "$ref": "#/definitions/FindingConfidence"
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ]
116
+ },
117
+ "reasons": {
118
+ "description": "Reasons for the classification.",
119
+ "type": "array",
120
+ "items": {
121
+ "type": "string"
122
+ }
123
+ },
124
+ "target": {
125
+ "description": "The target file or export.",
126
+ "type": "string"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }