audit-tools 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dispatch/merge-results.mjs +229 -140
- package/dispatch/validate-result.mjs +98 -40
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +35 -3
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +9 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +94 -38
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +64 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +877 -783
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +12 -0
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +34 -1
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +2 -2
- package/dist/audit/extractors/graph.d.ts +28 -2
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +122 -11
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts +8 -0
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +71 -4
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +55 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +189 -12
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts +11 -0
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +13 -3
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +64 -0
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +191 -57
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +55 -21
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/flowCoverage.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowCoverage.js +7 -10
- package/dist/audit/orchestrator/flowCoverage.js.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.d.ts +54 -1
- package/dist/audit/orchestrator/flowPlanning.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.js +77 -18
- package/dist/audit/orchestrator/flowPlanning.js.map +1 -1
- package/dist/audit/orchestrator/flowRequeue.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowRequeue.js +6 -10
- package/dist/audit/orchestrator/flowRequeue.js.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +2 -2
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/requeueFold.d.ts.map +1 -1
- package/dist/audit/orchestrator/requeueFold.js +18 -5
- package/dist/audit/orchestrator/requeueFold.js.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts +24 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +147 -16
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts +26 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +97 -12
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.js +111 -21
- package/dist/audit/orchestrator/taskBuilder.js.map +1 -1
- package/dist/audit/orchestrator/trivialAudit.d.ts +17 -1
- package/dist/audit/orchestrator/trivialAudit.d.ts.map +1 -1
- package/dist/audit/orchestrator/trivialAudit.js +31 -4
- package/dist/audit/orchestrator/trivialAudit.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +2 -3
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
- package/dist/audit/reporting/workBlocks.js +4 -38
- package/dist/audit/reporting/workBlocks.js.map +1 -1
- package/dist/audit/types/analyzerCapability.d.ts +6 -6
- package/dist/audit/types/charterRegister.d.ts +30 -12
- package/dist/audit/types/charterRegister.d.ts.map +1 -1
- package/dist/audit/types/charterRegister.js +22 -9
- package/dist/audit/types/charterRegister.js.map +1 -1
- package/dist/audit/validation/anchorGrounding.d.ts.map +1 -1
- package/dist/audit/validation/anchorGrounding.js +17 -0
- package/dist/audit/validation/anchorGrounding.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +17 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +50 -17
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +48 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +128 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
- package/dist/remediate/contractPipeline/derive.d.ts +8 -5
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +8 -16
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +43 -2
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intent/intentOrdering.d.ts +13 -5
- package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
- package/dist/remediate/intent/intentOrdering.js +56 -25
- package/dist/remediate/intent/intentOrdering.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +57 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +260 -36
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/state/disposition.d.ts +26 -4
- package/dist/remediate/state/disposition.d.ts.map +1 -1
- package/dist/remediate/state/itemStatus.d.ts +33 -6
- package/dist/remediate/state/itemStatus.d.ts.map +1 -1
- package/dist/remediate/state/itemStatus.js +154 -39
- package/dist/remediate/state/itemStatus.js.map +1 -1
- package/dist/remediate/state/types.d.ts +41 -2
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +287 -15
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +1664 -987
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +137 -2
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +713 -59
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +136 -37
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +120 -86
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +8 -0
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +40 -11
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +96 -5
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +668 -147
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +4 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +10 -0
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts +20 -0
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +239 -13
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +58 -0
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +167 -43
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +72 -25
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +149 -15
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +27 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +149 -43
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts +9 -8
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +96 -64
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts +40 -12
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +74 -18
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +14 -13
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +29 -6
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/analyzers/types.d.ts +196 -13
- package/dist/shared/analyzers/types.d.ts.map +1 -1
- package/dist/shared/analyzers/types.js +122 -9
- package/dist/shared/analyzers/types.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +12 -1
- package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
- package/dist/shared/decompose/charterClarification.js +11 -4
- package/dist/shared/decompose/charterClarification.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +20 -10
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +52 -23
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts +43 -2
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +109 -5
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts +17 -0
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +78 -3
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/workBlockSeams.d.ts +45 -0
- package/dist/shared/decompose/workBlockSeams.d.ts.map +1 -0
- package/dist/shared/decompose/workBlockSeams.js +82 -0
- package/dist/shared/decompose/workBlockSeams.js.map +1 -0
- package/dist/shared/index.d.ts +4 -3
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +4 -2
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts +12 -2
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
- package/dist/shared/intent/freeFormIntentInterpreter.js +27 -22
- package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
- package/dist/shared/intent/pathScope.d.ts +12 -1
- package/dist/shared/intent/pathScope.d.ts.map +1 -1
- package/dist/shared/intent/pathScope.js +56 -19
- package/dist/shared/intent/pathScope.js.map +1 -1
- package/dist/shared/intent/sharedIntentData.d.ts +19 -1
- package/dist/shared/intent/sharedIntentData.d.ts.map +1 -1
- package/dist/shared/intent/sharedIntentData.js +33 -8
- package/dist/shared/intent/sharedIntentData.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts +12 -0
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +48 -5
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/json.d.ts +13 -0
- package/dist/shared/io/json.d.ts.map +1 -1
- package/dist/shared/io/json.js +19 -1
- package/dist/shared/io/json.js.map +1 -1
- package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
- package/dist/shared/reporting/auditDeliverable.js +8 -3
- package/dist/shared/reporting/auditDeliverable.js.map +1 -1
- package/dist/shared/steps/stepEmissionScaffold.d.ts +69 -0
- package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -0
- package/dist/shared/steps/stepEmissionScaffold.js +83 -0
- package/dist/shared/steps/stepEmissionScaffold.js.map +1 -0
- package/dist/shared/submission/handRecovery.d.ts.map +1 -1
- package/dist/shared/submission/handRecovery.js +69 -4
- package/dist/shared/submission/handRecovery.js.map +1 -1
- package/dist/shared/submission/submissionIdentity.d.ts +10 -1
- package/dist/shared/submission/submissionIdentity.d.ts.map +1 -1
- package/dist/shared/submission/submissionIdentity.js +12 -3
- package/dist/shared/submission/submissionIdentity.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +43 -2
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +50 -7
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/allowlistedExec.d.ts +9 -0
- package/dist/shared/tooling/allowlistedExec.d.ts.map +1 -1
- package/dist/shared/tooling/allowlistedExec.js +19 -2
- package/dist/shared/tooling/allowlistedExec.js.map +1 -1
- package/dist/shared/types/charter.d.ts +24 -0
- package/dist/shared/types/charter.d.ts.map +1 -1
- package/dist/shared/types/charter.js +9 -0
- package/dist/shared/types/charter.js.map +1 -1
- package/dist/shared/types/finding.d.ts +105 -53
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +38 -11
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +282 -9
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +174 -1
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +19 -1
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/package.json +2 -1
- package/remediate-code.mjs +15 -0
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +45 -4
- package/wrapper/remediate-code-wrapper-install-renderers.mjs +12 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { hashAnalyzerSnippet, } from "./provenance.js";
|
|
2
|
+
import { normalizeRepoPath } from "../validation/findingGrounding.js";
|
|
2
3
|
function normalizeExternalSeverity(value) {
|
|
3
4
|
switch (value?.toLowerCase()) {
|
|
4
5
|
case "critical": return "critical";
|
|
@@ -14,9 +15,51 @@ function normalizeExternalSeverity(value) {
|
|
|
14
15
|
default: return "info";
|
|
15
16
|
}
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Separator-normalized, `./`-stripped form. This is `normalizeRepoPath` WITHOUT the
|
|
20
|
+
* case fold — the fold is correct for membership matching and wrong for a path that
|
|
21
|
+
* will be persisted and later re-read from a case-sensitive filesystem.
|
|
22
|
+
*/
|
|
23
|
+
function posixify(path) {
|
|
24
|
+
return path.trim().replace(/\\/g, "/").replace(/^\.\//, "");
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Repo-relative form of an analyzer-reported path, case PRESERVED.
|
|
28
|
+
*
|
|
29
|
+
* Seven of the twelve candidates hand their tool the ABSOLUTE repository root as a
|
|
30
|
+
* positional target, so those tools echo absolute paths back. Persisting one makes
|
|
31
|
+
* the lead machine-specific, un-joinable against every repo-relative consumer, and
|
|
32
|
+
* unreadable by the provenance reader (`join(root, "/abs/path")` names nothing).
|
|
33
|
+
* Containment is decided with the shared {@link normalizeRepoPath} (case- and
|
|
34
|
+
* separator-folded, so win32 drive-letter and case drift still match); the returned
|
|
35
|
+
* value is sliced out of the ORIGINAL string so on-disk case survives.
|
|
36
|
+
*
|
|
37
|
+
* A path outside the repository root is left as-is: it is not repo-relative, and
|
|
38
|
+
* silently rewriting it would invent an identity the tool never reported.
|
|
39
|
+
*/
|
|
40
|
+
export function toRepoRelativeAnalyzerPath(repoRoot, rawPath) {
|
|
41
|
+
const path = posixify(rawPath);
|
|
42
|
+
if (!repoRoot || path.length === 0)
|
|
43
|
+
return path;
|
|
44
|
+
const root = posixify(repoRoot).replace(/\/+$/, "");
|
|
45
|
+
if (root.length === 0)
|
|
46
|
+
return path;
|
|
47
|
+
const foldedRoot = normalizeRepoPath(root);
|
|
48
|
+
const foldedPath = normalizeRepoPath(path);
|
|
49
|
+
if (foldedPath === foldedRoot)
|
|
50
|
+
return "";
|
|
51
|
+
if (!foldedPath.startsWith(`${foldedRoot}/`))
|
|
52
|
+
return path;
|
|
53
|
+
return path.slice(root.length + 1);
|
|
54
|
+
}
|
|
17
55
|
export function normalizeGenericExternalResults(tool, items, options = {}) {
|
|
18
|
-
|
|
19
|
-
|
|
56
|
+
// Repo-relative FIRST: every downstream step — validity, provenance read, and the
|
|
57
|
+
// persisted `path` — must see the same normalized identity.
|
|
58
|
+
const normalizedItems = items.map((item) => typeof item?.path === "string"
|
|
59
|
+
? { ...item, path: toRepoRelativeAnalyzerPath(options.repoRoot, item.path) }
|
|
60
|
+
: item);
|
|
61
|
+
const valid = normalizedItems.filter((item) => item.path && item.summary);
|
|
62
|
+
const dropped = normalizedItems.length - valid.length;
|
|
20
63
|
if (dropped > 0) {
|
|
21
64
|
process.stderr.write(JSON.stringify({
|
|
22
65
|
event: "normalizer_findings_dropped",
|
|
@@ -34,12 +77,20 @@ export function normalizeGenericExternalResults(tool, items, options = {}) {
|
|
|
34
77
|
sourceCache.set(path, options.readSource(path));
|
|
35
78
|
return sourceCache.get(path);
|
|
36
79
|
};
|
|
80
|
+
// An item with BOTH a path and a line number is anchorable; if its source cannot
|
|
81
|
+
// be read, provenance is lost for a reason the operator can act on. An item with
|
|
82
|
+
// no line number simply has no anchor — a different, benign state. Counting only
|
|
83
|
+
// the first keeps the two apart (they are byte-identical in the results array).
|
|
84
|
+
let sourceReadFailures = 0;
|
|
37
85
|
const provenanceFor = (item) => {
|
|
38
86
|
if (!item.path || item.line_start === undefined)
|
|
39
87
|
return undefined;
|
|
40
88
|
const source = readCached(item.path);
|
|
41
|
-
if (source === undefined)
|
|
89
|
+
if (source === undefined) {
|
|
90
|
+
if (options.readSource)
|
|
91
|
+
sourceReadFailures += 1;
|
|
42
92
|
return undefined;
|
|
93
|
+
}
|
|
43
94
|
const snippet_hash = hashAnalyzerSnippet(source, item.line_start, item.line_end);
|
|
44
95
|
if (snippet_hash === undefined)
|
|
45
96
|
return undefined;
|
|
@@ -50,24 +101,29 @@ export function normalizeGenericExternalResults(tool, items, options = {}) {
|
|
|
50
101
|
snippet_hash,
|
|
51
102
|
};
|
|
52
103
|
};
|
|
104
|
+
const results = valid.map((item, index) => {
|
|
105
|
+
const provenance = provenanceFor(item);
|
|
106
|
+
return {
|
|
107
|
+
id: item.id ?? `${tool}-${index + 1}`,
|
|
108
|
+
category: item.category ?? "unknown",
|
|
109
|
+
severity: normalizeExternalSeverity(item.severity),
|
|
110
|
+
path: item.path,
|
|
111
|
+
line_start: item.line_start,
|
|
112
|
+
line_end: item.line_end,
|
|
113
|
+
summary: item.summary,
|
|
114
|
+
rule: item.rule,
|
|
115
|
+
raw: item.raw,
|
|
116
|
+
...(provenance !== undefined ? { provenance } : {}),
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
options.onDiagnostics?.({
|
|
120
|
+
dropped_items: dropped,
|
|
121
|
+
source_read_failures: sourceReadFailures,
|
|
122
|
+
});
|
|
53
123
|
return {
|
|
54
124
|
tool,
|
|
55
125
|
generated_at: new Date().toISOString(),
|
|
56
|
-
results
|
|
57
|
-
const provenance = provenanceFor(item);
|
|
58
|
-
return {
|
|
59
|
-
id: item.id ?? `${tool}-${index + 1}`,
|
|
60
|
-
category: item.category ?? "unknown",
|
|
61
|
-
severity: normalizeExternalSeverity(item.severity),
|
|
62
|
-
path: item.path,
|
|
63
|
-
line_start: item.line_start,
|
|
64
|
-
line_end: item.line_end,
|
|
65
|
-
summary: item.summary,
|
|
66
|
-
rule: item.rule,
|
|
67
|
-
raw: item.raw,
|
|
68
|
-
...(provenance !== undefined ? { provenance } : {}),
|
|
69
|
-
};
|
|
70
|
-
}),
|
|
126
|
+
results,
|
|
71
127
|
};
|
|
72
128
|
}
|
|
73
129
|
function clampUnitInterval(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeExternal.js","sourceRoot":"","sources":["../../../src/shared/analyzers/normalizeExternal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizeExternal.js","sourceRoot":"","sources":["../../../src/shared/analyzers/normalizeExternal.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,mBAAmB,GAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,SAAS,yBAAyB,CAAC,KAAyB;IAC1D,QAAQ,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;QAC7B,KAAK,UAAU,CAAC,CAAC,OAAO,UAAU,CAAC;QACnC,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC;QAC3B,KAAK,SAAS,CAAC;QACf,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ,CAAC,CAAC,OAAO,QAAQ,CAAC;QAC/B,KAAK,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC;QACz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,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import type { ExternalAnalyzerResults } from "./types.js";
|
|
1
|
+
import type { ExternalAnalyzerParsedItem, ExternalAnalyzerParseReport, ExternalAnalyzerResults } from "./types.js";
|
|
2
2
|
/**
|
|
3
|
-
* Parse rubocop's `--format json` stdout
|
|
4
|
-
*
|
|
3
|
+
* Parse rubocop's `--format json` stdout, REPORTING a degradation rather than
|
|
4
|
+
* swallowing it: unparsable JSON or a payload with no `files` array comes back as
|
|
5
|
+
* `parse_failed`, which the acquisition engine classifies `parse_error`. Before
|
|
6
|
+
* this, a rubocop invocation that crashed or printed a non-JSON banner produced the
|
|
7
|
+
* same `{results: []}` as a genuinely clean Ruby tree — the one signal the status
|
|
8
|
+
* contract was designed to carry was unreachable from this adapter.
|
|
5
9
|
*/
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
summary?: string;
|
|
14
|
-
rule?: string;
|
|
15
|
-
}>;
|
|
10
|
+
export declare function parseRubocopOutcome(stdout: string): ExternalAnalyzerParseReport;
|
|
11
|
+
/**
|
|
12
|
+
* The item-list view of {@link parseRubocopOutcome}, for the audit/adapters
|
|
13
|
+
* normalization seam, which consumes items and reports coverage elsewhere. One
|
|
14
|
+
* implementation, two views — never two parsers that can drift.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseRubocop(stdout: string): ExternalAnalyzerParsedItem[];
|
|
16
17
|
/**
|
|
17
18
|
* Dedicated severity adapter: route rubocop's parsed items through the shared
|
|
18
19
|
* generic normalizer so its output matches the exact ExternalAnalyzerResults
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rubocop.d.ts","sourceRoot":"","sources":["../../../src/shared/analyzers/rubocop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"rubocop.d.ts","sourceRoot":"","sources":["../../../src/shared/analyzers/rubocop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAgDpB;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,2BAA2B,CAwD/E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,0BAA0B,EAAE,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAE5E"}
|
|
@@ -11,18 +11,33 @@ function mapRubocopSeverity(severity) {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Parse rubocop's `--format json` stdout
|
|
15
|
-
*
|
|
14
|
+
* Parse rubocop's `--format json` stdout, REPORTING a degradation rather than
|
|
15
|
+
* swallowing it: unparsable JSON or a payload with no `files` array comes back as
|
|
16
|
+
* `parse_failed`, which the acquisition engine classifies `parse_error`. Before
|
|
17
|
+
* this, a rubocop invocation that crashed or printed a non-JSON banner produced the
|
|
18
|
+
* same `{results: []}` as a genuinely clean Ruby tree — the one signal the status
|
|
19
|
+
* contract was designed to carry was unreachable from this adapter.
|
|
16
20
|
*/
|
|
17
|
-
export function
|
|
21
|
+
export function parseRubocopOutcome(stdout) {
|
|
18
22
|
let payload;
|
|
19
23
|
try {
|
|
20
24
|
payload = JSON.parse(stdout || "{}");
|
|
21
25
|
}
|
|
22
26
|
catch {
|
|
23
|
-
return
|
|
27
|
+
return {
|
|
28
|
+
items: [],
|
|
29
|
+
parse_failed: true,
|
|
30
|
+
note: "rubocop: output is not valid JSON",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (!payload || typeof payload !== "object" || !Array.isArray(payload.files)) {
|
|
34
|
+
return {
|
|
35
|
+
items: [],
|
|
36
|
+
parse_failed: true,
|
|
37
|
+
note: "rubocop: output has no `files` array",
|
|
38
|
+
};
|
|
24
39
|
}
|
|
25
|
-
const files =
|
|
40
|
+
const files = payload.files;
|
|
26
41
|
const items = [];
|
|
27
42
|
for (const file of files) {
|
|
28
43
|
if (!file || typeof file !== "object")
|
|
@@ -59,7 +74,15 @@ export function parseRubocop(stdout) {
|
|
|
59
74
|
});
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
|
-
return items;
|
|
77
|
+
return { items };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The item-list view of {@link parseRubocopOutcome}, for the audit/adapters
|
|
81
|
+
* normalization seam, which consumes items and reports coverage elsewhere. One
|
|
82
|
+
* implementation, two views — never two parsers that can drift.
|
|
83
|
+
*/
|
|
84
|
+
export function parseRubocop(stdout) {
|
|
85
|
+
return parseRubocopOutcome(stdout).items;
|
|
63
86
|
}
|
|
64
87
|
/**
|
|
65
88
|
* Dedicated severity adapter: route rubocop's parsed items through the shared
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rubocop.js","sourceRoot":"","sources":["../../../src/shared/analyzers/rubocop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rubocop.js","sourceRoot":"","sources":["../../../src/shared/analyzers/rubocop.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAmCzE,SAAS,kBAAkB,CAAC,QAA4B;IACtD,QAAQ,QAAQ,EAAE,WAAW,EAAE,EAAE,CAAC;QAChC,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,QAAQ,CAAC;QAClB;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC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;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,OAAO,+BAA+B,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -111,17 +111,93 @@ export declare const ExternalAnalyzerOwnershipRootSchema: z.ZodObject<{
|
|
|
111
111
|
confidence?: number | undefined;
|
|
112
112
|
kind?: string | undefined;
|
|
113
113
|
}>;
|
|
114
|
+
/**
|
|
115
|
+
* The analyzer status vocabulary, single-sourced (artifact:analyzer-status-vocabulary).
|
|
116
|
+
* The zod enum below is BUILT from this tuple, so there is exactly one place a member
|
|
117
|
+
* is added — and {@link EXTERNAL_ANALYZER_STATUS_CLASSIFICATION} below is an exhaustive
|
|
118
|
+
* `Record` over it, so widening the tuple without classifying the new member is a
|
|
119
|
+
* COMPILE error rather than a silent fall-through to "the run was fine".
|
|
120
|
+
*/
|
|
121
|
+
export declare const EXTERNAL_ANALYZER_TOOL_STATUSES: readonly ["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed", "checksum_mismatch"];
|
|
122
|
+
export type ExternalAnalyzerToolStatusValue = (typeof EXTERNAL_ANALYZER_TOOL_STATUSES)[number];
|
|
123
|
+
/**
|
|
124
|
+
* What each status says about COVERAGE — the question every consumer of a status
|
|
125
|
+
* record is really asking. `clean` is the ONLY value that may be read as "this tool
|
|
126
|
+
* ran and found nothing"; `degraded` means the tool ran but its output cannot be
|
|
127
|
+
* trusted as coverage; `not_run` means no coverage was produced at all.
|
|
128
|
+
*
|
|
129
|
+
* Exhaustive by construction: adding a member to
|
|
130
|
+
* {@link EXTERNAL_ANALYZER_TOOL_STATUSES} without adding its row here fails
|
|
131
|
+
* `npm run check`, so a new status can never default into `clean`.
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* What a status says about coverage. Named as a type so the vocabulary has ONE
|
|
135
|
+
* home and every consumer of the classification speaks it by name.
|
|
136
|
+
*/
|
|
137
|
+
export type ExternalAnalyzerCoverage = "clean" | "findings" | "degraded" | "not_run";
|
|
138
|
+
/**
|
|
139
|
+
* True when a coverage class means NO trustworthy coverage was produced — the
|
|
140
|
+
* single member-level answer. Both consumers ask it here rather than each
|
|
141
|
+
* re-typing `=== "degraded" || === "not_run"`, so widening the coverage
|
|
142
|
+
* vocabulary is one edit guarded by a compile error, never a silent divergence
|
|
143
|
+
* between two copies of the same comparison.
|
|
144
|
+
*/
|
|
145
|
+
export declare function isNonCleanAnalyzerCoverage(coverage: ExternalAnalyzerCoverage): boolean;
|
|
146
|
+
export declare const EXTERNAL_ANALYZER_STATUS_CLASSIFICATION: Record<ExternalAnalyzerToolStatusValue, ExternalAnalyzerCoverage>;
|
|
147
|
+
/**
|
|
148
|
+
* True when a RECORD means "this tool did not produce trustworthy coverage".
|
|
149
|
+
*
|
|
150
|
+
* The status member alone cannot answer this, because degradation is not always
|
|
151
|
+
* terminal: a run can exit non-zero, fail to parse, or drop rows and STILL surface
|
|
152
|
+
* some items, which lands it on `findings` — an affirmative member describing a
|
|
153
|
+
* partially-crashed run. Asking the member in isolation reports such a run as
|
|
154
|
+
* trustworthy, which is the same success-shaped-empty mistake one level up.
|
|
155
|
+
*
|
|
156
|
+
* So the question is asked of the whole record: degraded when the member says so, OR
|
|
157
|
+
* when the record carries a marker that findings were LOST —
|
|
158
|
+
* - a non-zero exit, or a NULL exit (killed by a signal, never exited on its own);
|
|
159
|
+
* - `dropped_rows` (parser rows plus normalizer items the run failed to report).
|
|
160
|
+
*
|
|
161
|
+
* `source_read_failures` is deliberately NOT in that set. Provenance is optional
|
|
162
|
+
* everywhere on this contract: an item whose anchor could not be resolved is still a
|
|
163
|
+
* fully reported lead, so an unresolved anchor is a weaker join key, not lost
|
|
164
|
+
* coverage. It stays on the record because it is worth surfacing; it just does not
|
|
165
|
+
* make the run untrustworthy.
|
|
166
|
+
*
|
|
167
|
+
* {@link EXTERNAL_ANALYZER_STATUS_CLASSIFICATION} remains the status-MEMBER map and
|
|
168
|
+
* the compile gate; this is the consumer-facing answer.
|
|
169
|
+
*/
|
|
170
|
+
export declare function isDegradedExternalAnalyzerStatus(record: Pick<ExternalAnalyzerToolStatus, "status" | "exit_code" | "dropped_rows">): boolean;
|
|
114
171
|
export declare const ExternalAnalyzerToolStatusSchema: z.ZodObject<{
|
|
115
172
|
tool: z.ZodString;
|
|
116
173
|
command: z.ZodOptional<z.ZodString>;
|
|
117
174
|
resolved: z.ZodBoolean;
|
|
118
|
-
status: z.ZodEnum<["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed"]>;
|
|
175
|
+
status: z.ZodEnum<["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed", "checksum_mismatch"]>;
|
|
119
176
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
120
177
|
error: z.ZodOptional<z.ZodString>;
|
|
121
178
|
output_snippet: z.ZodOptional<z.ZodString>;
|
|
179
|
+
/**
|
|
180
|
+
* The tool's own stderr, bounded. Present whenever stderr carried text — it is
|
|
181
|
+
* the only post-run evidence of WHY a non-zero exit or a stderr-only run failed.
|
|
182
|
+
*/
|
|
183
|
+
stderr_snippet: z.ZodOptional<z.ZodString>;
|
|
184
|
+
/**
|
|
185
|
+
* Everything this run failed to report, as ONE count: rows the parser understood
|
|
186
|
+
* the shape of but could not use (malformed CSV/JSON rows), PLUS items the
|
|
187
|
+
* normalizer discarded for a missing path or summary. The engine merges the two
|
|
188
|
+
* because they are the same question to a consumer — how much did this run lose?
|
|
189
|
+
* A non-zero count means the run under-reports; it is never a clean scan.
|
|
190
|
+
*/
|
|
191
|
+
dropped_rows: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
/**
|
|
193
|
+
* Items that named a path + line but whose source could not be read, so their
|
|
194
|
+
* content-anchored provenance was dropped. Distinguishes a broken read seam from
|
|
195
|
+
* a tool that legitimately reports no line numbers.
|
|
196
|
+
*/
|
|
197
|
+
source_read_failures: z.ZodOptional<z.ZodNumber>;
|
|
122
198
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
123
199
|
}, "strict", z.ZodTypeAny, {
|
|
124
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
200
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
125
201
|
resolved: boolean;
|
|
126
202
|
tool: string;
|
|
127
203
|
error?: string | undefined;
|
|
@@ -129,8 +205,11 @@ export declare const ExternalAnalyzerToolStatusSchema: z.ZodObject<{
|
|
|
129
205
|
duration_ms?: number | undefined;
|
|
130
206
|
exit_code?: number | null | undefined;
|
|
131
207
|
output_snippet?: string | undefined;
|
|
208
|
+
stderr_snippet?: string | undefined;
|
|
209
|
+
dropped_rows?: number | undefined;
|
|
210
|
+
source_read_failures?: number | undefined;
|
|
132
211
|
}, {
|
|
133
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
212
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
134
213
|
resolved: boolean;
|
|
135
214
|
tool: string;
|
|
136
215
|
error?: string | undefined;
|
|
@@ -138,8 +217,50 @@ export declare const ExternalAnalyzerToolStatusSchema: z.ZodObject<{
|
|
|
138
217
|
duration_ms?: number | undefined;
|
|
139
218
|
exit_code?: number | null | undefined;
|
|
140
219
|
output_snippet?: string | undefined;
|
|
220
|
+
stderr_snippet?: string | undefined;
|
|
221
|
+
dropped_rows?: number | undefined;
|
|
222
|
+
source_read_failures?: number | undefined;
|
|
141
223
|
}>;
|
|
142
224
|
export type ExternalAnalyzerToolStatus = z.infer<typeof ExternalAnalyzerToolStatusSchema>;
|
|
225
|
+
/**
|
|
226
|
+
* The generic pre-normalization item shape every analyzer parser emits. `from`/`to`
|
|
227
|
+
* are the optional dataflow-edge endpoints `normalizeGenericExternalEdges` reads.
|
|
228
|
+
*/
|
|
229
|
+
export interface ExternalAnalyzerParsedItem {
|
|
230
|
+
id?: string;
|
|
231
|
+
category?: string;
|
|
232
|
+
severity?: string;
|
|
233
|
+
path?: string;
|
|
234
|
+
line_start?: number;
|
|
235
|
+
line_end?: number;
|
|
236
|
+
summary?: string;
|
|
237
|
+
rule?: string;
|
|
238
|
+
raw?: unknown;
|
|
239
|
+
from?: unknown;
|
|
240
|
+
to?: unknown;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* A parse that can SAY it degraded. A bare `[]` cannot distinguish "the tool found
|
|
244
|
+
* nothing" from "the payload was unparseable" or "half the rows were malformed", and
|
|
245
|
+
* that ambiguity is what makes a broken analyzer read as a clean scan downstream.
|
|
246
|
+
*/
|
|
247
|
+
export interface ExternalAnalyzerParseReport {
|
|
248
|
+
items: ExternalAnalyzerParsedItem[];
|
|
249
|
+
/** The payload could not be parsed at all (bad JSON/CSV, or the wrong top-level shape). */
|
|
250
|
+
parse_failed?: boolean;
|
|
251
|
+
/** Rows recognised but unusable — counted, never silently dropped. */
|
|
252
|
+
dropped_rows?: number;
|
|
253
|
+
/** Human-readable cause, carried onto the status record. */
|
|
254
|
+
note?: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* What `ExternalAnalyzerCandidate.parse` returns. A plain array is the "nothing to
|
|
258
|
+
* report beyond the items" form; the report form is how a parser reports degradation.
|
|
259
|
+
* Read both through {@link readParseOutcome} so no consumer has to branch.
|
|
260
|
+
*/
|
|
261
|
+
export type ExternalAnalyzerParseOutcome = ExternalAnalyzerParsedItem[] | ExternalAnalyzerParseReport;
|
|
262
|
+
/** Normalize either parse-outcome form into the report form. */
|
|
263
|
+
export declare function readParseOutcome(outcome: ExternalAnalyzerParseOutcome | undefined | null): Required<Pick<ExternalAnalyzerParseReport, "items">> & Omit<ExternalAnalyzerParseReport, "items">;
|
|
143
264
|
/** Imported analyzer output captured at a single generation time. */
|
|
144
265
|
export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
145
266
|
tool: z.ZodString;
|
|
@@ -190,13 +311,32 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
190
311
|
tool: z.ZodString;
|
|
191
312
|
command: z.ZodOptional<z.ZodString>;
|
|
192
313
|
resolved: z.ZodBoolean;
|
|
193
|
-
status: z.ZodEnum<["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed"]>;
|
|
314
|
+
status: z.ZodEnum<["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed", "checksum_mismatch"]>;
|
|
194
315
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
195
316
|
error: z.ZodOptional<z.ZodString>;
|
|
196
317
|
output_snippet: z.ZodOptional<z.ZodString>;
|
|
318
|
+
/**
|
|
319
|
+
* The tool's own stderr, bounded. Present whenever stderr carried text — it is
|
|
320
|
+
* the only post-run evidence of WHY a non-zero exit or a stderr-only run failed.
|
|
321
|
+
*/
|
|
322
|
+
stderr_snippet: z.ZodOptional<z.ZodString>;
|
|
323
|
+
/**
|
|
324
|
+
* Everything this run failed to report, as ONE count: rows the parser understood
|
|
325
|
+
* the shape of but could not use (malformed CSV/JSON rows), PLUS items the
|
|
326
|
+
* normalizer discarded for a missing path or summary. The engine merges the two
|
|
327
|
+
* because they are the same question to a consumer — how much did this run lose?
|
|
328
|
+
* A non-zero count means the run under-reports; it is never a clean scan.
|
|
329
|
+
*/
|
|
330
|
+
dropped_rows: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
/**
|
|
332
|
+
* Items that named a path + line but whose source could not be read, so their
|
|
333
|
+
* content-anchored provenance was dropped. Distinguishes a broken read seam from
|
|
334
|
+
* a tool that legitimately reports no line numbers.
|
|
335
|
+
*/
|
|
336
|
+
source_read_failures: z.ZodOptional<z.ZodNumber>;
|
|
197
337
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
198
338
|
}, "strict", z.ZodTypeAny, {
|
|
199
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
339
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
200
340
|
resolved: boolean;
|
|
201
341
|
tool: string;
|
|
202
342
|
error?: string | undefined;
|
|
@@ -204,8 +344,11 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
204
344
|
duration_ms?: number | undefined;
|
|
205
345
|
exit_code?: number | null | undefined;
|
|
206
346
|
output_snippet?: string | undefined;
|
|
347
|
+
stderr_snippet?: string | undefined;
|
|
348
|
+
dropped_rows?: number | undefined;
|
|
349
|
+
source_read_failures?: number | undefined;
|
|
207
350
|
}, {
|
|
208
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
351
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
209
352
|
resolved: boolean;
|
|
210
353
|
tool: string;
|
|
211
354
|
error?: string | undefined;
|
|
@@ -213,6 +356,9 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
213
356
|
duration_ms?: number | undefined;
|
|
214
357
|
exit_code?: number | null | undefined;
|
|
215
358
|
output_snippet?: string | undefined;
|
|
359
|
+
stderr_snippet?: string | undefined;
|
|
360
|
+
dropped_rows?: number | undefined;
|
|
361
|
+
source_read_failures?: number | undefined;
|
|
216
362
|
}>, "many">>;
|
|
217
363
|
results: z.ZodArray<z.ZodObject<{
|
|
218
364
|
id: z.ZodString;
|
|
@@ -310,7 +456,7 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
310
456
|
kind?: string | undefined;
|
|
311
457
|
}[] | undefined;
|
|
312
458
|
tool_statuses?: {
|
|
313
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
459
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
314
460
|
resolved: boolean;
|
|
315
461
|
tool: string;
|
|
316
462
|
error?: string | undefined;
|
|
@@ -318,6 +464,9 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
318
464
|
duration_ms?: number | undefined;
|
|
319
465
|
exit_code?: number | null | undefined;
|
|
320
466
|
output_snippet?: string | undefined;
|
|
467
|
+
stderr_snippet?: string | undefined;
|
|
468
|
+
dropped_rows?: number | undefined;
|
|
469
|
+
source_read_failures?: number | undefined;
|
|
321
470
|
}[] | undefined;
|
|
322
471
|
}, {
|
|
323
472
|
tool: string;
|
|
@@ -354,7 +503,7 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
354
503
|
kind?: string | undefined;
|
|
355
504
|
}[] | undefined;
|
|
356
505
|
tool_statuses?: {
|
|
357
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
506
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
358
507
|
resolved: boolean;
|
|
359
508
|
tool: string;
|
|
360
509
|
error?: string | undefined;
|
|
@@ -362,6 +511,9 @@ export declare const ExternalAnalyzerResultsSchema: z.ZodObject<{
|
|
|
362
511
|
duration_ms?: number | undefined;
|
|
363
512
|
exit_code?: number | null | undefined;
|
|
364
513
|
output_snippet?: string | undefined;
|
|
514
|
+
stderr_snippet?: string | undefined;
|
|
515
|
+
dropped_rows?: number | undefined;
|
|
516
|
+
source_read_failures?: number | undefined;
|
|
365
517
|
}[] | undefined;
|
|
366
518
|
}>;
|
|
367
519
|
export type ExternalAnalyzerResults = z.infer<typeof ExternalAnalyzerResultsSchema>;
|
|
@@ -384,13 +536,32 @@ export declare const ExternalAnalyzerAcquisitionMarkerSchema: z.ZodObject<{
|
|
|
384
536
|
tool: z.ZodString;
|
|
385
537
|
command: z.ZodOptional<z.ZodString>;
|
|
386
538
|
resolved: z.ZodBoolean;
|
|
387
|
-
status: z.ZodEnum<["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed"]>;
|
|
539
|
+
status: z.ZodEnum<["skipped", "success", "findings", "not_resolved", "spawn_error", "parse_error", "failed", "checksum_mismatch"]>;
|
|
388
540
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
389
541
|
error: z.ZodOptional<z.ZodString>;
|
|
390
542
|
output_snippet: z.ZodOptional<z.ZodString>;
|
|
543
|
+
/**
|
|
544
|
+
* The tool's own stderr, bounded. Present whenever stderr carried text — it is
|
|
545
|
+
* the only post-run evidence of WHY a non-zero exit or a stderr-only run failed.
|
|
546
|
+
*/
|
|
547
|
+
stderr_snippet: z.ZodOptional<z.ZodString>;
|
|
548
|
+
/**
|
|
549
|
+
* Everything this run failed to report, as ONE count: rows the parser understood
|
|
550
|
+
* the shape of but could not use (malformed CSV/JSON rows), PLUS items the
|
|
551
|
+
* normalizer discarded for a missing path or summary. The engine merges the two
|
|
552
|
+
* because they are the same question to a consumer — how much did this run lose?
|
|
553
|
+
* A non-zero count means the run under-reports; it is never a clean scan.
|
|
554
|
+
*/
|
|
555
|
+
dropped_rows: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
/**
|
|
557
|
+
* Items that named a path + line but whose source could not be read, so their
|
|
558
|
+
* content-anchored provenance was dropped. Distinguishes a broken read seam from
|
|
559
|
+
* a tool that legitimately reports no line numbers.
|
|
560
|
+
*/
|
|
561
|
+
source_read_failures: z.ZodOptional<z.ZodNumber>;
|
|
391
562
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
392
563
|
}, "strict", z.ZodTypeAny, {
|
|
393
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
564
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
394
565
|
resolved: boolean;
|
|
395
566
|
tool: string;
|
|
396
567
|
error?: string | undefined;
|
|
@@ -398,8 +569,11 @@ export declare const ExternalAnalyzerAcquisitionMarkerSchema: z.ZodObject<{
|
|
|
398
569
|
duration_ms?: number | undefined;
|
|
399
570
|
exit_code?: number | null | undefined;
|
|
400
571
|
output_snippet?: string | undefined;
|
|
572
|
+
stderr_snippet?: string | undefined;
|
|
573
|
+
dropped_rows?: number | undefined;
|
|
574
|
+
source_read_failures?: number | undefined;
|
|
401
575
|
}, {
|
|
402
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
576
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
403
577
|
resolved: boolean;
|
|
404
578
|
tool: string;
|
|
405
579
|
error?: string | undefined;
|
|
@@ -407,11 +581,14 @@ export declare const ExternalAnalyzerAcquisitionMarkerSchema: z.ZodObject<{
|
|
|
407
581
|
duration_ms?: number | undefined;
|
|
408
582
|
exit_code?: number | null | undefined;
|
|
409
583
|
output_snippet?: string | undefined;
|
|
584
|
+
stderr_snippet?: string | undefined;
|
|
585
|
+
dropped_rows?: number | undefined;
|
|
586
|
+
source_read_failures?: number | undefined;
|
|
410
587
|
}>, "many">;
|
|
411
588
|
}, "strict", z.ZodTypeAny, {
|
|
412
589
|
enabled: boolean;
|
|
413
590
|
tool_statuses: {
|
|
414
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
591
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
415
592
|
resolved: boolean;
|
|
416
593
|
tool: string;
|
|
417
594
|
error?: string | undefined;
|
|
@@ -419,12 +596,15 @@ export declare const ExternalAnalyzerAcquisitionMarkerSchema: z.ZodObject<{
|
|
|
419
596
|
duration_ms?: number | undefined;
|
|
420
597
|
exit_code?: number | null | undefined;
|
|
421
598
|
output_snippet?: string | undefined;
|
|
599
|
+
stderr_snippet?: string | undefined;
|
|
600
|
+
dropped_rows?: number | undefined;
|
|
601
|
+
source_read_failures?: number | undefined;
|
|
422
602
|
}[];
|
|
423
603
|
generated_at?: string | undefined;
|
|
424
604
|
}, {
|
|
425
605
|
enabled: boolean;
|
|
426
606
|
tool_statuses: {
|
|
427
|
-
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error";
|
|
607
|
+
status: "failed" | "findings" | "skipped" | "spawn_error" | "success" | "not_resolved" | "parse_error" | "checksum_mismatch";
|
|
428
608
|
resolved: boolean;
|
|
429
609
|
tool: string;
|
|
430
610
|
error?: string | undefined;
|
|
@@ -432,6 +612,9 @@ export declare const ExternalAnalyzerAcquisitionMarkerSchema: z.ZodObject<{
|
|
|
432
612
|
duration_ms?: number | undefined;
|
|
433
613
|
exit_code?: number | null | undefined;
|
|
434
614
|
output_snippet?: string | undefined;
|
|
615
|
+
stderr_snippet?: string | undefined;
|
|
616
|
+
dropped_rows?: number | undefined;
|
|
617
|
+
source_read_failures?: number | undefined;
|
|
435
618
|
}[];
|
|
436
619
|
generated_at?: string | undefined;
|
|
437
620
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/shared/analyzers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,sFAAsF;AACtF,eAAO,MAAM,gCAAgC;;;;;;;;;IAUzC,iFAAiF;;IAEjF,yEAAyE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlE,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;EAQjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,C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