@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.
Files changed (38) hide show
  1. package/LICENSE +6 -0
  2. package/dist/confirm-observed-caller.d.ts +27 -62
  3. package/dist/confirm-observed-caller.d.ts.map +1 -1
  4. package/dist/confirm-observed-caller.js +25 -60
  5. package/dist/confirm-observed-caller.js.map +1 -1
  6. package/dist/cross-service-call.d.ts +54 -104
  7. package/dist/cross-service-call.d.ts.map +1 -1
  8. package/dist/cross-service-call.js +59 -107
  9. package/dist/cross-service-call.js.map +1 -1
  10. package/dist/database-table.d.ts +8 -20
  11. package/dist/database-table.d.ts.map +1 -1
  12. package/dist/database-table.js +8 -20
  13. package/dist/database-table.js.map +1 -1
  14. package/dist/endpoint.d.ts +19 -43
  15. package/dist/endpoint.d.ts.map +1 -1
  16. package/dist/endpoint.js +20 -45
  17. package/dist/endpoint.js.map +1 -1
  18. package/dist/frontend-caller.d.ts +15 -37
  19. package/dist/frontend-caller.d.ts.map +1 -1
  20. package/dist/frontend-caller.js +15 -37
  21. package/dist/frontend-caller.js.map +1 -1
  22. package/dist/index.d.ts +5 -9
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +5 -9
  25. package/dist/index.js.map +1 -1
  26. package/dist/log-endpoint.d.ts +14 -35
  27. package/dist/log-endpoint.d.ts.map +1 -1
  28. package/dist/log-endpoint.js +15 -41
  29. package/dist/log-endpoint.js.map +1 -1
  30. package/dist/observed-frontend-caller.d.ts +20 -44
  31. package/dist/observed-frontend-caller.d.ts.map +1 -1
  32. package/dist/observed-frontend-caller.js +21 -51
  33. package/dist/observed-frontend-caller.js.map +1 -1
  34. package/dist/symbol.d.ts +44 -124
  35. package/dist/symbol.d.ts.map +1 -1
  36. package/dist/symbol.js +48 -130
  37. package/dist/symbol.js.map +1 -1
  38. package/package.json +10 -5
