@descryy/core 0.6.3 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/contracts/index.d.ts +3 -1
  2. package/dist/contracts/index.d.ts.map +1 -1
  3. package/dist/contracts/index.js +2 -1
  4. package/dist/contracts/index.js.map +1 -1
  5. package/dist/contracts/paths.d.ts +7 -0
  6. package/dist/contracts/paths.d.ts.map +1 -1
  7. package/dist/contracts/paths.js +7 -4
  8. package/dist/contracts/paths.js.map +1 -1
  9. package/dist/contracts/shapes.d.ts +12 -1
  10. package/dist/contracts/shapes.d.ts.map +1 -1
  11. package/dist/contracts/shapes.js +68 -0
  12. package/dist/contracts/shapes.js.map +1 -1
  13. package/dist/contracts/workspace-join.d.ts +104 -0
  14. package/dist/contracts/workspace-join.d.ts.map +1 -0
  15. package/dist/contracts/workspace-join.js +208 -0
  16. package/dist/contracts/workspace-join.js.map +1 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +4 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/query/index.d.ts +7 -3
  22. package/dist/query/index.d.ts.map +1 -1
  23. package/dist/query/index.js +4 -2
  24. package/dist/query/index.js.map +1 -1
  25. package/dist/query/model-table.d.ts +7 -0
  26. package/dist/query/model-table.d.ts.map +1 -1
  27. package/dist/query/model-table.js +7 -4
  28. package/dist/query/model-table.js.map +1 -1
  29. package/dist/query/persistence-reach.d.ts +150 -0
  30. package/dist/query/persistence-reach.d.ts.map +1 -0
  31. package/dist/query/persistence-reach.js +393 -0
  32. package/dist/query/persistence-reach.js.map +1 -0
  33. package/dist/query/queries.d.ts +5 -0
  34. package/dist/query/queries.d.ts.map +1 -1
  35. package/dist/query/queries.js +58 -0
  36. package/dist/query/queries.js.map +1 -1
  37. package/dist/query/user-chain.d.ts +89 -0
  38. package/dist/query/user-chain.d.ts.map +1 -0
  39. package/dist/query/user-chain.js +203 -0
  40. package/dist/query/user-chain.js.map +1 -0
  41. package/dist/sources/git/history.d.ts +12 -0
  42. package/dist/sources/git/history.d.ts.map +1 -1
  43. package/dist/sources/git/history.js +27 -0
  44. package/dist/sources/git/history.js.map +1 -1
  45. package/dist/sources/git/index.d.ts +1 -1
  46. package/dist/sources/git/index.d.ts.map +1 -1
  47. package/dist/sources/git/index.js +1 -1
  48. package/dist/sources/git/index.js.map +1 -1
  49. package/dist/store/incremental-cache.d.ts +120 -0
  50. package/dist/store/incremental-cache.d.ts.map +1 -0
  51. package/dist/store/incremental-cache.js +161 -0
  52. package/dist/store/incremental-cache.js.map +1 -0
  53. package/dist/store/index.d.ts +2 -0
  54. package/dist/store/index.d.ts.map +1 -1
  55. package/dist/store/index.js +1 -0
  56. package/dist/store/index.js.map +1 -1
  57. package/dist/store/reader.d.ts.map +1 -1
  58. package/dist/store/reader.js +6 -1
  59. package/dist/store/reader.js.map +1 -1
  60. package/dist/store/schema.d.ts +4 -4
  61. package/dist/store/schema.d.ts.map +1 -1
  62. package/dist/store/schema.js +46 -1
  63. package/dist/store/schema.js.map +1 -1
  64. package/dist/store/writer.d.ts.map +1 -1
  65. package/dist/store/writer.js +4 -3
  66. package/dist/store/writer.js.map +1 -1
  67. package/dist/tiers/certify.d.ts +174 -0
  68. package/dist/tiers/certify.d.ts.map +1 -1
  69. package/dist/tiers/certify.js +309 -5
  70. package/dist/tiers/certify.js.map +1 -1
  71. package/dist/tiers/index.d.ts +1 -1
  72. package/dist/tiers/index.d.ts.map +1 -1
  73. package/dist/tiers/index.js.map +1 -1
  74. package/dist/workspace/graph-layout.d.ts +85 -0
  75. package/dist/workspace/graph-layout.d.ts.map +1 -0
  76. package/dist/workspace/graph-layout.js +90 -0
  77. package/dist/workspace/graph-layout.js.map +1 -0
  78. package/dist/workspace/index.d.ts +3 -0
  79. package/dist/workspace/index.d.ts.map +1 -0
  80. package/dist/workspace/index.js +2 -0
  81. package/dist/workspace/index.js.map +1 -0
  82. package/package.json +2 -2
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;AAE5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;AAE5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
@@ -5,8 +5,10 @@ export type { MemoryGraph } from "./memory.ts";
5
5
  export { createStoreProvider, commitSpread } from "./sqlite.ts";
