@descryy/mcp 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +121 -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 +12 -19
- package/dist/browser/fake-driver.d.ts.map +1 -1
- package/dist/browser/fake-driver.js +31 -26
- 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 +59 -197
- 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-provenance.d.ts +23 -0
- package/dist/browser/scenario-provenance.d.ts.map +1 -0
- package/dist/browser/scenario-provenance.js +59 -0
- package/dist/browser/scenario-provenance.js.map +1 -0
- 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 +37 -58
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +88 -96
- package/dist/registry.js.map +1 -1
- package/dist/render.d.ts +89 -13
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +111 -16
- 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 +69 -19
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +90 -259
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +136 -250
- package/dist/session.js.map +1 -1
- package/dist/tools/analyze.d.ts +32 -118
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +65 -186
- 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 +47 -84
- 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 +145 -56
- 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 +273 -434
- 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 +74 -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 +74 -16
- package/dist/tools/pre-push.d.ts.map +1 -1
- package/dist/tools/pre-push.js +152 -51
- 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 +17 -58
- 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 +29 -70
- package/dist/tools/validate.d.ts.map +1 -1
- package/dist/tools/validate.js +141 -85
- 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 +40 -22
package/dist/tools/pre-push.js
CHANGED
|
@@ -66,9 +66,9 @@
|
|
|
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
|
-
import { answer, optionalInteger, optionalString, optionalStringArray, } from "./kit.js";
|
|
71
|
+
import { answer, optionalBoolean, optionalEnum, optionalInteger, optionalString, optionalStringArray, ToolInputError, } from "./kit.js";
|
|
72
72
|
import { prAnalysisTool } from "./pr-analysis.js";
|
|
73
73
|
import { scopeTool } from "./scope.js";
|
|
74
74
|
import { validateTool } from "./validate.js";
|
|
@@ -76,6 +76,7 @@ import { validateTool } from "./validate.js";
|
|
|
76
76
|
const PER_SOURCE = 3;
|
|
77
77
|
/** `validate`'s own default is 25; a blocked developer reads far fewer. */
|
|
78
78
|
const VALIDATE_MAX_FINDINGS = 10;
|
|
79
|
+
const WORKING_TREE_SCOPES = ["unstaged", "staged", "all"];
|
|
79
80
|
const SCHEMA = {
|
|
80
81
|
type: "object",
|
|
81
82
|
properties: {
|
|
@@ -87,9 +88,23 @@ const SCHEMA = {
|
|
|
87
88
|
},
|
|
88
89
|
base: {
|
|
89
90
|
type: "string",
|
|
90
|
-
description: "Git ref to compare against, three-dot
|
|
91
|
-
"
|
|
92
|
-
"three still run.",
|
|
91
|
+
description: "Git ref to compare against, three-dot, for the pr_analysis section. Mutually exclusive " +
|
|
92
|
+
"with \"workingTree\" — pass one or neither, never both. Without either, pr_analysis has no " +
|
|
93
|
+
"defensible default and is reported as refused; the other three sections still run.",
|
|
94
|
+
},
|
|
95
|
+
workingTree: {
|
|
96
|
+
type: "string",
|
|
97
|
+
enum: [...WORKING_TREE_SCOPES],
|
|
98
|
+
description: "Forwarded to the pr_analysis section: review it against the working tree as it stands, " +
|
|
99
|
+
"uncommitted, rather than a ref range — precisely the change set a pre-push gate exists to " +
|
|
100
|
+
"check. \"all\" is staged and unstaged together. Mutually exclusive with \"base\" — pass one " +
|
|
101
|
+
"or neither, never both. Unlike \"base\", this is never guessed on your behalf either: with " +
|
|
102
|
+
"neither given, pr_analysis is reported as refused, same as before.",
|
|
103
|
+
},
|
|
104
|
+
includeUntracked: {
|
|
105
|
+
type: "boolean",
|
|
106
|
+
description: "With \"workingTree\", forwarded to the pr_analysis section to include files git has never " +
|
|
107
|
+
"seen. On by default, matching pr_analysis's own default. Ignored without \"workingTree\".",
|
|
93
108
|
},
|
|
94
109
|
perSource: {
|
|
95
110
|
type: "integer",
|
|
@@ -113,14 +128,58 @@ function listOf(data, key) {
|
|
|
113
128
|
const value = data[key];
|
|
114
129
|
return Array.isArray(value) ? value : [];
|
|
115
130
|
}
|
|
116
|
-
/**
|
|
117
|
-
|
|
118
|
-
|
|
131
|
+
/**
|
|
132
|
+
* A finding's own claim, defaulting to `defect` when it carries none.
|
|
133
|
+
*
|
|
134
|
+
* The default is deliberate and it is the safe direction: a source that has not
|
|
135
|
+
* yet been taught the distinction has its findings counted as fault claims, so
|
|
136
|
+
* adding a check can never silently stop blocking a push. The opposite default
|
|
137
|
+
* would turn every un-migrated source into a source of leads overnight.
|
|
138
|
+
*/
|
|
139
|
+
function claimOf(item) {
|
|
140
|
+
return typeof item === "object" &&
|
|
141
|
+
item !== null &&
|
|
142
|
+
item["claim"] === "lead"
|
|
143
|
+
? "lead"
|
|
144
|
+
: "defect";
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The leading clause, when the coverage section is about a different change set.
|
|
148
|
+
*
|
|
149
|
+
* **First, not in a footnote.** This mismatch has always been disclosed, and
|
|
150
|
+
* the disclosure sat underneath a headline and a section total that both read
|
|
151
|
+
* as if they described the files passed. A reader who stops at the headline —
|
|
152
|
+
* which is what a headline is for — got a confident sentence about the wrong
|
|
153
|
+
* work. Ordering is the whole fix.
|
|
154
|
+
*
|
|
155
|
+
* Empty when it does not apply, because a caveat printed on every run is one a
|
|
156
|
+
* reader learns to skip past on the run where it matters.
|
|
157
|
+
*/
|
|
158
|
+
function coverageWarning(files, coverage) {
|
|
159
|
+
if (coverage === null || coverage.uncommitted.length === 0)
|
|
160
|
+
return "";
|
|
161
|
+
const n = coverage.uncommitted.length;
|
|
162
|
+
return (`${n} of ${files.length} file(s) are uncommitted, so the pr_analysis section (${coverage.describes}) ` +
|
|
163
|
+
"does not describe them. " +
|
|
164
|
+
"The other three sections describe the files you passed. ");
|
|
119
165
|
}
|
|
120
166
|
async function run(args, ctx) {
|
|
121
167
|
const files = optionalStringArray(args, "files") ?? [];
|
|
168
|
+
let coverage = null;
|
|
122
169
|
const perSource = optionalInteger(args, "perSource", 1) ?? PER_SOURCE;
|
|
123
170
|
const baseRef = optionalString(args, "base");
|
|
171
|
+
const workingTreeArg = optionalEnum(args, "workingTree", WORKING_TREE_SCOPES);
|
|
172
|
+
const includeUntracked = optionalBoolean(args, "includeUntracked");
|
|
173
|
+
// Validated at this tool's own boundary, before any section is dispatched.
|
|
174
|
+
// pr_analysis enforces the identical rule, but letting it throw from inside
|
|
175
|
+
// a section call would turn one bad argument combination into a "failed"
|
|
176
|
+
// envelope over all four constituents, when the actual problem is nothing
|
|
177
|
+
// any of scope/contracts/validate had a chance to answer about — it never
|
|
178
|
+
// got that far.
|
|
179
|
+
if (baseRef !== undefined && workingTreeArg !== undefined) {
|
|
180
|
+
throw new ToolInputError('"base" and "workingTree" are mutually exclusive, for pr_analysis just as much as here — pass ' +
|
|
181
|
+
"one or neither, never both.");
|
|
182
|
+
}
|
|
124
183
|
const base = ctx.session.provider().baseStamp();
|
|
125
184
|
const nodeBudget = NODE_BUDGETS["pre-push"];
|
|
126
185
|
const notes = [
|
|
@@ -146,7 +205,7 @@ async function run(args, ctx) {
|
|
|
146
205
|
irSchemaVersion: base.irSchemaVersion,
|
|
147
206
|
commitSpread: base.commitSpread,
|
|
148
207
|
notes,
|
|
149
|
-
data: { files: [], sections: [], blockingTotal: 0, leadTotal: 0, nodeBudget },
|
|
208
|
+
data: { files: [], sections: [], blockingTotal: 0, leadTotal: 0, nodeBudget, coverage: null },
|
|
150
209
|
});
|
|
151
210
|
}
|
|
152
211
|
// Sequential rather than concurrent, deliberately: these share one SQLite
|
|
@@ -159,7 +218,7 @@ async function run(args, ctx) {
|
|
|
159
218
|
// three that were not -- the same leaked-default failure this repository's
|
|
160
219
|
// own UAT caught on a refusal path.
|
|
161
220
|
const floors = [];
|
|
162
|
-
const runOne = async (source, tool, toolArgs, pick,
|
|
221
|
+
const runOne = async (source, tool, toolArgs, pick, claimsFaults, claimOf = () => "defect") => {
|
|
163
222
|
ctx.progress(`Running ${source}`);
|
|
164
223
|
let sub;
|
|
165
224
|
try {
|
|
@@ -173,60 +232,104 @@ async function run(args, ctx) {
|
|
|
173
232
|
source,
|
|
174
233
|
state: "failed",
|
|
175
234
|
total: 0,
|
|
176
|
-
defects: 0,
|
|
177
235
|
shown: [],
|
|
178
|
-
|
|
236
|
+
claimsFaults,
|
|
237
|
+
defects: 0,
|
|
238
|
+
leads: 0,
|
|
179
239
|
headline: `${source} failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
180
240
|
});
|
|
181
|
-
return;
|
|
241
|
+
return null;
|
|
182
242
|
}
|
|
183
243
|
floors.push(sub.resolutionFloor);
|
|
184
244
|
const items = pick(sub.data);
|
|
245
|
+
// A source that does not claim anything is wrong contributes to neither
|
|
246
|
+
// count, whatever it found — the split is about fault claims, and `scope`
|
|
247
|
+
// makes none.
|
|
248
|
+
const leads = claimsFaults ? items.filter((item) => claimOf(item) === "lead").length : 0;
|
|
185
249
|
sections.push({
|
|
186
250
|
source,
|
|
187
251
|
state: sub.state,
|
|
188
252
|
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
253
|
shown: items.slice(0, perSource),
|
|
193
|
-
|
|
254
|
+
claimsFaults,
|
|
255
|
+
defects: claimsFaults ? items.length - leads : 0,
|
|
256
|
+
leads,
|
|
194
257
|
headline: sub.headline,
|
|
195
258
|
});
|
|
196
259
|
for (const note of sub.notes)
|
|
197
260
|
collectedNotes.push(`${source}: ${note}`);
|
|
261
|
+
return sub;
|
|
198
262
|
};
|
|
199
263
|
await runOne("scope", scopeTool, { files, trigger: "pre-push" }, (data) => listOf(data, "affected"), false);
|
|
200
|
-
if (baseRef === undefined) {
|
|
264
|
+
if (baseRef === undefined && workingTreeArg === undefined) {
|
|
201
265
|
// Reported, not skipped silently, and not as a failure either: pr_analysis
|
|
202
|
-
// requires
|
|
203
|
-
// defensible default base"). Borrowing this tool's own working-tree
|
|
204
|
-
// would manufacture exactly the guess that tool declines to make
|
|
266
|
+
// requires one of the two and deliberately refuses to invent either ("there
|
|
267
|
+
// is no defensible default base"). Borrowing this tool's own working-tree
|
|
268
|
+
// default would manufacture exactly the guess that tool declines to make —
|
|
269
|
+
// which is why "workingTree" unblocks this section only when the caller
|
|
270
|
+
// passes it explicitly, never as a fallback picked on their behalf.
|
|
205
271
|
sections.push({
|
|
206
272
|
source: "pr_analysis",
|
|
207
273
|
state: "refused",
|
|
208
274
|
total: 0,
|
|
209
|
-
defects: 0,
|
|
210
275
|
shown: [],
|
|
211
|
-
|
|
212
|
-
|
|
276
|
+
claimsFaults: false,
|
|
277
|
+
defects: 0,
|
|
278
|
+
leads: 0,
|
|
279
|
+
headline: 'pr_analysis needs either "base" or "workingTree" to know what to diff, and has no default ' +
|
|
280
|
+
'for either. Pass one to include this section.',
|
|
213
281
|
});
|
|
214
282
|
}
|
|
215
283
|
else {
|
|
284
|
+
const subject = baseRef !== undefined ? `${baseRef}...HEAD` : `the working tree (${workingTreeArg})`;
|
|
216
285
|
// Stated because it is not obvious and it was not obvious in a real run:
|
|
217
286
|
// called with two files and a three-commit base, the envelope said "across
|
|
218
287
|
// 2 changed file(s)" while this section said "across 25". Both are right --
|
|
219
|
-
// pr_analysis takes no file list, by design, and derives its own from
|
|
220
|
-
//
|
|
221
|
-
// side read as one answer about one change
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
"
|
|
226
|
-
|
|
288
|
+
// pr_analysis takes no file list, by design, and derives its own from the
|
|
289
|
+
// diff (a ref range, or the working tree) -- but two sections describing
|
|
290
|
+
// different change sets side by side read as one answer about one change
|
|
291
|
+
// unless the reply says otherwise.
|
|
292
|
+
notes.push(`pr_analysis scopes itself from ${baseRef !== undefined ? "the base diff" : "the working tree"} ` +
|
|
293
|
+
`(${subject}), not from the files given here: it takes no file list, deliberately, because ` +
|
|
294
|
+
"the diff is what defines a change to review. So its section may describe a wider or " +
|
|
295
|
+
"narrower set of files than the other three, which use the list you passed.");
|
|
296
|
+
const pr = await runOne("pr_analysis", prAnalysisTool, baseRef !== undefined
|
|
297
|
+
? { base: baseRef, trigger: "pre-push" }
|
|
298
|
+
: {
|
|
299
|
+
workingTree: workingTreeArg,
|
|
300
|
+
trigger: "pre-push",
|
|
301
|
+
...(includeUntracked === undefined ? {} : { includeUntracked }),
|
|
302
|
+
}, (data) => listOf(data, "untested"), false);
|
|
303
|
+
if (pr !== null) {
|
|
304
|
+
// The comparison is against the list `pr_analysis` itself reports, not a
|
|
305
|
+
// second diff computed here. Two git calls answering the same question
|
|
306
|
+
// is how they come to disagree.
|
|
307
|
+
const inDiff = new Set(listOf(pr.data, "files").filter((f) => typeof f === "string"));
|
|
308
|
+
const outside = files.filter((file) => !inDiff.has(file));
|
|
309
|
+
// A failure here must not take the other three constituents with it —
|
|
310
|
+
// the rule this file already states for a constituent, applied to the
|
|
311
|
+
// caveat about one. Without the classification the reply still reports
|
|
312
|
+
// which files the coverage section did not describe; it just cannot say
|
|
313
|
+
// that the reason was timing.
|
|
314
|
+
let uncommitted = [];
|
|
315
|
+
try {
|
|
316
|
+
uncommitted = await uncommittedAmong(ctx.session.repoPath, outside);
|
|
317
|
+
}
|
|
318
|
+
catch (error) {
|
|
319
|
+
if (outside.length > 0) {
|
|
320
|
+
notes.push(`${outside.length} file(s) you passed are not in ${subject}, and git could ` +
|
|
321
|
+
`not be asked whether that is because they are uncommitted: ` +
|
|
322
|
+
`${error.message.trim()}. They are listed in coverage.filesOutsideDiff.`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
coverage = {
|
|
326
|
+
describes: subject,
|
|
327
|
+
filesOutsideDiff: outside,
|
|
328
|
+
uncommitted,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
227
331
|
}
|
|
228
332
|
await runOne("contracts", contractsTool,
|
|
229
|
-
// pathsOnly is what the pre-push tier means for a tool with no traversal to
|
|
230
333
|
// budget — see the module header. `files` is UAT round 3, B11: without it,
|
|
231
334
|
// contracts compared the whole graph and this section's total was the
|
|
232
335
|
// repository's standing backlog, not the change being pushed.
|
|
@@ -234,14 +337,14 @@ async function run(args, ctx) {
|
|
|
234
337
|
// shapeMismatches is always empty under pathsOnly, but folded in anyway
|
|
235
338
|
// rather than assumed empty — a future call that drops pathsOnly should
|
|
236
339
|
// 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
|
-
|
|
340
|
+
(data) => [...listOf(data, "findings"), ...listOf(data, "shapeMismatches")], true, claimOf);
|
|
341
|
+
await runOne("validate", validateTool, { files, maxFindings: VALIDATE_MAX_FINDINGS }, (data) => listOf(data, "findings"), true, claimOf);
|
|
342
|
+
// Each section already reports 0/0 for both when it does not claim faults
|
|
343
|
+
// (`claimsFaults: false`), so summing `defects`/`leads` across every section
|
|
344
|
+
// needs no separate filter — the split already happened when the section was
|
|
345
|
+
// built.
|
|
346
|
+
const blockingTotal = sections.reduce((sum, section) => sum + section.defects, 0);
|
|
347
|
+
const leadTotal = sections.reduce((sum, section) => sum + section.leads, 0);
|
|
245
348
|
const failed = sections.filter((section) => section.state === "failed");
|
|
246
349
|
if (failed.length > 0) {
|
|
247
350
|
notes.push(`${failed.length} of 4 constituent(s) failed and contributed nothing: ` +
|
|
@@ -249,20 +352,18 @@ async function run(args, ctx) {
|
|
|
249
352
|
"reply is not.");
|
|
250
353
|
}
|
|
251
354
|
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).`,
|
|
355
|
+
headline: coverageWarning(files, coverage) +
|
|
356
|
+
(blockingTotal === 0 && leadTotal === 0
|
|
357
|
+
? `No contract or environment findings across ${files.length} changed file(s).`
|
|
358
|
+
: `${blockingTotal} defect(s) and ${leadTotal} lead(s) across ${files.length} changed ` +
|
|
359
|
+
"file(s) — only the defects assert that something is wrong. See the contracts and " +
|
|
360
|
+
"validate sections."),
|
|
260
361
|
// `empty` is earned here: all four ran against a real graph and found
|
|
261
362
|
// nothing at all, blocking or not. A constituent that refused makes that
|
|
262
363
|
// untrue, so the state follows the weakest link rather than the happy
|
|
263
364
|
// 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 },
|
|
365
|
+
state: failed.length > 0 ? "failed" : blockingTotal + leadTotal > 0 ? "ok" : "empty",
|
|
366
|
+
data: { files, sections, blockingTotal, leadTotal, nodeBudget, coverage },
|
|
266
367
|
resolutionFloor: (floors.length === 0 ? 0 : Math.min(...floors)),
|
|
267
368
|
nameLevel: true,
|
|
268
369
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,MAAM,EACN,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,cAAc,GAGf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,gGAAgG;AAChG,MAAM,UAAU,GAAG,CAAC,CAAC;AAErB,2EAA2E;AAC3E,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAEnE,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,yFAAyF;gBACzF,uFAAuF;SAC1F;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,yFAAyF;gBACzF,6FAA6F;gB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CAAC,GAAG,KAAK,EAAE,GAAG,cAAc,CAAC;KACrC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,uDAAuD;IAC9D,WAAW,EACT,8FAA8F;QAC9F,gGAAgG;QAChG,iGAAiG;QACjG,iGAAiG;QACjG,iGAAiG;QACjG,iGAAiG;QACjG,+FAA+F;QAC/F,yEAAyE;IAC3E,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
|
@@ -1,38 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `propagation` —
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* **Field-level propagation requires R3.** §11A.6 is explicit: propagation
|
|
8
|
-
* compares *shapes*, not names, and shapes are what a type checker buys. Below
|
|
9
|
-
* R3 this query still returns something useful — the paths data *can* travel —
|
|
10
|
-
* but "where the `currency` field ends up" and "which functions this value can
|
|
11
|
-
* reach" are different claims, and only the second is provable at R2. The query
|
|
12
|
-
* layer already computes the floor and writes the note; this tool's job is to
|
|
13
|
-
* make sure a caller cannot receive the answer without it, and to refuse to
|
|
14
|
-
* dress a path-level answer up as a field-level one in its headline.
|
|
15
|
-
*
|
|
16
|
-
* ## The empty answer is several different answers
|
|
17
|
-
*
|
|
18
|
-
* The resolution guard above was the only guard here, and it protects the
|
|
19
|
-
* *quality* of a non-empty answer. It says nothing about an empty one.
|
|
20
|
-
*
|
|
21
|
-
* **`PROPAGATES_TO` has no producer.** No adapter emits it, and it is the first
|
|
22
|
-
* of the four edge types this walk follows — five of §11.5's six hops are that
|
|
23
|
-
* type. So on a real graph this tool returned `reached: []` and a headline
|
|
24
|
-
* reading *"X can reach 0 node(s)"*: a user asks what propagates and is told
|
|
25
|
-
* nothing propagates. That is §20.2's fourth category collapsing into its
|
|
26
|
-
* second, in the user-facing surface rather than in an instrument, and it is
|
|
27
|
-
* the same defect `hidden-dependency.ts` carries `analysed` for.
|
|
28
|
-
*
|
|
29
|
-
* So an empty walk is now attributed rather than reported. The tool probes the
|
|
30
|
-
* edges incident to the start node and reports which of the requested types it
|
|
31
|
-
* found. **It deliberately does not claim which cause applies** — a local probe
|
|
32
|
-
* cannot separate *no producer emits this edge type* from *this node has none
|
|
33
|
-
* of them*, and guessing between them would be the same overreach one level
|
|
34
|
-
* down. It names the candidates and says it cannot choose.
|
|
35
|
-
*/
|
|
2
|
+
* `propagation` — §11.9 data-flow query. Field-level answers require R3 (§11A.6:
|
|
3
|
+
* shapes need a type checker); below R3, path-level only, labelled as such.
|
|
4
|
+
* `PROPAGATES_TO` has no producer today — an empty walk is attributed (edge
|
|
5
|
+
* types actually present near the node), never reported as "reaches 0 nodes". */
|
|
36
6
|
import { type BriefNode, type NodeCandidates, type ToolDefinition } from "./kit.ts";
|
|
37
7
|
/** A node the data can reach, with how far along the walk it sits. */
|
|
38
8
|
export interface ReachedNode extends BriefNode {
|
|
@@ -44,31 +14,19 @@ export interface PropagationReport {
|
|
|
44
14
|
/** Capped by `limit`; `reachedTotal` is the uncapped count. */
|
|
45
15
|
readonly reached: readonly ReachedNode[];
|
|
46
16
|
readonly reachedTotal: number;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* False means the answer is *where data can flow*, not *which field arrives
|
|
51
|
-
* where* — the second compares shapes and shapes need a type checker.
|
|
52
|
-
*/
|
|
17
|
+
/** True only at R3+. False means "where data can flow", not "which field arrives
|
|
18
|
+
* where" — the latter compares shapes, needing a type checker. */
|
|
53
19
|
readonly fieldLevel: boolean;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* **An empty `reached` with `analysed: false` means the walk did not run**,
|
|
58
|
-
* not that nothing propagates. `PROPAGATES_TO` has no producer today, so
|
|
59
|
-
* this is the common case rather than the exotic one.
|
|
60
|
-
*/
|
|
20
|
+
/** False when no edge of any walked type touches the start node. Empty `reached`
|
|
21
|
+
* with `analysed: false` means the walk didn't run, not that nothing propagates —
|
|
22
|
+
* the common case, since `PROPAGATES_TO` has no producer today. */
|
|
61
23
|
readonly analysed: boolean;
|
|
62
24
|
readonly edgeTypesWalked: readonly string[];
|
|
63
25
|
/** The subset of `edgeTypesWalked` actually found on an edge touching this node. */
|
|
64
26
|
readonly edgeTypesPresent: readonly string[];
|
|
65
27
|
}
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* `NodeCandidates` arrives when the symbol did not resolve to exactly one
|
|
70
|
-
* node, and nothing was walked.
|
|
71
|
-
*/
|
|
28
|
+
/** One call, two shapes — narrow on `"from" in data`. `NodeCandidates` arrives when
|
|
29
|
+
* the symbol didn't resolve to exactly one node, and nothing was walked. */
|
|
72
30
|
export type PropagationData = PropagationReport | NodeCandidates;
|
|
73
31
|
export declare const propagationTool: ToolDefinition;
|
|
74
32
|
//# sourceMappingURL=propagation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propagation.d.ts","sourceRoot":"","sources":["../../src/tools/propagation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"propagation.d.ts","sourceRoot":"","sources":["../../src/tools/propagation.ts"],"names":[],"mappings":"AAAA;;;;iFAIiF;AAIjF,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB,sEAAsE;AACtE,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;uEACmE;IACnE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;wEAEoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,oFAAoF;IACpF,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C;AAED;6EAC6E;AAC7E,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,cAAc,CAAC;AA4JjE,eAAO,MAAM,eAAe,EAAE,cAY7B,CAAC"}
|
|
@@ -1,38 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `propagation` —
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* **Field-level propagation requires R3.** §11A.6 is explicit: propagation
|
|
8
|
-
* compares *shapes*, not names, and shapes are what a type checker buys. Below
|
|
9
|
-
* R3 this query still returns something useful — the paths data *can* travel —
|
|
10
|
-
* but "where the `currency` field ends up" and "which functions this value can
|
|
11
|
-
* reach" are different claims, and only the second is provable at R2. The query
|
|
12
|
-
* layer already computes the floor and writes the note; this tool's job is to
|
|
13
|
-
* make sure a caller cannot receive the answer without it, and to refuse to
|
|
14
|
-
* dress a path-level answer up as a field-level one in its headline.
|
|
15
|
-
*
|
|
16
|
-
* ## The empty answer is several different answers
|
|
17
|
-
*
|
|
18
|
-
* The resolution guard above was the only guard here, and it protects the
|
|
19
|
-
* *quality* of a non-empty answer. It says nothing about an empty one.
|
|
20
|
-
*
|
|
21
|
-
* **`PROPAGATES_TO` has no producer.** No adapter emits it, and it is the first
|
|
22
|
-
* of the four edge types this walk follows — five of §11.5's six hops are that
|
|
23
|
-
* type. So on a real graph this tool returned `reached: []` and a headline
|
|
24
|
-
* reading *"X can reach 0 node(s)"*: a user asks what propagates and is told
|
|
25
|
-
* nothing propagates. That is §20.2's fourth category collapsing into its
|
|
26
|
-
* second, in the user-facing surface rather than in an instrument, and it is
|
|
27
|
-
* the same defect `hidden-dependency.ts` carries `analysed` for.
|
|
28
|
-
*
|
|
29
|
-
* So an empty walk is now attributed rather than reported. The tool probes the
|
|
30
|
-
* edges incident to the start node and reports which of the requested types it
|
|
31
|
-
* found. **It deliberately does not claim which cause applies** — a local probe
|
|
32
|
-
* cannot separate *no producer emits this edge type* from *this node has none
|
|
33
|
-
* of them*, and guessing between them would be the same overreach one level
|
|
34
|
-
* down. It names the candidates and says it cannot choose.
|
|
35
|
-
*/
|
|
2
|
+
* `propagation` — §11.9 data-flow query. Field-level answers require R3 (§11A.6:
|
|
3
|
+
* shapes need a type checker); below R3, path-level only, labelled as such.
|
|
4
|
+
* `PROPAGATES_TO` has no producer today — an empty walk is attributed (edge
|
|
5
|
+
* types actually present near the node), never reported as "reaches 0 nodes". */
|
|
36
6
|
import { dataFlowFrom, DATA_FLOW_EDGE_TYPES } from "@descryy/core";
|
|
37
7
|
import { answer, briefNode, optionalInteger, optionalString, optionalStringArray, ToolInputError, } from "./kit.js";
|
|
38
8
|
import { resolveOneNode } from "./lookup.js";
|
|
@@ -53,7 +23,9 @@ const SCHEMA = {
|
|
|
53
23
|
type: "array",
|
|
54
24
|
items: { type: "string" },
|
|
55
25
|
description: "Restrict the walk. Defaults to PROPAGATES_TO, READS, WRITES and RETURNS — the four that " +
|
|
56
|
-
"carry data rather than control."
|
|
26
|
+
"carry data rather than control. PROPAGATES_TO has no producer in any shipped adapter " +
|
|
27
|
+
"today, so in practice this walk runs over the other three; an empty result is disclosed " +
|
|
28
|
+
"as such rather than reported as \"reaches 0 nodes\".",
|
|
57
29
|
},
|
|
58
30
|
maxDepth: { type: "integer", minimum: 1, description: "Hop limit. Default unbounded." },
|
|
59
31
|
limit: {
|
|
@@ -104,10 +76,8 @@ async function run(args, ctx) {
|
|
|
104
76
|
notes.push(`${reached.length - shown.length} further node(s) are on the path but not listed — the reply ` +
|
|
105
77
|
`is capped at ${limit}.`);
|
|
106
78
|
}
|
|
107
|
-
// Which
|
|
108
|
-
//
|
|
109
|
-
// to follow, and "reaches 0 nodes" is a statement about the graph's contents
|
|
110
|
-
// rather than about this symbol.
|
|
79
|
+
// Which walked edge types exist around the start node — the baseline precondition.
|
|
80
|
+
// None present means "reaches 0 nodes" is a statement about the graph, not the symbol.
|
|
111
81
|
const walked = edgeTypes ?? DATA_FLOW_EDGE_TYPES;
|
|
112
82
|
const present = new Set();
|
|
113
83
|
for (const edge of [
|
|
@@ -144,12 +114,8 @@ async function run(args, ctx) {
|
|
|
144
114
|
})),
|
|
145
115
|
reachedTotal: reached.length,
|
|
146
116
|
fieldLevel,
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* **An empty `reached` with `analysed: false` means the walk did not
|
|
151
|
-
* run, not that nothing propagates.** Mirrors `HiddenDependencyReport`.
|
|
152
|
-
*/
|
|
117
|
+
/** False when no edge of any walked type touches the start node — empty
|
|
118
|
+
* `reached` with this false means the walk didn't run. Mirrors `HiddenDependencyReport`. */
|
|
153
119
|
analysed,
|
|
154
120
|
edgeTypesWalked: walked,
|
|
155
121
|
edgeTypesPresent: [...present].sort(),
|
|
@@ -157,20 +123,13 @@ async function run(args, ctx) {
|
|
|
157
123
|
notes,
|
|
158
124
|
},
|
|
159
125
|
...(analysed ? (reached.length === 0 ? { state: "empty" } : {}) : { state: "refused" }),
|
|
160
|
-
// Never name-level
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
// single assertions about existence: a missing environment variable, a
|
|
164
|
-
// migration head. This tool's claim is that *data* travels a route, and data
|
|
165
|
-
// is a shape concern by nature: a `PROPAGATES_TO` edge derived without a
|
|
166
|
-
// type checker is a weaker fact than the resolved reference underneath it.
|
|
167
|
-
// So R3 and R4 reach A on their own merits and R2 is capped at B, which is
|
|
168
|
-
// the conservative reading and the one "when in doubt, understate" picks.
|
|
126
|
+
// Never name-level — §11A.5's R2/class-A carve-out is for existence facts (a
|
|
127
|
+
// missing env var), not a data-flow shape claim. R2 stays capped at B here;
|
|
128
|
+
// only R3/R4 reach A, the conservative "when in doubt, understate" reading.
|
|
169
129
|
nameLevel: false,
|
|
170
|
-
// The headline is
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
// notes say.
|
|
130
|
+
// The headline is what a user acts on — not-analysable gets its own sentence
|
|
131
|
+
// rather than reusing "reaches 0 node(s)" with a note beneath it (a zero in the
|
|
132
|
+
// headline reads as a measurement regardless of the notes).
|
|
174
133
|
headline: !analysed
|
|
175
134
|
? `Data flow out of ${found.node.name} was not analysed: the graph holds no ` +
|
|
176
135
|
`${walked.join("/")} edge touching it. This is not a finding that nothing propagates.`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propagation.js","sourceRoot":"","sources":["../../src/tools/propagation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"propagation.js","sourceRoot":"","sources":["../../src/tools/propagation.ts"],"names":[],"mappings":"AAAA;;;;iFAIiF;AAEjF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EACL,MAAM,EACN,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,cAAc,GAKf,MAAM,UAAU,CAAC;AA6BlB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;QACvE,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0FAA0F;gBAC1F,4CAA4C;SAC/C;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+EAA+E;SAC7F;Q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