@@ -1,90 +1,38 @@
1
1
  /**
2
- * **A caller in one process, a route in another, joined without a browser.**
2
+ * A caller in one process, a route in another, joined without a browser.
3
3
  *
4
- * This is the arrow `observe-runtime`'s own header records as unreachable:
5
- * *"a backend-only run resolves both kinds of node and writes no edge... the
6
- * arrow is currently reachable only from a browser-driven run."* That was a
7
- * true statement about one collector, not about the wire. `NETWORK_REQUEST`
8
- * evidence carrying a call-site stack came from exactly one place —
9
- * `@descryhq-wq/runtime-browser`'s `fetch()` initiator capture — and every
10
- * backend collector set `stackTrace: null`, `ExternalRequestCollector`
11
- * included, *because the preload never captured one*. It does now
12
- * (`fetch-instrumentation.ts`), and this file is what turns that capture
13
- * into an edge.
4
+ * Closes the gap `observe-runtime` noted as unreachable: backend-only runs resolved both node kinds but
5
+ * wrote no edge, since `NETWORK_REQUEST` stacks only came from `runtime-browser`'s `fetch()` capture and
6
+ * every backend collector set `stackTrace: null`. `fetch-instrumentation.ts` now captures one
7
+ * backend-side too; this file turns it into an edge.
14
8
  *
15
- * ## The two ends, and why neither is inferred
9
+ * **Two ends, neither inferred.** Caller: `EXTERNAL_REQUEST` evidence carrying the outbound stack,
10
+ * resolved to a `FUNCTION` via `resolveSymbolNode`. Callee: `NETWORK_REQUEST` evidence from
11
+ * `InboundProxy` at the other process, resolved to an `API_ENDPOINT` via `resolveEndpointNode`
12
+ * (workspace-scoped, DEC-054). Both come from the observation; nothing here pairs attributions that
13
+ * merely co-occur.
16
14
  *
17
- * **The caller** is `EXTERNAL_REQUEST` evidence from the calling process,
18
- * carrying the stack the observed application's own `fetch` call site had at
19
- * the moment it called. Its site of interest (`primaryFrameLocation`, the
20
- * identical rule every other stack-to-evidence join here already uses)
21
- * resolves to a `FUNCTION` node via `resolveSymbolNode`.
15
+ * **The join, which is the precision question.** Two observations of one exchange must be shown to be
16
+ * the same exchange. Two joins accepted, each named in the result, never averaged:
22
17
  *
23
- * **The callee** is `NETWORK_REQUEST` evidence observed *at the other
24
- * process* — `InboundProxy`'s own capture of a request arriving. Its
25
- * `method`/`path` resolve to an `API_ENDPOINT` node via
26
- * `resolveEndpointNode`. `API_ENDPOINT` is workspace-scoped, not repo-scoped
27
- * (DEC-054, and `endpoint.ts`'s own header), so there is no "which repo's
28
- * route" question to answer and no repo filter to invent.
29
- *
30
- * Both ends come from the observation. Nothing here pairs up attributions
31
- * that merely co-occur in a run — the exact manufacture `observe-runtime`'s
32
- * header rules out — because a pair of co-occurring observations is not a
33
- * witnessed relationship.
34
- *
35
- * ## The join, which is the whole precision question
36
- *
37
- * Two observations of one HTTP exchange, from two processes, have to be
38
- * shown to be the *same* exchange. Two joins are accepted and each one is
39
- * named in the result, never averaged into a single confidence number:
40
- *
41
- * | join | what it rests on |
18
+ * | join | rests on |
42
19
  * | --- | --- |
43
- * | `correlation-id` | both observations carry the same non-null `traceId` or `requestId`, within one execution — the application propagated an id and both sides read it back |
44
- * | `run-owned-authority` | the outbound URL's authority is a listening post **Descry itself bound** for the named callee service in this run, and that callee independently observed the same method and path |
45
- *
46
- * `correlation-id` is preferred whenever it is available. It is the rule
47
- * `correlateBackendEvidence` (`@descryy/runtime-backend-observation`) already
48
- * applies to backend evidence, applied here to the same fields; this module
49
- * does not call that function because it needs a *join decision*, not a
50
- * `Correlation` record with a fresh UUID, and importing it would put an
51
- * unpublished-scope package into a published one's dependency list for no
52
- * gain.
53
- *
54
- * `run-owned-authority` exists because requiring `correlation-id` alone
55
- * would make this whole mechanism conditional on the application under test
56
- * already propagating trace headers — which the UAT workspace did not, and
57
- * which is the sort of precondition that turns a capability into a
58
- * disclosure. It is not a weaker guess: the authority is not matched against
59
- * a hostname this module recognises, it is matched against a `host:port`
60
- * **the caller declares Descry allocated for that service in this run**
61
- * (`observedAuthorities`). Declared, never inferred — the same discipline
62
- * RT-032 already applies to service start order. A call that reached a port
63
- * Descry itself bound for service B, answered successfully, and shows up in
64
- * B's own independent inbound observation of the same method and path, is a
65
- * call that reached that route.
66
- *
67
- * Both joins additionally require what `correlateBackendEvidence` requires:
68
- * one `executionId`. Evidence from two runs is never joined on a bare
69
- * identifier.
70
- *
71
- * ## What is refused, and why refusal is the point
72
- *
73
- * No stack, an unresolvable frame, an ambiguous symbol, an unresolvable or
74
- * ambiguous endpoint, an outbound call that reached nothing, an authority
75
- * nobody declared, no matching inbound observation — every one of these
76
- * returns a named refusal with a reason and **no edge**. Rule 2, stated in
77
- * the plan that asked for this file: *"a wrong cross-repo edge corrupts diff
78
- * scoping, impact scores and root-cause traversal in every layer above it.
79
- * If the join is uncertain, omit the edge and disclose."*
80
- *
81
- * ## What this does not do
82
- *
83
- * - **No denial arrow.** Identical reasoning to
84
- * `confirm-observed-caller.ts`: a run establishes that a call happened and
85
- * can never establish that one did not.
86
- * - **It does not judge a finding** (RT-027), decide staleness, or invent a
87
- * node — core's refusals pass through whole.
20
+ * | `correlation-id` | both observations carry the same non-null `traceId`/`requestId` in one execution |
21
+ * | `run-owned-authority` | the outbound authority is a listening post Descry itself bound for the named callee, independently confirmed by that callee's own observation of the same method+path |
22
+ *
23
+ * `correlation-id` is preferred — same rule as `correlateBackendEvidence`, reimplemented rather than
24
+ * imported (needs a join decision, not a fresh `Correlation` record; avoids an unpublished-scope dependency).
25
+ * `run-owned-authority` exists because `correlation-id` alone requires the app under test to propagate
26
+ * trace headers, which the UAT workspace did not — the authority is matched against a `host:port` the
27
+ * caller declares Descry allocated for that service (`observedAuthorities`), declared never inferred
28
+ * (RT-032's discipline). Both joins require one shared `executionId` — never joined across runs.
29
+ *
30
+ * **Refusal is the point.** No stack, unresolvable frame/symbol/endpoint, a call that reached nothing, an
31
+ * undeclared authority, no matching inbound — every one is a named refusal, no edge (rule 2: a wrong
32
+ * cross-repo edge corrupts diff scoping, impact and root-cause traversal above it).
33
+ *
34
+ * **No denial arrow** — same reasoning as `confirm-observed-caller.ts`: can establish a call happened,
35
+ * never that it didn't. Also doesn't judge a finding (RT-027), decide staleness, or invent a node.
88
36
  */