6
6
  export { bfs, weightedBfs, findPath, defaultTraversalWeight, API_JOIN_EDGE_TYPES } from "./traverse.ts";
7
7
  export type { Direction, Reached, TraversalOptions, TraversalOutcome, WeightedOptions } from "./traverse.ts";
8
- export { impactOf, rootCauseSearch, testsCovering, dataFlowFrom, DATA_FLOW_EDGE_TYPES, traceApi, changeRisk, changesWith, } from "./queries.ts";
9
- export type { ImpactOptions, RootCauseMatch, ChangeRisk, CoChange } from "./queries.ts";
8
+ export { impactOf, rootCauseSearch, testsCovering, dataFlowFrom, DATA_FLOW_EDGE_TYPES, traceApi, changeRisk, changesWith, reachablePages, } from "./queries.ts";
9
+ export type { ImpactOptions, RootCauseMatch, ChangeRisk, CoChange, ReachablePage } from "./queries.ts";
10
+ export { traceUserChain, CHAIN_STAGE_ORDER } from "./user-chain.ts";
11
+ export type { ChainStage, ChainStageName, UserChain } from "./user-chain.ts";
10
12
  export { similarIncidents, tokenSetSimilarity, fileOverlapSimilarity } from "./similar-incidents.ts";
11
13
  export type { SimilarFailureQuery, SimilarIncidentMatch, SimilarIncidentOptions, SimilarIncidentSignal, SimilarIncidentSignalKind, } from "./similar-incidents.ts";
12
14
  export { classifyRefusal, classifyRefusals, readRate } from "./unresolved.ts";
