audit-tools 0.39.9 → 0.39.11
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/README.md +1 -1
- package/dist/audit/cli/steps.d.ts +4 -4
- package/dist/audit/contracts/workerSchemas.d.ts +32 -32
- package/dist/audit/types/reviewPlanning.d.ts +2 -2
- package/dist/audit/types.d.ts +2 -2
- package/dist/remediate/intake.d.ts +2 -2
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +66 -24
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +10 -10
- package/dist/shared/contentKey.d.ts +42 -1
- package/dist/shared/contentKey.d.ts.map +1 -1
- package/dist/shared/contentKey.js +45 -1
- package/dist/shared/contentKey.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +12 -12
- package/dist/shared/dispatch/dispatchQuotaContract.d.ts +12 -12
- package/dist/shared/index.d.ts +4 -2
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +2 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/quota/capacity.d.ts +2 -2
- package/dist/shared/quota/scheduler.d.ts +2 -2
- package/dist/shared/types/accessMemory.d.ts +6 -6
- package/dist/shared/types/attributionContract.d.ts +198 -0
- package/dist/shared/types/attributionContract.d.ts.map +1 -0
- package/dist/shared/types/attributionContract.js +332 -0
- package/dist/shared/types/attributionContract.js.map +1 -0
- package/dist/shared/types/charter.d.ts +10 -10
- package/dist/shared/types/intentCheckpoint.d.ts +28 -28
- package/docs/audit-pkg/operator-guide.md +5 -3
- package/docs/audit-pkg/release.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ Add `--root <repo>` when running from outside the target repository.
|
|
|
201
201
|
|
|
202
202
|
## Develop
|
|
203
203
|
|
|
204
|
-
TypeScript, Node
|
|
204
|
+
TypeScript, Node 22+. From the repo root:
|
|
205
205
|
|
|
206
206
|
```bash
|
|
207
207
|
npm install # always run first in a fresh clone/worktree
|
|
@@ -130,12 +130,12 @@ export declare const StepArtifactSchema: z.ZodObject<{
|
|
|
130
130
|
}>>;
|
|
131
131
|
}, "strict", z.ZodTypeAny, {
|
|
132
132
|
status: "blocked" | "ready" | "complete";
|
|
133
|
-
run_id: string | null;
|
|
134
133
|
contract_version: "audit-code-step/v1alpha1";
|
|
134
|
+
run_id: string | null;
|
|
135
135
|
repo_root: string;
|
|
136
136
|
artifacts_dir: string;
|
|
137
137
|
prompt_path: string;
|
|
138
|
-
step_kind: "blocked" | "
|
|
138
|
+
step_kind: "blocked" | "analyzer_consent" | "design_review" | "charter_clarification" | "systemic_challenge" | "critical_flow_fallback" | "synthesis_narrative" | "charter_extraction" | "charter_delta" | "dispatch_review" | "design_review_parallel" | "design_review_contract" | "design_review_conceptual" | "confirm_intent" | "intent_equivalence" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
|
|
139
139
|
allowed_commands: string[];
|
|
140
140
|
stop_condition: string;
|
|
141
141
|
artifact_paths: Record<string, string | null>;
|
|
@@ -158,12 +158,12 @@ export declare const StepArtifactSchema: z.ZodObject<{
|
|
|
158
158
|
allowed_mcp_tools?: string[] | undefined;
|
|
159
159
|
}, {
|
|
160
160
|
status: "blocked" | "ready" | "complete";
|
|
161
|
-
run_id: string | null;
|
|
162
161
|
contract_version: "audit-code-step/v1alpha1";
|
|
162
|
+
run_id: string | null;
|
|
163
163
|
repo_root: string;
|
|
164
164
|
artifacts_dir: string;
|
|
165
165
|
prompt_path: string;
|
|
166
|
-
step_kind: "blocked" | "
|
|
166
|
+
step_kind: "blocked" | "analyzer_consent" | "design_review" | "charter_clarification" | "systemic_challenge" | "critical_flow_fallback" | "synthesis_narrative" | "charter_extraction" | "charter_delta" | "dispatch_review" | "design_review_parallel" | "design_review_contract" | "design_review_conceptual" | "confirm_intent" | "intent_equivalence" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
|
|
167
167
|
allowed_commands: string[];
|
|
168
168
|
stop_condition: string;
|
|
169
169
|
artifact_paths: Record<string, string | null>;
|
|
@@ -178,7 +178,7 @@ export declare const WorkerFindingSchema: z.ZodObject<{
|
|
|
178
178
|
hash_at_plan_time?: string | undefined;
|
|
179
179
|
}[];
|
|
180
180
|
evidence: string[];
|
|
181
|
-
lens?: "
|
|
181
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
182
182
|
impact?: string | undefined;
|
|
183
183
|
likelihood?: string | undefined;
|
|
184
184
|
reproduction?: string[] | undefined;
|
|
@@ -232,7 +232,7 @@ export declare const WorkerFindingSchema: z.ZodObject<{
|
|
|
232
232
|
hash_at_plan_time?: string | undefined;
|
|
233
233
|
}[];
|
|
234
234
|
evidence: string[];
|
|
235
|
-
lens?: "
|
|
235
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
236
236
|
impact?: string | undefined;
|
|
237
237
|
likelihood?: string | undefined;
|
|
238
238
|
reproduction?: string[] | undefined;
|
|
@@ -312,7 +312,7 @@ export declare const WorkerAuditTaskSchema: z.ZodObject<{
|
|
|
312
312
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
313
313
|
}, "strict", z.ZodTypeAny, {
|
|
314
314
|
unit_id: string;
|
|
315
|
-
lens: "
|
|
315
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
316
316
|
rationale: string;
|
|
317
317
|
task_id: string;
|
|
318
318
|
pass_id: string;
|
|
@@ -333,7 +333,7 @@ export declare const WorkerAuditTaskSchema: z.ZodObject<{
|
|
|
333
333
|
completion_reason?: string | undefined;
|
|
334
334
|
}, {
|
|
335
335
|
unit_id: string;
|
|
336
|
-
lens: "
|
|
336
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
337
337
|
rationale: string;
|
|
338
338
|
task_id: string;
|
|
339
339
|
pass_id: string;
|
|
@@ -543,7 +543,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
543
543
|
hash_at_plan_time?: string | undefined;
|
|
544
544
|
}[];
|
|
545
545
|
evidence: string[];
|
|
546
|
-
lens?: "
|
|
546
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
547
547
|
impact?: string | undefined;
|
|
548
548
|
likelihood?: string | undefined;
|
|
549
549
|
reproduction?: string[] | undefined;
|
|
@@ -597,7 +597,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
597
597
|
hash_at_plan_time?: string | undefined;
|
|
598
598
|
}[];
|
|
599
599
|
evidence: string[];
|
|
600
|
-
lens?: "
|
|
600
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
601
601
|
impact?: string | undefined;
|
|
602
602
|
likelihood?: string | undefined;
|
|
603
603
|
reproduction?: string[] | undefined;
|
|
@@ -685,7 +685,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
685
685
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
686
686
|
}, "strict", z.ZodTypeAny, {
|
|
687
687
|
unit_id: string;
|
|
688
|
-
lens: "
|
|
688
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
689
689
|
rationale: string;
|
|
690
690
|
task_id: string;
|
|
691
691
|
pass_id: string;
|
|
@@ -706,7 +706,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
706
706
|
completion_reason?: string | undefined;
|
|
707
707
|
}, {
|
|
708
708
|
unit_id: string;
|
|
709
|
-
lens: "
|
|
709
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
710
710
|
rationale: string;
|
|
711
711
|
task_id: string;
|
|
712
712
|
pass_id: string;
|
|
@@ -734,7 +734,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
734
734
|
confidence_concerns?: string[] | undefined;
|
|
735
735
|
followup_tasks?: {
|
|
736
736
|
unit_id: string;
|
|
737
|
-
lens: "
|
|
737
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
738
738
|
rationale: string;
|
|
739
739
|
task_id: string;
|
|
740
740
|
pass_id: string;
|
|
@@ -762,7 +762,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
762
762
|
confidence_concerns?: string[] | undefined;
|
|
763
763
|
followup_tasks?: {
|
|
764
764
|
unit_id: string;
|
|
765
|
-
lens: "
|
|
765
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
766
766
|
rationale: string;
|
|
767
767
|
task_id: string;
|
|
768
768
|
pass_id: string;
|
|
@@ -786,7 +786,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
786
786
|
submitted_at: z.ZodOptional<z.ZodString>;
|
|
787
787
|
}, "strict", z.ZodTypeAny, {
|
|
788
788
|
unit_id: string;
|
|
789
|
-
lens: "
|
|
789
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
790
790
|
findings: {
|
|
791
791
|
id: string;
|
|
792
792
|
confidence: "high" | "low" | "medium";
|
|
@@ -803,7 +803,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
803
803
|
hash_at_plan_time?: string | undefined;
|
|
804
804
|
}[];
|
|
805
805
|
evidence: string[];
|
|
806
|
-
lens?: "
|
|
806
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
807
807
|
impact?: string | undefined;
|
|
808
808
|
likelihood?: string | undefined;
|
|
809
809
|
reproduction?: string[] | undefined;
|
|
@@ -849,8 +849,8 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
849
849
|
total_lines: number;
|
|
850
850
|
}[];
|
|
851
851
|
notes?: string[] | undefined;
|
|
852
|
-
run_id?: string | undefined;
|
|
853
852
|
attempt?: number | undefined;
|
|
853
|
+
run_id?: string | undefined;
|
|
854
854
|
verification?: {
|
|
855
855
|
verified: boolean;
|
|
856
856
|
needs_followup: boolean;
|
|
@@ -859,7 +859,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
859
859
|
confidence_concerns?: string[] | undefined;
|
|
860
860
|
followup_tasks?: {
|
|
861
861
|
unit_id: string;
|
|
862
|
-
lens: "
|
|
862
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
863
863
|
rationale: string;
|
|
864
864
|
task_id: string;
|
|
865
865
|
pass_id: string;
|
|
@@ -895,7 +895,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
895
895
|
} | undefined;
|
|
896
896
|
}, {
|
|
897
897
|
unit_id: string;
|
|
898
|
-
lens: "
|
|
898
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
899
899
|
findings: {
|
|
900
900
|
id: string;
|
|
901
901
|
confidence: "high" | "low" | "medium";
|
|
@@ -912,7 +912,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
912
912
|
hash_at_plan_time?: string | undefined;
|
|
913
913
|
}[];
|
|
914
914
|
evidence: string[];
|
|
915
|
-
lens?: "
|
|
915
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
916
916
|
impact?: string | undefined;
|
|
917
917
|
likelihood?: string | undefined;
|
|
918
918
|
reproduction?: string[] | undefined;
|
|
@@ -958,8 +958,8 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
958
958
|
total_lines: number;
|
|
959
959
|
}[];
|
|
960
960
|
notes?: string[] | undefined;
|
|
961
|
-
run_id?: string | undefined;
|
|
962
961
|
attempt?: number | undefined;
|
|
962
|
+
run_id?: string | undefined;
|
|
963
963
|
verification?: {
|
|
964
964
|
verified: boolean;
|
|
965
965
|
needs_followup: boolean;
|
|
@@ -968,7 +968,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
968
968
|
confidence_concerns?: string[] | undefined;
|
|
969
969
|
followup_tasks?: {
|
|
970
970
|
unit_id: string;
|
|
971
|
-
lens: "
|
|
971
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
972
972
|
rationale: string;
|
|
973
973
|
task_id: string;
|
|
974
974
|
pass_id: string;
|
|
@@ -1189,7 +1189,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1189
1189
|
hash_at_plan_time?: string | undefined;
|
|
1190
1190
|
}[];
|
|
1191
1191
|
evidence: string[];
|
|
1192
|
-
lens?: "
|
|
1192
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
1193
1193
|
impact?: string | undefined;
|
|
1194
1194
|
likelihood?: string | undefined;
|
|
1195
1195
|
reproduction?: string[] | undefined;
|
|
@@ -1243,7 +1243,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1243
1243
|
hash_at_plan_time?: string | undefined;
|
|
1244
1244
|
}[];
|
|
1245
1245
|
evidence: string[];
|
|
1246
|
-
lens?: "
|
|
1246
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
1247
1247
|
impact?: string | undefined;
|
|
1248
1248
|
likelihood?: string | undefined;
|
|
1249
1249
|
reproduction?: string[] | undefined;
|
|
@@ -1331,7 +1331,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1331
1331
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1332
1332
|
}, "strict", z.ZodTypeAny, {
|
|
1333
1333
|
unit_id: string;
|
|
1334
|
-
lens: "
|
|
1334
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1335
1335
|
rationale: string;
|
|
1336
1336
|
task_id: string;
|
|
1337
1337
|
pass_id: string;
|
|
@@ -1352,7 +1352,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1352
1352
|
completion_reason?: string | undefined;
|
|
1353
1353
|
}, {
|
|
1354
1354
|
unit_id: string;
|
|
1355
|
-
lens: "
|
|
1355
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1356
1356
|
rationale: string;
|
|
1357
1357
|
task_id: string;
|
|
1358
1358
|
pass_id: string;
|
|
@@ -1380,7 +1380,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1380
1380
|
confidence_concerns?: string[] | undefined;
|
|
1381
1381
|
followup_tasks?: {
|
|
1382
1382
|
unit_id: string;
|
|
1383
|
-
lens: "
|
|
1383
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1384
1384
|
rationale: string;
|
|
1385
1385
|
task_id: string;
|
|
1386
1386
|
pass_id: string;
|
|
@@ -1408,7 +1408,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1408
1408
|
confidence_concerns?: string[] | undefined;
|
|
1409
1409
|
followup_tasks?: {
|
|
1410
1410
|
unit_id: string;
|
|
1411
|
-
lens: "
|
|
1411
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1412
1412
|
rationale: string;
|
|
1413
1413
|
task_id: string;
|
|
1414
1414
|
pass_id: string;
|
|
@@ -1432,7 +1432,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1432
1432
|
submitted_at: z.ZodOptional<z.ZodString>;
|
|
1433
1433
|
}, "strict", z.ZodTypeAny, {
|
|
1434
1434
|
unit_id: string;
|
|
1435
|
-
lens: "
|
|
1435
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1436
1436
|
findings: {
|
|
1437
1437
|
id: string;
|
|
1438
1438
|
confidence: "high" | "low" | "medium";
|
|
@@ -1449,7 +1449,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1449
1449
|
hash_at_plan_time?: string | undefined;
|
|
1450
1450
|
}[];
|
|
1451
1451
|
evidence: string[];
|
|
1452
|
-
lens?: "
|
|
1452
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
1453
1453
|
impact?: string | undefined;
|
|
1454
1454
|
likelihood?: string | undefined;
|
|
1455
1455
|
reproduction?: string[] | undefined;
|
|
@@ -1495,8 +1495,8 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1495
1495
|
total_lines: number;
|
|
1496
1496
|
}[];
|
|
1497
1497
|
notes?: string[] | undefined;
|
|
1498
|
-
run_id?: string | undefined;
|
|
1499
1498
|
attempt?: number | undefined;
|
|
1499
|
+
run_id?: string | undefined;
|
|
1500
1500
|
verification?: {
|
|
1501
1501
|
verified: boolean;
|
|
1502
1502
|
needs_followup: boolean;
|
|
@@ -1505,7 +1505,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1505
1505
|
confidence_concerns?: string[] | undefined;
|
|
1506
1506
|
followup_tasks?: {
|
|
1507
1507
|
unit_id: string;
|
|
1508
|
-
lens: "
|
|
1508
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1509
1509
|
rationale: string;
|
|
1510
1510
|
task_id: string;
|
|
1511
1511
|
pass_id: string;
|
|
@@ -1541,7 +1541,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1541
1541
|
} | undefined;
|
|
1542
1542
|
}, {
|
|
1543
1543
|
unit_id: string;
|
|
1544
|
-
lens: "
|
|
1544
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1545
1545
|
findings: {
|
|
1546
1546
|
id: string;
|
|
1547
1547
|
confidence: "high" | "low" | "medium";
|
|
@@ -1558,7 +1558,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1558
1558
|
hash_at_plan_time?: string | undefined;
|
|
1559
1559
|
}[];
|
|
1560
1560
|
evidence: string[];
|
|
1561
|
-
lens?: "
|
|
1561
|
+
lens?: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability" | undefined;
|
|
1562
1562
|
impact?: string | undefined;
|
|
1563
1563
|
likelihood?: string | undefined;
|
|
1564
1564
|
reproduction?: string[] | undefined;
|
|
@@ -1604,8 +1604,8 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1604
1604
|
total_lines: number;
|
|
1605
1605
|
}[];
|
|
1606
1606
|
notes?: string[] | undefined;
|
|
1607
|
-
run_id?: string | undefined;
|
|
1608
1607
|
attempt?: number | undefined;
|
|
1608
|
+
run_id?: string | undefined;
|
|
1609
1609
|
verification?: {
|
|
1610
1610
|
verified: boolean;
|
|
1611
1611
|
needs_followup: boolean;
|
|
@@ -1614,7 +1614,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1614
1614
|
confidence_concerns?: string[] | undefined;
|
|
1615
1615
|
followup_tasks?: {
|
|
1616
1616
|
unit_id: string;
|
|
1617
|
-
lens: "
|
|
1617
|
+
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
1618
1618
|
rationale: string;
|
|
1619
1619
|
task_id: string;
|
|
1620
1620
|
pass_id: string;
|
|
@@ -125,9 +125,9 @@ export declare const ReviewPacketSchema: z.ZodObject<{
|
|
|
125
125
|
*/
|
|
126
126
|
routing_risk: z.ZodOptional<z.ZodNumber>;
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
lenses: string[];
|
|
129
128
|
unit_ids: string[];
|
|
130
129
|
rationale: string;
|
|
130
|
+
lenses: string[];
|
|
131
131
|
priority: "high" | "low" | "medium";
|
|
132
132
|
packet_id: string;
|
|
133
133
|
task_ids: string[];
|
|
@@ -154,9 +154,9 @@ export declare const ReviewPacketSchema: z.ZodObject<{
|
|
|
154
154
|
boundary_files?: string[] | undefined;
|
|
155
155
|
routing_risk?: number | undefined;
|
|
156
156
|
}, {
|
|
157
|
-
lenses: string[];
|
|
158
157
|
unit_ids: string[];
|
|
159
158
|
rationale: string;
|
|
159
|
+
lenses: string[];
|
|
160
160
|
priority: "high" | "low" | "medium";
|
|
161
161
|
packet_id: string;
|
|
162
162
|
task_ids: string[];
|
package/dist/audit/types.d.ts
CHANGED
|
@@ -1018,8 +1018,8 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1018
1018
|
total_lines: number;
|
|
1019
1019
|
}[];
|
|
1020
1020
|
notes?: string[] | undefined;
|
|
1021
|
-
run_id?: string | undefined;
|
|
1022
1021
|
attempt?: number | undefined;
|
|
1022
|
+
run_id?: string | undefined;
|
|
1023
1023
|
verification?: {
|
|
1024
1024
|
verified: boolean;
|
|
1025
1025
|
needs_followup: boolean;
|
|
@@ -1127,8 +1127,8 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1127
1127
|
total_lines: number;
|
|
1128
1128
|
}[];
|
|
1129
1129
|
notes?: string[] | undefined;
|
|
1130
|
-
run_id?: string | undefined;
|
|
1131
1130
|
attempt?: number | undefined;
|
|
1131
|
+
run_id?: string | undefined;
|
|
1132
1132
|
verification?: {
|
|
1133
1133
|
verified: boolean;
|
|
1134
1134
|
needs_followup: boolean;
|
|
@@ -69,8 +69,8 @@ export declare const IntakeSummarySchema: z.ZodObject<{
|
|
|
69
69
|
path: string;
|
|
70
70
|
reason?: string | undefined;
|
|
71
71
|
}[];
|
|
72
|
-
schema_version: "remediate-code-intake-summary/v1alpha1";
|
|
73
72
|
ready: boolean;
|
|
73
|
+
schema_version: "remediate-code-intake-summary/v1alpha1";
|
|
74
74
|
constraints: string[];
|
|
75
75
|
source_type: "conversation" | "structured_audit" | "mixed" | "documents";
|
|
76
76
|
non_goals: string[];
|
|
@@ -86,8 +86,8 @@ export declare const IntakeSummarySchema: z.ZodObject<{
|
|
|
86
86
|
path: string;
|
|
87
87
|
reason?: string | undefined;
|
|
88
88
|
}[];
|
|
89
|
-
schema_version: "remediate-code-intake-summary/v1alpha1";
|
|
90
89
|
ready: boolean;
|
|
90
|
+
schema_version: "remediate-code-intake-summary/v1alpha1";
|
|
91
91
|
constraints: string[];
|
|
92
92
|
source_type: "conversation" | "structured_audit" | "mixed" | "documents";
|
|
93
93
|
non_goals: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractPipeline.d.ts","sourceRoot":"","sources":["../../../src/remediate/steps/contractPipeline.ts"],"names":[],"mappings":"AAwBA,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,WAAW,EAGhB,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,aAAa,EAGnB,MAAM,oBAAoB,CAAC;AAkF5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAIzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA6ClD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AAuErD,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,oEAAoE,CAAC;IACrF,qFAAqF;IACrF,QAAQ,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACzE,qDAAqD;IACrD,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAMD,wBAAsB,yBAAyB,CAC7C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAWhC;AAED,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAGf;AAiFD,qCAAqC;AACrC,MAAM,WA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ACH,wBAAsB,qCAAqC,CACzD,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAAC,CAa1C;AAiBD,4EAA4E;AAC5E,QAAA,MAAM,sBAAsB;;CAElB,CAAC;AAEX,KAAK,mBAAmB,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAE/D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,mBAAmB,CAEjF;AAyRD;;;GAGG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAo0CjC;AAkED;;;GAGG;AACH,wBAAsB,uCAAuC,CAC3D,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAoMf;AAgBD,yGAAyG;AACzG,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD,mEAAmE;AACnE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,qBAAqB,CAAC;IACrC,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,MAAM,GACb,iBAAiB,CAQnB"}
|
|
@@ -675,6 +675,13 @@ export async function validateImplementationDagTraceability(artifactsDir) {
|
|
|
675
675
|
if (nodes.length === 0) {
|
|
676
676
|
violations.push("implementation_dag has no nodes; nothing would be implemented.");
|
|
677
677
|
}
|
|
678
|
+
// A node that resolves to no write scope is undispatchable: no worktree seed, no
|
|
679
|
+
// write boundary, no paths to inline for a single-shot worker. It used to reach
|
|
680
|
+
// the dispatch boundary anyway and fail there with "there is nothing a worker
|
|
681
|
+
// could be scoped to" — cascade-blocking its dependents, three steps from the
|
|
682
|
+
// cause. Refusing HERE puts it in front of the regeneration loop this validator
|
|
683
|
+
// already feeds, and names the slug that failed to join.
|
|
684
|
+
const { resolve: resolveWriteScope, availableSlugs } = await buildNodeWriteScopeResolver(artifactsDir);
|
|
678
685
|
for (const node of nodes) {
|
|
679
686
|
const tracedObligations = [
|
|
680
687
|
...(node.satisfies_obligations ?? []),
|
|
@@ -684,6 +691,17 @@ export async function validateImplementationDagTraceability(artifactsDir) {
|
|
|
684
691
|
if (tracedObligations.length === 0 && tracedCounterexamples.length === 0) {
|
|
685
692
|
violations.push(`Node "${node.id}" traces to no obligation from the obligation ledger and no judge-accepted counterexample.`);
|
|
686
693
|
}
|
|
694
|
+
if (resolveWriteScope(node).length === 0) {
|
|
695
|
+
const carried = [
|
|
696
|
+
...(node.satisfies_obligations ?? []),
|
|
697
|
+
...(node.verification_obligation_ids ?? []),
|
|
698
|
+
];
|
|
699
|
+
violations.push(`Node "${node.id}" resolves to an EMPTY write scope, so nothing could be dispatched for it. ` +
|
|
700
|
+
`It declares no output_files/files_likely_touched, and none of its obligation ids ` +
|
|
701
|
+
`(${carried.join(", ") || "none"}) begins with "OBL-<module>-" for any module in ` +
|
|
702
|
+
`module_decomposition (${availableSlugs.join(", ") || "no modules declared"}). ` +
|
|
703
|
+
`Declare the node's output_files, or name its obligations after a decomposed module.`);
|
|
704
|
+
}
|
|
687
705
|
}
|
|
688
706
|
return { ok: violations.length === 0, violations };
|
|
689
707
|
}
|
|
@@ -909,6 +927,51 @@ async function readDecomposedModules(artifactsDir) {
|
|
|
909
927
|
}
|
|
910
928
|
return result;
|
|
911
929
|
}
|
|
930
|
+
/**
|
|
931
|
+
* Single source for "which files may this DAG node write". Declared scope wins
|
|
932
|
+
* (`output_files`, else `files_likely_touched`); a node that declared neither
|
|
933
|
+
* inherits the `file_scope` of the module(s) its obligations belong to, resolved
|
|
934
|
+
* by longest-`OBL-<slug>-` prefix so a short slug never mis-claims a longer
|
|
935
|
+
* module's files.
|
|
936
|
+
*
|
|
937
|
+
* ⚠ Shared by the PROMOTER (which derives the scope) and the VALIDATOR (which
|
|
938
|
+
* refuses when it resolves to nothing) on purpose. Two copies of this resolution
|
|
939
|
+
* would drift, and the drift is invisible: the validator would pass a node the
|
|
940
|
+
* promoter then writes scope-less.
|
|
941
|
+
*
|
|
942
|
+
* The join it performs is between two INDEPENDENTLY AUTHORED name spaces — the
|
|
943
|
+
* obligation id's slug and the decomposition's module names — which is exactly
|
|
944
|
+
* where it fails. Observed 2026-08-09: nodes carrying `OBL-attribution-capture-…`
|
|
945
|
+
* and `OBL-verdict-capture-…` matched no module, because the decomposition had
|
|
946
|
+
* named them `dispatch-attribution-capture` and `verdict-capture-audit` /
|
|
947
|
+
* `verdict-capture-remediate`. Their siblings matched and dispatched; these two
|
|
948
|
+
* resolved to nothing and died later at the dispatch boundary with "there is
|
|
949
|
+
* nothing a worker could be scoped to", three steps from the cause.
|
|
950
|
+
*/
|
|
951
|
+
async function buildNodeWriteScopeResolver(artifactsDir) {
|
|
952
|
+
const decomposedModules = await readDecomposedModules(artifactsDir);
|
|
953
|
+
const moduleScopesBySlug = decomposedModules
|
|
954
|
+
.map((m) => ({ slug: moduleSlug(m.name), files: m.file_scope }))
|
|
955
|
+
.sort((a, b) => b.slug.length - a.slug.length);
|
|
956
|
+
const resolve = (node) => {
|
|
957
|
+
const declared = [...new Set(node.output_files ?? node.files_likely_touched ?? [])];
|
|
958
|
+
if (declared.length > 0)
|
|
959
|
+
return declared;
|
|
960
|
+
const obligationIds = [
|
|
961
|
+
...(node.satisfies_obligations ?? []),
|
|
962
|
+
...(node.verification_obligation_ids ?? []),
|
|
963
|
+
];
|
|
964
|
+
const inherited = new Set();
|
|
965
|
+
for (const id of obligationIds) {
|
|
966
|
+
const owner = moduleScopesBySlug.find((m) => id.startsWith(`OBL-${m.slug}-`));
|
|
967
|
+
if (owner)
|
|
968
|
+
for (const f of owner.files)
|
|
969
|
+
inherited.add(f);
|
|
970
|
+
}
|
|
971
|
+
return [...inherited];
|
|
972
|
+
};
|
|
973
|
+
return { resolve, availableSlugs: moduleScopesBySlug.map((m) => m.slug) };
|
|
974
|
+
}
|
|
912
975
|
/** The goal_id carried by module_decomposition (authoritative for the merge). */
|
|
913
976
|
async function readDecompositionGoalId(artifactsDir) {
|
|
914
977
|
const decomposition = envelopePayload(await readContractArtifact(artifactsDir, "module_decomposition"));
|
|
@@ -2257,30 +2320,9 @@ export async function promoteImplementationDagToExtractedPlan(artifactsDir) {
|
|
|
2257
2320
|
// node's obligations are `OBL-<moduleSlug>-…`, and every module declares its
|
|
2258
2321
|
// `file_scope`, so a node that declared no files inherits the file_scope of the
|
|
2259
2322
|
// module(s) its obligations belong to. (Declared files still win when present.)
|
|
2260
|
-
|
|
2261
|
-
//
|
|
2262
|
-
|
|
2263
|
-
// shorter slug that prefixes another module's slug never mis-claims its files.
|
|
2264
|
-
const moduleScopesBySlug = decomposedModules
|
|
2265
|
-
.map((m) => ({ slug: moduleSlug(m.name), files: m.file_scope }))
|
|
2266
|
-
.sort((a, b) => b.slug.length - a.slug.length);
|
|
2267
|
-
const deriveNodeFiles = (node) => {
|
|
2268
|
-
const declared = [...new Set(node.output_files ?? node.files_likely_touched ?? [])];
|
|
2269
|
-
if (declared.length > 0)
|
|
2270
|
-
return declared;
|
|
2271
|
-
const obligationIds = [
|
|
2272
|
-
...(node.satisfies_obligations ?? []),
|
|
2273
|
-
...(node.verification_obligation_ids ?? []),
|
|
2274
|
-
];
|
|
2275
|
-
const inherited = new Set();
|
|
2276
|
-
for (const id of obligationIds) {
|
|
2277
|
-
const owner = moduleScopesBySlug.find((m) => id.startsWith(`OBL-${m.slug}-`));
|
|
2278
|
-
if (owner)
|
|
2279
|
-
for (const f of owner.files)
|
|
2280
|
-
inherited.add(f);
|
|
2281
|
-
}
|
|
2282
|
-
return [...inherited];
|
|
2283
|
-
};
|
|
2323
|
+
// Single-sourced with the DAG validator, which refuses a node this resolves to
|
|
2324
|
+
// nothing for — see buildNodeWriteScopeResolver.
|
|
2325
|
+
const { resolve: deriveNodeFiles } = await buildNodeWriteScopeResolver(artifactsDir);
|
|
2284
2326
|
const nodes = Array.isArray(dag?.nodes) ? dag.nodes : [];
|
|
2285
2327
|
const findings = nodes.map((node, index) => {
|
|
2286
2328
|
const id = ensureNodeId(node.id, index);
|