@descryy/mcp 0.6.0 → 0.7.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/dist/action-handshake.d.ts +8 -75
- package/dist/action-handshake.d.ts.map +1 -1
- package/dist/action-handshake.js +9 -79
- package/dist/action-handshake.js.map +1 -1
- package/dist/bin/descry-mcp.d.ts +4 -15
- package/dist/bin/descry-mcp.d.ts.map +1 -1
- package/dist/bin/descry-mcp.js +12 -42
- package/dist/bin/descry-mcp.js.map +1 -1
- package/dist/browser/driver.d.ts +59 -224
- package/dist/browser/driver.d.ts.map +1 -1
- package/dist/browser/driver.js +9 -55
- package/dist/browser/driver.js.map +1 -1
- package/dist/browser/evidence.d.ts +10 -43
- package/dist/browser/evidence.d.ts.map +1 -1
- package/dist/browser/evidence.js +20 -54
- package/dist/browser/evidence.js.map +1 -1
- package/dist/browser/fake-driver.d.ts +4 -16
- package/dist/browser/fake-driver.d.ts.map +1 -1
- package/dist/browser/fake-driver.js +6 -20
- package/dist/browser/fake-driver.js.map +1 -1
- package/dist/browser/graph-write.d.ts +4 -45
- package/dist/browser/graph-write.d.ts.map +1 -1
- package/dist/browser/graph-write.js +8 -53
- package/dist/browser/graph-write.js.map +1 -1
- package/dist/browser/playwright-driver.d.ts +7 -91
- package/dist/browser/playwright-driver.d.ts.map +1 -1
- package/dist/browser/playwright-driver.js +40 -194
- package/dist/browser/playwright-driver.js.map +1 -1
- package/dist/browser/provider.d.ts +5 -34
- package/dist/browser/provider.d.ts.map +1 -1
- package/dist/browser/provider.js +4 -24
- package/dist/browser/provider.js.map +1 -1
- package/dist/browser/registry.d.ts +26 -106
- package/dist/browser/registry.d.ts.map +1 -1
- package/dist/browser/registry.js +20 -77
- package/dist/browser/registry.js.map +1 -1
- package/dist/browser/scenario-resolve.d.ts +10 -44
- package/dist/browser/scenario-resolve.d.ts.map +1 -1
- package/dist/browser/scenario-resolve.js +10 -41
- package/dist/browser/scenario-resolve.js.map +1 -1
- package/dist/browser/scenario-runner.d.ts +12 -70
- package/dist/browser/scenario-runner.d.ts.map +1 -1
- package/dist/browser/scenario-runner.js +30 -90
- package/dist/browser/scenario-runner.js.map +1 -1
- package/dist/browser/stack-parser.d.ts +4 -28
- package/dist/browser/stack-parser.d.ts.map +1 -1
- package/dist/browser/stack-parser.js +12 -39
- package/dist/browser/stack-parser.js.map +1 -1
- package/dist/browser/tool-support.d.ts +20 -67
- package/dist/browser/tool-support.d.ts.map +1 -1
- package/dist/browser/tool-support.js +21 -65
- package/dist/browser/tool-support.js.map +1 -1
- package/dist/browser/url-scheme.d.ts +14 -0
- package/dist/browser/url-scheme.d.ts.map +1 -0
- package/dist/browser/url-scheme.js +38 -0
- package/dist/browser/url-scheme.js.map +1 -0
- package/dist/cancellation.d.ts +11 -46
- package/dist/cancellation.d.ts.map +1 -1
- package/dist/cancellation.js +11 -46
- package/dist/cancellation.js.map +1 -1
- package/dist/capped.d.ts +9 -33
- package/dist/capped.d.ts.map +1 -1
- package/dist/capped.js +7 -27
- package/dist/capped.js.map +1 -1
- package/dist/disclosure-ledger.d.ts +6 -30
- package/dist/disclosure-ledger.d.ts.map +1 -1
- package/dist/disclosure-ledger.js +4 -26
- package/dist/disclosure-ledger.js.map +1 -1
- package/dist/index.d.ts +10 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -17
- package/dist/index.js.map +1 -1
- package/dist/module-trust.d.ts +24 -0
- package/dist/module-trust.d.ts.map +1 -0
- package/dist/module-trust.js +60 -0
- package/dist/module-trust.js.map +1 -0
- package/dist/path-confinement.d.ts +31 -0
- package/dist/path-confinement.d.ts.map +1 -0
- package/dist/path-confinement.js +44 -0
- package/dist/path-confinement.js.map +1 -0
- package/dist/protocol.d.ts +10 -53
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +14 -60
- package/dist/protocol.js.map +1 -1
- package/dist/registry.d.ts +10 -58
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +38 -90
- package/dist/registry.js.map +1 -1
- package/dist/render.d.ts +42 -11
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +74 -10
- package/dist/render.js.map +1 -1
- package/dist/runtime-registry.d.ts +7 -66
- package/dist/runtime-registry.d.ts.map +1 -1
- package/dist/runtime-registry.js +39 -114
- package/dist/runtime-registry.js.map +1 -1
- package/dist/scenarios/index.d.ts +1 -1
- package/dist/scenarios/index.d.ts.map +1 -1
- package/dist/scenarios/index.js +1 -1
- package/dist/scenarios/index.js.map +1 -1
- package/dist/scenarios/parse.d.ts +4 -18
- package/dist/scenarios/parse.d.ts.map +1 -1
- package/dist/scenarios/parse.js +14 -34
- package/dist/scenarios/parse.js.map +1 -1
- package/dist/scenarios/scenario.d.ts +18 -74
- package/dist/scenarios/scenario.d.ts.map +1 -1
- package/dist/scenarios/scenario.js +7 -34
- package/dist/scenarios/scenario.js.map +1 -1
- package/dist/scenarios/storage.d.ts +11 -41
- package/dist/scenarios/storage.d.ts.map +1 -1
- package/dist/scenarios/storage.js +57 -47
- package/dist/scenarios/storage.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +37 -17
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +67 -259
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -250
- package/dist/session.js.map +1 -1
- package/dist/tools/analyze.d.ts +24 -118
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +44 -166
- package/dist/tools/analyze.js.map +1 -1
- package/dist/tools/browser-click.d.ts +3 -21
- package/dist/tools/browser-click.d.ts.map +1 -1
- package/dist/tools/browser-click.js +10 -31
- package/dist/tools/browser-click.js.map +1 -1
- package/dist/tools/browser-close-session.d.ts +4 -13
- package/dist/tools/browser-close-session.d.ts.map +1 -1
- package/dist/tools/browser-close-session.js +4 -13
- package/dist/tools/browser-close-session.js.map +1 -1
- package/dist/tools/browser-fill.d.ts +5 -36
- package/dist/tools/browser-fill.d.ts.map +1 -1
- package/dist/tools/browser-fill.js +9 -44
- package/dist/tools/browser-fill.js.map +1 -1
- package/dist/tools/browser-navigate.d.ts +6 -27
- package/dist/tools/browser-navigate.d.ts.map +1 -1
- package/dist/tools/browser-navigate.js +6 -23
- package/dist/tools/browser-navigate.js.map +1 -1
- package/dist/tools/browser-run-scenario.d.ts +5 -31
- package/dist/tools/browser-run-scenario.d.ts.map +1 -1
- package/dist/tools/browser-run-scenario.js +10 -46
- package/dist/tools/browser-run-scenario.js.map +1 -1
- package/dist/tools/browser-save-scenario.d.ts +3 -28
- package/dist/tools/browser-save-scenario.d.ts.map +1 -1
- package/dist/tools/browser-save-scenario.js +15 -74
- package/dist/tools/browser-save-scenario.js.map +1 -1
- package/dist/tools/browser-snapshot.d.ts +6 -39
- package/dist/tools/browser-snapshot.d.ts.map +1 -1
- package/dist/tools/browser-snapshot.js +4 -31
- package/dist/tools/browser-snapshot.js.map +1 -1
- package/dist/tools/browser-start-session.d.ts +4 -23
- package/dist/tools/browser-start-session.d.ts.map +1 -1
- package/dist/tools/browser-start-session.js +33 -55
- package/dist/tools/browser-start-session.js.map +1 -1
- package/dist/tools/browser-type.d.ts +5 -35
- package/dist/tools/browser-type.d.ts.map +1 -1
- package/dist/tools/browser-type.js +10 -45
- package/dist/tools/browser-type.js.map +1 -1
- package/dist/tools/contracts.d.ts +9 -86
- package/dist/tools/contracts.d.ts.map +1 -1
- package/dist/tools/contracts.js +24 -80
- package/dist/tools/contracts.js.map +1 -1
- package/dist/tools/cross-pr.d.ts +42 -30
- package/dist/tools/cross-pr.d.ts.map +1 -1
- package/dist/tools/cross-pr.js +81 -62
- package/dist/tools/cross-pr.js.map +1 -1
- package/dist/tools/git-diff.d.ts +18 -2
- package/dist/tools/git-diff.d.ts.map +1 -1
- package/dist/tools/git-diff.js +118 -26
- package/dist/tools/git-diff.js.map +1 -1
- package/dist/tools/git-history.d.ts +5 -16
- package/dist/tools/git-history.d.ts.map +1 -1
- package/dist/tools/git-history.js +3 -10
- package/dist/tools/git-history.js.map +1 -1
- package/dist/tools/history.d.ts +4 -33
- package/dist/tools/history.d.ts.map +1 -1
- package/dist/tools/history.js +6 -31
- package/dist/tools/history.js.map +1 -1
- package/dist/tools/impact.d.ts +7 -51
- package/dist/tools/impact.d.ts.map +1 -1
- package/dist/tools/impact.js +15 -67
- package/dist/tools/impact.js.map +1 -1
- package/dist/tools/index.d.ts +3 -8
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kit.d.ts +66 -113
- package/dist/tools/kit.d.ts.map +1 -1
- package/dist/tools/kit.js +60 -28
- package/dist/tools/kit.js.map +1 -1
- package/dist/tools/link-workspace.d.ts +7 -45
- package/dist/tools/link-workspace.d.ts.map +1 -1
- package/dist/tools/link-workspace.js +10 -48
- package/dist/tools/link-workspace.js.map +1 -1
- package/dist/tools/lookup.d.ts +4 -14
- package/dist/tools/lookup.d.ts.map +1 -1
- package/dist/tools/lookup.js +4 -14
- package/dist/tools/lookup.js.map +1 -1
- package/dist/tools/mark-incident.d.ts +7 -54
- package/dist/tools/mark-incident.d.ts.map +1 -1
- package/dist/tools/mark-incident.js +15 -68
- package/dist/tools/mark-incident.js.map +1 -1
- package/dist/tools/observe-runtime.d.ts +27 -210
- package/dist/tools/observe-runtime.d.ts.map +1 -1
- package/dist/tools/observe-runtime.js +257 -435
- package/dist/tools/observe-runtime.js.map +1 -1
- package/dist/tools/observe-tests.d.ts +9 -100
- package/dist/tools/observe-tests.d.ts.map +1 -1
- package/dist/tools/observe-tests.js +24 -152
- package/dist/tools/observe-tests.js.map +1 -1
- package/dist/tools/pr-analysis.d.ts +18 -2
- package/dist/tools/pr-analysis.d.ts.map +1 -1
- package/dist/tools/pr-analysis.js +73 -23
- package/dist/tools/pr-analysis.js.map +1 -1
- package/dist/tools/pre-push.d.ts +68 -16
- package/dist/tools/pre-push.d.ts.map +1 -1
- package/dist/tools/pre-push.js +98 -35
- package/dist/tools/pre-push.js.map +1 -1
- package/dist/tools/propagation.d.ts +11 -53
- package/dist/tools/propagation.d.ts.map +1 -1
- package/dist/tools/propagation.js +14 -57
- package/dist/tools/propagation.js.map +1 -1
- package/dist/tools/questions.d.ts +13 -63
- package/dist/tools/questions.d.ts.map +1 -1
- package/dist/tools/questions.js +33 -105
- package/dist/tools/questions.js.map +1 -1
- package/dist/tools/refusal-fetch.d.ts +4 -40
- package/dist/tools/refusal-fetch.d.ts.map +1 -1
- package/dist/tools/refusal-fetch.js +4 -40
- package/dist/tools/refusal-fetch.js.map +1 -1
- package/dist/tools/runtime-incident.d.ts +4 -63
- package/dist/tools/runtime-incident.d.ts.map +1 -1
- package/dist/tools/runtime-incident.js +10 -87
- package/dist/tools/runtime-incident.js.map +1 -1
- package/dist/tools/scope.d.ts +7 -25
- package/dist/tools/scope.d.ts.map +1 -1
- package/dist/tools/scope.js +10 -29
- package/dist/tools/scope.js.map +1 -1
- package/dist/tools/similar-incidents.d.ts +11 -86
- package/dist/tools/similar-incidents.d.ts.map +1 -1
- package/dist/tools/similar-incidents.js +7 -71
- package/dist/tools/similar-incidents.js.map +1 -1
- package/dist/tools/validate.d.ts +14 -69
- package/dist/tools/validate.d.ts.map +1 -1
- package/dist/tools/validate.js +23 -74
- package/dist/tools/validate.js.map +1 -1
- package/dist/tools/verification-status.d.ts +9 -64
- package/dist/tools/verification-status.d.ts.map +1 -1
- package/dist/tools/verification-status.js +9 -62
- package/dist/tools/verification-status.js.map +1 -1
- package/dist/tools/verify-claim.d.ts +5 -52
- package/dist/tools/verify-claim.d.ts.map +1 -1
- package/dist/tools/verify-claim.js +6 -56
- package/dist/tools/verify-claim.js.map +1 -1
- package/dist/transport.d.ts +15 -52
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +16 -60
- package/dist/transport.js.map +1 -1
- package/package.json +30 -21
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
* times in one reply. `indexPrAnalysisNodes` collapses that: the lists name
|
|
31
31
|
* ids, `nodes` holds each node once. Tool version 2.0.0 for it.
|
|
32
32
|
*/
|
|
33
|
-
import { changedFiles, changeRisk, NODE_BUDGETS, nodesInFiles, withProminence } from "@descryy/core";
|
|
34
|
-
import { answer, briefNode, optionalEnum, optionalInteger, optionalString,
|
|
33
|
+
import { changedFiles, changeRisk, NODE_BUDGETS, nodesInFiles, withProminence, workingTreeChangedFiles, } from "@descryy/core";
|
|
34
|
+
import { answer, briefNode, optionalEnum, optionalInteger, descryOwnState, optionalString, ToolInputError, } from "./kit.js";
|
|
35
35
|
/**
|
|
36
36
|
* Collapse three overlapping node lists into one map plus three id lists.
|
|
37
37
|
*
|
|
@@ -64,9 +64,24 @@ const SCHEMA = {
|
|
|
64
64
|
base: {
|
|
65
65
|
type: "string",
|
|
66
66
|
description: "The branch or commit this change is measured against, e.g. \"main\" or \"origin/main\". " +
|
|
67
|
-
"Required — there is no defensible default, and guessing
|
|
67
|
+
"Required unless \"workingTree\" is given — there is no defensible default, and guessing " +
|
|
68
|
+
"one silently changes the diff.",
|
|
68
69
|
},
|
|
69
70
|
head: { type: "string", description: "The tip being reviewed. Default HEAD." },
|
|
71
|
+
workingTree: {
|
|
72
|
+
type: "string",
|
|
73
|
+
enum: ["unstaged", "staged", "all"],
|
|
74
|
+
description: "Review the change as it stands in the working tree rather than between two refs — the " +
|
|
75
|
+
"change about to be committed, including files git has never seen. \"all\" is staged and " +
|
|
76
|
+
"unstaged together. Mutually exclusive with \"base\", and never inferred: the two answer " +
|
|
77
|
+
"different questions, so the caller declares which one they are asking. Which ran is " +
|
|
78
|
+
"stated in the reply.",
|
|
79
|
+
},
|
|
80
|
+
includeUntracked: {
|
|
81
|
+
type: "boolean",
|
|
82
|
+
description: "With \"workingTree\", include files git has never seen. On by default — a new file " +
|
|
83
|
+
"written and not yet added is part of the change about to be committed.",
|
|
84
|
+
},
|
|
70
85
|
trigger: {
|
|
71
86
|
type: "string",
|
|
72
87
|
enum: [...TRIGGERS],
|
|
@@ -74,26 +89,60 @@ const SCHEMA = {
|
|
|
74
89
|
},
|
|
75
90
|
limit: { type: "integer", minimum: 1, description: "Cap on nodes per list. Default 50." },
|
|
76
91
|
},
|
|
77
|
-
required: ["base"],
|
|
78
92
|
additionalProperties: false,
|
|
79
93
|
};
|
|
80
94
|
async function run(args, ctx) {
|
|
81
|
-
//
|
|
82
|
-
// guessing
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
// One of the two questions has to be chosen, and neither has a defensible
|
|
96
|
+
// default: guessing would silently change which change set the whole answer
|
|
97
|
+
// describes. This tool's own reasoning is that the diff is what defines a
|
|
98
|
+
// change to review — a working tree *is* a diff, it is simply not a
|
|
99
|
+
// ref-to-ref one, so accepting it completes that principle rather than
|
|
100
|
+
// bending it. Which one ran is stated in the reply.
|
|
101
|
+
const workingTree = optionalString(args, "workingTree");
|
|
102
|
+
const includeUntracked = args["includeUntracked"] !== false;
|
|
103
|
+
const baseArg = optionalString(args, "base");
|
|
104
|
+
if (workingTree === undefined && baseArg === undefined) {
|
|
105
|
+
throw new ToolInputError('Give either "base" (a ref range) or "workingTree" (the change as it stands, uncommitted). ' +
|
|
106
|
+
"There is no defensible default, and guessing one silently changes which change set the " +
|
|
107
|
+
"answer describes.");
|
|
108
|
+
}
|
|
109
|
+
if (workingTree !== undefined && baseArg !== undefined) {
|
|
110
|
+
throw new ToolInputError('"base" and "workingTree" are mutually exclusive — they are two different questions. Ask one.');
|
|
111
|
+
}
|
|
112
|
+
if (workingTree !== undefined && !["unstaged", "staged", "all"].includes(workingTree)) {
|
|
113
|
+
throw new ToolInputError(`"workingTree" must be "unstaged", "staged" or "all" — got "${workingTree}".`);
|
|
114
|
+
}
|
|
115
|
+
const scope = (workingTree ?? "all");
|
|
116
|
+
const mode = baseArg === undefined ? "working-tree" : "range";
|
|
117
|
+
const base = baseArg ?? null;
|
|
118
|
+
const head = base === null ? null : optionalString(args, "head") ?? "HEAD";
|
|
119
|
+
const subject = base === null ? `the working tree (${scope})` : `${base}...${head}`;
|
|
120
|
+
/** Carried into every one of the four reply shapes, so none can omit it. */
|
|
121
|
+
const identity = {
|
|
122
|
+
mode,
|
|
123
|
+
base,
|
|
124
|
+
head,
|
|
125
|
+
...(base === null ? { workingTree: { scope, includeUntracked } } : {}),
|
|
126
|
+
};
|
|
85
127
|
const trigger = optionalEnum(args, "trigger", TRIGGERS) ?? "pr";
|
|
86
128
|
const limit = optionalInteger(args, "limit", 1) ?? 50;
|
|
87
129
|
const session = ctx.session;
|
|
88
130
|
const stamp = session.provider().baseStamp();
|
|
89
|
-
ctx.progress(`Diffing ${
|
|
131
|
+
ctx.progress(`Diffing ${subject}`);
|
|
90
132
|
let files;
|
|
91
133
|
try {
|
|
92
|
-
files =
|
|
134
|
+
files =
|
|
135
|
+
base === null
|
|
136
|
+
? await workingTreeChangedFiles(session.repoPath, {
|
|
137
|
+
scope,
|
|
138
|
+
includeUntracked,
|
|
139
|
+
exclude: descryOwnState(session.config.graph),
|
|
140
|
+
})
|
|
141
|
+
: await changedFiles(session.repoPath, base, head);
|
|
93
142
|
}
|
|
94
143
|
catch (error) {
|
|
95
144
|
return answer({
|
|
96
|
-
headline: `Could not diff ${
|
|
145
|
+
headline: `Could not diff ${subject}.`,
|
|
97
146
|
state: "refused",
|
|
98
147
|
nameLevel: true,
|
|
99
148
|
resolutionFloor: 0,
|
|
@@ -102,16 +151,18 @@ async function run(args, ctx) {
|
|
|
102
151
|
irSchemaVersion: stamp.irSchemaVersion,
|
|
103
152
|
commitSpread: stamp.commitSpread,
|
|
104
153
|
notes: [
|
|
105
|
-
|
|
106
|
-
|
|
154
|
+
(base === null
|
|
155
|
+
? `git rejected the working-tree read: ${error.message.trim()}.`
|
|
156
|
+
: `git rejected the range: ${error.message.trim()}. Check that "${base}" ` +
|
|
157
|
+
"exists locally — a shallow clone or a missing fetch is the usual cause."),
|
|
107
158
|
],
|
|
108
|
-
data: {
|
|
159
|
+
data: { ...identity, files: [] },
|
|
109
160
|
});
|
|
110
161
|
}
|
|
111
162
|
const notes = [];
|
|
112
163
|
if (files.length === 0) {
|
|
113
164
|
return answer({
|
|
114
|
-
headline: `${
|
|
165
|
+
headline: `${subject} changes no files.`,
|
|
115
166
|
nameLevel: true,
|
|
116
167
|
// 0, not 4. Every other branch of this tool already stamps 0 for the same
|
|
117
168
|
// reason `get_git_diff` does — a live git read is not a graph-traversal
|
|
@@ -124,7 +175,7 @@ async function run(args, ctx) {
|
|
|
124
175
|
irSchemaVersion: stamp.irSchemaVersion,
|
|
125
176
|
commitSpread: stamp.commitSpread,
|
|
126
177
|
notes: ["An empty diff is a real answer: there is nothing to assess."],
|
|
127
|
-
data: {
|
|
178
|
+
data: { ...identity, files: [], nodes: {}, affected: [], untested: [], tests: [] },
|
|
128
179
|
});
|
|
129
180
|
}
|
|
130
181
|
ctx.progress(`Resolving ${files.length} changed file(s)`, 1, 3);
|
|
@@ -137,7 +188,7 @@ async function run(args, ctx) {
|
|
|
137
188
|
}
|
|
138
189
|
if (nodes.length === 0) {
|
|
139
190
|
return answer({
|
|
140
|
-
headline: `None of the ${files.length}
|
|
191
|
+
headline: `None of the ${files.length} file(s) changed in ${subject} are in the graph.`,
|
|
141
192
|
state: "refused",
|
|
142
193
|
nameLevel: true,
|
|
143
194
|
resolutionFloor: 0,
|
|
@@ -150,7 +201,7 @@ async function run(args, ctx) {
|
|
|
150
201
|
"No blast radius was computed. Run analyze first; if it has already run, its disclosures " +
|
|
151
202
|
"name the languages and paths it could not read.",
|
|
152
203
|
],
|
|
153
|
-
data: {
|
|
204
|
+
data: { ...identity, files, missing, nodes: {}, affected: [], untested: [], tests: [] },
|
|
154
205
|
});
|
|
155
206
|
}
|
|
156
207
|
ctx.progress(`Assessing ${nodes.length} changed symbol(s)`, 2, 3);
|
|
@@ -173,8 +224,7 @@ async function run(args, ctx) {
|
|
|
173
224
|
result: {
|
|
174
225
|
...risk,
|
|
175
226
|
data: {
|
|
176
|
-
|
|
177
|
-
head,
|
|
227
|
+
...identity,
|
|
178
228
|
files,
|
|
179
229
|
missing,
|
|
180
230
|
changedSymbols: nodes.length,
|
|
@@ -187,9 +237,9 @@ async function run(args, ctx) {
|
|
|
187
237
|
},
|
|
188
238
|
...(affected.length === 0 ? { state: "empty" } : {}),
|
|
189
239
|
nameLevel: true,
|
|
190
|
-
headline:
|
|
191
|
-
|
|
192
|
-
|
|
240
|
+
headline: `Across ${subject}: ${nodes.length} changed symbol(s) in ${files.length} file(s) affect ` +
|
|
241
|
+
`${affected.length} other node(s). ${risk.data.tests.length} test(s) cover part of that; ` +
|
|
242
|
+
`${untested.length} affected node(s) have no covering test in the graph.`,
|
|
193
243
|
};
|
|
194
244
|
}
|
|
195
245
|
export const prAnalysisTool = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-analysis.js","sourceRoot":"","sources":["../../src/tools/pr-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"pr-analysis.js","sourceRoot":"","sources":["../../src/tools/pr-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,MAAM,EACN,SAAS,EACT,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,GAIf,MAAM,UAAU,CAAC;AAsDlB;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAqG,EACrG,QAAkC,EAClC,KAA+B;IAE/B,MAAM,KAAK,GAA8B,EAAE,CAAC;IAC5C,MAAM,QAAQ,GAAG,CAAC,IAAmB,EAAU,EAAE;QAC/C,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,I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AM;gBAC9B,aAAa,EAAE,QAAQ,CAAC,MAAM;gBAC9B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;gBAClC,GAAG,KAAK;aACT;YACD,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,KAAK,CAAC;SACjC;QACD,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,SAAS,EAAE,IAAI;QACf,QAAQ,EACN,UAAU,OAAO,KAAK,KAAK,CAAC,MAAM,yBAAyB,KAAK,CAAC,MAAM,kBAAkB;YACzF,GAAG,QAAQ,CAAC,MAAM,mBAAmB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,+BAA+B;YAC1F,GAAG,QAAQ,CAAC,MAAM,uDAAuD;KAC5E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,uEAAuE;IACvE,0EAA0E;IAC1E,2EAA2E;IAC3E,yDAAyD;IACzD,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,mDAAmD;IAC1D,WAAW,EACT,6FAA6F;QAC7F,0FAA0F;QAC1F,6FAA6F;QAC7F,uBAAuB;IACzB,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
package/dist/tools/pre-push.d.ts
CHANGED
|
@@ -74,37 +74,89 @@ export interface PrePushSection {
|
|
|
74
74
|
readonly state: string;
|
|
75
75
|
/** How many items this source found in total, before this tool took its top few. */
|
|
76
76
|
readonly total: number;
|
|
77
|
+
/** The top few, in the order that source reported them. */
|
|
78
|
+
readonly shown: readonly unknown[];
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
80
|
+
* True when this source is **the kind that claims something is wrong** —
|
|
81
|
+
* a property of the source, not of what it found this time.
|
|
82
|
+
*
|
|
83
|
+
* **It was called `blocking`, sitting beside a `blockingTotal` that means the
|
|
84
|
+
* other thing.** `contracts` can be `blocking: true` with `total: 0`, and
|
|
85
|
+
* `validate` `blocking: true` with ten leads and a `blockingTotal` of zero,
|
|
86
|
+
* so the obvious consumer arithmetic — sum `total` over the blocking
|
|
87
|
+
* sections — is wrong in both directions. This tool's own test suite made
|
|
88
|
+
* exactly that mistake and passed, because the fixture happened to produce no
|
|
89
|
+
* leads.
|
|
90
|
+
*
|
|
91
|
+
* The name now says which question it answers. The other question — *did this
|
|
92
|
+
* section find anything that blocks?* — is `defects > 0`, and there is no
|
|
93
|
+
* longer a field whose name suggests it answers both.
|
|
81
94
|
*/
|
|
95
|
+
readonly claimsFaults: boolean;
|
|
96
|
+
/** Of `total`, how many assert a fault. Zero for a source that claims none. */
|
|
82
97
|
readonly defects: number;
|
|
83
|
-
/**
|
|
84
|
-
readonly
|
|
85
|
-
/** True when this source's findings count toward `blockingTotal`. */
|
|
86
|
-
readonly blocking: boolean;
|
|
98
|
+
/** Of `total`, how many are worth a look without asserting one. */
|
|
99
|
+
readonly leads: number;
|
|
87
100
|
/** This source's own headline, kept verbatim. */
|
|
88
101
|
readonly headline: string;
|
|
89
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Which change set the coverage section actually described.
|
|
105
|
+
*
|
|
106
|
+
* `pr_analysis` derives its own file list from `base...head` and takes none,
|
|
107
|
+
* deliberately. Three constituents therefore describe the files passed and one
|
|
108
|
+
* describes the branch's committed diff, and in a real run those were 2 files
|
|
109
|
+
* and 25. Both answers were right; presented side by side under one headline
|
|
110
|
+
* they read as one answer about one change.
|
|
111
|
+
*
|
|
112
|
+
* The disclosure explaining that has always been in the reply. It sat below a
|
|
113
|
+
* headline and a section total that both read as though they described the
|
|
114
|
+
* files passed, which is the wrong order for the most common working moment:
|
|
115
|
+
* before a commit, when the git-derived half can see none of the work.
|
|
116
|
+
*/
|
|
117
|
+
export interface PrePushCoverage {
|
|
118
|
+
/** The ref-to-ref diff `pr_analysis` answered about. */
|
|
119
|
+
readonly describes: string;
|
|
120
|
+
/** Files passed that the base diff does not contain — whatever the reason. */
|
|
121
|
+
readonly filesOutsideDiff: readonly string[];
|
|
122
|
+
/**
|
|
123
|
+
* Of those, the ones git reports as modified, staged or untracked.
|
|
124
|
+
*
|
|
125
|
+
* Separated because "not in the diff" has two causes and only one is about
|
|
126
|
+
* timing: uncommitted work the developer can commit, versus a file they named
|
|
127
|
+
* that this branch never touched.
|
|
128
|
+
*/
|
|
129
|
+
readonly uncommitted: readonly string[];
|
|
130
|
+
}
|
|
90
131
|
export interface PrePushData {
|
|
91
132
|
readonly files: readonly string[];
|
|
92
133
|
readonly sections: readonly PrePushSection[];
|
|
93
134
|
/**
|
|
94
|
-
* Contract and environment
|
|
95
|
-
*
|
|
96
|
-
*
|
|
135
|
+
* Contract and environment findings that **assert a fault**.
|
|
136
|
+
*
|
|
137
|
+
* The doctrine that keeps `scope` and `pr_analysis` out of this number is the
|
|
138
|
+
* same one that keeps a lead out of it: a change with a large blast radius is
|
|
139
|
+
* not a broken change, and neither is a route no code in this graph calls.
|
|
140
|
+
* Both constituents already knew which of their findings claimed a fault —
|
|
141
|
+
* `validate` in a field, `contracts` in the prose of the finding itself — and
|
|
142
|
+
* this composite flattened them into one count a git hook exits on.
|
|
143
|
+
*
|
|
144
|
+
* "15 blocking findings" and "1 defect, 15 leads" are different sentences and
|
|
145
|
+
* only one is worth acting on. A check that cries wolf is worse than no
|
|
146
|
+
* check, because it also discredits the real findings underneath it.
|
|
97
147
|
*/
|
|
98
148
|
readonly blockingTotal: number;
|
|
99
|
-
/**
|
|
100
|
-
* Contract and environment **leads** — worth a look, never blocking. Kept
|
|
101
|
-
* under its own key rather than folded into `blockingTotal`, per this
|
|
102
|
-
* tool's own rule that a repo-wide or non-defect count never hides inside
|
|
103
|
-
* the number a hook branches on.
|
|
104
|
-
*/
|
|
149
|
+
/** Findings worth a look that assert nothing. Reported, never exited on. */
|
|
105
150
|
readonly leadTotal: number;
|
|
106
151
|
/** The node budget actually applied to the traversing constituents. */
|
|
107
152
|
readonly nodeBudget: number;
|
|
153
|
+
/**
|
|
154
|
+
* What the coverage section was about, when one ran.
|
|
155
|
+
*
|
|
156
|
+
* `null` when no base ref was given: `pr_analysis` is skipped entirely then,
|
|
157
|
+
* and a caveat about a section that did not run is a caveat about nothing.
|
|
158
|
+
*/
|
|
159
|
+
readonly coverage: PrePushCoverage | null;
|
|
108
160
|
}
|
|
109
161
|
export declare const prePushTool: ToolDefinition;
|
|
110
162
|
//# sourceMappingURL=pre-push.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pre-push.d.ts","sourceRoot":"","sources":["../../src/tools/pre-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAKH,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAuClB,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,+FAA+F;IAC/F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB
|
|
1
|
+
{"version":3,"file":"pre-push.d.ts","sourceRoot":"","sources":["../../src/tools/pre-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAKH,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAuClB,MAAM,MAAM,aAAa,GAAG,OAAO,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AO,MAAM,WAAW,EAAE,cAiBzB,CAAC"}
|
package/dist/tools/pre-push.js
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
* `read` — it runs four read tools and writes nothing. `evidence` — it reports
|
|
67
67
|
* what those four found and draws no conclusion of its own.
|
|
68
68
|
*/
|
|
69
|
-
import { NODE_BUDGETS } from "@descryy/core";
|
|
69
|
+
import { NODE_BUDGETS, uncommittedAmong } from "@descryy/core";
|
|
70
70
|
import { contractsTool } from "./contracts.js";
|
|
71
71
|
import { answer, optionalInteger, optionalString, optionalStringArray, } from "./kit.js";
|
|
72
72
|
import { prAnalysisTool } from "./pr-analysis.js";
|
|
@@ -113,12 +113,44 @@ function listOf(data, key) {
|
|
|
113
113
|
const value = data[key];
|
|
114
114
|
return Array.isArray(value) ? value : [];
|
|
115
115
|
}
|
|
116
|
-
/**
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
/**
|
|
117
|
+
* A finding's own claim, defaulting to `defect` when it carries none.
|
|
118
|
+
*
|
|
119
|
+
* The default is deliberate and it is the safe direction: a source that has not
|
|
120
|
+
* yet been taught the distinction has its findings counted as fault claims, so
|
|
121
|
+
* adding a check can never silently stop blocking a push. The opposite default
|
|
122
|
+
* would turn every un-migrated source into a source of leads overnight.
|
|
123
|
+
*/
|
|
124
|
+
function claimOf(item) {
|
|
125
|
+
return typeof item === "object" &&
|
|
126
|
+
item !== null &&
|
|
127
|
+
item["claim"] === "lead"
|
|
128
|
+
? "lead"
|
|
129
|
+
: "defect";
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The leading clause, when the coverage section is about a different change set.
|
|
133
|
+
*
|
|
134
|
+
* **First, not in a footnote.** This mismatch has always been disclosed, and
|
|
135
|
+
* the disclosure sat underneath a headline and a section total that both read
|
|
136
|
+
* as if they described the files passed. A reader who stops at the headline —
|
|
137
|
+
* which is what a headline is for — got a confident sentence about the wrong
|
|
138
|
+
* work. Ordering is the whole fix.
|
|
139
|
+
*
|
|
140
|
+
* Empty when it does not apply, because a caveat printed on every run is one a
|
|
141
|
+
* reader learns to skip past on the run where it matters.
|
|
142
|
+
*/
|
|
143
|
+
function coverageWarning(files, coverage) {
|
|
144
|
+
if (coverage === null || coverage.uncommitted.length === 0)
|
|
145
|
+
return "";
|
|
146
|
+
const n = coverage.uncommitted.length;
|
|
147
|
+
return (`${n} of ${files.length} file(s) are uncommitted, so the pr_analysis section describes ` +
|
|
148
|
+
`committed work only (${coverage.describes}) and not them. ` +
|
|
149
|
+
"The other three sections describe the files you passed. ");
|
|
119
150
|
}
|
|
120
151
|
async function run(args, ctx) {
|
|
121
152
|
const files = optionalStringArray(args, "files") ?? [];
|
|
153
|
+
let coverage = null;
|
|
122
154
|
const perSource = optionalInteger(args, "perSource", 1) ?? PER_SOURCE;
|
|
123
155
|
const baseRef = optionalString(args, "base");
|
|
124
156
|
const base = ctx.session.provider().baseStamp();
|
|
@@ -146,7 +178,7 @@ async function run(args, ctx) {
|
|
|
146
178
|
irSchemaVersion: base.irSchemaVersion,
|
|
147
179
|
commitSpread: base.commitSpread,
|
|
148
180
|
notes,
|
|
149
|
-
data: { files: [], sections: [], blockingTotal: 0, leadTotal: 0, nodeBudget },
|
|
181
|
+
data: { files: [], sections: [], blockingTotal: 0, leadTotal: 0, nodeBudget, coverage: null },
|
|
150
182
|
});
|
|
151
183
|
}
|
|
152
184
|
// Sequential rather than concurrent, deliberately: these share one SQLite
|
|
@@ -159,7 +191,7 @@ async function run(args, ctx) {
|
|
|
159
191
|
// three that were not -- the same leaked-default failure this repository's
|
|
160
192
|
// own UAT caught on a refusal path.
|
|
161
193
|
const floors = [];
|
|
162
|
-
const runOne = async (source, tool, toolArgs, pick,
|
|
194
|
+
const runOne = async (source, tool, toolArgs, pick, claimsFaults, claimOf = () => "defect") => {
|
|
163
195
|
ctx.progress(`Running ${source}`);
|
|
164
196
|
let sub;
|
|
165
197
|
try {
|
|
@@ -173,28 +205,33 @@ async function run(args, ctx) {
|
|
|
173
205
|
source,
|
|
174
206
|
state: "failed",
|
|
175
207
|
total: 0,
|
|
176
|
-
defects: 0,
|
|
177
208
|
shown: [],
|
|
178
|
-
|
|
209
|
+
claimsFaults,
|
|
210
|
+
defects: 0,
|
|
211
|
+
leads: 0,
|
|
179
212
|
headline: `${source} failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
180
213
|
});
|
|
181
|
-
return;
|
|
214
|
+
return null;
|
|
182
215
|
}
|
|
183
216
|
floors.push(sub.resolutionFloor);
|
|
184
217
|
const items = pick(sub.data);
|
|
218
|
+
// A source that does not claim anything is wrong contributes to neither
|
|
219
|
+
// count, whatever it found — the split is about fault claims, and `scope`
|
|
220
|
+
// makes none.
|
|
221
|
+
const leads = claimsFaults ? items.filter((item) => claimOf(item) === "lead").length : 0;
|
|
185
222
|
sections.push({
|
|
186
223
|
source,
|
|
187
224
|
state: sub.state,
|
|
188
225
|
total: items.length,
|
|
189
|
-
// scope and pr_analysis carry no `claim` at all — `defectsIn` reads 0 for
|
|
190
|
-
// them, which is correct: neither reports a claim that something is wrong.
|
|
191
|
-
defects: defectsIn(items),
|
|
192
226
|
shown: items.slice(0, perSource),
|
|
193
|
-
|
|
227
|
+
claimsFaults,
|
|
228
|
+
defects: claimsFaults ? items.length - leads : 0,
|
|
229
|
+
leads,
|
|
194
230
|
headline: sub.headline,
|
|
195
231
|
});
|
|
196
232
|
for (const note of sub.notes)
|
|
197
233
|
collectedNotes.push(`${source}: ${note}`);
|
|
234
|
+
return sub;
|
|
198
235
|
};
|
|
199
236
|
await runOne("scope", scopeTool, { files, trigger: "pre-push" }, (data) => listOf(data, "affected"), false);
|
|
200
237
|
if (baseRef === undefined) {
|
|
@@ -206,9 +243,10 @@ async function run(args, ctx) {
|
|
|
206
243
|
source: "pr_analysis",
|
|
207
244
|
state: "refused",
|
|
208
245
|
total: 0,
|
|
209
|
-
defects: 0,
|
|
210
246
|
shown: [],
|
|
211
|
-
|
|
247
|
+
claimsFaults: false,
|
|
248
|
+
defects: 0,
|
|
249
|
+
leads: 0,
|
|
212
250
|
headline: "pr_analysis needs a base ref to diff against and has no default. Pass \"base\" to include it.",
|
|
213
251
|
});
|
|
214
252
|
}
|
|
@@ -223,10 +261,37 @@ async function run(args, ctx) {
|
|
|
223
261
|
`${baseRef}...HEAD), not from the files given here: it takes no file list, deliberately, ` +
|
|
224
262
|
"because the diff is what defines a change to review. So its section may describe a wider " +
|
|
225
263
|
"or narrower set of files than the other three, which use the list you passed.");
|
|
226
|
-
await runOne("pr_analysis", prAnalysisTool, { base: baseRef, trigger: "pre-push" }, (data) => listOf(data, "untested"), false);
|
|
264
|
+
const pr = await runOne("pr_analysis", prAnalysisTool, { base: baseRef, trigger: "pre-push" }, (data) => listOf(data, "untested"), false);
|
|
265
|
+
if (pr !== null) {
|
|
266
|
+
// The comparison is against the list `pr_analysis` itself reports, not a
|
|
267
|
+
// second diff computed here. Two git calls answering the same question
|
|
268
|
+
// is how they come to disagree.
|
|
269
|
+
const inDiff = new Set(listOf(pr.data, "files").filter((f) => typeof f === "string"));
|
|
270
|
+
const outside = files.filter((file) => !inDiff.has(file));
|
|
271
|
+
// A failure here must not take the other three constituents with it —
|
|
272
|
+
// the rule this file already states for a constituent, applied to the
|
|
273
|
+
// caveat about one. Without the classification the reply still reports
|
|
274
|
+
// which files the coverage section did not describe; it just cannot say
|
|
275
|
+
// that the reason was timing.
|
|
276
|
+
let uncommitted = [];
|
|
277
|
+
try {
|
|
278
|
+
uncommitted = await uncommittedAmong(ctx.session.repoPath, outside);
|
|
279
|
+
}
|
|
280
|
+
catch (error) {
|
|
281
|
+
if (outside.length > 0) {
|
|
282
|
+
notes.push(`${outside.length} file(s) you passed are not in ${baseRef}...HEAD, and git could ` +
|
|
283
|
+
`not be asked whether that is because they are uncommitted: ` +
|
|
284
|
+
`${error.message.trim()}. They are listed in coverage.filesOutsideDiff.`);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
coverage = {
|
|
288
|
+
describes: `${baseRef}...HEAD`,
|
|
289
|
+
filesOutsideDiff: outside,
|
|
290
|
+
uncommitted,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
227
293
|
}
|
|
228
294
|
await runOne("contracts", contractsTool,
|
|
229
|
-
// pathsOnly is what the pre-push tier means for a tool with no traversal to
|
|
230
295
|
// budget — see the module header. `files` is UAT round 3, B11: without it,
|
|
231
296
|
// contracts compared the whole graph and this section's total was the
|
|
232
297
|
// repository's standing backlog, not the change being pushed.
|
|
@@ -234,14 +299,14 @@ async function run(args, ctx) {
|
|
|
234
299
|
// shapeMismatches is always empty under pathsOnly, but folded in anyway
|
|
235
300
|
// rather than assumed empty — a future call that drops pathsOnly should
|
|
236
301
|
// not silently under-count defects here.
|
|
237
|
-
(data) => [...listOf(data, "findings"), ...listOf(data, "shapeMismatches")], true);
|
|
238
|
-
await runOne("validate", validateTool, { files, maxFindings: VALIDATE_MAX_FINDINGS }, (data) => listOf(data, "findings"), true);
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
302
|
+
(data) => [...listOf(data, "findings"), ...listOf(data, "shapeMismatches")], true, claimOf);
|
|
303
|
+
await runOne("validate", validateTool, { files, maxFindings: VALIDATE_MAX_FINDINGS }, (data) => listOf(data, "findings"), true, claimOf);
|
|
304
|
+
// Each section already reports 0/0 for both when it does not claim faults
|
|
305
|
+
// (`claimsFaults: false`), so summing `defects`/`leads` across every section
|
|
306
|
+
// needs no separate filter — the split already happened when the section was
|
|
307
|
+
// built.
|
|
308
|
+
const blockingTotal = sections.reduce((sum, section) => sum + section.defects, 0);
|
|
309
|
+
const leadTotal = sections.reduce((sum, section) => sum + section.leads, 0);
|
|
245
310
|
const failed = sections.filter((section) => section.state === "failed");
|
|
246
311
|
if (failed.length > 0) {
|
|
247
312
|
notes.push(`${failed.length} of 4 constituent(s) failed and contributed nothing: ` +
|
|
@@ -249,20 +314,18 @@ async function run(args, ctx) {
|
|
|
249
314
|
"reply is not.");
|
|
250
315
|
}
|
|
251
316
|
return answer({
|
|
252
|
-
headline:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
"review — see the contracts and validate sections."
|
|
259
|
-
: `No contract or environment findings across ${files.length} changed file(s).`,
|
|
317
|
+
headline: coverageWarning(files, coverage) +
|
|
318
|
+
(blockingTotal === 0 && leadTotal === 0
|
|
319
|
+
? `No contract or environment findings across ${files.length} changed file(s).`
|
|
320
|
+
: `${blockingTotal} defect(s) and ${leadTotal} lead(s) across ${files.length} changed ` +
|
|
321
|
+
"file(s) — only the defects assert that something is wrong. See the contracts and " +
|
|
322
|
+
"validate sections."),
|
|
260
323
|
// `empty` is earned here: all four ran against a real graph and found
|
|
261
324
|
// nothing at all, blocking or not. A constituent that refused makes that
|
|
262
325
|
// untrue, so the state follows the weakest link rather than the happy
|
|
263
326
|
// path — and a lead is still something found, so it is `ok`, not `empty`.
|
|
264
|
-
state: failed.length > 0 ? "failed" : blockingTotal
|
|
265
|
-
data: { files, sections, blockingTotal, leadTotal, nodeBudget },
|
|
327
|
+
state: failed.length > 0 ? "failed" : blockingTotal + leadTotal > 0 ? "ok" : "empty",
|
|
328
|
+
data: { files, sections, blockingTotal, leadTotal, nodeBudget, coverage },
|
|
266
329
|
resolutionFloor: (floors.length === 0 ? 0 : Math.min(...floors)),
|
|
267
330
|
nameLevel: true,
|
|
268
331
|
commitSha: base.commitSha,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pre-push.js","sourceRoot":"","sources":["../../src/tools/pre-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pre-push.js","sourceRoot":"","sources":["../../src/tools/pre-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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