@@ -31,5 +33,7 @@ export { rankRootCause, DEFAULT_ROOT_CAUSE_WEIGHTS, ROOT_CAUSE_TRACE_EDGE_TYPES,
31
33
  export type { RootCauseWeights, RootCauseOptions, RankedRootCauseCandidate, RootCauseRanking, ChangeCouplingEvidence, } from "./root-cause-score.ts";
32
34
  export { createResolutionFloor } from "./resolution-floor.ts";
33
35
  export type { ResolutionFloor } from "./resolution-floor.ts";
34
- export { tableForModel, modelsForTable } from "./model-table.ts";
36
+ export { tableForModel, modelsForTable, tableIdForModel } from "./model-table.ts";
37
+ export { endpointsReachingTable, MODEL_ACCESS_EDGE_TYPES, WRITE_MEANING_NOTE } from "./persistence-reach.ts";
38
+ export type { AccessDirection, EndpointTableAccess, PersistenceHopGap, PersistencePath, PersistenceReach, PersistenceReachOptions, } from "./persistence-reach.ts";
35
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,WAAW,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACxG,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE7G,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACrG,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,yBAA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O,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrG,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC9F,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACpI,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC7G,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC"}
@@ -2,7 +2,8 @@ export { rankEdges, applyAdjacencyOptions } from "./provider.js";
2
2
  export { createMemoryProvider } from "./memory.js";
3
3
  export { createStoreProvider, commitSpread } from "./sqlite.js";
4
4
  export { bfs, weightedBfs, findPath, defaultTraversalWeight, API_JOIN_EDGE_TYPES } from "./traverse.js";
5
- export { impactOf, rootCauseSearch, testsCovering, dataFlowFrom, DATA_FLOW_EDGE_TYPES, traceApi, changeRisk, changesWith, } from "./queries.js";
5
+ export { impactOf, rootCauseSearch, testsCovering, dataFlowFrom, DATA_FLOW_EDGE_TYPES, traceApi, changeRisk, changesWith, reachablePages, } from "./queries.js";
6
+ export { traceUserChain, CHAIN_STAGE_ORDER } from "./user-chain.js";
6
7
  export { similarIncidents, tokenSetSimilarity, fileOverlapSimilarity } from "./similar-incidents.js";
7
8
  export { classifyRefusal, classifyRefusals, readRate } from "./unresolved.js";
8
9
  export { applyConfirmedFacts } from "./confirmed-facts.js";
@@ -15,5 +16,6 @@ export { applyDeclaredValues, DECLARED_VALUE_RELIABILITY } from "./declared-valu
15
16
  export { describeRowClosures } from "./row-closure-picture.js";
16
17
  export { rankRootCause, DEFAULT_ROOT_CAUSE_WEIGHTS, ROOT_CAUSE_TRACE_EDGE_TYPES, INCIDENT_SATURATION } from "./root-cause-score.js";
17
18
  export { createResolutionFloor } from "./resolution-floor.js";
18
- export { tableForModel, modelsForTable } from "./model-table.js";
19
+ export { tableForModel, modelsForTable, tableIdForModel } from "./model-table.js";
20
+ export { endpointsReachingTable, MODEL_ACCESS_EDGE_TYPES, WRITE_MEANING_NOTE } from "./persistence-reach.js";
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAQjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC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,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -16,6 +16,13 @@
16
16
  * time, not stored" precedent as `contracts/orphans.ts`'s `keyOf()`. */
17
17
  import { type IdentityScope, type IRNode } from "@descryy/ir";
18
18
  import type { AdjacencyProvider } from "./provider.ts";
19
+ /** The table id a `MODEL` node's own declared shape computes to, or
20
+ * `undefined` when it names no table — refused rather than guessed at mint
21
+ * time (`model-tables.ts`), so this is a real absence, not a lookup miss.
22
+ * Exported so a composed query can enumerate `MODEL` once and both filter and
23
+ * probe from that one enumeration; a second `nodesOfType` call to recover the
24
+ * same set is a scan the store does not need to repeat. */
25
+ export declare function tableIdForModel(model: IRNode, scope: IdentityScope): string | undefined;
19
26
  /** A `MODEL` node's `DATABASE_TABLE` counterpart, or `undefined` when the
20
27
  * model names no table, or when the table it names was never observed in
21
28
  * this graph (no adapter emitted it, or it belongs to a different scope).
@@ -1 +1 @@
1
- {"version":3,"file":"model-table.d.ts","sourceRoot":"","sources":["../../src/query/model-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;yEAeyE;AAEzE,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,iBAAiB,EAAW,MAAM,eAAe,CAAC;AAYhE;;;;;8EAK8E;AAC9E,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,GACnB,MAAM,GAAG,SAAS,CAGpB;AAED;;;;mCAImC;AACnC,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,EACpB,KAAK,CAAC,EAAE,MAAM,GACb;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAIrE"}
1
+ {"version":3,"file":"model-table.d.ts","sourceRoot":"","sources":["../../src/query/model-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;yEAeyE;AAEzE,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,iBAAiB,EAAW,MAAM,eAAe,CAAC;AAEhE;;;;;4DAK4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAKvF;AAED;;;;;8EAK8E;AAC9E,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,GACnB,MAAM,GAAG,SAAS,CAGpB;AAED;;;;mCAImC;AACnC,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,EACpB,KAAK,CAAC,EAAE,MAAM,GACb;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAIrE"}
@@ -17,8 +17,11 @@
17
17
  import { DEFAULT_MODEL_SCHEMA, nodeId, tableQsp, } from "@descryy/ir";
18
18
  /** The table id a `MODEL` node's own declared shape computes to, or
19
19
  * `undefined` when it names no table — refused rather than guessed at mint
20
- * time (`model-tables.ts`), so this is a real absence, not a lookup miss. */
21
- function declaredTableId(model, scope) {
20
+ * time (`model-tables.ts`), so this is a real absence, not a lookup miss.
21
+ * Exported so a composed query can enumerate `MODEL` once and both filter and
22
+ * probe from that one enumeration; a second `nodesOfType` call to recover the
23
+ * same set is a scan the store does not need to repeat. */
24
+ export function tableIdForModel(model, scope) {
22
25
  const table = model.attrs["table"];
23
26
  if (typeof table !== "string" || table === "")
24
27
  return undefined;
@@ -32,7 +35,7 @@ function declaredTableId(model, scope) {
32
35
  * same `IdentityScope` the graph was built with; `DATABASE_TABLE` is
33
36
  * workspace-scoped (`NODE_SCOPE`), so a mismatched scope silently misses. */
34
37
  export function tableForModel(provider, model, scope) {
35
- const tableId = declaredTableId(model, scope);
38
+ const tableId = tableIdForModel(model, scope);
36
39
  return tableId === undefined ? undefined : provider.node(tableId);
37
40
  }
38
41
  /** The reverse direction: every `MODEL` node in this graph whose declared
@@ -42,7 +45,7 @@ export function tableForModel(provider, model, scope) {
42
45
  * walk in the other direction. */
43
46
  export function modelsForTable(provider, table, scope, limit) {
44
47
  const set = limit === undefined ? provider.nodesOfType("MODEL") : provider.nodesOfType("MODEL", limit);
45
- const models = set.nodes.filter((model) => declaredTableId(model, scope) === table.id);
48
+ const models = set.nodes.filter((model) => tableIdForModel(model, scope) === table.id);
46
49
  return { models, truncated: set.truncated };
47
50
  }
48
51
  //# sourceMappingURL=model-table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-table.js","sourceRoot":"","sources":["../../src/query/model-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;yEAeyE;AAEzE,OAAO,EACL,oBAAoB,EACpB,MAAM,EACN,QAAQ,GAGT,MAAM,aAAa,CAAC;AAIrB;;8EAE8E;AAC9E,SAAS,eAAe,CAAC,KAAa,EAAE,KAAoB;IAC1D,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAChE,MAAM,MAAM,GAAG,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,oBAAo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 * persistence half of the bug-relevant subgraph, made askable.
3
+ *
4
+ * Until this query existed the question could not be asked in any language:
5
+ * `DATABASE_TABLE`/`DATABASE_COLUMN` are in no edge, of any type, in either
6
+ * direction. That is not a defect — it is the consequence of a ruling. The
7
+ * model-to-table join was deliberately built **by shared node identity rather
8
+ * than by an edge** (`databaseTableNodesFromModel`, `@descryy/ir`, DEC-240),
9
+ * so an ORM-derived producer and a raw-DDL-derived producer land on the same
10
+ * id for the same real table with no coordination. Identity merging and
11
+ * reachability are different problems, and solving the first left the second
12
+ * untouched. This module solves the second **without touching the first**:
13
+ * no new edge type, no new node type, no adapter change
14
+ * (`DEC-NEXT-database-table-column-traversability-vs-queryability.md`,
15
+ * `DEC-NEXT-persistence-half-of-the-bug-relevant-subgraph-is-unreachable.md`
16
+ * option 1).
17
+ *
18
+ * ## The three hops, walked backwards from the table
19
+ *
20
+ * 1. **table -> model** — `modelsForTable` (`model-table.ts`), an O(1) exact
21
+ * id match per model, recomputed from the model's own declared table name.
22
+ * **This leg has no edge under it.** Its evidence is two declarations: a
23
+ * string in the model and the table node's identity. That is why the whole
24
+ * composed claim is name-level and can never reach reliability class A,
25
+ * however well-resolved the other two hops are.
26
+ * 2. **model -> accessor** — `READS`/`ASSIGNS` edges pointing at the model.
27
+ * 3. **accessor -> route -> endpoint** — one budgeted inbound `CALLS` walk
28
+ * seeded on every accessor at once (never one walk per accessor), carrying
29
+ * the set of accessors each node reaches, then
30
+ * `API_ROUTE --SERVES_API--> API_ENDPOINT`.
31
+ *
32
+ * ## The write gate, and why it names no language
33
+ *
34
+ * A developer acting on "this endpoint writes to your users table" changes
35
+ * code. Only some producers distinguish an assignment from a read; the rest
36
+ * emit every field access as `READS`, so answering the write question from a
37
+ * `READS` edge would state the opposite of what the code does for those
38
+ * producers. It must therefore be gated — but gating on a language name above
39
+ * the IR is a boundary breach (rule 1), and the mechanical boundary lint is
40
+ * right to forbid it.
41
+ *
42
+ * So the gate is **evidence, not configuration**: a producer is
43
+ * direction-aware iff it is observed emitting at least one `ASSIGNS` edge
44
+ * into a `MODEL` in this graph. An `ASSIGNS` edge is self-evidencing and
45
+ * needs no gate at all. A `READS` edge from a direction-aware producer is a
46
+ * genuine read. A `READS` edge from a producer never seen emitting `ASSIGNS`
47
+ * is `unknown-direction` — reported as not analysable, folded into neither
48
+ * the read set nor the write set. The failure mode is one-directional by
49
+ * construction: the worst this rule can do is decline to answer, and it can
50
+ * never manufacture a write. */
51
+ import { type EdgeType, type IdentityScope, type IREdge, type IRNode, type ReliabilityClass } from "@descryy/ir";
52
+ import type { AdjacencyProvider, QueryResult } from "./provider.ts";
53
+ /** The two edge types that carry a function's access to a model's fields.
54
+ * Named once so the accessor read and the direction probe cannot drift. */
55
+ export declare const MODEL_ACCESS_EDGE_TYPES: readonly EdgeType[];
56
+ /** What this query is willing to say about an endpoint's access to a table.
57
+ *
58
+ * `writes` means **an assignment to a mapped column of the model backing this
59
+ * table**, which is what the underlying edge actually records. It is not a
60
+ * witnessed database write: whether the assignment reaches the database
61
+ * depends on the object being session-attached and the session being flushed,
62
+ * and nothing in the graph establishes either. Rule 4 governs the difference —
63
+ * this is a behavioural prediction until a runtime run confirms it, and the
64
+ * reliability cap and `WRITE_MEANING_NOTE` both say so.
65
+ *
66
+ * `unknown-direction` is a real answer, not a missing one: the endpoint
67
+ * demonstrably reaches the table, and the direction is not analysable from
68
+ * the evidence the producer emitted. */
69
+ export type AccessDirection = "writes" | "reads" | "unknown-direction";
70
+ /** Which hop stopped, and where. A missing hop is disclosed rather than
71
+ * silently yielding a shorter answer — an endpoint absent from the result
72
+ * because hop 2 had nothing to walk is not an endpoint that does not touch
73
+ * the table. */
74
+ export interface PersistenceHopGap {
75
+ readonly hop: "model-for-table" | "accessor-for-model" | "route-for-accessor" | "endpoint-for-route";
76
+ /** The node the hop was walked from. */
77
+ readonly node: IRNode;
78
+ readonly reason: string;
79
+ }
80
+ /** One traced route from an endpoint to the table, with every edge under it. */
81
+ export interface PersistencePath {
82
+ readonly endpoint: IRNode;
83
+ readonly route: IRNode;
84
+ /** The function carrying the model-access edge — the end of the call chain. */
85
+ readonly accessor: IRNode;
86
+ readonly model: IRNode;
87
+ readonly direction: AccessDirection;
88
+ /** Columns the access edge names, where it names any. */
89
+ readonly columns: readonly string[];
90
+ /** `CALLS` hops from the route to the accessor. 1 when the route calls it directly. */
91
+ readonly callDepth: number;
92
+ /** Every edge this claim rests on, in path order: route->endpoint,
93
+ * route->..->accessor, accessor->model. The model->table leg is absent by
94
+ * construction — it is an identity match, not an edge. */
95
+ readonly edges: readonly IREdge[];
96
+ }
97
+ export interface EndpointTableAccess {
98
+ readonly endpoint: IRNode;
99
+ /** Precedence is `writes` > `unknown-direction` > `reads`: one undetermined
100
+ * path is enough to forbid the claim that this endpoint only reads. */
101
+ readonly direction: AccessDirection;
102
+ readonly columns: readonly string[];
103
+ readonly paths: readonly PersistencePath[];
104
+ }
105
+ export interface PersistenceReach {
106
+ readonly table: IRNode;
107
+ /** The `MODEL` nodes whose declared table is this one. More than one is
108
+ * legitimate — two entities intentionally sharing a table. */
109
+ readonly models: readonly IRNode[];
110
+ readonly endpoints: readonly EndpointTableAccess[];
111
+ readonly hopGaps: readonly PersistenceHopGap[];
112
+ /** Producers observed emitting `ASSIGNS` into a `MODEL` in this graph:
113
+ * their `READS` edges are genuine reads. */
114
+ readonly directionAwareProducers: readonly string[];
115
+ /** Producers on a path here that were never observed emitting `ASSIGNS`:
116
+ * their `READS` edges carry no direction, and are reported as such. */
117
+ readonly directionBlindProducers: readonly string[];
118
+ /** Capped at B unconditionally — see the module doc's hop 1. */
119
+ readonly reliability: ReliabilityClass;
120
+ }
121
+ export interface PersistenceReachOptions {
122
+ /** `CALLS` hops from a route to an accessor. Default 4. */
123
+ readonly maxCallDepth?: number;
124
+ /** Budget for the inbound `CALLS` walk, counted in (node, accessor) pairs
125
+ * rather than nodes — the walk re-enters a node for a new accessor, so
126
+ * pairs are what actually bound it. DEC-007's 200/1,000/5,000. Default 1,000. */
127
+ readonly budget?: number;
128
+ /** Fan-out cap per hop, and the cap on accessors read per model. Default 200. */
129
+ readonly perNodeLimit?: number;
130
+ /** Cap on `MODEL` nodes enumerated, for both the table join and the
131
+ * direction probe. Default 5,000 — the provider's own default. */
132
+ readonly modelLimit?: number;
133
+ }
134
+ /** Emitted whenever a write is reported. The distinction it draws is the one a
135
+ * reader will otherwise collapse, and collapsing it turns a provable
136
+ * statement about source into an unproven one about a running database. */
137
+ export declare const WRITE_MEANING_NOTE: string;
138
+ /**
139
+ * Every `API_ENDPOINT` that reaches `table`, and which of them write to it.
140
+ *
141
+ * `scope` must be the `IdentityScope` the graph was built with —
142
+ * `DATABASE_TABLE` is workspace-scoped, so a mismatched scope misses silently
143
+ * rather than erroring, and the miss surfaces as a `model-for-table` gap.
144
+ *
145
+ * Never throws on graph content. A node of the wrong type, a model whose
146
+ * declared table is not a string, a dangling edge — each degrades to a named
147
+ * reason in `hopGaps` or `notes`.
148
+ */
149
+ export declare function endpointsReachingTable(provider: AdjacencyProvider, table: IRNode, scope: IdentityScope, options?: PersistenceReachOptions): QueryResult<PersistenceReach>;
150
+ //# sourceMappingURL=persistence-reach.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistence-reach.d.ts","sourceRoot":"","sources":["../../src/query/persistence-reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAiDiC;AAEjC,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,gBAAgB,EAEtB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAAE,iBAAiB,EAAc,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhF;4EAC4E;AAC5E,eAAO,MAAM,uBAAuB,EAAE,SAAS,QAAQ,EAAyB,CAAC;AAEjF;;;;;;;;;;;;yCAYyC;AACzC,MAAM,MAAM,eAAe,GAAG,QAAQ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