@descryy/runtime-graph-correlator 0.3.0 → 0.4.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/LICENSE +6 -0
- package/dist/confirm-observed-caller.d.ts +27 -62
- package/dist/confirm-observed-caller.d.ts.map +1 -1
- package/dist/confirm-observed-caller.js +25 -60
- package/dist/confirm-observed-caller.js.map +1 -1
- package/dist/cross-service-call.d.ts +54 -104
- package/dist/cross-service-call.d.ts.map +1 -1
- package/dist/cross-service-call.js +59 -107
- package/dist/cross-service-call.js.map +1 -1
- package/dist/database-table.d.ts +8 -20
- package/dist/database-table.d.ts.map +1 -1
- package/dist/database-table.js +8 -20
- package/dist/database-table.js.map +1 -1
- package/dist/endpoint.d.ts +19 -43
- package/dist/endpoint.d.ts.map +1 -1
- package/dist/endpoint.js +20 -45
- package/dist/endpoint.js.map +1 -1
- package/dist/frontend-caller.d.ts +15 -37
- package/dist/frontend-caller.d.ts.map +1 -1
- package/dist/frontend-caller.js +15 -37
- package/dist/frontend-caller.js.map +1 -1
- package/dist/index.d.ts +5 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/dist/log-endpoint.d.ts +14 -35
- package/dist/log-endpoint.d.ts.map +1 -1
- package/dist/log-endpoint.js +15 -41
- package/dist/log-endpoint.js.map +1 -1
- package/dist/observed-frontend-caller.d.ts +20 -44
- package/dist/observed-frontend-caller.d.ts.map +1 -1
- package/dist/observed-frontend-caller.js +21 -51
- package/dist/observed-frontend-caller.js.map +1 -1
- package/dist/symbol.d.ts +44 -124
- package/dist/symbol.d.ts.map +1 -1
- package/dist/symbol.js +48 -130
- package/dist/symbol.js.map +1 -1
- package/package.json +10 -5
package/dist/symbol.d.ts
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
* than
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* ambiguity to the caller instead of resolving it silently.
|
|
15
|
-
*
|
|
16
|
-
* `line`, when the caller has one (a stack frame almost always does), is a
|
|
17
|
-
* second, independent check after name+file+repo resolve to exactly one
|
|
18
|
-
* node: does the evidence's own claimed line actually fall inside that
|
|
19
|
-
* node's range? A source map can point at the right *file* and even the
|
|
20
|
-
* right *function name* while still landing on a stale line — a stripped
|
|
21
|
-
* build, a moved function whose body shifted, a webpack virtual path that
|
|
22
|
-
* resolves near but not into the real range. Name+file+repo agreeing is not
|
|
23
|
-
* the same claim as the line agreeing, so a mismatch is its own outcome
|
|
24
|
-
* (`line-mismatch`) rather than a silent `resolved` that hides a real
|
|
25
|
-
* discrepancy, or a `not-found` that discards a symbol that plainly exists.
|
|
2
|
+
* Resolves source-mapped evidence (a stack frame or log line naming a file + symbol) to the
|
|
3
|
+
* `FUNCTION`/`CLASS` node it came from. `FUNCTION`/`CLASS` are repo-scoped (DEC-054); a session
|
|
4
|
+
* merging more than one repo (DEC-228) can hold two same-named, same-relative-path symbols from
|
|
5
|
+
* different repos. So `repo` is required, not optional — no honest default, same discipline
|
|
6
|
+
* `resolveOneNode` uses: return every match, never pick one by heuristic, refuse ambiguity rather
|
|
7
|
+
* than resolve it silently.
|
|
8
|
+
*
|
|
9
|
+
* `line`, when given, is a second check after name+file+repo resolve to one node: does the claimed
|
|
10
|
+
* line fall inside that node's range? A source map can name the right file and function while
|
|
11
|
+
* landing on a stale line (a stripped build, a moved function, a webpack virtual path) — so a
|
|
12
|
+
* mismatch is its own outcome (`line-mismatch`), not a silent `resolved` or a `not-found` that
|
|
13
|
+
* discards a symbol that plainly exists.
|
|
26
14
|
*/
|
|
27
15
|
import type { IRNode } from "@descryy/ir";
|
|
28
16
|
import { type SqlDriver } from "@descryy/core";
|
|
@@ -47,32 +35,23 @@ export declare function resolveSymbolNode(driver: SqlDriver, location: {
|
|
|
47
35
|
readonly line?: number;
|
|
48
36
|
}, repo: string,
|
|
49
37
|
/**
|
|
50
|
-
* `cwd`: the directory the process that produced `location.file`
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* behaviour every other caller already relies on for an already
|
|
55
|
-
* repo-relative path.
|
|
38
|
+
* `cwd`: the directory the process that produced `location.file` actually
|
|
39
|
+
* ran in. Pass it when the runtime echoes its invocation argument verbatim
|
|
40
|
+
* (RT-113: Ruby) -- omitting it keeps the passthrough behaviour other
|
|
41
|
+
* callers rely on for an already repo-relative path.
|
|
56
42
|
*/
|
|
57
43
|
options?: {
|
|
58
44
|
readonly repoRoot?: string;
|
|
59
45
|
readonly cwd?: string;
|
|
60
46
|
}): SymbolResolution;
|
|
61
47
|
/**
|
|
62
|
-
* `resolveSymbolNode
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* spans more than one repository. `resolveSymbolNode` already refuses
|
|
67
|
-
* ambiguity *within* one repo by requiring `repo` as a mandatory parameter
|
|
68
|
-
* — this function is the layer above that: trying repos in sequence and
|
|
69
|
-
* keeping the first hit would smuggle a guess back in through the one door
|
|
70
|
-
* `resolveSymbolNode` closed, so a match in more than one repo is refused
|
|
71
|
-
* here too, naming every repo that matched.
|
|
48
|
+
* `resolveSymbolNode` tried across every known repo, for evidence with no scope at all (RT-008: a
|
|
49
|
+
* raw log line naming a symbol, no repo hint) in a session spanning more than one repo. Keeping the
|
|
50
|
+
* first hit across repos would smuggle back the guess `resolveSymbolNode` refuses by requiring
|
|
51
|
+
* `repo` — so a match in more than one repo is refused here too.
|
|
72
52
|
*
|
|
73
|
-
* Negative control #1 (`next_tasks.md` T6): two repos, identically-named
|
|
74
|
-
*
|
|
75
|
-
* either.
|
|
53
|
+
* Negative control #1 (`next_tasks.md` T6): two repos, identically-named symbol, same relative
|
|
54
|
+
* path, no scope — must refuse.
|
|
76
55
|
*/
|
|
77
56
|
export type CrossRepoSymbolResolution = {
|
|
78
57
|
readonly outcome: "resolved";
|
|
@@ -98,43 +77,20 @@ export declare function resolveSymbolAcrossRepos(driver: SqlDriver, location: {
|
|
|
98
77
|
readonly cwd?: string;
|
|
99
78
|
}): CrossRepoSymbolResolution;
|
|
100
79
|
/**
|
|
101
|
-
* The
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* §10 asks the runtime to correlate evidence to each graph node type where
|
|
105
|
-
* applicable. Measured across `descry-adapters` rather than assumed, the
|
|
106
|
-
* picture for the file-shaped types is:
|
|
80
|
+
* The coarser answer: which `MODULE` node is declared in the file this evidence named. Measured
|
|
81
|
+
* across `descry-adapters`:
|
|
107
82
|
*
|
|
108
83
|
* | type | producers | so |
|
|
109
84
|
* | --- | --- | --- |
|
|
110
85
|
* | `MODULE` | 10 of 15 adapters | correlatable, and this is it |
|
|
111
|
-
* | `FILE` |
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* `
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* ## Why this is a separate function, not a fallback inside `resolveSymbolNode`
|
|
121
|
-
*
|
|
122
|
-
* A caller must **ask** for the coarser answer. `resolveSymbolNode` silently
|
|
123
|
-
* degrading to a module when the symbol did not resolve would be the
|
|
124
|
-
* honest-degradation rule broken in the one place it matters most: the
|
|
125
|
-
* refusal would disappear, and a consumer would see a resolution where the
|
|
126
|
-
* truth is "we could not find the function, here is the file it claims to be
|
|
127
|
-
* in." Two outcomes that mean different things must not arrive through the
|
|
128
|
-
* same door.
|
|
129
|
-
*
|
|
130
|
-
* ## The outcome is `module-level`, never `resolved`
|
|
131
|
-
*
|
|
132
|
-
* Following RT-055's `sole-structural-caller`: the vocabulary carries the
|
|
133
|
-
* claim's strength at the type level, so a consumer cannot treat a
|
|
134
|
-
* file-granularity answer as a symbol-granularity one by writing
|
|
135
|
-
* `outcome === "resolved"`. This matters for the resolution cap — a finding
|
|
136
|
-
* resting on a module-level correlation knows *which file* failed and does
|
|
137
|
-
* not know *which function*, and those are different findings.
|
|
86
|
+
* | `FILE` | zero | nothing to correlate to |
|
|
87
|
+
*
|
|
88
|
+
* `FILE` is not a gap here — no shipped adapter emits one (`descry-core`'s
|
|
89
|
+
* `capabilities/preconditions.ts`); a resolver for it would always return `not-found`, indistinguishable
|
|
90
|
+
* from a clean answer. Separate function, not a fallback in `resolveSymbolNode` — a caller must ask for
|
|
91
|
+
* the coarser answer, or honest degradation breaks: the refusal would disappear behind a weaker
|
|
92
|
+
* resolution. Outcome is `module-level`, never `resolved` (RT-055's pattern) — a module-level finding
|
|
93
|
+
* knows which file failed, not which function; the resolution cap treats those as different findings.
|
|
138
94
|
*/
|
|
139
95
|
export type ModuleResolution = {
|
|
140
96
|
readonly outcome: "module-level";
|
|
@@ -154,62 +110,26 @@ options?: {
|
|
|
154
110
|
readonly cwd?: string;
|
|
155
111
|
}): ModuleResolution;
|
|
156
112
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* This is the join that lets a failing test stop being a parallel silo. Once
|
|
162
|
-
* the observed test is a graph node, the `TESTS` edges already leaving that
|
|
163
|
-
* node answer "what does this test cover" with **no runtime guessing at all**
|
|
164
|
-
* — the subject was resolved statically, by an adapter, at index time. The
|
|
165
|
-
* runtime's job is to identify the node, not to infer the relationship.
|
|
113
|
+
* Resolves an observed test (`test:pass`/`test:fail`, name/file/line) to the `TEST_CASE` node an adapter
|
|
114
|
+
* minted — the join that lets a failing test stop being a parallel silo. Once resolved, existing `TESTS`
|
|
115
|
+
* edges answer "what does this cover" with no runtime guessing.
|
|
166
116
|
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* Counted across `descry-adapters` rather than assumed, by looking for actual
|
|
170
|
-
* node construction (`type: "TEST_CASE"`) rather than references to the
|
|
171
|
-
* string — six of the ten language adapters mention `TEST_CASE` while
|
|
172
|
-
* constructing none, because they use it for the `TESTS` *edge* and for
|
|
173
|
-
* container checks:
|
|
117
|
+
* Why the fifth outcome exists: measured across `descry-adapters` by counting actual node construction,
|
|
118
|
+
* not references to the string:
|
|
174
119
|
*
|
|
175
120
|
* | | adapters |
|
|
176
121
|
* | --- | --- |
|
|
177
122
|
* | construct `TEST_CASE` nodes | 4 |
|
|
178
123
|
* | mention it, construct none | 6 |
|
|
179
124
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* function above, displaced rather than avoided, and it is RT-060's
|
|
186
|
-
* producer-versus-consumer attribution restated: a refusal has to say **whose**
|
|
187
|
-
* gap it is.
|
|
188
|
-
*
|
|
189
|
-
* ## `producer-emitted-none` claims exactly what was measured, and no more
|
|
190
|
-
*
|
|
191
|
-
* The name is not `producer-does-not-emit`, because this function cannot
|
|
192
|
-
* observe an adapter — it observes a store. Zero `TEST_CASE` nodes in a
|
|
193
|
-
* language admits two readings: no adapter for that language emits them, or
|
|
194
|
-
* this store simply holds no tests written in it. **Both are producer-side,
|
|
195
|
-
* and neither is "your test is missing"** — which is the whole distinction a
|
|
196
|
-
* consumer needs. The reason string carries the disjunction instead of the
|
|
197
|
-
* outcome name resolving it by fiat.
|
|
198
|
-
*
|
|
199
|
-
* And when the scan truncates, this outcome is **withheld**: a set-property
|
|
200
|
-
* question answered over a silently truncated set is a fact computed from a
|
|
201
|
-
* sample, which is the warning `nodesOfType` carries in its own doc comment.
|
|
202
|
-
* A truncated scan that found nothing degrades to `not-found` naming the
|
|
203
|
-
* truncation, never to a confident claim about a producer.
|
|
204
|
-
*
|
|
205
|
-
* ## This reads `language`; it does not branch on one
|
|
125
|
+
* A four-outcome resolver would return `not-found` forever for the six, read as "not indexed" when
|
|
126
|
+
* nothing was ever going to index it (RT-060: a refusal must say whose gap it is). `producer-emitted-none`
|
|
127
|
+
* claims only what's measured — this observes a store, not an adapter: zero `TEST_CASE` nodes of a
|
|
128
|
+
* language means no adapter emits them, or nothing indexed here is written in it, both producer-side. A
|
|
129
|
+
* truncated scan withholds the claim and degrades to `not-found` naming the truncation.
|
|
206
130
|
*
|
|
207
|
-
* `
|
|
208
|
-
*
|
|
209
|
-
* in this file. It groups by the value the graph itself supplied, the same way
|
|
210
|
-
* `findNodes` narrows by a `repo` string it was handed. A hardcoded set of
|
|
211
|
-
* "languages whose adapters emit TEST_CASE" would have been the violation, and
|
|
212
|
-
* it would also have gone stale the first time an adapter started emitting.
|
|
131
|
+
* Reads `language`, never branches on it — groups by whatever value the graph supplied, same as
|
|
132
|
+
* `findNodes` narrowing by `repo`. A hardcoded language set would be the IR-boundary violation this avoids.
|
|
213
133
|
*/
|
|
214
134
|
export type TestCaseResolution = {
|
|
215
135
|
readonly outcome: "resolved";
|
package/dist/symbol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MA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,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClG;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrF;IAAE,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAK7G,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACtF,IAAI,EAAE,MAAM;AACZ,6EAA6E;AAC7E,OAAO,GAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAO,GACvG,kBAAkB,CAyCpB"}
|
package/dist/symbol.js
CHANGED
|
@@ -1,103 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Resolves source-mapped evidence (a stack frame or log line naming a file + symbol) to the
|
|
3
|
+
* `FUNCTION`/`CLASS` node it came from. `FUNCTION`/`CLASS` are repo-scoped (DEC-054); a session
|
|
4
|
+
* merging more than one repo (DEC-228) can hold two same-named, same-relative-path symbols from
|
|
5
|
+
* different repos. So `repo` is required, not optional — no honest default, same discipline
|
|
6
|
+
* `resolveOneNode` uses: return every match, never pick one by heuristic, refuse ambiguity rather
|
|
7
|
+
* than resolve it silently.
|
|
4
8
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* optional — there is no honest default for it, and guessing one is exactly
|
|
11
|
-
* the failure `resolveOneNode` (descry-core's own MCP lookup) refuses to
|
|
12
|
-
* make. This function inherits that discipline rather than reimplementing
|
|
13
|
-
* it differently: return every match, never pick one by heuristic, refuse
|
|
14
|
-
* ambiguity to the caller instead of resolving it silently.
|
|
15
|
-
*
|
|
16
|
-
* `line`, when the caller has one (a stack frame almost always does), is a
|
|
17
|
-
* second, independent check after name+file+repo resolve to exactly one
|
|
18
|
-
* node: does the evidence's own claimed line actually fall inside that
|
|
19
|
-
* node's range? A source map can point at the right *file* and even the
|
|
20
|
-
* right *function name* while still landing on a stale line — a stripped
|
|
21
|
-
* build, a moved function whose body shifted, a webpack virtual path that
|
|
22
|
-
* resolves near but not into the real range. Name+file+repo agreeing is not
|
|
23
|
-
* the same claim as the line agreeing, so a mismatch is its own outcome
|
|
24
|
-
* (`line-mismatch`) rather than a silent `resolved` that hides a real
|
|
25
|
-
* discrepancy, or a `not-found` that discards a symbol that plainly exists.
|
|
9
|
+
* `line`, when given, is a second check after name+file+repo resolve to one node: does the claimed
|
|
10
|
+
* line fall inside that node's range? A source map can name the right file and function while
|
|
11
|
+
* landing on a stale line (a stripped build, a moved function, a webpack virtual path) — so a
|
|
12
|
+
* mismatch is its own outcome (`line-mismatch`), not a silent `resolved` or a `not-found` that
|
|
13
|
+
* discards a symbol that plainly exists.
|
|
26
14
|
*/
|
|
27
15
|
import { isAbsolute, relative, resolve as resolvePath } from "node:path";
|
|
28
16
|
import { findNodes, nodesOfType } from "@descryy/core";
|
|
29
17
|
const SYMBOL_NODE_TYPES = new Set(["FUNCTION", "CLASS"]);
|
|
30
18
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* runtime evidence onto graph entities, so it translates here.
|
|
38
|
-
*
|
|
39
|
-
* **Found by the continuous-chain test, and only by it.** Every earlier
|
|
40
|
-
* test supplied a path in whichever convention it happened to need — the
|
|
41
|
-
* vertical slice pre-relativised with its own helper, the collector tests
|
|
42
|
-
* never resolved to a node — so the two halves each looked right and the
|
|
43
|
-
* seam between them had never been crossed. The first run that crossed it
|
|
44
|
-
* failed with `not-found` on a symbol that plainly exists.
|
|
45
|
-
*
|
|
46
|
-
* **The old failure was worse than a failure: it was a misleading one.**
|
|
47
|
-
* An absolute path simply matched nothing, and the refusal read `No
|
|
48
|
-
* FUNCTION/CLASS node named "deleteInvoice" in
|
|
49
|
-
* "/home/.../server.mjs"` — which a reader takes as "that symbol is not in
|
|
50
|
-
* the graph" when the truth is "you handed me a path in the other
|
|
51
|
-
* coordinate system." Both refusals below now say which of the two it is.
|
|
52
|
-
*
|
|
53
|
-
* Relativising is exact, never a guess: the path must actually live under
|
|
54
|
-
* `repoRoot`, and a path outside it is a **different repository's file**,
|
|
55
|
-
* reported as such. Matching on basename instead would be RT-031's
|
|
56
|
-
* identity-proxy error — `server.mjs` exists in both fixture repos.
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* Absolute observed path → repo-relative graph path, or a refusal saying
|
|
60
|
-
* which of the two coordinate systems went wrong.
|
|
19
|
+
* Absolute observed path -> repo-relative graph path, or a refusal naming which coordinate system
|
|
20
|
+
* disagreed. Evidence names an absolute on-disk path (rewriting it at capture would destroy the
|
|
21
|
+
* observation); graph nodes carry repo-relative paths (path-dependent identity churns on checkout
|
|
22
|
+
* location). A path outside `repoRoot` is a different repository's file, reported as such —
|
|
23
|
+
* basename matching would be RT-031's identity-proxy error (`server.mjs` exists in both fixture
|
|
24
|
+
* repos). Shared, not copied — both resolvers here must translate identically.
|
|
61
25
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* **A third coordinate system, alongside absolute and repo-relative:
|
|
69
|
-
* relative-to-whatever-cwd-the-process-was-launched-in.** RT-113 measured it
|
|
70
|
-
* against Ruby — a backtrace prints the path exactly as invoked, never
|
|
71
|
-
* normalized — but nothing about the fact is Ruby-specific: any runtime that
|
|
72
|
-
* echoes its own invocation argument verbatim produces the same shape, and
|
|
73
|
-
* this function cannot tell that class of relative path from an
|
|
74
|
-
* already-repo-relative one by looking at it. It can only be told, by a
|
|
75
|
-
* caller that knows the directory the process actually ran in. `cwd` is that
|
|
76
|
-
* signal: passing it is how a caller opts a relative path into this
|
|
77
|
-
* resolution instead of the passthrough below, so every existing caller that
|
|
78
|
-
* never supplies it keeps exactly its old behaviour (`resolveSymbolNode: a
|
|
79
|
-
* relative path still works unchanged`, `symbol.test.ts`). When given, a
|
|
80
|
-
* relative path is resolved against it into an absolute path and handed to
|
|
81
|
-
* the same repoRoot-relativisation the absolute branch already does below —
|
|
82
|
-
* one coordinate translation, not two.
|
|
26
|
+
* A relative path can also be relative-to-invocation-cwd, not already repo-relative (RT-113: a Ruby
|
|
27
|
+
* backtrace prints the path as invoked, unnormalized — any runtime that echoes its invocation
|
|
28
|
+
* argument verbatim has the same shape, and this can't tell the two apart by looking). `cwd`, when
|
|
29
|
+
* supplied, opts a relative path into cwd-then-repoRoot resolution; omitting it keeps the old
|
|
30
|
+
* passthrough.
|
|
83
31
|
*/
|
|
84
32
|
function toRepoRelative(file, repo, repoRoot, cwd) {
|
|
85
33
|
if (!isAbsolute(file)) {
|
|
86
34
|
if (cwd === undefined) {
|
|
87
|
-
// A leading `./` is
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
// `./self-failing-server.rs` verbatim; `discover()` (adapter-common)
|
|
92
|
-
// never produces a `./`-prefixed path, so the two would otherwise agree
|
|
93
|
-
// on everything but this one cosmetic prefix and report `not-found`.
|
|
94
|
-
// Stripped unconditionally: a leading `./` never carries identity,
|
|
95
|
-
// unlike `..` which genuinely means "outside" and is left alone.
|
|
96
|
-
//
|
|
97
|
-
// No `cwd` known means no way to distinguish "already repo-relative"
|
|
98
|
-
// from "relative to some other, unrecorded base" -- passthrough is the
|
|
99
|
-
// existing, deliberately narrow default, not a guess that this path is
|
|
100
|
-
// correct.
|
|
35
|
+
// A leading `./` is rustc's own path language (a relative source arg makes the panic header
|
|
36
|
+
// embed `./file.rs` verbatim); discover() never produces one, so strip it unconditionally --
|
|
37
|
+
// unlike `..`, which genuinely means "outside" and is left alone. No `cwd` known means no way
|
|
38
|
+
// to tell "already repo-relative" from "relative to some other unrecorded base" -- passthrough.
|
|
101
39
|
return { ok: true, file: file.startsWith("./") ? file.slice(2) : file };
|
|
102
40
|
}
|
|
103
41
|
file = resolvePath(cwd, file);
|
|
@@ -122,12 +60,10 @@ function toRepoRelative(file, repo, repoRoot, cwd) {
|
|
|
122
60
|
}
|
|
123
61
|
export function resolveSymbolNode(driver, location, repo,
|
|
124
62
|
/**
|
|
125
|
-
* `cwd`: the directory the process that produced `location.file`
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* behaviour every other caller already relies on for an already
|
|
130
|
-
* repo-relative path.
|
|
63
|
+
* `cwd`: the directory the process that produced `location.file` actually
|
|
64
|
+
* ran in. Pass it when the runtime echoes its invocation argument verbatim
|
|
65
|
+
* (RT-113: Ruby) -- omitting it keeps the passthrough behaviour other
|
|
66
|
+
* callers rely on for an already repo-relative path.
|
|
131
67
|
*/
|
|
132
68
|
options = {}) {
|
|
133
69
|
const translated = toRepoRelative(location.file, repo, options.repoRoot, options.cwd);
|
|
@@ -158,10 +94,9 @@ options = {}) {
|
|
|
158
94
|
};
|
|
159
95
|
}
|
|
160
96
|
const node = matches[0];
|
|
161
|
-
// `null` joins `undefined`
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
// name-and-file match on the strength of information nobody captured.
|
|
97
|
+
// `null` joins `undefined` deliberately -- a frame with no line (a JVM
|
|
98
|
+
// "Unknown Source" frame) has nothing to check against; treating "no line"
|
|
99
|
+
// as a mismatch would reject a correct name+file match on no information.
|
|
165
100
|
if (location.line !== undefined && location.line !== null && node.range !== null) {
|
|
166
101
|
const { startLine, endLine } = node.range;
|
|
167
102
|
if (location.line < startLine || location.line > endLine) {
|
|
@@ -180,10 +115,8 @@ export function resolveSymbolAcrossRepos(driver, location, knownRepos, options =
|
|
|
180
115
|
const resolved = [];
|
|
181
116
|
for (const repo of knownRepos) {
|
|
182
117
|
const result = resolveSymbolNode(driver, location, repo, options);
|
|
183
|
-
// Only a clean `resolved` counts
|
|
184
|
-
//
|
|
185
|
-
// refusal, not a hit to compare against the other repos' results, and
|
|
186
|
-
// folding them in would understate the ambiguity rather than report it.
|
|
118
|
+
// Only a clean `resolved` counts -- `ambiguous`/`line-mismatch` are that
|
|
119
|
+
// repo's own refusal, not a hit to compare against other repos.
|
|
187
120
|
if (result.outcome === "resolved")
|
|
188
121
|
resolved.push({ repo, node: result.node });
|
|
189
122
|
}
|
|
@@ -223,10 +156,8 @@ options = {}) {
|
|
|
223
156
|
};
|
|
224
157
|
}
|
|
225
158
|
if (matches.length > 1) {
|
|
226
|
-
// Two modules
|
|
227
|
-
//
|
|
228
|
-
// which one the frame was inside, and neither does a line, since module
|
|
229
|
-
// ranges routinely nest. Refused rather than ranked.
|
|
159
|
+
// Two modules in one file is legitimate (Ruby, C#, Python nested scopes)
|
|
160
|
+
// -- neither file nor line say which; module ranges routinely nest. Refused, not ranked.
|
|
230
161
|
return {
|
|
231
162
|
outcome: "ambiguous",
|
|
232
163
|
candidates: matches,
|
|
@@ -248,11 +179,8 @@ options = {}) {
|
|
|
248
179
|
const file = translated.file;
|
|
249
180
|
const matches = findNodes(driver, { name: location.testName, file, repo, limit: 10 }).filter((n) => n.type === "TEST_CASE");
|
|
250
181
|
if (matches.length > 1) {
|
|
251
|
-
//
|
|
252
|
-
// nest,
|
|
253
|
-
// file. The observed event carries a line, but test ranges nest just as
|
|
254
|
-
// module ranges do, so the innermost is not reliably the right one.
|
|
255
|
-
// Refused rather than ranked, exactly as above.
|
|
182
|
+
// Same name in one file is ordinary -- describe blocks nest, and test
|
|
183
|
+
// ranges nest too, so the innermost line match isn't reliably right. Refused, not ranked.
|
|
256
184
|
return {
|
|
257
185
|
outcome: "ambiguous",
|
|
258
186
|
candidates: matches,
|
|
@@ -280,20 +208,14 @@ options = {}) {
|
|
|
280
208
|
return explainMissingTestCase(driver, file, repo, location.testName, options.producerScanLimit);
|
|
281
209
|
}
|
|
282
210
|
/**
|
|
283
|
-
* Why nothing matched
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* Kept separate from the resolver so the resolver reads as one decision, and
|
|
287
|
-
* so this can be exercised directly: three of the four branches need a store
|
|
288
|
-
* shaped a particular way, and reaching them through the happy path would
|
|
289
|
-
* mean every test also depended on name matching working.
|
|
211
|
+
* Why nothing matched -- distinguishes four situations that all present as
|
|
212
|
+
* an empty result set. Kept separate so the resolver reads as one decision
|
|
213
|
+
* and this can be tested directly without routing through name matching.
|
|
290
214
|
*/
|
|
291
215
|
function explainMissingTestCase(driver, file, repo, testName, scanLimit) {
|
|
292
216
|
const inFile = findNodes(driver, { file, repo, limit: 200 });
|
|
293
|
-
// (1) Nothing at all from this file
|
|
294
|
-
//
|
|
295
|
-
// producer claim here would be wrong in a specific way: it would blame the
|
|
296
|
-
// language when the file was never opened.
|
|
217
|
+
// (1) Nothing at all from this file -- no adapter read it (excluded path, unsupported extension,
|
|
218
|
+
// file newer than graph). A producer claim here would blame the language when the file was never opened.
|
|
297
219
|
if (inFile.length === 0) {
|
|
298
220
|
return {
|
|
299
221
|
outcome: "not-found",
|
|
@@ -307,8 +229,7 @@ function explainMissingTestCase(driver, file, repo, testName, scanLimit) {
|
|
|
307
229
|
const { nodes: testCases, truncated } = nodesOfType(driver, "TEST_CASE", limit);
|
|
308
230
|
const sameLanguage = testCases.filter((n) => n.language === language);
|
|
309
231
|
if (sameLanguage.length === 0) {
|
|
310
|
-
// (2) The scan hit its cap, so "none" was measured over a sample.
|
|
311
|
-
// producer claim is withheld rather than made cheaply.
|
|
232
|
+
// (2) The scan hit its cap, so "none" was measured over a sample -- the claim is withheld rather than made cheaply.
|
|
312
233
|
if (truncated) {
|
|
313
234
|
return {
|
|
314
235
|
outcome: "not-found",
|
|
@@ -317,9 +238,8 @@ function explainMissingTestCase(driver, file, repo, testName, scanLimit) {
|
|
|
317
238
|
"not the set, so no claim about the producer is made from it. Raise `producerScanLimit`.",
|
|
318
239
|
};
|
|
319
240
|
}
|
|
320
|
-
// (3) The whole store holds no TEST_CASE node of this provenance
|
|
321
|
-
//
|
|
322
|
-
// the two producer-side readings applies.
|
|
241
|
+
// (3) The whole store holds no TEST_CASE node of this provenance -- not a consumer-side miss;
|
|
242
|
+
// the reason says so without deciding which of the two producer-side readings applies.
|
|
323
243
|
return {
|
|
324
244
|
outcome: "producer-emitted-none",
|
|
325
245
|
language,
|
|
@@ -330,9 +250,7 @@ function explainMissingTestCase(driver, file, repo, testName, scanLimit) {
|
|
|
330
250
|
"same as the test being absent from a graph that could have held it.",
|
|
331
251
|
};
|
|
332
252
|
}
|
|
333
|
-
// (4)
|
|
334
|
-
// still is not there — a real consumer-side miss, and the only branch where
|
|
335
|
-
// "the graph does not have your test" is the honest sentence.
|
|
253
|
+
// (4) Producer emits for this provenance; this test still isn't there -- the only branch where "the graph doesn't have your test" is honest.
|
|
336
254
|
return {
|
|
337
255
|
outcome: "not-found",
|
|
338
256
|
reason: `No TEST_CASE node named "${testName}" in "${file}" within repo "${repo}", though ` +
|
package/dist/symbol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol.js","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"symbol.js","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO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CAAC;QAC9B,oHAAoH;QACpH,IAAI,SAAS,EAAE,CAAC;YACd,OAAO;gBACL,OAAO,EAAE,WAAW;gBACpB,MAAM,EACJ,4BAA4B,QAAQ,SAAS,IAAI,uCAAuC;oBACxF,yDAAyD,KAAK,4BAA4B;oBAC1F,yFAAyF;aAC5F,CAAC;QACJ,CAAC;QACD,8FAA8F;QAC9F,uFAAuF;QACvF,OAAO;YACL,OAAO,EAAE,uBAAuB;YAChC,QAAQ;YACR,MAAM,EACJ,iEAAiE,IAAI,OAAO,SAAS,CAAC,MAAM,GAAG;gBAC/F,4FAA4F;gBAC5F,yFAAyF;gBACzF,oBAAoB,QAAQ,kEAAkE;gBAC9F,qEAAqE;SACxE,CAAC;IACJ,CAAC;IAED,6IAA6I;IAC7I,OAAO;QACL,OAAO,EAAE,WAAW;QACpB,MAAM,EACJ,4BAA4B,QAAQ,SAAS,IAAI,kBAAkB,IAAI,YAAY;YACnF,GAAG,YAAY,CAAC,MAAM,0EAA0E;YAChG,0FAA0F;YAC1F,6DAA6D;KAChE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descryy/runtime-graph-correlator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Resolves runtime evidence to descry-core graph nodes and builds the observed graph path between them. Deliverable of the correlation/graph-integration row
|
|
5
|
+
"description": "Resolves runtime evidence to descry-core graph nodes and builds the observed graph path between them. Deliverable of the correlation/graph-integration row — depends on @descryy/runtime-contracts, @descryy/core and @descryy/ir; consumes the graph, does not modify it.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/descryhq-wq/descry-runtime.git",
|
|
10
|
+
"directory": "packages/graph-correlator"
|
|
11
|
+
},
|
|
7
12
|
"engines": {
|
|
8
13
|
"node": ">=22.5"
|
|
9
14
|
},
|
|
@@ -24,8 +29,8 @@
|
|
|
24
29
|
"build": "tsc -b"
|
|
25
30
|
},
|
|
26
31
|
"dependencies": {
|
|
27
|
-
"@descryy/runtime-contracts": "0.
|
|
28
|
-
"@descryy/core": "0.
|
|
29
|
-
"@descryy/ir": "0.
|
|
32
|
+
"@descryy/runtime-contracts": "0.3.1",
|
|
33
|
+
"@descryy/core": "0.5.1",
|
|
34
|
+
"@descryy/ir": "0.5.1"
|
|
30
35
|
}
|
|
31
36
|
}
|