audit-tools 0.54.0 → 0.55.1
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.
- package/dist/audit/cli/auditStep.js +2 -2
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +70 -10
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.d.ts.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.js +13 -11
- package/dist/audit/contracts/findingContractPrompt.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +21 -124
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +19 -3
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +52 -2
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +17 -5
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +14 -2
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +6 -2
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +2 -2
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/types/finding.d.ts +4 -14
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +6 -16
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/validation/designFindingGrounding.d.ts +3 -2
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +12 -2
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts +18 -6
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +107 -24
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/package.json +1 -1
- package/schemas/audit_result.schema.json +0 -8
- package/schemas/audit_results.schema.json +0 -8
- package/schemas/finding.schema.json +0 -8
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The location fields the per-file projection omits, with the sentence ingestion
|
|
4
|
+
* refuses each with — the location-level twin of
|
|
5
|
+
* {@link WORKER_REFUSED_FINDING_VERDICTS}, and one fact for the same reason.
|
|
6
|
+
*
|
|
7
|
+
* Line numbers are TOOL-OWNED: `groundFinding` writes them from where the
|
|
8
|
+
* entry's `quoted_text` occurs. A reviewer-typed number was never compared with
|
|
9
|
+
* its quote, so it could point anywhere in the file and still pass every check.
|
|
10
|
+
*/
|
|
11
|
+
export declare const WORKER_REFUSED_LOCATION_FIELDS: {
|
|
12
|
+
readonly line_start: "line_start is derived at ingest from where quoted_text occurs and must not be supplied";
|
|
13
|
+
readonly line_end: "line_end is derived at ingest from where quoted_text occurs and must not be supplied";
|
|
14
|
+
};
|
|
15
|
+
export declare const WorkerFindingLocationSchema: z.ZodEffects<z.ZodObject<Omit<{
|
|
3
16
|
path: z.ZodString;
|
|
4
17
|
line_start: z.ZodOptional<z.ZodNumber>;
|
|
5
18
|
line_end: z.ZodOptional<z.ZodNumber>;
|
|
@@ -7,51 +20,27 @@ export declare const WorkerFindingLocationSchema: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
7
20
|
quoted_text: z.ZodOptional<z.ZodString>;
|
|
8
21
|
no_quotable_span: z.ZodOptional<z.ZodString>;
|
|
9
22
|
hash_at_plan_time: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, "strict", z.ZodTypeAny, {
|
|
11
|
-
path: string;
|
|
12
|
-
symbol?: string | undefined;
|
|
13
|
-
line_start?: number | undefined;
|
|
14
|
-
line_end?: number | undefined;
|
|
15
|
-
quoted_text?: string | undefined;
|
|
16
|
-
no_quotable_span?: string | undefined;
|
|
17
|
-
hash_at_plan_time?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
path: string;
|
|
20
|
-
symbol?: string | undefined;
|
|
21
|
-
line_start?: number | undefined;
|
|
22
|
-
line_end?: number | undefined;
|
|
23
|
-
quoted_text?: string | undefined;
|
|
24
|
-
no_quotable_span?: string | undefined;
|
|
25
|
-
hash_at_plan_time?: string | undefined;
|
|
26
|
-
}>, {
|
|
23
|
+
}, "line_start" | "line_end">, "strict", z.ZodTypeAny, {
|
|
27
24
|
path: string;
|
|
28
25
|
symbol?: string | undefined;
|
|
29
|
-
line_start?: number | undefined;
|
|
30
|
-
line_end?: number | undefined;
|
|
31
26
|
quoted_text?: string | undefined;
|
|
32
27
|
no_quotable_span?: string | undefined;
|
|
33
28
|
hash_at_plan_time?: string | undefined;
|
|
34
29
|
}, {
|
|
35
30
|
path: string;
|
|
36
31
|
symbol?: string | undefined;
|
|
37
|
-
line_start?: number | undefined;
|
|
38
|
-
line_end?: number | undefined;
|
|
39
32
|
quoted_text?: string | undefined;
|
|
40
33
|
no_quotable_span?: string | undefined;
|
|
41
34
|
hash_at_plan_time?: string | undefined;
|
|
42
35
|
}>, {
|
|
43
36
|
path: string;
|
|
44
37
|
symbol?: string | undefined;
|
|
45
|
-
line_start?: number | undefined;
|
|
46
|
-
line_end?: number | undefined;
|
|
47
38
|
quoted_text?: string | undefined;
|
|
48
39
|
no_quotable_span?: string | undefined;
|
|
49
40
|
hash_at_plan_time?: string | undefined;
|
|
50
41
|
}, {
|
|
51
42
|
path: string;
|
|
52
43
|
symbol?: string | undefined;
|
|
53
|
-
line_start?: number | undefined;
|
|
54
|
-
line_end?: number | undefined;
|
|
55
44
|
quoted_text?: string | undefined;
|
|
56
45
|
no_quotable_span?: string | undefined;
|
|
57
46
|
hash_at_plan_time?: string | undefined;
|
|
@@ -174,7 +163,7 @@ export declare const WorkerFindingSchema: z.ZodObject<{
|
|
|
174
163
|
} & {
|
|
175
164
|
category: z.ZodString;
|
|
176
165
|
lens: z.ZodOptional<z.ZodEnum<["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]>>;
|
|
177
|
-
affected_files: z.ZodArray<z.ZodEffects<z.
|
|
166
|
+
affected_files: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
|
|
178
167
|
path: z.ZodString;
|
|
179
168
|
line_start: z.ZodOptional<z.ZodNumber>;
|
|
180
169
|
line_end: z.ZodOptional<z.ZodNumber>;
|
|
@@ -182,51 +171,27 @@ export declare const WorkerFindingSchema: z.ZodObject<{
|
|
|
182
171
|
quoted_text: z.ZodOptional<z.ZodString>;
|
|
183
172
|
no_quotable_span: z.ZodOptional<z.ZodString>;
|
|
184
173
|
hash_at_plan_time: z.ZodOptional<z.ZodString>;
|
|
185
|
-
}, "strict", z.ZodTypeAny, {
|
|
186
|
-
path: string;
|
|
187
|
-
symbol?: string | undefined;
|
|
188
|
-
line_start?: number | undefined;
|
|
189
|
-
line_end?: number | undefined;
|
|
190
|
-
quoted_text?: string | undefined;
|
|
191
|
-
no_quotable_span?: string | undefined;
|
|
192
|
-
hash_at_plan_time?: string | undefined;
|
|
193
|
-
}, {
|
|
194
|
-
path: string;
|
|
195
|
-
symbol?: string | undefined;
|
|
196
|
-
line_start?: number | undefined;
|
|
197
|
-
line_end?: number | undefined;
|
|
198
|
-
quoted_text?: string | undefined;
|
|
199
|
-
no_quotable_span?: string | undefined;
|
|
200
|
-
hash_at_plan_time?: string | undefined;
|
|
201
|
-
}>, {
|
|
174
|
+
}, "line_start" | "line_end">, "strict", z.ZodTypeAny, {
|
|
202
175
|
path: string;
|
|
203
176
|
symbol?: string | undefined;
|
|
204
|
-
line_start?: number | undefined;
|
|
205
|
-
line_end?: number | undefined;
|
|
206
177
|
quoted_text?: string | undefined;
|
|
207
178
|
no_quotable_span?: string | undefined;
|
|
208
179
|
hash_at_plan_time?: string | undefined;
|
|
209
180
|
}, {
|
|
210
181
|
path: string;
|
|
211
182
|
symbol?: string | undefined;
|
|
212
|
-
line_start?: number | undefined;
|
|
213
|
-
line_end?: number | undefined;
|
|
214
183
|
quoted_text?: string | undefined;
|
|
215
184
|
no_quotable_span?: string | undefined;
|
|
216
185
|
hash_at_plan_time?: string | undefined;
|
|
217
186
|
}>, {
|
|
218
187
|
path: string;
|
|
219
188
|
symbol?: string | undefined;
|
|
220
|
-
line_start?: number | undefined;
|
|
221
|
-
line_end?: number | undefined;
|
|
222
189
|
quoted_text?: string | undefined;
|
|
223
190
|
no_quotable_span?: string | undefined;
|
|
224
191
|
hash_at_plan_time?: string | undefined;
|
|
225
192
|
}, {
|
|
226
193
|
path: string;
|
|
227
194
|
symbol?: string | undefined;
|
|
228
|
-
line_start?: number | undefined;
|
|
229
|
-
line_end?: number | undefined;
|
|
230
195
|
quoted_text?: string | undefined;
|
|
231
196
|
no_quotable_span?: string | undefined;
|
|
232
197
|
hash_at_plan_time?: string | undefined;
|
|
@@ -244,8 +209,6 @@ export declare const WorkerFindingSchema: z.ZodObject<{
|
|
|
244
209
|
affected_files: {
|
|
245
210
|
path: string;
|
|
246
211
|
symbol?: string | undefined;
|
|
247
|
-
line_start?: number | undefined;
|
|
248
|
-
line_end?: number | undefined;
|
|
249
212
|
quoted_text?: string | undefined;
|
|
250
213
|
no_quotable_span?: string | undefined;
|
|
251
214
|
hash_at_plan_time?: string | undefined;
|
|
@@ -295,8 +258,6 @@ export declare const WorkerFindingSchema: z.ZodObject<{
|
|
|
295
258
|
affected_files: {
|
|
296
259
|
path: string;
|
|
297
260
|
symbol?: string | undefined;
|
|
298
|
-
line_start?: number | undefined;
|
|
299
|
-
line_end?: number | undefined;
|
|
300
261
|
quoted_text?: string | undefined;
|
|
301
262
|
no_quotable_span?: string | undefined;
|
|
302
263
|
hash_at_plan_time?: string | undefined;
|
|
@@ -582,7 +543,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
582
543
|
} & {
|
|
583
544
|
category: z.ZodString;
|
|
584
545
|
lens: z.ZodOptional<z.ZodEnum<["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]>>;
|
|
585
|
-
affected_files: z.ZodArray<z.ZodEffects<z.
|
|
546
|
+
affected_files: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
|
|
586
547
|
path: z.ZodString;
|
|
587
548
|
line_start: z.ZodOptional<z.ZodNumber>;
|
|
588
549
|
line_end: z.ZodOptional<z.ZodNumber>;
|
|
@@ -590,51 +551,27 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
590
551
|
quoted_text: z.ZodOptional<z.ZodString>;
|
|
591
552
|
no_quotable_span: z.ZodOptional<z.ZodString>;
|
|
592
553
|
hash_at_plan_time: z.ZodOptional<z.ZodString>;
|
|
593
|
-
}, "strict", z.ZodTypeAny, {
|
|
594
|
-
path: string;
|
|
595
|
-
symbol?: string | undefined;
|
|
596
|
-
line_start?: number | undefined;
|
|
597
|
-
line_end?: number | undefined;
|
|
598
|
-
quoted_text?: string | undefined;
|
|
599
|
-
no_quotable_span?: string | undefined;
|
|
600
|
-
hash_at_plan_time?: string | undefined;
|
|
601
|
-
}, {
|
|
602
|
-
path: string;
|
|
603
|
-
symbol?: string | undefined;
|
|
604
|
-
line_start?: number | undefined;
|
|
605
|
-
line_end?: number | undefined;
|
|
606
|
-
quoted_text?: string | undefined;
|
|
607
|
-
no_quotable_span?: string | undefined;
|
|
608
|
-
hash_at_plan_time?: string | undefined;
|
|
609
|
-
}>, {
|
|
554
|
+
}, "line_start" | "line_end">, "strict", z.ZodTypeAny, {
|
|
610
555
|
path: string;
|
|
611
556
|
symbol?: string | undefined;
|
|
612
|
-
line_start?: number | undefined;
|
|
613
|
-
line_end?: number | undefined;
|
|
614
557
|
quoted_text?: string | undefined;
|
|
615
558
|
no_quotable_span?: string | undefined;
|
|
616
559
|
hash_at_plan_time?: string | undefined;
|
|
617
560
|
}, {
|
|
618
561
|
path: string;
|
|
619
562
|
symbol?: string | undefined;
|
|
620
|
-
line_start?: number | undefined;
|
|
621
|
-
line_end?: number | undefined;
|
|
622
563
|
quoted_text?: string | undefined;
|
|
623
564
|
no_quotable_span?: string | undefined;
|
|
624
565
|
hash_at_plan_time?: string | undefined;
|
|
625
566
|
}>, {
|
|
626
567
|
path: string;
|
|
627
568
|
symbol?: string | undefined;
|
|
628
|
-
line_start?: number | undefined;
|
|
629
|
-
line_end?: number | undefined;
|
|
630
569
|
quoted_text?: string | undefined;
|
|
631
570
|
no_quotable_span?: string | undefined;
|
|
632
571
|
hash_at_plan_time?: string | undefined;
|
|
633
572
|
}, {
|
|
634
573
|
path: string;
|
|
635
574
|
symbol?: string | undefined;
|
|
636
|
-
line_start?: number | undefined;
|
|
637
|
-
line_end?: number | undefined;
|
|
638
575
|
quoted_text?: string | undefined;
|
|
639
576
|
no_quotable_span?: string | undefined;
|
|
640
577
|
hash_at_plan_time?: string | undefined;
|
|
@@ -652,8 +589,6 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
652
589
|
affected_files: {
|
|
653
590
|
path: string;
|
|
654
591
|
symbol?: string | undefined;
|
|
655
|
-
line_start?: number | undefined;
|
|
656
|
-
line_end?: number | undefined;
|
|
657
592
|
quoted_text?: string | undefined;
|
|
658
593
|
no_quotable_span?: string | undefined;
|
|
659
594
|
hash_at_plan_time?: string | undefined;
|
|
@@ -703,8 +638,6 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
703
638
|
affected_files: {
|
|
704
639
|
path: string;
|
|
705
640
|
symbol?: string | undefined;
|
|
706
|
-
line_start?: number | undefined;
|
|
707
|
-
line_end?: number | undefined;
|
|
708
641
|
quoted_text?: string | undefined;
|
|
709
642
|
no_quotable_span?: string | undefined;
|
|
710
643
|
hash_at_plan_time?: string | undefined;
|
|
@@ -960,8 +893,6 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
960
893
|
affected_files: {
|
|
961
894
|
path: string;
|
|
962
895
|
symbol?: string | undefined;
|
|
963
|
-
line_start?: number | undefined;
|
|
964
|
-
line_end?: number | undefined;
|
|
965
896
|
quoted_text?: string | undefined;
|
|
966
897
|
no_quotable_span?: string | undefined;
|
|
967
898
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1072,8 +1003,6 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
1072
1003
|
affected_files: {
|
|
1073
1004
|
path: string;
|
|
1074
1005
|
symbol?: string | undefined;
|
|
1075
|
-
line_start?: number | undefined;
|
|
1076
|
-
line_end?: number | undefined;
|
|
1077
1006
|
quoted_text?: string | undefined;
|
|
1078
1007
|
no_quotable_span?: string | undefined;
|
|
1079
1008
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1299,7 +1228,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1299
1228
|
} & {
|
|
1300
1229
|
category: z.ZodString;
|
|
1301
1230
|
lens: z.ZodOptional<z.ZodEnum<["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]>>;
|
|
1302
|
-
affected_files: z.ZodArray<z.ZodEffects<z.
|
|
1231
|
+
affected_files: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
|
|
1303
1232
|
path: z.ZodString;
|
|
1304
1233
|
line_start: z.ZodOptional<z.ZodNumber>;
|
|
1305
1234
|
line_end: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1307,51 +1236,27 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1307
1236
|
quoted_text: z.ZodOptional<z.ZodString>;
|
|
1308
1237
|
no_quotable_span: z.ZodOptional<z.ZodString>;
|
|
1309
1238
|
hash_at_plan_time: z.ZodOptional<z.ZodString>;
|
|
1310
|
-
}, "strict", z.ZodTypeAny, {
|
|
1311
|
-
path: string;
|
|
1312
|
-
symbol?: string | undefined;
|
|
1313
|
-
line_start?: number | undefined;
|
|
1314
|
-
line_end?: number | undefined;
|
|
1315
|
-
quoted_text?: string | undefined;
|
|
1316
|
-
no_quotable_span?: string | undefined;
|
|
1317
|
-
hash_at_plan_time?: string | undefined;
|
|
1318
|
-
}, {
|
|
1319
|
-
path: string;
|
|
1320
|
-
symbol?: string | undefined;
|
|
1321
|
-
line_start?: number | undefined;
|
|
1322
|
-
line_end?: number | undefined;
|
|
1323
|
-
quoted_text?: string | undefined;
|
|
1324
|
-
no_quotable_span?: string | undefined;
|
|
1325
|
-
hash_at_plan_time?: string | undefined;
|
|
1326
|
-
}>, {
|
|
1239
|
+
}, "line_start" | "line_end">, "strict", z.ZodTypeAny, {
|
|
1327
1240
|
path: string;
|
|
1328
1241
|
symbol?: string | undefined;
|
|
1329
|
-
line_start?: number | undefined;
|
|
1330
|
-
line_end?: number | undefined;
|
|
1331
1242
|
quoted_text?: string | undefined;
|
|
1332
1243
|
no_quotable_span?: string | undefined;
|
|
1333
1244
|
hash_at_plan_time?: string | undefined;
|
|
1334
1245
|
}, {
|
|
1335
1246
|
path: string;
|
|
1336
1247
|
symbol?: string | undefined;
|
|
1337
|
-
line_start?: number | undefined;
|
|
1338
|
-
line_end?: number | undefined;
|
|
1339
1248
|
quoted_text?: string | undefined;
|
|
1340
1249
|
no_quotable_span?: string | undefined;
|
|
1341
1250
|
hash_at_plan_time?: string | undefined;
|
|
1342
1251
|
}>, {
|
|
1343
1252
|
path: string;
|
|
1344
1253
|
symbol?: string | undefined;
|
|
1345
|
-
line_start?: number | undefined;
|
|
1346
|
-
line_end?: number | undefined;
|
|
1347
1254
|
quoted_text?: string | undefined;
|
|
1348
1255
|
no_quotable_span?: string | undefined;
|
|
1349
1256
|
hash_at_plan_time?: string | undefined;
|
|
1350
1257
|
}, {
|
|
1351
1258
|
path: string;
|
|
1352
1259
|
symbol?: string | undefined;
|
|
1353
|
-
line_start?: number | undefined;
|
|
1354
|
-
line_end?: number | undefined;
|
|
1355
1260
|
quoted_text?: string | undefined;
|
|
1356
1261
|
no_quotable_span?: string | undefined;
|
|
1357
1262
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1369,8 +1274,6 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1369
1274
|
affected_files: {
|
|
1370
1275
|
path: string;
|
|
1371
1276
|
symbol?: string | undefined;
|
|
1372
|
-
line_start?: number | undefined;
|
|
1373
|
-
line_end?: number | undefined;
|
|
1374
1277
|
quoted_text?: string | undefined;
|
|
1375
1278
|
no_quotable_span?: string | undefined;
|
|
1376
1279
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1420,8 +1323,6 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1420
1323
|
affected_files: {
|
|
1421
1324
|
path: string;
|
|
1422
1325
|
symbol?: string | undefined;
|
|
1423
|
-
line_start?: number | undefined;
|
|
1424
|
-
line_end?: number | undefined;
|
|
1425
1326
|
quoted_text?: string | undefined;
|
|
1426
1327
|
no_quotable_span?: string | undefined;
|
|
1427
1328
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1677,8 +1578,6 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1677
1578
|
affected_files: {
|
|
1678
1579
|
path: string;
|
|
1679
1580
|
symbol?: string | undefined;
|
|
1680
|
-
line_start?: number | undefined;
|
|
1681
|
-
line_end?: number | undefined;
|
|
1682
1581
|
quoted_text?: string | undefined;
|
|
1683
1582
|
no_quotable_span?: string | undefined;
|
|
1684
1583
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1789,8 +1688,6 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1789
1688
|
affected_files: {
|
|
1790
1689
|
path: string;
|
|
1791
1690
|
symbol?: string | undefined;
|
|
1792
|
-
line_start?: number | undefined;
|
|
1793
|
-
line_end?: number | undefined;
|
|
1794
1691
|
quoted_text?: string | undefined;
|
|
1795
1692
|
no_quotable_span?: string | undefined;
|
|
1796
1693
|
hash_at_plan_time?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerSchemas.d.ts","sourceRoot":"","sources":["../../../src/audit/contracts/workerSchemas.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"workerSchemas.d.ts","sourceRoot":"","sources":["../../../src/audit/contracts/workerSchemas.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B;;;CAKjC,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BpC,CAAC;AAcL;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B;;;;;;CAUlC,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBrB,CAAC;AAEZ,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAA0C,CAAC;AAEhF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CACxC,MAAM,EACN;IAAE,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAkBxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,MAAM,EACN;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CA8BF,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB"}
|
|
@@ -5,11 +5,27 @@
|
|
|
5
5
|
// derives the sites from the staged diff and refuses an unbound one.
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
8
|
-
import { AUDIT_FINDING_QUOTE_OR_DECLARATION_RULE, FindingSchema, FindingLocationObjectSchema, LensSchema,
|
|
8
|
+
import { AUDIT_FINDING_QUOTE_OR_DECLARATION_RULE, FindingSchema, FindingLocationObjectSchema, LensSchema, } from "audit-tools/shared";
|
|
9
9
|
import { AuditTaskSchema, AuditResultSchema, AuditVerificationSchema, } from "../types.js";
|
|
10
10
|
import { AuditCodeResponseSchema } from "./wrapperResponse.js";
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The location fields the per-file projection omits, with the sentence ingestion
|
|
13
|
+
* refuses each with — the location-level twin of
|
|
14
|
+
* {@link WORKER_REFUSED_FINDING_VERDICTS}, and one fact for the same reason.
|
|
15
|
+
*
|
|
16
|
+
* Line numbers are TOOL-OWNED: `groundFinding` writes them from where the
|
|
17
|
+
* entry's `quoted_text` occurs. A reviewer-typed number was never compared with
|
|
18
|
+
* its quote, so it could point anywhere in the file and still pass every check.
|
|
19
|
+
*/
|
|
20
|
+
export const WORKER_REFUSED_LOCATION_FIELDS = {
|
|
21
|
+
line_start: "line_start is derived at ingest from where quoted_text occurs and must not be supplied",
|
|
22
|
+
line_end: "line_end is derived at ingest from where quoted_text occurs and must not be supplied",
|
|
23
|
+
};
|
|
24
|
+
export const WorkerFindingLocationSchema = FindingLocationObjectSchema.omit({
|
|
25
|
+
line_start: true,
|
|
26
|
+
line_end: true,
|
|
27
|
+
})
|
|
28
|
+
.strict()
|
|
13
29
|
// The audit draw's grounding rule, enforced at the SCHEMA so the host door
|
|
14
30
|
// (`parseFindings`) and the generated JSON schema state it without a second
|
|
15
31
|
// hand-written check. The sentence is the shared constant the dispatch prompt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerSchemas.js","sourceRoot":"","sources":["../../../src/audit/contracts/workerSchemas.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,EAAE;AACF,uGAAuG;AACvG,sFAAsF;AACtF,uEAAuE;AAEvE,OAAO,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Aa,EAAE,aAAa,EAC5B,SAAS,EAAE,OAAO,GAAG,SAAS,EAC9B,cAAc,EAAE,yBAAyB,EACzC,YAAY,EAAE,kBAAkB,EAChC,WAAW,GAAE,eAAe,EAAO,EACnC,YAAY,GAAE,wBAAoE,GACjF,MAAM,CA0PR;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,gBAAgB,EAC/B,YAAY,EAAE,kBAAkB,EAChC,SAAS,EAAE,aAAa,EACxB,aAAa,EAAE,aAAa,EAC5B,SAAS,CAAC,EAAE,SAAS,EACrB,YAAY,GAAE,wBAAoE,EAClF,cAAc,GAAE,yBAAwF,GACvG,OAAO,CAAC,aAAa,CAAC,CAqIxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,kBAAkB,GAC/B,kBAAkB,CAwDpB;AAcD,wBAAsB,aAAa,CACjC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,EAC5B,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,gBAAgB,CAAC,CA8X3B"}
|
|
@@ -855,6 +855,40 @@ async function checkClosingPreview(state, options) {
|
|
|
855
855
|
}
|
|
856
856
|
return preview;
|
|
857
857
|
}
|
|
858
|
+
/**
|
|
859
|
+
* Commit exactly the closing `files`, never another staged path.
|
|
860
|
+
*
|
|
861
|
+
* The normal form is a pathspec'd commit. Git cannot take one when two of the
|
|
862
|
+
* paths differ only by case on a case-insensitive checkout (a case-only
|
|
863
|
+
* rename): it refuses "will not add file alias". The whole index is then the
|
|
864
|
+
* only commit that records the rename — and it is taken ONLY when nothing
|
|
865
|
+
* outside `files` is staged. Otherwise the close refuses with the reason
|
|
866
|
+
* recorded, rather than sweep the user's staged work into its commit.
|
|
867
|
+
*/
|
|
868
|
+
async function commitClosingFiles(root, files, message, run, commands) {
|
|
869
|
+
const foldCollision = new Set(files.map(normalizeRepoPath)).size < files.length;
|
|
870
|
+
if (!foldCollision) {
|
|
871
|
+
return run("git", ["commit", "-m", message, "--", ...files]);
|
|
872
|
+
}
|
|
873
|
+
const listed = await runTrackedAsync(["git", "diff", "--cached", "--name-only", "--no-renames", "-z"], { cwd: root, encoding: "utf8", windowsHide: true, timeout: CLOSING_CHILD_DEADLINE_MS });
|
|
874
|
+
const own = new Set(files);
|
|
875
|
+
const foreign = listed.status === 0
|
|
876
|
+
? String(listed.stdout).split("\0").filter((path) => path && !own.has(path))
|
|
877
|
+
: null;
|
|
878
|
+
if (foreign === null || foreign.length > 0) {
|
|
879
|
+
commands.push({
|
|
880
|
+
command: [],
|
|
881
|
+
exit_code: null,
|
|
882
|
+
stderr: "closing commit refused: a case-only rename cannot be committed by path, and the index " +
|
|
883
|
+
(foreign === null
|
|
884
|
+
? "could not be listed to prove nothing else is staged"
|
|
885
|
+
: `also holds staged paths outside this run: ${foreign.join(", ")}`) +
|
|
886
|
+
". Commit the rename by hand, or unstage those paths and re-run the close.",
|
|
887
|
+
});
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
return run("git", ["commit", "-m", message]);
|
|
891
|
+
}
|
|
858
892
|
/**
|
|
859
893
|
* Execute the run's closing action.
|
|
860
894
|
*
|
|
@@ -908,8 +942,24 @@ export async function executeClosingAction(state, options) {
|
|
|
908
942
|
// Awaited stepwise so the `&&` short-circuit survives the async migration:
|
|
909
943
|
// a promise is truthy, so a bare `a() && b()` over async runs would have
|
|
910
944
|
// run BOTH commands and dropped the failure gate.
|
|
911
|
-
|
|
912
|
-
|
|
945
|
+
//
|
|
946
|
+
// The commit carries the SAME pathspec as the add. Without it, git records
|
|
947
|
+
// the whole index, so a path the user staged before the close (reported as
|
|
948
|
+
// `leftover`, never added here) would ride into this commit. With it, git
|
|
949
|
+
// commits only these paths and leaves the user's other staged entries
|
|
950
|
+
// staged and untouched.
|
|
951
|
+
//
|
|
952
|
+
// A path gone from the working tree is a DELETION, and `git add` refuses it
|
|
953
|
+
// outright ("pathspec did not match") once the deletion is already staged —
|
|
954
|
+
// a `git rm`, or the old half of a `git mv`. `git rm --cached` records the
|
|
955
|
+
// deletion when the index still holds the path and is a no-op when it does
|
|
956
|
+
// not, so every manifest path reaches the commit without failing the add.
|
|
957
|
+
const present = files.filter((file) => existsSync(join(options.root, file)));
|
|
958
|
+
const absent = files.filter((file) => !present.includes(file));
|
|
959
|
+
const staged = (present.length === 0 || (await run("git", ["add", "--", ...present]))) &&
|
|
960
|
+
(absent.length === 0 ||
|
|
961
|
+
(await run("git", ["rm", "--cached", "--ignore-unmatch", "-q", "--", ...absent])));
|
|
962
|
+
const committed = staged && (await commitClosingFiles(options.root, files, commitMessage, run, commands));
|
|
913
963
|
if (committed && action === "push") {
|
|
914
964
|
await run("git", ["push"]);
|
|
915
965
|
}
|