89
37
  import { applyRuntimeObservations, } from "@descryy/core";
90
38
  import { primaryFrameLocation } from "@descryy/runtime-contracts";
@@ -103,12 +51,7 @@ function pathOnly(path) {
103
51
  const cut = path.indexOf("?");
104
52
  return cut === -1 ? path : path.slice(0, cut);
105
53
  }
106
- /**
107
- * The same rule `correlateBackendEvidence` applies — one execution, a
108
- * non-null id, equal on both sides, `traceId` before `requestId` — reading
109
- * the same canonical `Evidence` fields. See this module's header for why the
110
- * function itself is not imported.
111
- */
54
+ /** Same rule `correlateBackendEvidence` applies (one execution, non-null id equal on both sides, `traceId` before `requestId`) — see header for why that function itself isn't imported. */
112
55
  function correlationJoin(a, b) {
113
56
  if (a.executionId !== b.executionId)
114
57
  return null;
@@ -144,10 +87,8 @@ function describesSameExchange(target, inbound) {
144
87
  }
145
88
  function joinFor(input, target) {
146
89
  const sameExchange = input.inbound.filter((candidate) => candidate.eventType === "NETWORK_REQUEST" && describesSameExchange(target, candidate));
147
- // Preferred join first, over the whole candidate set -- an id that both
148
- // sides carry is a stronger statement than an authority this run bound,
149
- // and checking it first means the stronger one is never passed over
150
- // because a weaker one happened to match earlier in the list.
90
+ // Preferred join checked first over the whole candidate set -- an id both sides carry is
91
+ // stronger than a bound authority; check first so it's never passed over for a weaker match.
151
92
  for (const candidate of sameExchange) {
152
93
  const join = correlationJoin(input.outbound, candidate);
153
94
  if (join !== null)
@@ -162,11 +103,8 @@ function joinFor(input, target) {
162
103
  "Joining on method and path alone would pair two observations that merely look alike.",
163
104
  };
164
105
  }
165
- // The outbound call must have reached something. `success` is
166
- // `fetch`-resolved-rather-than-threw and `status` is the real response
167
- // code, both captured by the preload before the call returned to the
168
- // application: a call that threw reached no route, whatever else was
169
- // observed at the callee in the same window.
106
+ // The outbound call must have reached something -- `success` is fetch-resolved-rather-than-threw,
107
+ // captured by the preload before return: a call that threw reached no route regardless of what the callee saw.
170
108
  if (payloadBoolean(input.outbound, "success") !== true) {
171
109
  return {
172
110
  reason: `The outbound ${target.method} ${target.path} to "${target.authority}" did not resolve to a response ` +
@@ -220,6 +158,23 @@ export function resolveObservedCrossServiceCall(driver, input) {
220
158
  const joined = joinFor(input, target);
221
159
  if (!("join" in joined))
222
160
  return { outcome: "unjoined", reason: joined.reason };
161
+ // RT-N3: gate BEFORE resolving endpoint/caller -- an edge minted from
162
+ // content this run did not watch happen must never be minted at all, not
163
+ // merely left unconfirmed. Checked on both sides of the join: either one
164
+ // predating the observation window is enough to disqualify the pair.
165
+ if (input.outbound.preExisting === true || joined.inbound.preExisting === true) {
166
+ const which = input.outbound.preExisting === true && joined.inbound.preExisting === true
167
+ ? "Both the outbound call and the inbound observation it joined to"
168
+ : input.outbound.preExisting === true
169
+ ? "The outbound call"
170
+ : "The inbound observation it joined to";
171
+ return {
172
+ outcome: "pre-existing-evidence",
173
+ reason: `${which} predate this run's observation window (Evidence.preExisting) -- real evidence, but not ` +
174
+ "something this run watched happen. R4 means \"observed by THIS run\"; refusing to mint or confirm " +
175
+ "an edge from it rather than reporting a fresher run than the one that actually occurred.",
176
+ };
177
+ }
223
178
  const inboundMethod = payloadString(joined.inbound, "method") ?? target.method;
224
179
  const inboundPath = pathOnly(payloadString(joined.inbound, "path") ?? target.path);
225
180
  const endpoint = resolveEndpointNode(driver, inboundMethod, inboundPath);
@@ -255,22 +210,19 @@ const EMPTY = {
255
210
  };
256
211
  /**
257
212
  * Resolve one observed cross-service call and, when it genuinely observed
258
- * something, record it as R4 evidence against the graph.
213
+ * something, record it as R4 evidence.
259
214
  *
260
- * The `USES_API` edge this writes is the one a static adapter structurally
261
- * cannot produce when the target URL is assembled at runtime — the caller in
262
- * the fixture this was proven against builds it from an environment
263
- * variable — so this is `applyRuntimeObservations`' "recall gap closed" case
264
- * far more often than its promotion case.
215
+ * Writes the `USES_API` edge a static adapter structurally cannot produce
216
+ * when the target URL is assembled at runtime (the fixture this was proven
217
+ * against builds it from an env var) — so this is `applyRuntimeObservations`'
218
+ * "recall gap closed" case far more often than its promotion case.
265
219
  */
266
220
  export function confirmObservedCrossServiceCall(driver, input) {
267
221
  const resolution = resolveObservedCrossServiceCall(driver, input);
268
222
  if (resolution.outcome !== "observed") {
269
- // Deliberately not a call with an empty list: an `adapter_runs` row
270
- // would be minted for a run that witnessed nothing, which reads in the
271
- // ledger exactly like a run that observed and found nothing to say.
272
- // Those are different statements. (`confirm-observed-caller.ts`'s own
273
- // reasoning, unchanged.)
223
+ // Deliberately not an empty-list call -- an `adapter_runs` row would then
224
+ // read like a run that observed and found nothing to say (same
225
+ // reasoning as confirm-observed-caller.ts).
274
226
  return { resolution, observations: [], confirmation: EMPTY };
275
227
  }
276
228
  const observations = [
@@ -1 +1 @@
1
- {"version":3,"file":"cross-service-call.js","sourceRoot":"","sources":["../src/cross-service-call.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AAGH,OAAO,EACL,wBAAwB,GAGzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAiB,MAAM,4BAA4B,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAsEhD,SAAS,aAAa,CAAC,QAAkB,EAAE,GAAW;IACpD,MAAM,KAAK,GAAI,QAAQ,CAAC,OAA0C,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1E,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC;AAED,SAAS,cAAc,CAAC,QAAkB,EAAE,GAAW;IACrD,MAAM,KAAK,GAAI,QAAQ,CAAC,OAA0C,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1E,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED,2KAA2K;AAC3K,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM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C;QACtD;YACE,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,EAAE;YAC9B,EAAE,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE;YAC9B,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,IAAI;YACV,MAAM,EACJ,0EAA0E,UAAU,CAAC,UAAU,CAAC,IAAI,GAAG;gBACvG,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,IAAI,cAAc,yDAAyD;gBACzG,MAAM,UAAU,CAAC,YAAY,CAAC,IAAI,8CAA8C,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI;SAC3G;KACF,CAAC;IAEF,OAAO;QACL,UAAU;QACV,YAAY;QACZ,YAAY,EAAE,wBAAwB,CAAC,MAAM,EAAE;YAC7C,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,YAAY;SACb,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -1,25 +1,13 @@
1
1
  /**
2
- * Resolving a captured query's target table name (a real, observed string —
3
- * `extractTargetTable`, `@descryy/runtime-database-observation`) to the
4
- * `DATABASE_TABLE` node it names — the §10/§18 join `DatabaseQueryCollector`
5
- * disclosed as missing since RT-141: real query capture, `graphNodeId`
6
- * always null.
2
+ * Resolves a captured query's target table name (`extractTargetTable`, `@descryy/runtime-database-
3
+ * observation`) to the `DATABASE_TABLE` node — the join `DatabaseQueryCollector` disclosed missing
4
+ * since RT-141: real query capture, `graphNodeId` always null.
7
5
  *
8
- * **`DATABASE_TABLE` is workspace-scoped, not repo-scoped** (`adapter-sql`'s
9
- * own `extract`/`adapter.ts`, DEC-054) — the same reason `resolveEndpointNode`
10
- * (`endpoint.ts`, this package) takes no `repo` parameter: a migration can
11
- * live in one repository and the service reading the table in another, and
12
- * DEC-054 exists specifically so they still join. A runtime observation
13
- * carries no repository at all for a bare table name — the observed
14
- * process's own source may not even be one of the repos this graph indexed
15
- * — so taking a `repo` filter here would be inventing a constraint the
16
- * caller has no way to satisfy.
17
- *
18
- * **Unlike an endpoint, a table name is not a template.** No segment
19
- * matching, no `{param}` — `DATABASE_TABLE.name` is the bare table name
20
- * (`adapter-sql`'s `extract.ts`: `name: table.table`), so this is a plain
21
- * equality match against every candidate, the simpler half of
22
- * `resolveEndpointNode`'s own two-part job.
6
+ * `DATABASE_TABLE` is workspace-scoped, not repo-scoped (`adapter-sql`, DEC-054) — a migration can
7
+ * live in one repo and the reading service in another, and a runtime observation carries no repo
8
+ * for a bare table name, so no `repo` filter here (same reason `resolveEndpointNode` has none).
9
+ * Table names aren't templated like endpoints (no `{param}`), so this is a plain equality match —
10
+ * simpler than `resolveEndpointNode`'s two-part job.
23
11
  */
24
12
  import type { IRNode } from "@descryy/ir";
25
13
  import { type SqlDriver } from "@descryy/core";
@@ -1 +1 @@
1
- {"version":3,"file":"database-table.d.ts","sourceRoot":"","sources":["../src/database-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAC/B;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,MAAM,CAAA;CAAE,CAAC;AAEvG,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,uBAAuB,CA+BzB"}
1
+ {"version":3,"file":"database-table.d.ts","sourceRoot":"","sources":["../src/database-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAC/B;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,MAAM,CAAA;CAAE,CAAC;AAEvG,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,uBAAuB,CA+BzB"}
@@ -1,25 +1,13 @@
1
1
  /**
2
- * Resolving a captured query's target table name (a real, observed string —
3
- * `extractTargetTable`, `@descryy/runtime-database-observation`) to the
4
- * `DATABASE_TABLE` node it names — the §10/§18 join `DatabaseQueryCollector`
5
- * disclosed as missing since RT-141: real query capture, `graphNodeId`
6
- * always null.
2
+ * Resolves a captured query's target table name (`extractTargetTable`, `@descryy/runtime-database-
3
+ * observation`) to the `DATABASE_TABLE` node — the join `DatabaseQueryCollector` disclosed missing
4
+ * since RT-141: real query capture, `graphNodeId` always null.
7
5
  *
8
- * **`DATABASE_TABLE` is workspace-scoped, not repo-scoped** (`adapter-sql`'s
9
- * own `extract`/`adapter.ts`, DEC-054) — the same reason `resolveEndpointNode`
10
- * (`endpoint.ts`, this package) takes no `repo` parameter: a migration can
11
- * live in one repository and the service reading the table in another, and
12
- * DEC-054 exists specifically so they still join. A runtime observation
13
- * carries no repository at all for a bare table name — the observed
14
- * process's own source may not even be one of the repos this graph indexed
15
- * — so taking a `repo` filter here would be inventing a constraint the
16
- * caller has no way to satisfy.
17
- *
18
- * **Unlike an endpoint, a table name is not a template.** No segment
19
- * matching, no `{param}` — `DATABASE_TABLE.name` is the bare table name
20
- * (`adapter-sql`'s `extract.ts`: `name: table.table`), so this is a plain
21
- * equality match against every candidate, the simpler half of
22
- * `resolveEndpointNode`'s own two-part job.
6
+ * `DATABASE_TABLE` is workspace-scoped, not repo-scoped (`adapter-sql`, DEC-054) — a migration can
7
+ * live in one repo and the reading service in another, and a runtime observation carries no repo
8
+ * for a bare table name, so no `repo` filter here (same reason `resolveEndpointNode` has none).
9
+ * Table names aren't templated like endpoints (no `{param}`), so this is a plain equality match —
10
+ * simpler than `resolveEndpointNode`'s two-part job.
23
11
  */
24
12
  import { nodesOfType } from "@descryy/core";
25
13
  export function resolveDatabaseTableNode(driver, tableName, options = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"database-table.js","sourceRoot":"","sources":["../src/database-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAC;AAO5D,MAAM,UAAU,wBAAwB,CACtC,MAAiB,EACjB,SAAiB,EACjB,UAAuC,EAAE;IAEzC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;IAC1F,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IAEhE,IAAI,OAAO,CA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CAAC,CAAC;IAEhE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,MAAM,EACJ,iCAAiC,SAAS,IAAI;gBAC9C,CAAC,SAAS;oBACR,CAAC,CAAC,uFAAuF;wBACvF,oCAAoC;oBACtC,CAAC,CAAC,uFAAuF;wBACvF,6DAA6D,CAAC;SACrE,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,UAAU,EAAE,OAAO;YACnB,MAAM,EACJ,GAAG,OAAO,CAAC,MAAM,oCAAoC,SAAS,MAAM;gBACpE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAI,CAAC,CAAC,KAAK,CAAC,MAA6B,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;gBAClG,uFAAuF;gBACvF,yFAAyF;gBACzF,mBAAmB;SACtB,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAE,EAAE,CAAC;AACpD,CAAC"}
@@ -1,31 +1,15 @@
1
1
  /**
2
- * Resolving observed HTTP evidence (a real request's method + literal path)
3
- * to the `API_ENDPOINT` node it was served by — plan §12/§25 ("Runtime
4
- * should be able to build an observed path such as FUNCTION → API_ROUTE →
5
- * API_ENDPOINT → FUNCTION → DATABASE_TABLE, where the static graph and
6
- * runtime evidence actually support those links").
2
+ * Resolves observed HTTP evidence (method + literal path) to the `API_ENDPOINT` node it was served
3
+ * by (plan §12/§25). `API_ENDPOINT` is workspace-scoped, not repo-scoped (DEC-054), and the one join
4
+ * node two repos mint identically with no shared code (DEC-115) — so there's no "wrong repository"
5
+ * version to pick, and this file takes no `repo`/`scope` parameter.
7
6
  *
8
- * `API_ENDPOINT` is workspace-scoped, not repo-scoped (DEC-054) — it is
9
- * deliberately the one join node two repositories mint identically with no
10
- * shared code (DEC-115). That means, unlike a `FUNCTION` lookup, there is no
11
- * "wrong repository" version of this node to accidentally pick: any
12
- * `API_ENDPOINT` in the store is the one shared join point by construction,
13
- * so this file takes no `repo`/`scope` parameter — adding one would be
14
- * inventing a filter with nothing behind it to filter on.
15
- *
16
- * What this file *does* have to solve, that a bare identity hash cannot: a
17
- * real request's URL is a literal (`/orders/5`), while the route that served
18
- * it may have been minted from a parameterised template
19
- * (`/orders/{param}`, per `normaliseEndpointPath`). Those hash to different
20
- * ids, so resolution here is a segment-wise match against every candidate's
21
- * *name*, not a single `getNode` by a computed id. That is also what makes
22
- * "similar endpoint" (plan §38's own negative-control name) a real,
23
- * representable outcome here rather than a hypothetical: a literal route
24
- * (`GET /orders/active`) and a parameterised one (`GET /orders/{param}`) can
25
- * both legitimately match one observed request, and this resolver reports
26
- * that as `ambiguous` rather than guessing which one actually served it —
27
- * the same discipline `resolveOneNode` (descry-core's MCP lookup) applies to
28
- * a name search, one layer down at the network-evidence layer instead.
7
+ * A request's URL is a literal (`/orders/5`); the route that served it may be a parameterised
8
+ * template (`/orders/{param}`, `normaliseEndpointPath`), which hashes to a different id — so this
9
+ * matches segment-wise against every candidate's *name*, not a single `getNode` by computed id.
10
+ * That also makes "similar endpoint" (plan §38) a real outcome: a literal route and a parameterised
11
+ * one can both match one request, and this resolver reports `ambiguous` rather than guessing which
12
+ * served it — same discipline `resolveOneNode` applies one layer down.
29
13
  */
30
14
  import { type IRNode } from "@descryy/ir";
31
15
  import { type SqlDriver } from "@descryy/core";
@@ -44,25 +28,17 @@ export declare function resolveEndpointNode(driver: SqlDriver, method: string, o
44
28
  readonly limit?: number;
45
29
  }): EndpointResolution;
46
30
  /**
47
- * Every `API_ENDPOINT` whose path shape matches `observedPath`, **regardless
48
- * of method** — the query `resolveEndpointNode` deliberately does not answer
49
- * on its own, since it filters by method first and a caller asking "does
50
- * this path exist under a different method" needs the method filter removed
51
- * entirely, not relaxed.
31
+ * Every `API_ENDPOINT` whose path shape matches `observedPath`, regardless of method —
32
+ * `resolveEndpointNode` filters by method first, so this exists for "does this path exist under a
33
+ * different method."
52
34
  *
53
- * Built for one caller (`@descryy/runtime-openapi-observation`'s "wrong
54
- * method" vs "undocumented" distinction, checklist §15): a request whose
55
- * exact method+path resolves to nothing is a different fact from one whose
56
- * path resolves under some *other* method — the first says the operation
57
- * was never declared, the second says it was declared and the request used
58
- * the wrong verb. Conflating them would report "undocumented" for a request
59
- * a contract-reading person would call a client bug, not a documentation
60
- * gap.
35
+ * Built for `@descryy/runtime-openapi-observation`'s "wrong method" vs "undocumented" distinction
36
+ * (checklist §15): exact method+path resolving to nothing means the operation was never declared;
37
+ * resolving under some other method means it was declared and the request used the wrong verb.
38
+ * Conflating them would call a client bug a documentation gap.
61
39
  *
62
- * Ambiguity is not resolved here either — every shape-matching node is
63
- * returned, and the caller decides what "more than one, across methods"
64
- * means for its own question, the same "refuse rather than rank" split
65
- * `resolveEndpointNode` already uses for its own single-method case.
40
+ * Ambiguity isn't resolved here either — every shape-matching node across methods is returned, and
41
+ * the caller decides what "more than one" means.
66
42
  */
67
43
  export declare function resolveEndpointNodesByPath(driver: SqlDriver, observedPath: string, options?: {
68
44
  readonly limit?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../src/endpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAsC,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,OAA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E,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAYvG,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,kBAAkB,CA2CpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAapE"}
package/dist/endpoint.js CHANGED
@@ -1,37 +1,20 @@
1
1
  /**
2
- * Resolving observed HTTP evidence (a real request's method + literal path)
3
- * to the `API_ENDPOINT` node it was served by — plan §12/§25 ("Runtime
4
- * should be able to build an observed path such as FUNCTION → API_ROUTE →
5
- * API_ENDPOINT → FUNCTION → DATABASE_TABLE, where the static graph and
6
- * runtime evidence actually support those links").
2
+ * Resolves observed HTTP evidence (method + literal path) to the `API_ENDPOINT` node it was served
3
+ * by (plan §12/§25). `API_ENDPOINT` is workspace-scoped, not repo-scoped (DEC-054), and the one join
4
+ * node two repos mint identically with no shared code (DEC-115) — so there's no "wrong repository"
5
+ * version to pick, and this file takes no `repo`/`scope` parameter.
7
6
  *
8
- * `API_ENDPOINT` is workspace-scoped, not repo-scoped (DEC-054) — it is
9
- * deliberately the one join node two repositories mint identically with no
10
- * shared code (DEC-115). That means, unlike a `FUNCTION` lookup, there is no
11
- * "wrong repository" version of this node to accidentally pick: any
12
- * `API_ENDPOINT` in the store is the one shared join point by construction,
13
- * so this file takes no `repo`/`scope` parameter — adding one would be
14
- * inventing a filter with nothing behind it to filter on.
15
- *
16
- * What this file *does* have to solve, that a bare identity hash cannot: a
17
- * real request's URL is a literal (`/orders/5`), while the route that served
18
- * it may have been minted from a parameterised template
19
- * (`/orders/{param}`, per `normaliseEndpointPath`). Those hash to different
20
- * ids, so resolution here is a segment-wise match against every candidate's
21
- * *name*, not a single `getNode` by a computed id. That is also what makes
22
- * "similar endpoint" (plan §38's own negative-control name) a real,
23
- * representable outcome here rather than a hypothetical: a literal route
24
- * (`GET /orders/active`) and a parameterised one (`GET /orders/{param}`) can
25
- * both legitimately match one observed request, and this resolver reports
26
- * that as `ambiguous` rather than guessing which one actually served it —
27
- * the same discipline `resolveOneNode` (descry-core's MCP lookup) applies to
28
- * a name search, one layer down at the network-evidence layer instead.
7
+ * A request's URL is a literal (`/orders/5`); the route that served it may be a parameterised
8
+ * template (`/orders/{param}`, `normaliseEndpointPath`), which hashes to a different id — so this
9
+ * matches segment-wise against every candidate's *name*, not a single `getNode` by computed id.
10
+ * That also makes "similar endpoint" (plan §38) a real outcome: a literal route and a parameterised
11
+ * one can both match one request, and this resolver reports `ambiguous` rather than guessing which
12
+ * served it — same discipline `resolveOneNode` applies one layer down.
29
13
  */
30
14
  import { endpointQsp, normaliseEndpointPath } from "@descryy/ir";
31
15
  import { nodesOfType } from "@descryy/core";
32
16
  function pathSegments(path) {
33
- // `endpointQsp`'s own qualified path is "METHOD /normalised/path" — split
34
- // on "/" after the method prefix is stripped, same shape either side.
17
+ // qualified path is "METHOD /normalised/path" -- split after the method prefix, same shape either side.
35
18
  return normaliseEndpointPath(path).split("/");
36
19
  }
37
20
  function segmentsMatch(templateSegments, observedSegments) {
@@ -78,25 +61,17 @@ export function resolveEndpointNode(driver, method, observedPath, options = {})
78
61
  return { outcome: "resolved", node: matches[0] };
79
62
  }
80
63
  /**
81
- * Every `API_ENDPOINT` whose path shape matches `observedPath`, **regardless
82
- * of method** — the query `resolveEndpointNode` deliberately does not answer
83
- * on its own, since it filters by method first and a caller asking "does
84
- * this path exist under a different method" needs the method filter removed
85
- * entirely, not relaxed.
64
+ * Every `API_ENDPOINT` whose path shape matches `observedPath`, regardless of method —
65
+ * `resolveEndpointNode` filters by method first, so this exists for "does this path exist under a
66
+ * different method."
86
67
  *
87
- * Built for one caller (`@descryy/runtime-openapi-observation`'s "wrong
88
- * method" vs "undocumented" distinction, checklist §15): a request whose
89
- * exact method+path resolves to nothing is a different fact from one whose
90
- * path resolves under some *other* method — the first says the operation
91
- * was never declared, the second says it was declared and the request used
92
- * the wrong verb. Conflating them would report "undocumented" for a request
93
- * a contract-reading person would call a client bug, not a documentation
94
- * gap.
68
+ * Built for `@descryy/runtime-openapi-observation`'s "wrong method" vs "undocumented" distinction
69
+ * (checklist §15): exact method+path resolving to nothing means the operation was never declared;
70
+ * resolving under some other method means it was declared and the request used the wrong verb.
71
+ * Conflating them would call a client bug a documentation gap.
95
72
  *
96
- * Ambiguity is not resolved here either — every shape-matching node is
97
- * returned, and the caller decides what "more than one, across methods"
98
- * means for its own question, the same "refuse rather than rank" split
99
- * `resolveEndpointNode` already uses for its own single-method case.
73
+ * Ambiguity isn't resolved here either — every shape-matching node across methods is returned, and
74
+ * the caller decides what "more than one" means.
100
75
  */
101
76
  export function resolveEndpointNodesByPath(driver, observedPath, options = {}) {
102
77
  const observedSegments = pathSegments(observedPath);
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../src/endpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAe,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAC;AAO5D,SAAS,YAAY,CAAC,IAAY;IAChC,0EAA0E;IAC1E,sEAAsE;IACtE,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,aAAa,CAAC,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