audit-tools 0.51.0 → 0.51.2
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/cleanup.d.ts +0 -1
- package/dist/audit/cli/cleanup.d.ts.map +1 -1
- package/dist/audit/cli/cleanup.js +32 -20
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +38 -20
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +2 -14
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
- package/dist/audit/cli/intakeCommand.js +3 -13
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +4 -30
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +2 -95
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +105 -92
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +6 -43
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.js +5 -2
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +21 -0
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -0
- package/dist/audit/cli/stepScaffold.js +50 -0
- package/dist/audit/cli/stepScaffold.js.map +1 -0
- package/dist/audit/cli/steps.d.ts +6 -6
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +2 -14
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +4 -4
- package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/merge.js +2 -7
- package/dist/audit/extractors/analyzers/merge.js.map +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +34 -22
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +2 -6
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/cargo.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/cargo.js +4 -4
- package/dist/audit/extractors/graphManifestEdges/cargo.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pnpm.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pnpm.js +3 -3
- package/dist/audit/extractors/graphManifestEdges/pnpm.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pyproject.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pyproject.js +3 -2
- package/dist/audit/extractors/graphManifestEdges/pyproject.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts +0 -6
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/toml.js +0 -13
- package/dist/audit/extractors/graphManifestEdges/toml.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts +9 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/workspace.js +16 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts +0 -2
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/yaml.js +0 -9
- package/dist/audit/extractors/graphManifestEdges/yaml.js.map +1 -1
- package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
- package/dist/audit/extractors/graphSignals.js +16 -2
- package/dist/audit/extractors/graphSignals.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +19 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +44 -2
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +0 -22
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +1 -43
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts +2 -2
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +79 -230
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.js +4 -9
- package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +11 -2
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/lineCounts.d.ts +44 -0
- package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -0
- package/dist/audit/orchestrator/lineCounts.js +61 -0
- package/dist/audit/orchestrator/lineCounts.js.map +1 -0
- package/dist/audit/orchestrator/obligationDerive.d.ts +35 -0
- package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -0
- package/dist/audit/orchestrator/obligationDerive.js +50 -0
- package/dist/audit/orchestrator/obligationDerive.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.js +3 -2
- package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
- package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.js +0 -4
- package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js +3 -2
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +4 -3
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +2 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +0 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +0 -27
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +10 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +1 -2
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +7 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +12 -12
- package/dist/audit/types.d.ts +2 -2
- package/dist/remediate/droppedFindingsRecord.d.ts +13 -0
- package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -0
- package/dist/remediate/droppedFindingsRecord.js +113 -0
- package/dist/remediate/droppedFindingsRecord.js.map +1 -0
- package/dist/remediate/intake.d.ts +17 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +23 -0
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +1 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +68 -6
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/state/types.d.ts +12 -6
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +3 -1
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +10 -4
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +10 -2
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +56 -12
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +277 -146
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +253 -75
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +14 -0
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +52 -4
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +0 -34
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +181 -143
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/agentReflections.d.ts +44 -3
- package/dist/shared/agentReflections.d.ts.map +1 -1
- package/dist/shared/agentReflections.js +63 -4
- package/dist/shared/agentReflections.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +20 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +17 -3
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +13 -4
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +111 -9
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +32 -1
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +5 -1
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +6 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +8 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/graph/edgeConfidence.d.ts +12 -0
- package/dist/shared/graph/edgeConfidence.d.ts.map +1 -0
- package/dist/shared/graph/edgeConfidence.js +15 -0
- package/dist/shared/graph/edgeConfidence.js.map +1 -0
- package/dist/shared/index.d.ts +12 -3
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +8 -3
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +4 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +42 -0
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -0
- package/dist/shared/submission/hostResultOutcomes.js +129 -0
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -0
- package/dist/shared/submission/ingestionChecks.d.ts +146 -0
- package/dist/shared/submission/ingestionChecks.d.ts.map +1 -0
- package/dist/shared/submission/ingestionChecks.js +157 -0
- package/dist/shared/submission/ingestionChecks.js.map +1 -0
- package/dist/shared/submission/submissionClassifier.d.ts +8 -0
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts +2 -0
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +4 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/projectFacts.d.ts +71 -0
- package/dist/shared/tooling/projectFacts.d.ts.map +1 -0
- package/dist/shared/tooling/projectFacts.js +153 -0
- package/dist/shared/tooling/projectFacts.js.map +1 -0
- package/dist/shared/tooling/projectTestAdmission.d.ts +5 -15
- package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.js +14 -5
- package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
- package/dist/shared/types/charterPacket.d.ts +18 -17
- package/dist/shared/types/charterPacket.d.ts.map +1 -1
- package/dist/shared/types/charterPacket.js.map +1 -1
- package/dist/shared/types/closingActions.d.ts +16 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -0
- package/dist/shared/types/closingActions.js +25 -0
- package/dist/shared/types/closingActions.js.map +1 -0
- package/dist/shared/types/intentCheckpoint.d.ts +50 -0
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +31 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/docs/audit-pkg/contracts.md +34 -12
- package/docs/audit-pkg/operator-guide.md +10 -7
- package/package.json +6 -2
- package/scripts/postinstall.mjs +42 -0
- package/skills/audit-code/audit-code.prompt.md +5 -3
- package/dist/remediate/state/closingActions.d.ts +0 -3
- package/dist/remediate/state/closingActions.d.ts.map +0 -1
- package/dist/remediate/state/closingActions.js +0 -10
- package/dist/remediate/state/closingActions.js.map +0 -1
|
@@ -7,17 +7,17 @@ export declare const ConceptualRoundContributorSchema: z.ZodObject<{
|
|
|
7
7
|
prompt_path: z.ZodString;
|
|
8
8
|
result_path: z.ZodString;
|
|
9
9
|
}, "strict", z.ZodTypeAny, {
|
|
10
|
+
result_path: string;
|
|
10
11
|
contributor_id: string;
|
|
11
12
|
perspective: string;
|
|
12
13
|
lane_id: string;
|
|
13
14
|
prompt_path: string;
|
|
14
|
-
result_path: string;
|
|
15
15
|
}, {
|
|
16
|
+
result_path: string;
|
|
16
17
|
contributor_id: string;
|
|
17
18
|
perspective: string;
|
|
18
19
|
lane_id: string;
|
|
19
20
|
prompt_path: string;
|
|
20
|
-
result_path: string;
|
|
21
21
|
}>;
|
|
22
22
|
export declare const ConceptualReviewRoundManifestSchema: z.ZodObject<{
|
|
23
23
|
schema_version: z.ZodLiteral<1>;
|
|
@@ -30,17 +30,17 @@ export declare const ConceptualReviewRoundManifestSchema: z.ZodObject<{
|
|
|
30
30
|
prompt_path: z.ZodString;
|
|
31
31
|
result_path: z.ZodString;
|
|
32
32
|
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
result_path: string;
|
|
33
34
|
contributor_id: string;
|
|
34
35
|
perspective: string;
|
|
35
36
|
lane_id: string;
|
|
36
37
|
prompt_path: string;
|
|
37
|
-
result_path: string;
|
|
38
38
|
}, {
|
|
39
|
+
result_path: string;
|
|
39
40
|
contributor_id: string;
|
|
40
41
|
perspective: string;
|
|
41
42
|
lane_id: string;
|
|
42
43
|
prompt_path: string;
|
|
43
|
-
result_path: string;
|
|
44
44
|
}>, "many">;
|
|
45
45
|
judge: z.ZodObject<{
|
|
46
46
|
contributor_id: z.ZodString;
|
|
@@ -48,50 +48,50 @@ export declare const ConceptualReviewRoundManifestSchema: z.ZodObject<{
|
|
|
48
48
|
prompt_path: z.ZodString;
|
|
49
49
|
result_path: z.ZodString;
|
|
50
50
|
}, "strict", z.ZodTypeAny, {
|
|
51
|
+
result_path: string;
|
|
51
52
|
contributor_id: string;
|
|
52
53
|
lane_id: string;
|
|
53
54
|
prompt_path: string;
|
|
54
|
-
result_path: string;
|
|
55
55
|
}, {
|
|
56
|
+
result_path: string;
|
|
56
57
|
contributor_id: string;
|
|
57
58
|
lane_id: string;
|
|
58
59
|
prompt_path: string;
|
|
59
|
-
result_path: string;
|
|
60
60
|
}>;
|
|
61
61
|
}, "strict", z.ZodTypeAny, {
|
|
62
62
|
schema_version: 1;
|
|
63
63
|
perspectives: {
|
|
64
|
+
result_path: string;
|
|
64
65
|
contributor_id: string;
|
|
65
66
|
perspective: string;
|
|
66
67
|
lane_id: string;
|
|
67
68
|
prompt_path: string;
|
|
68
|
-
result_path: string;
|
|
69
69
|
}[];
|
|
70
|
+
round_id: string;
|
|
70
71
|
judge: {
|
|
72
|
+
result_path: string;
|
|
71
73
|
contributor_id: string;
|
|
72
74
|
lane_id: string;
|
|
73
75
|
prompt_path: string;
|
|
74
|
-
result_path: string;
|
|
75
76
|
};
|
|
76
77
|
mode: "deep";
|
|
77
|
-
round_id: string;
|
|
78
78
|
}, {
|
|
79
79
|
schema_version: 1;
|
|
80
80
|
perspectives: {
|
|
81
|
+
result_path: string;
|
|
81
82
|
contributor_id: string;
|
|
82
83
|
perspective: string;
|
|
83
84
|
lane_id: string;
|
|
84
85
|
prompt_path: string;
|
|
85
|
-
result_path: string;
|
|
86
86
|
}[];
|
|
87
|
+
round_id: string;
|
|
87
88
|
judge: {
|
|
89
|
+
result_path: string;
|
|
88
90
|
contributor_id: string;
|
|
89
91
|
lane_id: string;
|
|
90
92
|
prompt_path: string;
|
|
91
|
-
result_path: string;
|
|
92
93
|
};
|
|
93
94
|
mode: "deep";
|
|
94
|
-
round_id: string;
|
|
95
95
|
}>;
|
|
96
96
|
export type ConceptualReviewRoundManifest = z.infer<typeof ConceptualReviewRoundManifestSchema>;
|
|
97
97
|
export declare const CONCEPTUAL_REVIEW_ROUND_FILENAME = "conceptual-review-round.json";
|
package/dist/audit/types.d.ts
CHANGED
|
@@ -1008,11 +1008,11 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1008
1008
|
}[];
|
|
1009
1009
|
lens: string;
|
|
1010
1010
|
task_id: string;
|
|
1011
|
-
pass_id: string;
|
|
1012
1011
|
file_coverage: {
|
|
1013
1012
|
path: string;
|
|
1014
1013
|
total_lines: number;
|
|
1015
1014
|
}[];
|
|
1015
|
+
pass_id: string;
|
|
1016
1016
|
notes?: string[] | undefined;
|
|
1017
1017
|
run_id?: string | undefined;
|
|
1018
1018
|
attempt?: number | undefined;
|
|
@@ -1114,11 +1114,11 @@ export declare const AuditResultSchema: z.ZodObject<{
|
|
|
1114
1114
|
}[];
|
|
1115
1115
|
lens: string;
|
|
1116
1116
|
task_id: string;
|
|
1117
|
-
pass_id: string;
|
|
1118
1117
|
file_coverage: {
|
|
1119
1118
|
path: string;
|
|
1120
1119
|
total_lines: number;
|
|
1121
1120
|
}[];
|
|
1121
|
+
pass_id: string;
|
|
1122
1122
|
notes?: string[] | undefined;
|
|
1123
1123
|
run_id?: string | undefined;
|
|
1124
1124
|
attempt?: number | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Finding } from "audit-tools/shared";
|
|
2
|
+
import type { FindingFilterResult } from "./findingFilter.js";
|
|
3
|
+
/** Canonical file name, relative to the remediation artifacts dir. */
|
|
4
|
+
export declare const DROPPED_FINDINGS_RECORD_FILENAME = "dropped-findings.md";
|
|
5
|
+
export declare function droppedFindingsRecordPath(artifactsDir: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Render the record. PURE — no IO, so the shape is testable without a filesystem.
|
|
8
|
+
*
|
|
9
|
+
* @param originals every finding the filter pass saw, before any drop
|
|
10
|
+
* @param filter the pass's own dispositions
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderDroppedFindingsRecord(originals: readonly Finding[], filter: FindingFilterResult): string;
|
|
13
|
+
//# sourceMappingURL=droppedFindingsRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"droppedFindingsRecord.d.ts","sourceRoot":"","sources":["../../src/remediate/droppedFindingsRecord.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,wBAAwB,CAAC;AAEtE,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEtE;AAoBD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,OAAO,EAAE,EAC7B,MAAM,EAAE,mBAAmB,GAC1B,MAAM,CAqFR"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// The durable, human-reviewable record of every finding the intake filter removed
|
|
2
|
+
// before planning.
|
|
3
|
+
//
|
|
4
|
+
// WHY THIS EXISTS. The filter pass drops findings for four different reasons and
|
|
5
|
+
// the machine record (`review_filter_dispositions.json`) keeps only their IDS —
|
|
6
|
+
// so a person asking "what happened to that finding?" got an id and nothing
|
|
7
|
+
// else, and the finding's own title, severity and lens were only recoverable by
|
|
8
|
+
// cross-referencing the originals by hand. The no-evidence class was the sharpest
|
|
9
|
+
// case: a high-severity, high-confidence finding could be discarded with no trace
|
|
10
|
+
// a reader would ever encounter.
|
|
11
|
+
//
|
|
12
|
+
// WHY IT IS A DOCUMENT AND NOT A STEP (owner decision, 2026-09-06). The review
|
|
13
|
+
// gate shows SURVIVORS only — that is a locked decision from 2026-06-16, and this
|
|
14
|
+
// record does not reopen it. Nor does the drop belong in the emitted step's
|
|
15
|
+
// prompt, which is read aloud in the operator's conversation and would grow a
|
|
16
|
+
// block nobody asked for on a run where nothing is wrong. The owner asked for the
|
|
17
|
+
// drop to land "in a document that doesn't get surfaced in chat, but can be
|
|
18
|
+
// reviewed later". This is that document. Nothing reads it back; it is written
|
|
19
|
+
// for a person, after the fact.
|
|
20
|
+
//
|
|
21
|
+
// It is written on EVERY filter pass, including one that dropped nothing, so its
|
|
22
|
+
// absence means the pass did not run rather than "nothing was dropped" — a
|
|
23
|
+
// success-shaped empty needs an affirmation, not silence.
|
|
24
|
+
import { join } from "node:path";
|
|
25
|
+
/** Canonical file name, relative to the remediation artifacts dir. */
|
|
26
|
+
export const DROPPED_FINDINGS_RECORD_FILENAME = "dropped-findings.md";
|
|
27
|
+
export function droppedFindingsRecordPath(artifactsDir) {
|
|
28
|
+
return join(artifactsDir, DROPPED_FINDINGS_RECORD_FILENAME);
|
|
29
|
+
}
|
|
30
|
+
function describe(finding, id) {
|
|
31
|
+
if (!finding)
|
|
32
|
+
return `\`${id}\` — (payload not present in the recorded originals)`;
|
|
33
|
+
const parts = [`\`${id}\``, finding.title ?? "(untitled)"];
|
|
34
|
+
const tags = [finding.severity, finding.confidence, finding.lens].filter((value) => typeof value === "string" && value.length > 0);
|
|
35
|
+
return tags.length > 0 ? `${parts.join(" — ")} (${tags.join(", ")})` : parts.join(" — ");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Render the record. PURE — no IO, so the shape is testable without a filesystem.
|
|
39
|
+
*
|
|
40
|
+
* @param originals every finding the filter pass saw, before any drop
|
|
41
|
+
* @param filter the pass's own dispositions
|
|
42
|
+
*/
|
|
43
|
+
export function renderDroppedFindingsRecord(originals, filter) {
|
|
44
|
+
const byId = new Map(originals.map((finding) => [finding.id, finding]));
|
|
45
|
+
const sections = [
|
|
46
|
+
{
|
|
47
|
+
heading: "Dropped — no evidence",
|
|
48
|
+
why: "The finding carried no `evidence` entries. Remediation cannot act on a finding with " +
|
|
49
|
+
"nothing to verify against, so it is removed before planning rather than dispatched and failed.",
|
|
50
|
+
entries: filter.droppedNoEvidence.map((id) => ({ id })),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
heading: "Dropped — every cited path was phantom",
|
|
54
|
+
why: "Every file the finding cited is absent from the repository, so there is nothing to change. " +
|
|
55
|
+
"A finding that cited SOME real paths was kept, with only the phantom ones stripped.",
|
|
56
|
+
entries: [...filter.droppedPhantomPaths.entries()].map(([id, paths]) => ({
|
|
57
|
+
id,
|
|
58
|
+
detail: `cited: ${paths.map((path) => `\`${path}\``).join(", ")}`,
|
|
59
|
+
})),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
heading: "Dropped — excluded by the intent checkpoint",
|
|
63
|
+
why: "The run's own intent checkpoint excluded this finding by severity, lens, package, theme " +
|
|
64
|
+
"or scope. This is a choice the run recorded, not a defect.",
|
|
65
|
+
entries: filter.droppedByCheckpoint.map((id) => ({ id })),
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
heading: "Folded into another finding",
|
|
69
|
+
why: "Two or more lenses flagged the same thing independently. The finding was merged into the " +
|
|
70
|
+
"surviving one named below; it is not lost, it is represented by its canonical twin.",
|
|
71
|
+
entries: [...filter.mergeMap.entries()].map(([absorbed, canonical]) => ({
|
|
72
|
+
id: absorbed,
|
|
73
|
+
detail: `folded into \`${canonical}\``,
|
|
74
|
+
})),
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
const droppedCount = sections.reduce((total, section) => total + section.entries.length, 0);
|
|
78
|
+
const lines = [
|
|
79
|
+
"# Findings removed before planning",
|
|
80
|
+
"",
|
|
81
|
+
"> Written by `remediate-code` on every intake filter pass, for review after the fact.",
|
|
82
|
+
"> Nothing reads this file back — it exists so a removal is never invisible.",
|
|
83
|
+
"> The review gate deliberately shows SURVIVORS only; this is where the rest go.",
|
|
84
|
+
"",
|
|
85
|
+
`Findings seen by the filter: **${String(originals.length)}**. `
|
|
86
|
+
+ `Survived: **${String(filter.survivors.length)}**. `
|
|
87
|
+
+ `Removed or folded: **${String(droppedCount)}**.`,
|
|
88
|
+
"",
|
|
89
|
+
];
|
|
90
|
+
if (droppedCount === 0) {
|
|
91
|
+
lines.push("Nothing was removed on this pass. Every finding reached the review gate.", "");
|
|
92
|
+
return lines.join("\n");
|
|
93
|
+
}
|
|
94
|
+
for (const section of sections) {
|
|
95
|
+
if (section.entries.length === 0)
|
|
96
|
+
continue;
|
|
97
|
+
lines.push(`## ${section.heading} (${String(section.entries.length)})`, "", section.why, "");
|
|
98
|
+
for (const entry of section.entries) {
|
|
99
|
+
const described = describe(byId.get(entry.id), entry.id);
|
|
100
|
+
lines.push(`- ${described}${entry.detail ? ` — ${entry.detail}` : ""}`);
|
|
101
|
+
}
|
|
102
|
+
lines.push("");
|
|
103
|
+
}
|
|
104
|
+
// Sections with no entries are omitted above rather than printed empty, so the
|
|
105
|
+
// reader meets only what actually happened. Name them here so an omission
|
|
106
|
+
// cannot be misread as a class this pass does not have.
|
|
107
|
+
const silent = sections.filter((section) => section.entries.length === 0);
|
|
108
|
+
if (silent.length > 0) {
|
|
109
|
+
lines.push(`No finding was removed for: ${silent.map((section) => `*${section.heading}*`).join("; ")}.`, "");
|
|
110
|
+
}
|
|
111
|
+
return lines.join("\n");
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=droppedFindingsRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"droppedFindingsRecord.js","sourceRoot":"","sources":["../../src/remediate/droppedFindingsRecord.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,mBAAmB;AACnB,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,4EAA4E;AAC5E,gFAAgF;AAChF,kFAAkF;AAClF,kFAAkF;AAClF,iCAAiC;AACjC,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,4EAA4E;AAC5E,8EAA8E;AAC9E,kFAAkF;AAClF,4EAA4E;AAC5E,+EAA+E;AAC/E,gCAAgC;AAChC,EAAE;AACF,iFAAiF;AACjF,2EAA2E;AAC3E,0DAA0D;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,sEAAsE;AACtE,MAAM,CAAC,MAAM,gCAAgC,GAAG,qBAAqB,CAAC;AAEtE,MAAM,UAAU,yBAAyB,CAAC,YAAoB;IAC5D,OAAO,IAAI,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAAC;AAC9D,CAAC;AAWD,SAAS,QAAQ,CAAC,OAA4B,EAAE,EAAU;IACxD,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,EAAE,sDAAsD,CAAC;IACnF,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,IAAI,YAAY,CAAC,CAAC;IAC3D,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CACtE,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAC1E,CAAC;IACF,OAAO,IAAI,CAAC,MAAM,GA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AG,EAAE,EAAE,CAAC,CAAC;QAC7F,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;YACzD,KAAK,CAAC,IAAI,CAAC,KAAK,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1E,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,+EAA+E;IAC/E,0EAA0E;IAC1E,wDAAwD;IACxD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC1E,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,KAAK,CAAC,IAAI,CACR,+BAA+B,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAC5F,EAAE,CACH,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type ProjectFacts } from "audit-tools/shared";
|
|
2
3
|
export declare const INTAKE_SOURCE_MANIFEST_SCHEMA_VERSION: "remediate-code-intake-source-manifest/v1alpha1";
|
|
3
4
|
export declare const INTAKE_SUMMARY_SCHEMA_VERSION: "remediate-code-intake-summary/v1alpha1";
|
|
4
5
|
export declare const INTAKE_CLARIFICATION_SCHEMA_VERSION: "remediate-code-intake-clarifications/v1alpha1";
|
|
@@ -132,7 +133,23 @@ export declare function intakePaths(artifactsDir: string): {
|
|
|
132
133
|
findingsDigest: string;
|
|
133
134
|
findingEnumeration: string;
|
|
134
135
|
riskSignal: string;
|
|
136
|
+
projectFacts: string;
|
|
135
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* The project facts the confirm step detected — project type, candidate
|
|
140
|
+
* closing actions and the signals behind them (owner decision
|
|
141
|
+
* 92b0e2dd7cfdc06d). Detection spawns git, and planning is
|
|
142
|
+
* backend-independent by contract (it spawns nothing), so the confirm step
|
|
143
|
+
* persists what it detected and planning READS it; a run whose facts were
|
|
144
|
+
* never persisted plans on `neutralProjectFacts()`.
|
|
145
|
+
*/
|
|
146
|
+
export declare const PROJECT_FACTS_SCHEMA_VERSION = "remediate-code-project-facts/v1alpha1";
|
|
147
|
+
export interface PersistedProjectFacts extends ProjectFacts {
|
|
148
|
+
schema_version: typeof PROJECT_FACTS_SCHEMA_VERSION;
|
|
149
|
+
}
|
|
150
|
+
export declare function writeProjectFacts(artifactsDir: string, facts: ProjectFacts): Promise<void>;
|
|
151
|
+
/** The persisted facts, or null when absent or written under another schema version. */
|
|
152
|
+
export declare function readProjectFacts(artifactsDir: string): Promise<ProjectFacts | null>;
|
|
136
153
|
/**
|
|
137
154
|
* Build a document source manifest from an ordered list of input paths.
|
|
138
155
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../../src/remediate/intake.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../../src/remediate/intake.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOtE,eAAO,MAAM,qCAAqC,EAChD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ACD,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB,CAeA;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,aAAa,GAAG,SAAS,GACjC,kBAAkB,EAAE,CAOtB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE,CAU3E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAMzE;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,OAAO,EACnB,iBAAiB,EAAE,kBAAkB,EAAE,EACvC,YAAY,CAAC,EAAE,kBAAkB,EAAE,GAClC,6BAA6B,CA8D/B;AAED,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;IACT,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CA0BD"}
|
package/dist/remediate/intake.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import { writeJsonFile } from "audit-tools/shared";
|
|
4
5
|
import { readOptionalJsonFile, readOptionalTextFile, isRecord, } from "audit-tools/shared";
|
|
5
6
|
export const INTAKE_SOURCE_MANIFEST_SCHEMA_VERSION = "remediate-code-intake-source-manifest/v1alpha1";
|
|
6
7
|
export const INTAKE_SUMMARY_SCHEMA_VERSION = "remediate-code-intake-summary/v1alpha1";
|
|
@@ -77,8 +78,30 @@ export function intakePaths(artifactsDir) {
|
|
|
77
78
|
findingsDigest: join(dir, "findings-digest.json"),
|
|
78
79
|
findingEnumeration: join(dir, "finding-enumeration.json"),
|
|
79
80
|
riskSignal: join(dir, "risk-signal.json"),
|
|
81
|
+
projectFacts: join(dir, "project-facts.json"),
|
|
80
82
|
};
|
|
81
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* The project facts the confirm step detected — project type, candidate
|
|
86
|
+
* closing actions and the signals behind them (owner decision
|
|
87
|
+
* 92b0e2dd7cfdc06d). Detection spawns git, and planning is
|
|
88
|
+
* backend-independent by contract (it spawns nothing), so the confirm step
|
|
89
|
+
* persists what it detected and planning READS it; a run whose facts were
|
|
90
|
+
* never persisted plans on `neutralProjectFacts()`.
|
|
91
|
+
*/
|
|
92
|
+
export const PROJECT_FACTS_SCHEMA_VERSION = "remediate-code-project-facts/v1alpha1";
|
|
93
|
+
export async function writeProjectFacts(artifactsDir, facts) {
|
|
94
|
+
const persisted = { schema_version: PROJECT_FACTS_SCHEMA_VERSION, ...facts };
|
|
95
|
+
await writeJsonFile(intakePaths(artifactsDir).projectFacts, persisted);
|
|
96
|
+
}
|
|
97
|
+
/** The persisted facts, or null when absent or written under another schema version. */
|
|
98
|
+
export async function readProjectFacts(artifactsDir) {
|
|
99
|
+
const raw = await readOptionalJsonFile(intakePaths(artifactsDir).projectFacts);
|
|
100
|
+
if (!raw || raw.schema_version !== PROJECT_FACTS_SCHEMA_VERSION)
|
|
101
|
+
return null;
|
|
102
|
+
const { schema_version: _version, ...facts } = raw;
|
|
103
|
+
return facts;
|
|
104
|
+
}
|
|
82
105
|
/**
|
|
83
106
|
* Build a document source manifest from an ordered list of input paths.
|
|
84
107
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intake.js","sourceRoot":"","sources":["../../src/remediate/intake.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,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EAAE,CAAC;YACnC,MAAM,CAAC,IAAI,CACT,sDAAsD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAClC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,YAAoB;IAQpB,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAAU,KAAK,CAAC,OAAO,CAAC,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,MAAM,oBAAoB,CAClC,KAAK,CAAC,cAAc,CACrB;QACD,iBAAiB,EAAE,MAAM,oBAAoB,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACtE,yEAAyE;QACzE,wEAAwE;QACxE,mEAAmE;QACnE,OAAO,EACL,UAAU,KAAK,SAAS;YACtB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC;QACtD,uBAAuB,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;YACzC,IAAI,CAAC;gBACH,OAAO,MAAM,oBAAoB,CAAU,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC5E,CAAC;YAAC,MAAM,CAAC;gBACP,iEAAiE;gBACjE,8EAA8E;gBAC9E,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC;KAC/C,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RemediationState } from "../state/store.js";
|
|
2
2
|
import { OrchestratorOptions } from "../types/options.js";
|
|
3
3
|
import type { RemediationOutcomesReport, RunLogger, VerificationReport } from "audit-tools/shared";
|
|
4
|
-
import type { ClosingAction } from "
|
|
4
|
+
import type { ClosingAction } from "audit-tools/shared";
|
|
5
5
|
import type { OutcomeCoverageLedger } from "../state/types.js";
|
|
6
6
|
import { type FinalGateReport } from "../../shared/types/remediationOutcome.js";
|
|
7
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/close.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/close.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAuB1D,OAAO,KAAK,EAIV,yBAAyB,EACzB,SAAS,EACT,kBAAkB,EAGnB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAKV,qBAAqB,EAItB,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,EAOL,KAAK,eAAe,EACrB,MAAM,0CAA0C,CAAC;AA8ElD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,eAAe,CAAC,CA2B1B;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,gBAAgB,EACvB,aAAa,EAAE,aAAa,EAI5B,SAAS,GAAE,eAA0C,GACpD,yBAAyB,CAgN3B;AAsDD;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,qBAAqB,GAAG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AE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CA2D7B;AAoED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,gBAAgB,EACvB,UAAU,EAAE,MAAM,GACjB,OAAO,CAqCT;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAwUD;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;GASG;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,GACpB,OAAO,CAAC,aAAa,CAAC,CA8FxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,EAC5B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,kBAAkB,GAC/B,kBAAkB,CAuKpB;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,mBAAmB,EAC5B,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAiR3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dirname, extname, isAbsolute, join, relative } from "node:path";
|
|
2
2
|
import { readFileSync, existsSync } from "node:fs";
|
|
3
|
-
import { AGENT_FEEDBACK_FILENAME, normalizeRepoPath, parseReflectionsNdjson, readOptionalJsonFile, readOptionalTextFile, renderProcessFeedbackSection, stagedAndUntracked, writeJsonFile, writeTextFile, RemediationOutcomeStatusSchema, countBy, commandLeavesDeclaredShape, parseCommandString, runTrackedAsync, compareCodeUnits, } from "audit-tools/shared";
|
|
3
|
+
import { AGENT_FEEDBACK_FILENAME, normalizeRepoPath, parseReflectionsNdjson, readOptionalJsonFile, readOptionalTextFile, renderProcessFeedbackSection, reportDiscardedReflections, stagedAndUntracked, writeJsonFile, writeTextFile, RemediationOutcomeStatusSchema, countBy, commandLeavesDeclaredShape, parseCommandString, runTrackedAsync, compareCodeUnits, runAdmittedProjectTestCommand, runAdmittedProjectE2eCommand, } from "audit-tools/shared";
|
|
4
4
|
import { CONTRACT_PIPELINE_VERIFICATION_REPORT_VERSION } from "audit-tools/shared";
|
|
5
5
|
import { FAILURE_OUTPUT_TAIL_CHARS } from "./constants.js";
|
|
6
6
|
import { verifyAnalyzerLeads } from "./closeVerifyAnalyzerLeads.js";
|
|
@@ -630,7 +630,13 @@ function generateCommitMessage(state) {
|
|
|
630
630
|
const suffix = resolved.length > 3 ? ` (+${resolved.length - 3} more)` : "";
|
|
631
631
|
return `Fix: ${titles}${suffix}`;
|
|
632
632
|
}
|
|
633
|
-
/**
|
|
633
|
+
/**
|
|
634
|
+
* Actions that require user confirmation before executing. `custom` is not
|
|
635
|
+
* here: its command is host-authored (attached on the confirmed intent
|
|
636
|
+
* checkpoint as `closing_custom_command`, owner decision 92b0e2dd7cfdc06d, or
|
|
637
|
+
* by hand on `closing_plan.custom_command`), and writing the command IS the
|
|
638
|
+
* authorization.
|
|
639
|
+
*/
|
|
634
640
|
const PREVIEW_ACTIONS = new Set(["commit", "push", "open-pr", "publish"]);
|
|
635
641
|
/**
|
|
636
642
|
* Check whether the closing action needs a confirmation preview. Returns the
|
|
@@ -722,8 +728,21 @@ export async function executeClosingAction(state, options) {
|
|
|
722
728
|
else if (action === "tag") {
|
|
723
729
|
await run("git", ["tag", "auto-remediation"]);
|
|
724
730
|
}
|
|
725
|
-
else if (action === "custom"
|
|
726
|
-
|
|
731
|
+
else if (action === "custom") {
|
|
732
|
+
const custom = state.closing_plan.custom_command;
|
|
733
|
+
if (custom?.length) {
|
|
734
|
+
await run(custom[0], custom.slice(1));
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
// A chosen `custom` with no command attached must never read as a green
|
|
738
|
+
// no-op: nothing ran, and the result says so. `custom` is reachable from
|
|
739
|
+
// the checkpoint since owner decision 92b0e2dd7cfdc06d.
|
|
740
|
+
commands.push({
|
|
741
|
+
command: [],
|
|
742
|
+
exit_code: null,
|
|
743
|
+
stderr: "closing action `custom` has no custom_command attached — nothing was run",
|
|
744
|
+
});
|
|
745
|
+
}
|
|
727
746
|
}
|
|
728
747
|
return {
|
|
729
748
|
contract_version: "remediate-code-closing-result/v1alpha1",
|
|
@@ -789,6 +808,27 @@ export async function runCombinedTestSuite(state, options) {
|
|
|
789
808
|
};
|
|
790
809
|
}
|
|
791
810
|
const startedAt = Date.now();
|
|
811
|
+
if (state.plan.test_command_source === "project_facts") {
|
|
812
|
+
const admitted = await runAdmittedProjectTestCommand(parseCommandString(suiteName), options.root, {
|
|
813
|
+
timeoutMs: CLOSING_CHILD_DEADLINE_MS,
|
|
814
|
+
});
|
|
815
|
+
if (!admitted.admitted) {
|
|
816
|
+
return { ran: false, passed: false, suite_name: suiteName, duration_ms: 0, output: admitted.refusal_reason ?? "refused" };
|
|
817
|
+
}
|
|
818
|
+
const passed = admitted.exit_code === 0 && !admitted.timed_out && !admitted.spawn_error;
|
|
819
|
+
return {
|
|
820
|
+
ran: true,
|
|
821
|
+
passed,
|
|
822
|
+
suite_name: suiteName,
|
|
823
|
+
duration_ms: Date.now() - startedAt,
|
|
824
|
+
output: passed
|
|
825
|
+
? ""
|
|
826
|
+
: (admitted.spawn_error ?? admitted.output).trim().slice(-FAILURE_OUTPUT_TAIL_CHARS) ||
|
|
827
|
+
(admitted.timed_out
|
|
828
|
+
? `default test command timed out after ${CLOSING_CHILD_DEADLINE_MS}ms`
|
|
829
|
+
: "default test command failed without output"),
|
|
830
|
+
};
|
|
831
|
+
}
|
|
792
832
|
// argv, never a shell string: the shape gate admits only single invocations,
|
|
793
833
|
// and `resolveExecArgv` inside the shared runner is what makes an `npm`/`npx`
|
|
794
834
|
// shim resolve on win32 without one.
|
|
@@ -935,6 +975,24 @@ async function runE2eTests(state, options) {
|
|
|
935
975
|
};
|
|
936
976
|
}
|
|
937
977
|
console.log("Running end-to-end tests on combined post-remediation state...");
|
|
978
|
+
if (state.plan.e2e_command_source === "project_facts") {
|
|
979
|
+
const admitted = await runAdmittedProjectE2eCommand(parseCommandString(state.plan.e2e_command), options.root, {
|
|
980
|
+
timeoutMs: CLOSING_CHILD_DEADLINE_MS,
|
|
981
|
+
});
|
|
982
|
+
if (!admitted.admitted)
|
|
983
|
+
return { ran: false, passed: false, output: admitted.refusal_reason ?? "refused" };
|
|
984
|
+
const passed = admitted.exit_code === 0 && !admitted.timed_out && !admitted.spawn_error;
|
|
985
|
+
return {
|
|
986
|
+
ran: true,
|
|
987
|
+
passed,
|
|
988
|
+
output: passed
|
|
989
|
+
? ""
|
|
990
|
+
: (admitted.spawn_error ?? admitted.output).trim().slice(-FAILURE_OUTPUT_TAIL_CHARS) ||
|
|
991
|
+
(admitted.timed_out
|
|
992
|
+
? `default e2e command timed out after ${CLOSING_CHILD_DEADLINE_MS}ms`
|
|
993
|
+
: "default e2e command failed without output"),
|
|
994
|
+
};
|
|
995
|
+
}
|
|
938
996
|
const e2eResult = await runTrackedAsync(parseCommandString(state.plan.e2e_command), {
|
|
939
997
|
cwd: options.root,
|
|
940
998
|
windowsHide: true,
|
|
@@ -1308,7 +1366,7 @@ export function buildVerificationReport(state, options, closingResult, combinedT
|
|
|
1308
1366
|
kind: "task",
|
|
1309
1367
|
label: suiteLabel,
|
|
1310
1368
|
evidence: !combinedTest.ran
|
|
1311
|
-
? ["no combined test suite configured for this run"]
|
|
1369
|
+
? [combinedTest.output || "no combined test suite configured for this run"]
|
|
1312
1370
|
: combinedTest.passed
|
|
1313
1371
|
? [`${suiteLabel} passed`]
|
|
1314
1372
|
: [`${suiteLabel} failed`, ...(combinedTest.output ? [combinedTest.output.slice(-500)] : [])],
|
|
@@ -1556,7 +1614,11 @@ export async function runClosePhase(state, options, runLogger) {
|
|
|
1556
1614
|
// dispatch; parse leniently (malformed lines skipped) and surface them in the
|
|
1557
1615
|
// report. Workers own the file — it is read-only here.
|
|
1558
1616
|
const feedbackText = await readOptionalTextFile(join(options.artifactsDir, AGENT_FEEDBACK_FILENAME));
|
|
1559
|
-
const
|
|
1617
|
+
const closeFeedback = feedbackText
|
|
1618
|
+
? parseReflectionsNdjson(feedbackText)
|
|
1619
|
+
: { reflections: [], discarded: [] };
|
|
1620
|
+
reportDiscardedReflections(closeFeedback.discarded, "remediate-code");
|
|
1621
|
+
const reportContent = buildRemediationReportMarkdown(state, entries, closingResult, e2eResult.ran ? e2eResult.passed : undefined, outcomesReport, combinedTest, closeFeedback.reflections);
|
|
1560
1622
|
// Enrich the coverage ledger with never-planned payloads NOW, from the live
|
|
1561
1623
|
// state and intake artifacts — both are deleted at the end of close, so this
|
|
1562
1624
|
// must happen strictly before cleanup.
|