@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAU,eAAe,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAIL,KAAK,SAAS,EAEd,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,yGAAyG;IACzG,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,sGAAsG;IACtG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8JAA8J;IAC9J,QAAQ,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,gKAAgK;IAChK,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;KAAE,CAAC;IACnF,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;IACvC,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EA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ACzB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAiND,eAAO,MAAM,aAAa,EAAE,cAe3B,CAAC"}
|
package/dist/tools/contracts.js
CHANGED
|
@@ -1,45 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `contracts` —
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* **The path half runs today.** A call that reaches no route, a route nothing
|
|
7
|
-
* calls. Name-level facts, so R2 evidence supports them at class A.
|
|
8
|
-
*
|
|
9
|
-
* **The shape half needs both producers to attach something they do not attach
|
|
10
|
-
* yet**, and it names exactly what — see `engine.ts`. It reports
|
|
11
|
-
* `refused` with those names rather than an empty mismatch list, because
|
|
12
|
-
* "no contract mismatches found" is a false statement when nothing was compared.
|
|
13
|
-
*
|
|
14
|
-
* ## Why the tool is `ok` when only the path half ran
|
|
15
|
-
*
|
|
16
|
-
* The path half produced a real answer over real evidence. Marking the whole
|
|
17
|
-
* call `refused` because a second check did not run would hide a genuine
|
|
18
|
-
* finding behind a caveat about a different question. The shape half's status is
|
|
19
|
-
* carried in `data.shapes.ran` and in the blockers, where a reader can act on it.
|
|
20
|
-
*
|
|
21
|
-
* The one case that *is* `refused` outright: no endpoints in the graph.
|
|
22
|
-
* Then neither half looked at anything.
|
|
23
|
-
*
|
|
24
|
-
* ## A filter matching nothing is not a clean bill of health
|
|
25
|
-
*
|
|
26
|
-
* UAT round 3, Suggestion 5. `paths: ["/reviews"]` on a repository whose
|
|
27
|
-
* `/reviews` route was never parsed as an `API_ROUTE` at all returned
|
|
28
|
-
* `state: "ok"`, `"Clean at path level."`, `findings: []` — indistinguishable
|
|
29
|
-
* from "checked `/reviews` and it is fine." Zero endpoints matched the filter,
|
|
30
|
-
* not zero problems with the endpoint it named. So a `paths` filter that
|
|
31
|
-
* matches no `API_ENDPOINT` in the graph now reports `state: "empty"` with an
|
|
32
|
-
* explicit count, before the "clean" verdict can be reached at all.
|
|
33
|
-
*
|
|
34
|
-
* ## Claim: defect versus lead
|
|
35
|
-
*
|
|
36
|
-
* UAT round 3, Suggestion 6, following `EnvFinding.claim`'s precedent
|
|
37
|
-
* (`validate`). `CALL_NOT_SERVED` and every shape mismatch are `defect` —
|
|
38
|
-
* provable from this graph (and, for a mismatch, a type checker) alone.
|
|
39
|
-
* `ROUTE_NOT_CALLED` is `lead` — a mobile client, another service, or an
|
|
40
|
-
* external consumer would not appear in this graph, so "nothing calls it" is
|
|
41
|
-
* never provable, only worth a look. This is orthogonal to `prominence`,
|
|
42
|
-
* which still orders by evidence strength alone.
|
|
2
|
+
* `contracts` — path half (name-level, R2→A) runs today; shape half (§13)
|
|
3
|
+
* needs producer-attached shapes, reporting `refused` with named blockers
|
|
4
|
+
* rather than an empty list. `defect` is provable here alone; `lead` is not.
|
|
43
5
|
*/
|
|
44
6
|
import { checkContracts, withProminence } from "@descryy/core";
|
|
45
7
|
import { briefNode, optionalInteger, optionalStringArray, } from "./kit.js";
|
|
@@ -89,10 +51,8 @@ async function run(args, ctx) {
|
|
|
89
51
|
});
|
|
90
52
|
const { paths, shapes } = checked.data;
|
|
91
53
|
const notes = [...checked.notes];
|
|
92
|
-
// Filtering happens after the check
|
|
93
|
-
//
|
|
94
|
-
// graph. A denominator that silently shrinks with the filter would make a
|
|
95
|
-
// narrow query look like a healthy repository.
|
|
54
|
+
// Filtering happens after the check so the counts describe the whole graph
|
|
55
|
+
// — a shrinking denominator would make a narrow query look healthy.
|
|
96
56
|
const matchesPath = (template) => filters === undefined || filters.some((f) => template.includes(f));
|
|
97
57
|
const findings = paths.findings.filter((f) => matchesPath(f.pathTemplate) && touchesFiles([...f.callers, ...f.routes], fileScope));
|
|
98
58
|
const mismatches = shapes.mismatches.filter((m) => matchesPath(String(m.endpoint.attrs["pathTemplate"] ?? m.endpoint.name)) &&
|
|
@@ -105,20 +65,9 @@ async function run(args, ctx) {
|
|
|
105
65
|
notes.push(`Filtered to findings touching ${fileScope.length} named file(s). The counts below describe ` +
|
|
106
66
|
"the whole graph; the lists describe the filter.");
|
|
107
67
|
}
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
// claim than "checked it and it is fine." Checked against the full,
|
|
112
|
-
// unfiltered endpoint set so a filter that matches one clean endpoint (a
|
|
113
|
-
// real, checked, empty result) is not confused with one that matches none.
|
|
114
|
-
//
|
|
115
|
-
// API_ROUTE is checked too, not only API_ENDPOINT: a declared-but-unmounted
|
|
116
|
-
// route (ROUTE_NOT_MOUNTED) has no API_ENDPOINT at all by construction — the
|
|
117
|
-
// route node is the only thing in this graph that ever named its path — so a
|
|
118
|
-
// filter matching only that route must still be treated as "matched
|
|
119
|
-
// something real", never collapsed into "0 endpoint(s) matched this
|
|
120
|
-
// filter." Precisely the reviews.py case: filtering to "/reviews" must reach
|
|
121
|
-
// the finding rather than fall through to this refusal.
|
|
68
|
+
// A `paths` filter matching zero endpoints means it named something never
|
|
69
|
+
// parsed as a route/endpoint — a different claim than "checked, fine."
|
|
70
|
+
// API_ROUTE is checked too: an unmounted route has no API_ENDPOINT at all.
|
|
122
71
|
let pathsMatchedNothing = false;
|
|
123
72
|
if (filters !== undefined) {
|
|
124
73
|
const endpoints = provider.nodesOfType("API_ENDPOINT");
|
|
@@ -134,29 +83,19 @@ async function run(args, ctx) {
|
|
|
134
83
|
"evidence; which of them is a defect versus a lead is a separate axis (claim), not a ranking.");
|
|
135
84
|
}
|
|
136
85
|
// Zero API_ENDPOINT nodes usually means nothing to check — but not when the
|
|
137
|
-
// mount check found
|
|
138
|
-
//
|
|
139
|
-
// an unmounted one). Refusing outright would bury that finding behind a
|
|
140
|
-
// refusal about a different question.
|
|
86
|
+
// mount check found an independent ROUTE_NOT_MOUNTED finding with no
|
|
87
|
+
// endpoint in the graph; refusing then would bury a real finding.
|
|
141
88
|
const nothingToCheck = paths.checked.endpoints === 0 && paths.findingsTotal === 0;
|
|
142
|
-
// MK-7:
|
|
143
|
-
//
|
|
144
|
-
// to catch, and every one here is provable from this graph alone —
|
|
145
|
-
// `contracts.ts`'s own header on `nearMiss` is what keeps a mere
|
|
146
|
-
// typo-shaped call out of the defect count, so a nonzero one is never a
|
|
147
|
-
// "maybe".
|
|
89
|
+
// MK-7: graded on `claim` — a lead is worth a look; a defect is provable
|
|
90
|
+
// from this graph alone (`nearMiss` keeps a mere typo out of the count).
|
|
148
91
|
const verdict = defects > 0
|
|
149
92
|
? `${defects} defect(s) found`
|
|
150
93
|
: leads > 0
|
|
151
94
|
? `No defects; ${leads} lead(s) to review`
|
|
152
95
|
: "Clean at path level";
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
// describes the whole, unfiltered graph — the same convention `checked`
|
|
157
|
-
// above already uses — which is an honest upper bound on `shown` since a
|
|
158
|
-
// `paths`/`files` filter here can only ever remove items from what core
|
|
159
|
-
// already capped, never add to them.
|
|
96
|
+
// render.ts refuses a `truncated` answer with no `truncatedDetail`, so this
|
|
97
|
+
// must be supplied whenever `checked.truncated` is set; `total` is the
|
|
98
|
+
// whole unfiltered graph, an honest upper bound on `shown`.
|
|
160
99
|
const truncatedDetail = checked.truncated
|
|
161
100
|
? { shown: findings.length, total: Math.max(paths.findingsTotal, findings.length), more: null }
|
|
162
101
|
: undefined;
|
|
@@ -172,6 +111,8 @@ async function run(args, ctx) {
|
|
|
172
111
|
.sort((a, b) => b.resolution - a.resolution)
|
|
173
112
|
.map((f) => ({
|
|
174
113
|
kind: f.kind,
|
|
114
|
+
// Whether this asserts a fault. Carried as a field because the
|
|
115
|
+
// sentence below already said it and nothing could read prose.
|
|
175
116
|
claim: f.claim,
|
|
176
117
|
method: f.method,
|
|
177
118
|
path: f.pathTemplate,
|
|
@@ -190,6 +131,10 @@ async function run(args, ctx) {
|
|
|
190
131
|
writer: briefNode(m.writer),
|
|
191
132
|
differences: m.differences,
|
|
192
133
|
resolution: m.resolution,
|
|
134
|
+
// A field the reading side needs and the writing side does not
|
|
135
|
+
// supply. There is no benign reading of that, so every mismatch is a
|
|
136
|
+
// fault claim — unlike an uncalled route, whose usual explanation is
|
|
137
|
+
// a consumer outside the graph.
|
|
193
138
|
claim: m.claim,
|
|
194
139
|
})),
|
|
195
140
|
checked: paths.checked,
|
|
@@ -215,10 +160,9 @@ async function run(args, ctx) {
|
|
|
215
160
|
]
|
|
216
161
|
: notes,
|
|
217
162
|
},
|
|
218
|
-
// A path finding is a claim
|
|
219
|
-
//
|
|
220
|
-
//
|
|
221
|
-
// claim, which is the path half.
|
|
163
|
+
// A path finding is a name-level claim (R2 fully supports); a shape
|
|
164
|
+
// mismatch is not — `engine.ts` caps each individually. This flags the
|
|
165
|
+
// answer's own headline claim, the path half.
|
|
222
166
|
nameLevel: true,
|
|
223
167
|
...(truncatedDetail === undefined ? {} : { truncatedDetail }),
|
|
224
168
|
...(nothingToCheck
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAY/D,OAAO,EACL,SAAS,EACT,eAAe,EACf,mBAAmB,GAIpB,MAAM,UAAU,CAAC;AAoElB,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,wFAAwF;gBACxF,wFAAwF;SAC3F;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,0FAA0F;gBAC1F,uFAAuF;gBACvF,qDAAqD;SACxD;QACD,SAAS,EAAE;YACT,IA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@ -11,22 +11,20 @@
|
|
|
11
11
|
* | hidden dependency | 14.8 | `CHANGES_WITH` edges, already in the graph | **runs** |
|
|
12
12
|
* | overlap scoring | 14.3 | stored PR scopes | **runs, over whatever is stored** |
|
|
13
13
|
* | superseded | 14.5 | git blob ids at head and at base's tip | **runs** |
|
|
14
|
-
* | migration heads | 14.6 |
|
|
14
|
+
* | migration heads | 14.6 | base's and head's migration files, read directly from git | **runs** |
|
|
15
15
|
*
|
|
16
16
|
* §14.8 is first because it is the one that costs nothing: the edges already
|
|
17
17
|
* exist, it needs no per-PR storage, and it works at R0 in any language with no
|
|
18
18
|
* adapter beyond file paths. For a repository whose language has no adapter at
|
|
19
19
|
* all, this is the check that still fires.
|
|
20
20
|
*
|
|
21
|
-
* **Migration heads
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* input exists — the same "declared, never silently omitted" contract stays,
|
|
29
|
-
* it just stops applying to this check.
|
|
21
|
+
* **Migration heads answers the diff-precise question this section once said
|
|
22
|
+
* was out of scope for an MCP tool call** — `readMigrationsAcrossChange`
|
|
23
|
+
* (`sources/migrations/across-change.ts`) reads base's and head's migration
|
|
24
|
+
* files directly with `git ls-tree`/`git show`, so it needs no language
|
|
25
|
+
* adapter and no re-resolution of the graph against two commits. `ran` is
|
|
26
|
+
* false only when neither side has a migration format this producer
|
|
27
|
+
* recognises — never because a producer has not run yet.
|
|
30
28
|
*
|
|
31
29
|
* ## Why a check that still cannot run is declared rather than omitted
|
|
32
30
|
*
|
|
@@ -48,7 +46,7 @@
|
|
|
48
46
|
* actual conflict — that distinction is left to the migration-integrity
|
|
49
47
|
* checks in `validate`, which are provable from the graph alone.
|
|
50
48
|
*/
|
|
51
|
-
import type { DiffType, HiddenDependencyReport, IncomparablePair, NodeVerdict, OverlapFinding, SupersededReport } from "@descryy/core";
|
|
49
|
+
import type { DiffType, HiddenDependencyReport, MigrationsAcrossChange, IncomparablePair, NodeVerdict, OverlapFinding, SupersededReport } from "@descryy/core";
|
|
52
50
|
import type { ReliabilityClass } from "@descryy/ir";
|
|
53
51
|
import { type BriefNode, type ToolDefinition } from "./kit.ts";
|
|
54
52
|
/**
|
|
@@ -125,41 +123,55 @@ export interface SupersededCheck {
|
|
|
125
123
|
readonly verdict: NodeVerdict;
|
|
126
124
|
}[];
|
|
127
125
|
}
|
|
128
|
-
/**
|
|
129
|
-
* §14.6 — *"would merging these changes leave more than one migration head?"*
|
|
130
|
-
* Independent of the diff succeeding: it reads the migration revision chain
|
|
131
|
-
* already in the graph, not a comparison of base's and head's own state.
|
|
132
|
-
*/
|
|
133
|
-
export interface MigrationHeadsCheck {
|
|
134
|
-
/** False when no module in the graph carried a migration revision — the producer this check waited for has not run. */
|
|
135
|
-
readonly ran: boolean;
|
|
136
|
-
/** Revisions with no other migration in this graph naming them as a parent. */
|
|
137
|
-
readonly heads: readonly string[];
|
|
138
|
-
/** True when there is more than one head — the fork a manual merge revision is needed to resolve. */
|
|
139
|
-
readonly verdict: boolean;
|
|
140
|
-
readonly disclosure: string;
|
|
141
|
-
}
|
|
142
126
|
/** git rejected the range: no diff-dependent check ran, and `blocked` is all there is to say. */
|
|
143
127
|
export interface CrossPrGitFailure {
|
|
144
128
|
readonly blocked: readonly BlockedCheck[];
|
|
145
|
-
readonly migrationHeads:
|
|
129
|
+
readonly migrationHeads: MigrationHeadCheck;
|
|
146
130
|
}
|
|
147
131
|
/** The diff is empty. A real answer: there is nothing to collide with. */
|
|
148
132
|
export interface CrossPrEmptyDiff extends CrossPrGitFailure {
|
|
149
133
|
readonly changedFiles: number;
|
|
150
134
|
}
|
|
151
135
|
/**
|
|
152
|
-
*
|
|
136
|
+
* §14.6 — the heads this merge would leave.
|
|
153
137
|
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
138
|
+
* The set is base's migrations plus this change's, because that is the set the
|
|
139
|
+
* migration runner sees after the merge. `ran` is false when neither side had a
|
|
140
|
+
* migration format this producer recognises, which is **not** the same as a
|
|
141
|
+
* clean answer: a repository whose framework declares no DAG cannot have this
|
|
142
|
+
* failure at all, and one whose files were unreadable simply was not read.
|
|
157
143
|
*/
|
|
144
|
+
export interface MigrationHeadCheck {
|
|
145
|
+
readonly ran: boolean;
|
|
146
|
+
/** Base's single head, or null when base has none or already forks. */
|
|
147
|
+
readonly baseHead: string | null;
|
|
148
|
+
/** At most one — either the merged set has a single head or it does not. */
|
|
149
|
+
readonly conflict: MigrationsAcrossChange["report"]["conflict"];
|
|
150
|
+
readonly dependencies: MigrationsAcrossChange["report"]["dependencies"];
|
|
151
|
+
readonly duplicateRevisions: MigrationsAcrossChange["report"]["duplicateRevisions"];
|
|
152
|
+
/** False when any parent list could not be read, so the DAG read is partial. */
|
|
153
|
+
readonly complete: boolean;
|
|
154
|
+
readonly checked: MigrationsAcrossChange["report"]["checked"];
|
|
155
|
+
/** Files declined, with the reason recorded rather than guessed. */
|
|
156
|
+
readonly refused: readonly {
|
|
157
|
+
file: string;
|
|
158
|
+
reason: string;
|
|
159
|
+
}[];
|
|
160
|
+
/**
|
|
161
|
+
* Well-formed migrations sitting where no migration tool looks.
|
|
162
|
+
*
|
|
163
|
+
* Reported separately from the head computation because they are not in it —
|
|
164
|
+
* the runner cannot see them either, so "the merge leaves one head" can be
|
|
165
|
+
* true and incomplete in the same breath.
|
|
166
|
+
*/
|
|
167
|
+
readonly misplaced: MigrationsAcrossChange["misplaced"];
|
|
168
|
+
}
|
|
158
169
|
export interface CrossPrReport extends CrossPrEmptyDiff {
|
|
159
170
|
readonly resolvedNodes: number;
|
|
160
171
|
readonly hiddenDependencies: HiddenDependencyCheck;
|
|
161
172
|
readonly overlaps: OverlapCheck;
|
|
162
173
|
readonly superseded: SupersededCheck;
|
|
174
|
+
readonly migrationHeads: MigrationHeadCheck;
|
|
163
175
|
}
|
|
164
176
|
export type CrossPrData = CrossPrGitFailure | CrossPrEmptyDiff | CrossPrReport;
|
|
165
177
|
export declare const crossPrTool: ToolDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-pr.d.ts","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cross-pr.d.ts","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAaH,OAAO,KAAK,EACV,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAML,KAAK,SAAS,EAEd,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,QAAQ,CAAC,SAAS,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1F,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,2FAA2F;IAC3F,QAAQ,CAAC,GAAG,EAAE,OAAO,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CAAC,CAAC;CACzD;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;IACnD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,kBAAkB,CAAC;CAC7C;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAoS/E,eAAO,MAAM,WAAW,EAAE,cAmBzB,CAAC"}
|
package/dist/tools/cross-pr.js
CHANGED
|
@@ -11,22 +11,20 @@
|
|
|
11
11
|
* | hidden dependency | 14.8 | `CHANGES_WITH` edges, already in the graph | **runs** |
|
|
12
12
|
* | overlap scoring | 14.3 | stored PR scopes | **runs, over whatever is stored** |
|
|
13
13
|
* | superseded | 14.5 | git blob ids at head and at base's tip | **runs** |
|
|
14
|
-
* | migration heads | 14.6 |
|
|
14
|
+
* | migration heads | 14.6 | base's and head's migration files, read directly from git | **runs** |
|
|
15
15
|
*
|
|
16
16
|
* §14.8 is first because it is the one that costs nothing: the edges already
|
|
17
17
|
* exist, it needs no per-PR storage, and it works at R0 in any language with no
|
|
18
18
|
* adapter beyond file paths. For a repository whose language has no adapter at
|
|
19
19
|
* all, this is the check that still fires.
|
|
20
20
|
*
|
|
21
|
-
* **Migration heads
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* input exists — the same "declared, never silently omitted" contract stays,
|
|
29
|
-
* it just stops applying to this check.
|
|
21
|
+
* **Migration heads answers the diff-precise question this section once said
|
|
22
|
+
* was out of scope for an MCP tool call** — `readMigrationsAcrossChange`
|
|
23
|
+
* (`sources/migrations/across-change.ts`) reads base's and head's migration
|
|
24
|
+
* files directly with `git ls-tree`/`git show`, so it needs no language
|
|
25
|
+
* adapter and no re-resolution of the graph against two commits. `ran` is
|
|
26
|
+
* false only when neither side has a migration format this producer
|
|
27
|
+
* recognises — never because a producer has not run yet.
|
|
30
28
|
*
|
|
31
29
|
* ## Why a check that still cannot run is declared rather than omitted
|
|
32
30
|
*
|
|
@@ -48,7 +46,7 @@
|
|
|
48
46
|
* actual conflict — that distinction is left to the migration-integrity
|
|
49
47
|
* checks in `validate`, which are provable from the graph alone.
|
|
50
48
|
*/
|
|
51
|
-
import { changedFiles,
|
|
49
|
+
import { changedFiles, findHiddenDependencies, findOverlaps, findSuperseded, nodesInFiles, readMigrationsAcrossChange, ScopeStore, supersededCandidates, } from "@descryy/core";
|
|
52
50
|
import { answer, briefNode, optionalInteger, optionalString, requiredString, } from "./kit.js";
|
|
53
51
|
import { capped } from "../capped.js";
|
|
54
52
|
const SCHEMA = {
|
|
@@ -71,16 +69,7 @@ const SCHEMA = {
|
|
|
71
69
|
* Named here rather than in prose so the reply carries them as data a caller
|
|
72
70
|
* can act on. Each says what would have to exist, not merely that it does not.
|
|
73
71
|
*/
|
|
74
|
-
const BLOCKED = [
|
|
75
|
-
{
|
|
76
|
-
check: "migration-heads",
|
|
77
|
-
section: "14.6",
|
|
78
|
-
question: "Would merging these changes leave more than one migration head?",
|
|
79
|
-
needs: "a producer emitting each migration's revision and declared parents. The check is " +
|
|
80
|
-
"framework-agnostic by design — a revision, its parents and which change adds it is the " +
|
|
81
|
-
"shape every migration tool has — so this is one adapter, not one per framework.",
|
|
82
|
-
},
|
|
83
|
-
];
|
|
72
|
+
const BLOCKED = [];
|
|
84
73
|
async function run(args, ctx) {
|
|
85
74
|
const base = requiredString(args, "base");
|
|
86
75
|
const head = optionalString(args, "head") ?? "HEAD";
|
|
@@ -98,33 +87,60 @@ async function run(args, ctx) {
|
|
|
98
87
|
// carve-out that lifts a name-level fact to A begins at R2.
|
|
99
88
|
nameLevel: true,
|
|
100
89
|
};
|
|
101
|
-
// §14.6 — independent of whether the diff
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
// this
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
// §14.6 — independent of whether the main diff below succeeds: it reads
|
|
91
|
+
// base's and head's migration files directly from git (`ls-tree`/`show`),
|
|
92
|
+
// not a comparison that needs the graph or the changed-file list. Computed
|
|
93
|
+
// once, up front, so both early-return paths below — a rejected range and a
|
|
94
|
+
// genuinely empty diff — still get a real answer rather than one about a
|
|
95
|
+
// question this check never asked.
|
|
96
|
+
ctx.progress("Reading migrations on both sides");
|
|
97
|
+
let migrations = null;
|
|
98
|
+
let migrationFailure = null;
|
|
99
|
+
try {
|
|
100
|
+
migrations = await readMigrationsAcrossChange(session.repoPath, base, head);
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
// One check failing is not four checks failing. Recorded rather than
|
|
104
|
+
// thrown, and `ran: false` with a reason is what the caller reads.
|
|
105
|
+
migrationFailure = error.message.trim();
|
|
106
|
+
}
|
|
110
107
|
const migrationHeads = {
|
|
111
|
-
ran:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
ran: migrations?.report.analysed === true,
|
|
109
|
+
baseHead: migrations?.baseHead ?? null,
|
|
110
|
+
conflict: migrations?.report.conflict ?? null,
|
|
111
|
+
dependencies: migrations?.report.dependencies ?? [],
|
|
112
|
+
duplicateRevisions: migrations?.report.duplicateRevisions ?? [],
|
|
113
|
+
complete: migrations?.report.complete ?? false,
|
|
114
|
+
checked: migrations?.report.checked ?? {
|
|
115
|
+
changes: 0,
|
|
116
|
+
migrations: 0,
|
|
117
|
+
withUnknownParents: 0,
|
|
118
|
+
heads: 0,
|
|
119
|
+
},
|
|
120
|
+
refused: [
|
|
121
|
+
...(migrations?.base.refusals ?? []),
|
|
122
|
+
...(migrations?.change.refusals ?? []),
|
|
123
|
+
].map((r) => ({ file: r.file, reason: r.reason })),
|
|
124
|
+
misplaced: migrations?.misplaced ?? [],
|
|
122
125
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
const migrationHeadsNotes = [];
|
|
127
|
+
if (migrationFailure !== null) {
|
|
128
|
+
migrationHeadsNotes.push(`The migration head check could not read one of the two revisions: ${migrationFailure}. ` +
|
|
129
|
+
"That is a failure of this check, not a finding that the merge leaves one head.");
|
|
130
|
+
}
|
|
131
|
+
else if (migrations !== null) {
|
|
132
|
+
migrationHeadsNotes.push(...migrations.notes);
|
|
133
|
+
if (migrationHeads.misplaced.length > 0) {
|
|
134
|
+
migrationHeadsNotes.push(`${migrationHeads.misplaced.length} well-formed migration(s) are in a location no ` +
|
|
135
|
+
"migration tool looks at, so nothing will run them and they are not in the head " +
|
|
136
|
+
`computation: ${migrationHeads.misplaced.map((m) => m.file).join(", ")}.`);
|
|
137
|
+
}
|
|
138
|
+
if (!migrationHeads.ran) {
|
|
139
|
+
migrationHeadsNotes.push("No migration format this producer recognises was found on either side, so no head " +
|
|
140
|
+
"computation ran. Two of the four common families declare no DAG at all and cannot " +
|
|
141
|
+
"have this failure; a repository using one of them is not being told it is clean.");
|
|
142
|
+
}
|
|
143
|
+
}
|
|
128
144
|
ctx.progress(`Diffing ${base}...${head}`, 1, 3);
|
|
129
145
|
let files;
|
|
130
146
|
try {
|
|
@@ -135,7 +151,7 @@ async function run(args, ctx) {
|
|
|
135
151
|
...envelope,
|
|
136
152
|
headline: `Could not diff ${base}...${head}.`,
|
|
137
153
|
state: "refused",
|
|
138
|
-
data: { blocked, migrationHeads },
|
|
154
|
+
data: { blocked: BLOCKED, migrationHeads },
|
|
139
155
|
notes: [
|
|
140
156
|
`git rejected the range: ${error.message.trim()}.`,
|
|
141
157
|
"No check ran, which is not a finding that this change collides with nothing.",
|
|
@@ -147,7 +163,7 @@ async function run(args, ctx) {
|
|
|
147
163
|
return answer({
|
|
148
164
|
...envelope,
|
|
149
165
|
headline: "The diff is empty.",
|
|
150
|
-
data: { changedFiles: 0, blocked, migrationHeads },
|
|
166
|
+
data: { changedFiles: 0, blocked: BLOCKED, migrationHeads },
|
|
151
167
|
notes: ["An empty diff is a real answer: there is nothing to collide with.", ...migrationHeadsNotes],
|
|
152
168
|
});
|
|
153
169
|
}
|
|
@@ -194,15 +210,15 @@ async function run(args, ctx) {
|
|
|
194
210
|
notes.push(`${remainingCap.detail.total - remainingCap.detail.shown} further file(s) not yet matched to ` +
|
|
195
211
|
`base are not listed — the reply is capped at ${limit}. Raise "limit" to see them.`);
|
|
196
212
|
}
|
|
197
|
-
if (
|
|
198
|
-
notes.push(`${
|
|
199
|
-
`input yet: ${
|
|
213
|
+
if (BLOCKED.length > 0) {
|
|
214
|
+
notes.push(`${BLOCKED.length} of the four multi-PR checks did not run because nothing produces their ` +
|
|
215
|
+
`input yet: ${BLOCKED.map((b) => b.check).join(", ")}. Each is listed in "blocked" with ` +
|
|
200
216
|
"what it is waiting for. Their absence is not a clean result.");
|
|
201
217
|
}
|
|
202
218
|
// `refused` only when NOTHING looked at anything. One check producing a
|
|
203
219
|
// real answer is a real answer, and burying it behind a caveat about a
|
|
204
220
|
// different question is what `contracts.ts` refuses for the same reason.
|
|
205
|
-
const anythingRan = hidden.data.analysed || scopes.length >= 2 || superseded.analysed ||
|
|
221
|
+
const anythingRan = hidden.data.analysed || scopes.length >= 2 || superseded.analysed || migrationHeads.ran;
|
|
206
222
|
// B8 (part 2) — `truncated` used to forward only `hidden.truncated`, so
|
|
207
223
|
// capping in `overlaps` or in `remaining` (above) went undisclosed on the
|
|
208
224
|
// wire even when the prose said so. Three checks can each independently
|
|
@@ -257,8 +273,8 @@ async function run(args, ctx) {
|
|
|
257
273
|
disclosure: superseded.disclosure,
|
|
258
274
|
remaining: remainingCap.shown,
|
|
259
275
|
},
|
|
260
|
-
blocked,
|
|
261
276
|
migrationHeads,
|
|
277
|
+
blocked: BLOCKED,
|
|
262
278
|
},
|
|
263
279
|
stamp: hidden.stamp,
|
|
264
280
|
truncated: anyCheckTruncated,
|
|
@@ -273,8 +289,11 @@ async function run(args, ctx) {
|
|
|
273
289
|
? `${verdict}. ${hidden.data.findings.length} historically coupled file(s) were not touched; ` +
|
|
274
290
|
`${overlaps.findings.length} overlapping change pair(s) scored above the conflict ` +
|
|
275
291
|
`threshold; ${superseded.superseded ? "this change's work is already on base" : `${superseded.counts.alreadyInBase} of ${superseded.counts.total} touched file(s) already match base`}; ` +
|
|
276
|
-
`${
|
|
277
|
-
|
|
292
|
+
`${!migrationHeads.ran
|
|
293
|
+
? "no migration DAG was read"
|
|
294
|
+
: migrationHeads.conflict === null
|
|
295
|
+
? `the merge leaves ${migrationHeads.checked.heads} migration head`
|
|
296
|
+
: "the merge would leave more than one migration head"}; ${BLOCKED.length} of four checks could not run.`
|
|
278
297
|
: "No multi-PR check was able to run on this change. That is a statement about the " +
|
|
279
298
|
"evidence available, not about the change.",
|
|
280
299
|
};
|
|
@@ -288,13 +307,13 @@ export const crossPrTool = {
|
|
|
288
307
|
description: "What this change collides with that reading its diff alone would not show: files it " +
|
|
289
308
|
"historically moves with and did not touch this time (§14.8), other in-flight changes " +
|
|
290
309
|
"editing the same important nodes (§14.3), whether the work is already on base by another " +
|
|
291
|
-
"route (§14.5), and whether
|
|
292
|
-
"(§14.6,
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
296
|
-
"
|
|
297
|
-
"silently omitted.",
|
|
310
|
+
"route (§14.5), and whether merging it would leave the migration runner with more than one " +
|
|
311
|
+
"head (§14.6, computed over base's migrations and this change's together, read directly from " +
|
|
312
|
+
"git — no language adapter needed). Findings are Class C hints about how people edit this " +
|
|
313
|
+
"repository, never claims about what breaks; a migration-head fork is reported the same way, " +
|
|
314
|
+
"because this check cannot yet tell a legitimate merge-in-progress from a real conflict. Any " +
|
|
315
|
+
"check whose input no producer writes is declared in \"blocked\" with what it is waiting for " +
|
|
316
|
+
"rather than silently omitted.",
|
|
298
317
|
inputSchema: SCHEMA,
|
|
299
318
|
run,
|
|
300
319
|
};
|