@descryy/core 0.3.0 → 0.5.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 (362) hide show
  1. package/dist/budget/reply.d.ts +11 -46
  2. package/dist/budget/reply.d.ts.map +1 -1
  3. package/dist/budget/reply.js +10 -39
  4. package/dist/budget/reply.js.map +1 -1
  5. package/dist/budget/size.d.ts +2 -21
  6. package/dist/budget/size.d.ts.map +1 -1
  7. package/dist/budget/size.js +3 -24
  8. package/dist/budget/size.js.map +1 -1
  9. package/dist/capabilities/preconditions.d.ts +7 -68
  10. package/dist/capabilities/preconditions.d.ts.map +1 -1
  11. package/dist/capabilities/preconditions.js +6 -57
  12. package/dist/capabilities/preconditions.js.map +1 -1
  13. package/dist/contracts/engine.d.ts +26 -12
  14. package/dist/contracts/engine.d.ts.map +1 -1
  15. package/dist/contracts/engine.js +28 -11
  16. package/dist/contracts/engine.js.map +1 -1
  17. package/dist/contracts/index.d.ts +1 -1
  18. package/dist/contracts/index.d.ts.map +1 -1
  19. package/dist/contracts/index.js.map +1 -1
  20. package/dist/contracts/orphans.d.ts +28 -77
  21. package/dist/contracts/orphans.d.ts.map +1 -1
  22. package/dist/contracts/orphans.js +124 -94
  23. package/dist/contracts/orphans.js.map +1 -1
  24. package/dist/contracts/paths.d.ts +4 -114
  25. package/dist/contracts/paths.d.ts.map +1 -1
  26. package/dist/contracts/paths.js +7 -140
  27. package/dist/contracts/paths.js.map +1 -1
  28. package/dist/contracts/shapes.d.ts +13 -66
  29. package/dist/contracts/shapes.d.ts.map +1 -1
  30. package/dist/contracts/shapes.js +20 -91
  31. package/dist/contracts/shapes.js.map +1 -1
  32. package/dist/governance/budget.d.ts +12 -48
  33. package/dist/governance/budget.d.ts.map +1 -1
  34. package/dist/governance/budget.js +12 -48
  35. package/dist/governance/budget.js.map +1 -1
  36. package/dist/governance/candidate-boundary.d.ts +4 -32
  37. package/dist/governance/candidate-boundary.d.ts.map +1 -1
  38. package/dist/governance/candidate-boundary.js +4 -32
  39. package/dist/governance/candidate-boundary.js.map +1 -1
  40. package/dist/governance/escalation.d.ts +7 -45
  41. package/dist/governance/escalation.d.ts.map +1 -1
  42. package/dist/governance/escalation.js +7 -45
  43. package/dist/governance/escalation.js.map +1 -1
  44. package/dist/governance/fact-boundary.d.ts +7 -49
  45. package/dist/governance/fact-boundary.d.ts.map +1 -1
  46. package/dist/governance/fact-boundary.js +5 -43
  47. package/dist/governance/fact-boundary.js.map +1 -1
  48. package/dist/governance/finding-funnel.d.ts +11 -72
  49. package/dist/governance/finding-funnel.d.ts.map +1 -1
  50. package/dist/governance/finding-funnel.js +9 -68
  51. package/dist/governance/finding-funnel.js.map +1 -1
  52. package/dist/graph/build.d.ts +13 -75
  53. package/dist/graph/build.d.ts.map +1 -1
  54. package/dist/graph/build.js +0 -0
  55. package/dist/graph/build.js.map +1 -1
  56. package/dist/graph/cross-language.d.ts +4 -43
  57. package/dist/graph/cross-language.d.ts.map +1 -1
  58. package/dist/graph/cross-language.js +9 -77
  59. package/dist/graph/cross-language.js.map +1 -1
  60. package/dist/graph/index.d.ts +1 -1
  61. package/dist/graph/index.d.ts.map +1 -1
  62. package/dist/graph/merge.d.ts +8 -76
  63. package/dist/graph/merge.d.ts.map +1 -1
  64. package/dist/graph/merge.js +27 -77
  65. package/dist/graph/merge.js.map +1 -1
  66. package/dist/graph/observed-tests.d.ts +7 -68
  67. package/dist/graph/observed-tests.d.ts.map +1 -1
  68. package/dist/graph/observed-tests.js +5 -60
  69. package/dist/graph/observed-tests.js.map +1 -1
  70. package/dist/graph/persist.d.ts +2 -25
  71. package/dist/graph/persist.d.ts.map +1 -1
  72. package/dist/graph/persist.js +2 -25
  73. package/dist/graph/persist.js.map +1 -1
  74. package/dist/graph/runtime-confirmation.d.ts +14 -91
  75. package/dist/graph/runtime-confirmation.d.ts.map +1 -1
  76. package/dist/graph/runtime-confirmation.js +19 -103
  77. package/dist/graph/runtime-confirmation.js.map +1 -1
  78. package/dist/ledger/mint.d.ts +9 -43
  79. package/dist/ledger/mint.d.ts.map +1 -1
  80. package/dist/ledger/mint.js +15 -65
  81. package/dist/ledger/mint.js.map +1 -1
  82. package/dist/ledger/resolve.d.ts +13 -81
  83. package/dist/ledger/resolve.d.ts.map +1 -1
  84. package/dist/ledger/resolve.js +13 -76
  85. package/dist/ledger/resolve.js.map +1 -1
  86. package/dist/multipr/fingerprint.d.ts +5 -46
  87. package/dist/multipr/fingerprint.d.ts.map +1 -1
  88. package/dist/multipr/fingerprint.js +22 -74
  89. package/dist/multipr/fingerprint.js.map +1 -1
  90. package/dist/multipr/hidden-dependency.d.ts +13 -73
  91. package/dist/multipr/hidden-dependency.d.ts.map +1 -1
  92. package/dist/multipr/hidden-dependency.js +12 -63
  93. package/dist/multipr/hidden-dependency.js.map +1 -1
  94. package/dist/multipr/mechanical.d.ts +25 -160
  95. package/dist/multipr/mechanical.d.ts.map +1 -1
  96. package/dist/multipr/mechanical.js +21 -137
  97. package/dist/multipr/mechanical.js.map +1 -1
  98. package/dist/multipr/migration-heads.d.ts +18 -105
  99. package/dist/multipr/migration-heads.d.ts.map +1 -1
  100. package/dist/multipr/migration-heads.js +15 -84
  101. package/dist/multipr/migration-heads.js.map +1 -1
  102. package/dist/multipr/overlap.d.ts +16 -94
  103. package/dist/multipr/overlap.d.ts.map +1 -1
  104. package/dist/multipr/overlap.js +25 -105
  105. package/dist/multipr/overlap.js.map +1 -1
  106. package/dist/multipr/scope-store.d.ts +15 -80
  107. package/dist/multipr/scope-store.d.ts.map +1 -1
  108. package/dist/multipr/scope-store.js +17 -87
  109. package/dist/multipr/scope-store.js.map +1 -1
  110. package/dist/multipr/superseded.d.ts +10 -95
  111. package/dist/multipr/superseded.d.ts.map +1 -1
  112. package/dist/multipr/superseded.js +7 -60
  113. package/dist/multipr/superseded.js.map +1 -1
  114. package/dist/query/confirmed-facts.d.ts +12 -58
  115. package/dist/query/confirmed-facts.d.ts.map +1 -1
  116. package/dist/query/confirmed-facts.js +8 -47
  117. package/dist/query/confirmed-facts.js.map +1 -1
  118. package/dist/query/declared-value-closure.d.ts +13 -104
  119. package/dist/query/declared-value-closure.d.ts.map +1 -1
  120. package/dist/query/declared-value-closure.js +15 -104
  121. package/dist/query/declared-value-closure.js.map +1 -1
  122. package/dist/query/memory.d.ts +5 -9
  123. package/dist/query/memory.d.ts.map +1 -1
  124. package/dist/query/memory.js +31 -15
  125. package/dist/query/memory.js.map +1 -1
  126. package/dist/query/prominence.d.ts +6 -55
  127. package/dist/query/prominence.d.ts.map +1 -1
  128. package/dist/query/prominence.js +6 -55
  129. package/dist/query/prominence.js.map +1 -1
  130. package/dist/query/provider.d.ts +28 -81
  131. package/dist/query/provider.d.ts.map +1 -1
  132. package/dist/query/provider.js +8 -29
  133. package/dist/query/provider.js.map +1 -1
  134. package/dist/query/queries.d.ts +15 -65
  135. package/dist/query/queries.d.ts.map +1 -1
  136. package/dist/query/queries.js +43 -100
  137. package/dist/query/queries.js.map +1 -1
  138. package/dist/query/refusal-fetch.d.ts +8 -85
  139. package/dist/query/refusal-fetch.d.ts.map +1 -1
  140. package/dist/query/refusal-fetch.js +11 -93
  141. package/dist/query/refusal-fetch.js.map +1 -1
  142. package/dist/query/refusal-questions.d.ts +17 -92
  143. package/dist/query/refusal-questions.d.ts.map +1 -1
  144. package/dist/query/refusal-questions.js +14 -78
  145. package/dist/query/refusal-questions.js.map +1 -1
  146. package/dist/query/resolution-floor.d.ts +3 -23
  147. package/dist/query/resolution-floor.d.ts.map +1 -1
  148. package/dist/query/resolution-floor.js +3 -23
  149. package/dist/query/resolution-floor.js.map +1 -1
  150. package/dist/query/root-cause-score.d.ts +11 -161
  151. package/dist/query/root-cause-score.d.ts.map +1 -1
  152. package/dist/query/root-cause-score.js +6 -137
  153. package/dist/query/root-cause-score.js.map +1 -1
  154. package/dist/query/row-closure-picture.d.ts +5 -67
  155. package/dist/query/row-closure-picture.d.ts.map +1 -1
  156. package/dist/query/row-closure-picture.js +6 -67
  157. package/dist/query/row-closure-picture.js.map +1 -1
  158. package/dist/query/similar-incidents.d.ts +6 -41
  159. package/dist/query/similar-incidents.d.ts.map +1 -1
  160. package/dist/query/similar-incidents.js +15 -69
  161. package/dist/query/similar-incidents.js.map +1 -1
  162. package/dist/query/sqlite.d.ts +3 -7
  163. package/dist/query/sqlite.d.ts.map +1 -1
  164. package/dist/query/sqlite.js +13 -16
  165. package/dist/query/sqlite.js.map +1 -1
  166. package/dist/query/test-coverage.d.ts +5 -45
  167. package/dist/query/test-coverage.d.ts.map +1 -1
  168. package/dist/query/test-coverage.js +10 -53
  169. package/dist/query/test-coverage.js.map +1 -1
  170. package/dist/query/traverse.d.ts +22 -126
  171. package/dist/query/traverse.d.ts.map +1 -1
  172. package/dist/query/traverse.js +0 -0
  173. package/dist/query/traverse.js.map +1 -1
  174. package/dist/query/unresolved.d.ts +19 -164
  175. package/dist/query/unresolved.d.ts.map +1 -1
  176. package/dist/query/unresolved.js +11 -138
  177. package/dist/query/unresolved.js.map +1 -1
  178. package/dist/query/verification-status.d.ts +12 -109
  179. package/dist/query/verification-status.d.ts.map +1 -1
  180. package/dist/query/verification-status.js +9 -99
  181. package/dist/query/verification-status.js.map +1 -1
  182. package/dist/recording/migrate.d.ts +4 -10
  183. package/dist/recording/migrate.d.ts.map +1 -1
  184. package/dist/recording/migrate.js +4 -10
  185. package/dist/recording/migrate.js.map +1 -1
  186. package/dist/recording/reader.d.ts +2 -7
  187. package/dist/recording/reader.d.ts.map +1 -1
  188. package/dist/recording/reader.js +2 -7
  189. package/dist/recording/reader.js.map +1 -1
  190. package/dist/recording/redact.d.ts +6 -57
  191. package/dist/recording/redact.d.ts.map +1 -1
  192. package/dist/recording/redact.js +8 -64
  193. package/dist/recording/redact.js.map +1 -1
  194. package/dist/recording/schema.d.ts +3 -38
  195. package/dist/recording/schema.d.ts.map +1 -1
  196. package/dist/recording/schema.js +3 -38
  197. package/dist/recording/schema.js.map +1 -1
  198. package/dist/recording/writer.d.ts +11 -74
  199. package/dist/recording/writer.d.ts.map +1 -1
  200. package/dist/recording/writer.js +3 -43
  201. package/dist/recording/writer.js.map +1 -1
  202. package/dist/scoping/fanout.d.ts +6 -68
  203. package/dist/scoping/fanout.d.ts.map +1 -1
  204. package/dist/scoping/fanout.js +6 -68
  205. package/dist/scoping/fanout.js.map +1 -1
  206. package/dist/scoping/score.d.ts +20 -70
  207. package/dist/scoping/score.d.ts.map +1 -1
  208. package/dist/scoping/score.js +20 -70
  209. package/dist/scoping/score.js.map +1 -1
  210. package/dist/scoping/tiers.d.ts +4 -16
  211. package/dist/scoping/tiers.d.ts.map +1 -1
  212. package/dist/scoping/tiers.js +4 -16
  213. package/dist/scoping/tiers.js.map +1 -1
  214. package/dist/scoping/traverse.d.ts +3 -25
  215. package/dist/scoping/traverse.d.ts.map +1 -1
  216. package/dist/scoping/traverse.js +14 -49
  217. package/dist/scoping/traverse.js.map +1 -1
  218. package/dist/scoping/weights.d.ts +10 -74
  219. package/dist/scoping/weights.d.ts.map +1 -1
  220. package/dist/scoping/weights.js +14 -86
  221. package/dist/scoping/weights.js.map +1 -1
  222. package/dist/sources/confirmed/incidents.d.ts +5 -35
  223. package/dist/sources/confirmed/incidents.d.ts.map +1 -1
  224. package/dist/sources/confirmed/incidents.js +14 -48
  225. package/dist/sources/confirmed/incidents.js.map +1 -1
  226. package/dist/sources/git/diff.d.ts +71 -65
  227. package/dist/sources/git/diff.d.ts.map +1 -1
  228. package/dist/sources/git/diff.js +136 -83
  229. package/dist/sources/git/diff.js.map +1 -1
  230. package/dist/sources/git/env.d.ts +7 -0
  231. package/dist/sources/git/env.d.ts.map +1 -1
  232. package/dist/sources/git/env.js +10 -11
  233. package/dist/sources/git/env.js.map +1 -1
  234. package/dist/sources/git/history.d.ts +64 -84
  235. package/dist/sources/git/history.d.ts.map +1 -1
  236. package/dist/sources/git/history.js +141 -112
  237. package/dist/sources/git/history.js.map +1 -1
  238. package/dist/sources/git/incidents.d.ts +13 -75
  239. package/dist/sources/git/incidents.d.ts.map +1 -1
  240. package/dist/sources/git/incidents.js +21 -91
  241. package/dist/sources/git/incidents.js.map +1 -1
  242. package/dist/sources/git/index.d.ts +5 -3
  243. package/dist/sources/git/index.d.ts.map +1 -1
  244. package/dist/sources/git/index.js +3 -2
  245. package/dist/sources/git/index.js.map +1 -1
  246. package/dist/sources/git/source.d.ts +9 -79
  247. package/dist/sources/git/source.d.ts.map +1 -1
  248. package/dist/sources/git/source.js +0 -0
  249. package/dist/sources/git/source.js.map +1 -1
  250. package/dist/sources/migrations/across-change.d.ts +94 -0
  251. package/dist/sources/migrations/across-change.d.ts.map +1 -0
  252. package/dist/sources/migrations/across-change.js +278 -0
  253. package/dist/sources/migrations/across-change.js.map +1 -0
  254. package/dist/sources/migrations/dialects.d.ts +20 -36
  255. package/dist/sources/migrations/dialects.d.ts.map +1 -1
  256. package/dist/sources/migrations/dialects.js +11 -36
  257. package/dist/sources/migrations/dialects.js.map +1 -1
  258. package/dist/sources/migrations/index.d.ts +3 -1
  259. package/dist/sources/migrations/index.d.ts.map +1 -1
  260. package/dist/sources/migrations/index.js +2 -1
  261. package/dist/sources/migrations/index.js.map +1 -1
  262. package/dist/sources/migrations/read.d.ts +14 -79
  263. package/dist/sources/migrations/read.d.ts.map +1 -1
  264. package/dist/sources/migrations/read.js +14 -89
  265. package/dist/sources/migrations/read.js.map +1 -1
  266. package/dist/sources/workspace/workspace.d.ts +6 -42
  267. package/dist/sources/workspace/workspace.d.ts.map +1 -1
  268. package/dist/sources/workspace/workspace.js +10 -53
  269. package/dist/sources/workspace/workspace.js.map +1 -1
  270. package/dist/store/driver/driver.d.ts +9 -38
  271. package/dist/store/driver/driver.d.ts.map +1 -1
  272. package/dist/store/driver/driver.js +4 -22
  273. package/dist/store/driver/driver.js.map +1 -1
  274. package/dist/store/driver/node-sqlite.d.ts +3 -12
  275. package/dist/store/driver/node-sqlite.d.ts.map +1 -1
  276. package/dist/store/driver/node-sqlite.js +4 -18
  277. package/dist/store/driver/node-sqlite.js.map +1 -1
  278. package/dist/store/index.d.ts +2 -7
  279. package/dist/store/index.d.ts.map +1 -1
  280. package/dist/store/index.js +4 -10
  281. package/dist/store/index.js.map +1 -1
  282. package/dist/store/migrate.d.ts +14 -50
  283. package/dist/store/migrate.d.ts.map +1 -1
  284. package/dist/store/migrate.js +15 -52
  285. package/dist/store/migrate.js.map +1 -1
  286. package/dist/store/reader.d.ts +19 -84
  287. package/dist/store/reader.d.ts.map +1 -1
  288. package/dist/store/reader.js +25 -92
  289. package/dist/store/reader.js.map +1 -1
  290. package/dist/store/schema.d.ts +14 -76
  291. package/dist/store/schema.d.ts.map +1 -1
  292. package/dist/store/schema.js +14 -76
  293. package/dist/store/schema.js.map +1 -1
  294. package/dist/store/writer.d.ts +14 -88
  295. package/dist/store/writer.d.ts.map +1 -1
  296. package/dist/store/writer.js +29 -123
  297. package/dist/store/writer.js.map +1 -1
  298. package/dist/tiers/certify.d.ts +46 -281
  299. package/dist/tiers/certify.d.ts.map +1 -1
  300. package/dist/tiers/certify.js +46 -226
  301. package/dist/tiers/certify.js.map +1 -1
  302. package/dist/tiers/ladder.d.ts +7 -51
  303. package/dist/tiers/ladder.d.ts.map +1 -1
  304. package/dist/tiers/ladder.js +13 -89
  305. package/dist/tiers/ladder.js.map +1 -1
  306. package/dist/validation/attributes.d.ts +47 -0
  307. package/dist/validation/attributes.d.ts.map +1 -0
  308. package/dist/validation/attributes.js +130 -0
  309. package/dist/validation/attributes.js.map +1 -0
  310. package/dist/validation/config-graph.d.ts +7 -56
  311. package/dist/validation/config-graph.d.ts.map +1 -1
  312. package/dist/validation/config-graph.js +15 -61
  313. package/dist/validation/config-graph.js.map +1 -1
  314. package/dist/validation/env.d.ts +53 -2
  315. package/dist/validation/env.d.ts.map +1 -1
  316. package/dist/validation/env.js +99 -4
  317. package/dist/validation/env.js.map +1 -1
  318. package/dist/validation/index.d.ts +5 -1
  319. package/dist/validation/index.d.ts.map +1 -1
  320. package/dist/validation/index.js +3 -1
  321. package/dist/validation/index.js.map +1 -1
  322. package/dist/validation/join-substitution.d.ts +22 -120
  323. package/dist/validation/join-substitution.d.ts.map +1 -1
  324. package/dist/validation/join-substitution.js +13 -90
  325. package/dist/validation/join-substitution.js.map +1 -1
  326. package/dist/validation/migration-integrity.d.ts +72 -0
  327. package/dist/validation/migration-integrity.d.ts.map +1 -0
  328. package/dist/validation/migration-integrity.js +238 -0
  329. package/dist/validation/migration-integrity.js.map +1 -0
  330. package/dist/validation/migrations.d.ts +23 -88
  331. package/dist/validation/migrations.d.ts.map +1 -1
  332. package/dist/validation/migrations.js +20 -79
  333. package/dist/validation/migrations.js.map +1 -1
  334. package/dist/validation/nodes.d.ts +3 -1
  335. package/dist/validation/nodes.d.ts.map +1 -1
  336. package/dist/validation/nodes.js +3 -1
  337. package/dist/validation/nodes.js.map +1 -1
  338. package/dist/validation/rollback.d.ts +10 -73
  339. package/dist/validation/rollback.d.ts.map +1 -1
  340. package/dist/validation/rollback.js +23 -81
  341. package/dist/validation/rollback.js.map +1 -1
  342. package/dist/validation/route-drift.d.ts +9 -62
  343. package/dist/validation/route-drift.d.ts.map +1 -1
  344. package/dist/validation/route-drift.js +7 -52
  345. package/dist/validation/route-drift.js.map +1 -1
  346. package/dist/validation/sources.d.ts +16 -94
  347. package/dist/validation/sources.d.ts.map +1 -1
  348. package/dist/validation/sources.js +51 -147
  349. package/dist/validation/sources.js.map +1 -1
  350. package/dist/worker/pool.d.ts +6 -45
  351. package/dist/worker/pool.d.ts.map +1 -1
  352. package/dist/worker/pool.js +5 -42
  353. package/dist/worker/pool.js.map +1 -1
  354. package/dist/worker/protocol.d.ts +7 -20
  355. package/dist/worker/protocol.d.ts.map +1 -1
  356. package/dist/worker/protocol.js +3 -10
  357. package/dist/worker/protocol.js.map +1 -1
  358. package/dist/worker/traversal.worker.d.ts +2 -21
  359. package/dist/worker/traversal.worker.d.ts.map +1 -1
  360. package/dist/worker/traversal.worker.js +4 -23
  361. package/dist/worker/traversal.worker.js.map +1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AAG,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACjE,MAAM,OAAO,GAAG,MAAM;aACnB,OAAO,CAAmB,qDAAqD,CAAC;aAChF,GAAG,CAAC,KAAK,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,gBAAgB,CAAC,CAAC;QACxE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEnC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,IAAI,GAAG,MAAM;aAChB,OAAO,CAA0B,UAAU,MAAM,UAAU,KAAK,cAAc,MAAM,EAAE,CAAC;aACvF,GAAG,EAAE,CAAC;QAET,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;QAC5B,KAAK,MAAM,GAAG,IAAI,IAAI;YAAE,MAAM,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,88 +1,26 @@
1
- /**
2
- * The graph schema.
3
- *
4
- * Held as a TypeScript constant rather than a `.sql` file on disk. Reading a
5
- * sibling `.sql` at runtime resolves to `src/` under Node's type stripping and
6
- * `dist/` after `tsc`, so it needs an asset-copy build step and then behaves
7
- * differently in tests than in production — the same class of trap the build
8
- * plan flags for the traversal worker entrypoint. A constant has neither
9
- * problem and costs nothing but syntax highlighting.
10
- *
11
- * ## Five corrections to the written schema
12
- *
13
- * Architecture §24.1 and blueprint §0.8 both describe this schema, and both need
14
- * amending. Each is recorded here because the docs are the shared reference and
15
- * a silent divergence is worse than either version.
16
- *
17
- * 1. **No `properties` table.** §11.8 names `nodes`/`edges`/`properties`, but
18
- * §24.1 and blueprint §0.8 both use a JSON column instead. An entity-
19
- * attribute-value table turns every node read into a join and defeats the
20
- * adjacency performance target that §11.8's own traversal decision rests on.
21
- * Language-specific detail lives in the `attrs` JSON column, which nothing
22
- * above the IR reads.
23
- *
24
- * 2. **No `edges.weight`.** Blueprint §0.8 lists it. But `EdgeWeight` in §12.4
25
- * is tuning config keyed by edge *type*, not a per-row value — storing it per
26
- * row would let 30,000 copies of one tunable drift apart. The single genuine
27
- * per-edge quantity, `CHANGES_WITH`'s co-change count, lives in `attrs`.
28
- *
29
- * 3. **No `edges.language`.** Both §24.1 and blueprint §0.8 declare it, and
30
- * `IREdge` has no such field — nothing in the IR could ever populate it. A
31
- * column no producer can fill is a column every reader must special-case.
32
- *
33
- * 4. **`nodes.language` is nullable.** §24.1 declares it `NOT NULL`. DEC-014
34
- * establishes that `API_ENDPOINT` — the cross-language join node — belongs to
35
- * no language, and XL-2 asserts it carries none. `NOT NULL` makes the join
36
- * node unstorable.
37
- *
38
- * 5. **Composite adjacency indices.** Blueprint §0.8 indexes `edges(source)` and
39
- * `edges(target)`. Every traversal hop filters by edge type as well, and the
40
- * prior-art measurement on this machine found a max in-degree of 1,036 — so
41
- * a single-column index means scanning a thousand rows to keep four.
42
- * `edges(source, type)` and `edges(target, type)` are the real access paths.
43
- *
44
- * ## Derived vs earned — DEC-017
45
- *
46
- * The partition is expressed in `DERIVED_TABLES` / `EARNED_TABLES` below rather
47
- * than left as prose, because the only thing that makes DEC-017 real is that
48
- * `dropDerived()` can be tested to leave the earned side untouched.
49
- */
50
- /**
51
- * Bumped when the IR itself changes shape, not when an adapter changes.
52
- *
53
- * DEC-017: on mismatch, refuse to read, drop derived, rebuild, migrate earned.
54
- * A stored graph is derived data and is never the source of truth.
55
- */
1
+ /** Graph schema (TS constant, not `.sql` — avoids a build/dist path trap).
2
+ * Diverges from written docs (§24.1, blueprint §0.8): no `properties` table
3
+ * (JSON `attrs`); no `edges.weight`/`edges.language` (tuning config resp.
4
+ * no IR field); `nodes.language` nullable (API_ENDPOINT, DEC-014); composite
5
+ * `(source/target, type)` indices (max in-degree 1,036). Derived/earned: DEC-017. */
6
+ /** Bumped when the IR itself changes shape, not when an adapter changes.
7
+ * DEC-017: on mismatch, refuse to read, drop derived, rebuild, migrate earned. */
56
8
  export declare const IR_SCHEMA_VERSION = 4;
57
- /**
58
- * The tag on every node id, derived from the constant rather than restated.
59
- *
60
- * A graph tagged otherwise is not ours, and the whole point of the tag is to say
61
- * so out loud instead of silently failing to match. Restating it here as a
62
- * literal would let the store keep validating the previous scheme after an id
63
- * change — the exact failure the tag exists to prevent.
64
- */
9
+ /** Tag on every node id, derived from the constant, not restated — a
10
+ * literal here would keep validating the old scheme after an id change. */
65
11
  export declare const NODE_ID_SCHEME: string;
66
12
  /**
67
13
  * Regenerable from source. Dropping these loses time, never information.
68
14
  */
69
15
  export declare const DERIVED_TABLES: readonly ["nodes", "edges", "unresolved_refs", "file_hashes", "embeddings", "adapter_runs"];
70
- /**
71
- * Cannot be regenerated: a run that witnessed an edge fire is gone once the
72
- * process exits, a run that executed a test is gone the same way, and a human's
73
- * correction of a wrong edge is not in the source at all. These survive every
74
- * rebuild.
75
- */
16
+ /** Cannot be regenerated — a witnessed edge, an executed test, or a human's
17
+ * correction exists nowhere in source. These survive every rebuild. */
76
18
  export declare const EARNED_TABLES: readonly ["observed_edges", "observed_tests", "edge_corrections", "incident_links", "pr_scopes"];
77
19
  export type DerivedTable = (typeof DERIVED_TABLES)[number];
78
20
  export type EarnedTable = (typeof EARNED_TABLES)[number];
79
- /**
80
- * Children before parents. Stated explicitly rather than derived by reversing
81
- * `DERIVED_TABLES`: `PRAGMA foreign_keys` cannot be changed inside a
82
- * transaction, so a drop in the wrong order either fails or leans on cascade
83
- * behaviour to rescue it. Neither should be left to the order someone happened
84
- * to list the tables in.
85
- */
21
+ /** Children before parents, stated explicitly (not derived by reversing
22
+ * `DERIVED_TABLES`) — `PRAGMA foreign_keys` can't change mid-transaction,
23
+ * so wrong order fails or leans on cascade to rescue it. */
86
24
  export declare const DERIVED_DROP_ORDER: readonly ["embeddings", "unresolved_refs", "edges", "nodes", "file_hashes", "adapter_runs"];
87
25
  export declare const SCHEMA_SQL = "\n-- ---------------------------------------------------------------------------\n-- graph_meta \u2014 identity of the store itself. Read before anything else.\n-- ---------------------------------------------------------------------------\nCREATE TABLE IF NOT EXISTS graph_meta (\n key TEXT PRIMARY KEY,\n value TEXT NOT NULL\n) STRICT;\n\n-- ---------------------------------------------------------------------------\n-- adapter_runs \u2014 one row per accepted IRBatch. \u00A724.1's adapter registry state\n-- and DEC-015's invalidation key are the same thing, so they are one table.\n--\n-- id is derived (hash of producer + repo + commit + source files), never an\n-- autoincrement rowid: re-ingesting an identical batch must reuse the same row,\n-- or idempotence is impossible to state.\n-- ---------------------------------------------------------------------------\nCREATE TABLE IF NOT EXISTS adapter_runs (\n id TEXT PRIMARY KEY,\n repo TEXT NOT NULL,\n -- The identity scope workspace-scoped ids in this batch were computed under\n -- (DEC-054). NULL means \"this repository alone\". Recorded because the scope is\n -- configuration: once it changes, no node id in this run can be re-derived from\n -- the row itself, and a workspace typo is otherwise invisible after the fact.\n workspace TEXT,\n commit_sha TEXT NOT NULL,\n adapter_id TEXT NOT NULL, -- the part before '@'\n adapter_version TEXT NOT NULL, -- the part after '@'\n produced_by TEXT NOT NULL, -- adapter_id@adapter_version, as written on every row\n reached_resolution INTEGER NOT NULL,\n source_files TEXT NOT NULL, -- JSON array; the invalidation key (DEC-015)\n file_count INTEGER NOT NULL,\n written_at INTEGER NOT NULL\n) STRICT;\n\nCREATE INDEX IF NOT EXISTS idx_runs_adapter ON adapter_runs(adapter_id);\nCREATE INDEX IF NOT EXISTS idx_runs_producer ON adapter_runs(produced_by);\n\n-- ---------------------------------------------------------------------------\n-- nodes\n-- ---------------------------------------------------------------------------\nCREATE TABLE IF NOT EXISTS nodes (\n id TEXT PRIMARY KEY,\n type TEXT NOT NULL,\n name TEXT NOT NULL,\n file_path TEXT, -- null for fileless types (DEC-014)\n start_line INTEGER,\n end_line INTEGER,\n language TEXT, -- correction 4: nullable\n produced_by TEXT NOT NULL,\n resolution INTEGER NOT NULL,\n attrs TEXT NOT NULL, -- JSON; correction 1\n run_id TEXT NOT NULL REFERENCES adapter_runs(id) ON DELETE CASCADE\n) STRICT;\n\nCREATE INDEX IF NOT EXISTS idx_nodes_type ON nodes(type);\nCREATE INDEX IF NOT EXISTS idx_nodes_name ON nodes(name);\nCREATE INDEX IF NOT EXISTS idx_nodes_file ON nodes(file_path);\nCREATE INDEX IF NOT EXISTS idx_nodes_resolution ON nodes(resolution);\nCREATE INDEX IF NOT EXISTS idx_nodes_run ON nodes(run_id);\n\n-- ---------------------------------------------------------------------------\n-- edges. Primary key is hash(from, to, type) per DEC-012, so two adapters\n-- finding the same relationship collide by construction \u2014 which is what makes\n-- a merge policy statable at all. 30% of prior-art edges were exact\n-- duplicates, so this is load-bearing rather than tidy.\n-- ---------------------------------------------------------------------------\nCREATE TABLE IF NOT EXISTS edges (\n id TEXT PRIMARY KEY,\n source TEXT NOT NULL REFERENCES nodes(id) ON DELETE CASCADE,\n target TEXT NOT NULL REFERENCES nodes(id) ON DELETE CASCADE,\n type TEXT NOT NULL,\n resolution INTEGER NOT NULL,\n confidence REAL NOT NULL,\n produced_by TEXT NOT NULL,\n observed_by_run TEXT, -- present exactly when resolution = 4\n attrs TEXT, -- JSON or null; corrections 1 and 2\n run_id TEXT NOT NULL REFERENCES adapter_runs(id) ON DELETE CASCADE,\n CHECK (resolution BETWEEN 0 AND 4),\n CHECK (confidence BETWEEN 0.0 AND 1.0),\n CHECK ((resolution = 4) = (observed_by_run IS NOT NULL))\n) STRICT;\n\n-- Correction 5: the real access paths. Every hop filters by type.\nCREATE INDEX IF NOT EXISTS idx_edges_source_type ON edges(source, type);\nCREATE INDEX IF NOT EXISTS idx_edges_target_type ON edges(target, type);\nCREATE INDEX IF NOT EXISTS idx_edges_resolution ON edges(resolution);\nCREATE INDEX IF NOT EXISTS idx_edges_run ON edges(run_id);\n\n-- ---------------------------------------------------------------------------\n-- unresolved_refs \u2014 DEC-016. What an adapter saw but could not resolve.\n--\n-- Not edges, because a name-matched guess is a false claim under \u00A711B.1. Not\n-- discarded either, because then \u00A711B.6 recall has no denominator and \u00A720.2's\n-- \"not analysable\" category has nothing to count. On the prior-art graphs this\n-- is 52-60% of everything emitted.\n-- ---------------------------------------------------------------------------\n-- id is a content hash, never an autoincrement rowid: an insertion-order key\n-- would make the permuted-ingest determinism proof impossible to state, and two\n-- byte-identical references are the same reference.\nCREATE TABLE IF NOT EXISTS unresolved_refs (\n id TEXT PRIMARY KEY,\n from_node_id TEXT NOT NULL REFERENCES nodes(id) ON DELETE CASCADE,\n edge_type TEXT NOT NULL,\n raw_target TEXT NOT NULL,\n file_path TEXT,\n line INTEGER,\n produced_by TEXT NOT NULL,\n reason TEXT NOT NULL,\n -- DEC-242's attrs.blockedBy/attrs.refusalClass live here, JSON or null --\n -- same optional-attrs treatment as edges (correction 2), and deliberately\n -- excluded from id's content hash below: this is classification of a\n -- refusal, not part of what makes two refusals the same refusal. Added in\n -- schema version 3 -- DEC-017 governs what that bump costs an existing\n -- store (drop derived, rebuild; earned tables untouched).\n attrs TEXT,\n run_id TEXT NOT NULL REFERENCES adapter_runs(id) ON DELETE CASCADE\n) STRICT;\n\nCREATE INDEX IF NOT EXISTS idx_unresolved_from ON unresolved_refs(from_node_id);\nCREATE INDEX IF NOT EXISTS idx_unresolved_target ON unresolved_refs(raw_target);\nCREATE INDEX IF NOT EXISTS idx_unresolved_run ON unresolved_refs(run_id);\n\n-- ---------------------------------------------------------------------------\n-- file_hashes \u2014 \u00A711.14 rebuild acceleration. Layer 1 change detection is\n-- defined against this table and v2.1 never declared it.\n-- ---------------------------------------------------------------------------\nCREATE TABLE IF NOT EXISTS file_hashes (\n file_path TEXT PRIMARY KEY,\n hash TEXT NOT NULL,\n last_parsed_at INTEGER NOT NULL\n) STRICT;\n\n-- ---------------------------------------------------------------------------\n-- embeddings \u2014 pointer table only. No vector extension is loaded in this build;\n-- \u00A78.2 keeps vectors in pgvector hosted or a local extension, and a column of\n-- serialised floats with no index would be a scan, not a search.\n-- ---------------------------------------------------------------------------\nCREATE TABLE IF NOT EXISTS embeddings (\n node_id TEXT PRIMARY KEY REFERENCES nodes(id) ON DELETE CASCADE,\n vector_reference TEXT NOT NULL,\n model_version TEXT NOT NULL\n) STRICT;\n\n-- ===========================================================================\n-- EARNED \u2014 DEC-017. Never dropped. No REFERENCES into the derived tables:\n-- a foreign key would cascade these away with the graph they describe, which\n-- is precisely the outcome the partition exists to prevent.\n-- ===========================================================================\n\n-- R4 evidence. An edge witnessed firing during a live run (\u00A711B.3). This is the\n-- product's core moat and cannot be recomputed from source at any price.\nCREATE TABLE IF NOT EXISTS observed_edges (\n edge_id TEXT NOT NULL,\n run_id TEXT NOT NULL,\n from_node_id TEXT NOT NULL,\n to_node_id TEXT NOT NULL,\n edge_type TEXT NOT NULL,\n commit_sha TEXT NOT NULL,\n observed_at INTEGER NOT NULL,\n PRIMARY KEY (edge_id, run_id)\n) STRICT;\n\n-- Which tests actually ran, and what happened. The coverage axis \u2014 AI layer \u00A720's\n-- \"Verification status\" \u2014 a different question from confidence, needing a\n-- different carrier.\n--\n-- Earned for the same reason as observed_edges, one step over: nothing in the\n-- source says which tests executed, so a rebuild that dropped this would turn\n-- \"what I actually verified\" silently back into \"what might be affected\".\n--\n-- Not an edge, deliberately. A test-runner's evidence carries no stack, so an\n-- observed test names exactly one node \u2014 its own TEST_CASE \u2014 and pairing it with\n-- a function it merely co-occurred with would mint an edge from temporal\n-- coincidence. That is why this is a table and not a promotion of a TESTS edge\n-- to R4; see DEC-NEXT-test-run-coverage-has-no-carrier.md.\n--\n-- (node_id, run_id) is the identity: two runs of one test are two facts, while a\n-- retry inside one run is the same fact re-observed, so the latter updates in\n-- place. Within-run retries are therefore not distinguishable here \u2014 a disclosed\n-- limit, not an oversight; this table is a coverage carrier, not a flake detector.\nCREATE TABLE IF NOT EXISTS observed_tests (\n node_id TEXT NOT NULL,\n run_id TEXT NOT NULL,\n qualified_name TEXT NOT NULL,\n outcome TEXT NOT NULL, -- 'passed' | 'failed' | 'skipped'\n -- REAL, not INTEGER, and this was an INTEGER until a real run proved it could\n -- not be. Runners report fractional milliseconds \u2014 node:test emits 2.316958 \u2014\n -- and a STRICT table refuses that value outright, so every write failed on\n -- first contact with an actual suite while the unit tests, which all passed\n -- integer literals, stayed green. Rounding was the other option and is worse:\n -- sub-millisecond tests are ordinary here, and 0.36 rounded to 0 reads as\n -- \"instant\", the same falsehood the null-rather-than-zero rule below refuses.\n duration_ms REAL,\n commit_sha TEXT NOT NULL,\n observed_at INTEGER NOT NULL,\n PRIMARY KEY (node_id, run_id)\n) STRICT;\n\nCREATE INDEX IF NOT EXISTS idx_observed_tests_run ON observed_tests(run_id);\n\n-- \u00A711B.5. A human said an edge was wrong, or runtime contradicted it. Feeding\n-- this back is how precision improves; losing it repeats the same false claim.\nCREATE TABLE IF NOT EXISTS edge_corrections (\n edge_id TEXT PRIMARY KEY,\n verdict TEXT NOT NULL, -- 'wrong' | 'right'\n reason TEXT NOT NULL,\n corrected_at INTEGER NOT NULL\n) STRICT;\n\n-- \u00A714.2. One pull request's computed scope, and it is EARNED rather than derived\n-- for a reason that is easy to get backwards.\n--\n-- Everything else on the derived side can be regenerated from source because the\n-- source is what produced it. A PR scope cannot: it was computed against a graph\n-- at one commit, and that graph moves. Recomputing it later answers a DIFFERENT\n-- question and returns a plausible answer to it \u2014 so dropping this table does\n-- not lose time, it loses the COMPARISON BASIS. Overlap scoring between two PRs\n-- is only meaningful when both scopes were computed against the same graph, and\n-- nothing in a recomputed row would say that it was not.\n--\n-- graph_commit_sha is therefore not decoration: it is the field that makes two\n-- rows comparable or not, and a reader that ignores it will happily overlap a\n-- scope from last week with one from today and report a number.\n--\n-- scope_json holds the node id set. Kept opaque here on purpose: the shape of a\n-- scope is the scoping layer's business, and a column per dimension would need\n-- a migration every time that layer learns something. What the store guarantees\n-- is that the bytes come back unchanged with the commit they were computed at.\nCREATE TABLE IF NOT EXISTS pr_scopes (\n pr_id TEXT NOT NULL,\n repo TEXT NOT NULL,\n -- The head commit of the PR itself.\n head_sha TEXT NOT NULL,\n -- The commit the GRAPH was at when this scope was computed. Two scopes are\n -- comparable only when these agree.\n graph_commit_sha TEXT NOT NULL,\n scope_json TEXT NOT NULL,\n node_count INTEGER NOT NULL,\n computed_at INTEGER NOT NULL,\n PRIMARY KEY (repo, pr_id, graph_commit_sha)\n) STRICT;\n\n-- The access path for overlap scoring: every scope computed against one graph.\n-- Without it, comparing N PRs scans the whole table N times.\nCREATE INDEX IF NOT EXISTS idx_pr_scopes_graph ON pr_scopes(repo, graph_commit_sha);\n\n-- Incident and fix-pattern links. Accumulated from real failures over time.\nCREATE TABLE IF NOT EXISTS incident_links (\n incident_node_id TEXT NOT NULL,\n target_node_id TEXT NOT NULL,\n kind TEXT NOT NULL,\n created_at INTEGER NOT NULL,\n PRIMARY KEY (incident_node_id, target_node_id, kind)\n) STRICT;\n";
88
26
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/store/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAkC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,cAAc,6FAOjB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,aAAa,kGAMhB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,6FAOa,CAAC;AAE7C,eAAO,MAAM,UAAU,8gaA+PtB,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/store/schema.ts"],"names":[],"mappings":"AAAA;;;;sFAIsF;AAItF;mFACmF;AACnF,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;4EAC4E;AAC5E,eAAO,MAAM,cAAc,QAAkC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,cAAc,6FAOjB,CAAC;AAEX;wEACwE;AACxE,eAAO,MAAM,aAAa,kGAMhB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;6DAE6D;AAC7D,eAAO,MAAM,kBAAkB,6FAOa,CAAC;AAE7C,eAAO,MAAM,UAAU,8gaA+PtB,CAAC"}
@@ -1,68 +1,14 @@
1
- /**
2
- * The graph schema.
3
- *
4
- * Held as a TypeScript constant rather than a `.sql` file on disk. Reading a
5
- * sibling `.sql` at runtime resolves to `src/` under Node's type stripping and
6
- * `dist/` after `tsc`, so it needs an asset-copy build step and then behaves
7
- * differently in tests than in production — the same class of trap the build
8
- * plan flags for the traversal worker entrypoint. A constant has neither
9
- * problem and costs nothing but syntax highlighting.
10
- *
11
- * ## Five corrections to the written schema
12
- *
13
- * Architecture §24.1 and blueprint §0.8 both describe this schema, and both need
14
- * amending. Each is recorded here because the docs are the shared reference and
15
- * a silent divergence is worse than either version.
16
- *
17
- * 1. **No `properties` table.** §11.8 names `nodes`/`edges`/`properties`, but
18
- * §24.1 and blueprint §0.8 both use a JSON column instead. An entity-
19
- * attribute-value table turns every node read into a join and defeats the
20
- * adjacency performance target that §11.8's own traversal decision rests on.
21
- * Language-specific detail lives in the `attrs` JSON column, which nothing
22
- * above the IR reads.
23
- *
24
- * 2. **No `edges.weight`.** Blueprint §0.8 lists it. But `EdgeWeight` in §12.4
25
- * is tuning config keyed by edge *type*, not a per-row value — storing it per
26
- * row would let 30,000 copies of one tunable drift apart. The single genuine
27
- * per-edge quantity, `CHANGES_WITH`'s co-change count, lives in `attrs`.
28
- *
29
- * 3. **No `edges.language`.** Both §24.1 and blueprint §0.8 declare it, and
30
- * `IREdge` has no such field — nothing in the IR could ever populate it. A
31
- * column no producer can fill is a column every reader must special-case.
32
- *
33
- * 4. **`nodes.language` is nullable.** §24.1 declares it `NOT NULL`. DEC-014
34
- * establishes that `API_ENDPOINT` — the cross-language join node — belongs to
35
- * no language, and XL-2 asserts it carries none. `NOT NULL` makes the join
36
- * node unstorable.
37
- *
38
- * 5. **Composite adjacency indices.** Blueprint §0.8 indexes `edges(source)` and
39
- * `edges(target)`. Every traversal hop filters by edge type as well, and the
40
- * prior-art measurement on this machine found a max in-degree of 1,036 — so
41
- * a single-column index means scanning a thousand rows to keep four.
42
- * `edges(source, type)` and `edges(target, type)` are the real access paths.
43
- *
44
- * ## Derived vs earned — DEC-017
45
- *
46
- * The partition is expressed in `DERIVED_TABLES` / `EARNED_TABLES` below rather
47
- * than left as prose, because the only thing that makes DEC-017 real is that
48
- * `dropDerived()` can be tested to leave the earned side untouched.
49
- */
1
+ /** Graph schema (TS constant, not `.sql` — avoids a build/dist path trap).
2
+ * Diverges from written docs (§24.1, blueprint §0.8): no `properties` table
3
+ * (JSON `attrs`); no `edges.weight`/`edges.language` (tuning config resp.
4
+ * no IR field); `nodes.language` nullable (API_ENDPOINT, DEC-014); composite
5
+ * `(source/target, type)` indices (max in-degree 1,036). Derived/earned: DEC-017. */
50
6
  import { NODE_ID_PREFIX } from "@descryy/ir";
51
- /**
52
- * Bumped when the IR itself changes shape, not when an adapter changes.
53
- *
54
- * DEC-017: on mismatch, refuse to read, drop derived, rebuild, migrate earned.
55
- * A stored graph is derived data and is never the source of truth.
56
- */
7
+ /** Bumped when the IR itself changes shape, not when an adapter changes.
8
+ * DEC-017: on mismatch, refuse to read, drop derived, rebuild, migrate earned. */
57
9
  export const IR_SCHEMA_VERSION = 4; // 3 -> 4: edge ids move e1: -> e2:, DEC-323
58
- /**
59
- * The tag on every node id, derived from the constant rather than restated.
60
- *
61
- * A graph tagged otherwise is not ours, and the whole point of the tag is to say
62
- * so out loud instead of silently failing to match. Restating it here as a
63
- * literal would let the store keep validating the previous scheme after an id
64
- * change — the exact failure the tag exists to prevent.
65
- */
10
+ /** Tag on every node id, derived from the constant, not restated — a
11
+ * literal here would keep validating the old scheme after an id change. */
66
12
  export const NODE_ID_SCHEME = NODE_ID_PREFIX.replace(":", "");
67
13
  /**
68
14
  * Regenerable from source. Dropping these loses time, never information.
@@ -75,12 +21,8 @@ export const DERIVED_TABLES = [
75
21
  "embeddings",
76
22
  "adapter_runs",
77
23
  ];
78
- /**
79
- * Cannot be regenerated: a run that witnessed an edge fire is gone once the
80
- * process exits, a run that executed a test is gone the same way, and a human's
81
- * correction of a wrong edge is not in the source at all. These survive every
82
- * rebuild.
83
- */
24
+ /** Cannot be regenerated — a witnessed edge, an executed test, or a human's
25
+ * correction exists nowhere in source. These survive every rebuild. */
84
26
  export const EARNED_TABLES = [
85
27
  "observed_edges",
86
28
  "observed_tests",
@@ -88,13 +30,9 @@ export const EARNED_TABLES = [
88
30
  "incident_links",
89
31
  "pr_scopes",
90
32
  ];
91
- /**
92
- * Children before parents. Stated explicitly rather than derived by reversing
93
- * `DERIVED_TABLES`: `PRAGMA foreign_keys` cannot be changed inside a
94
- * transaction, so a drop in the wrong order either fails or leans on cascade
95
- * behaviour to rescue it. Neither should be left to the order someone happened
96
- * to list the tables in.
97
- */
33
+ /** Children before parents, stated explicitly (not derived by reversing
34
+ * `DERIVED_TABLES`) — `PRAGMA foreign_keys` can't change mid-transaction,
35
+ * so wrong order fails or leans on cascade to rescue it. */
98
36
  export const DERIVED_DROP_ORDER = [
99
37
  "embeddings",
100
38
  "unresolved_refs",
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/store/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,CAAC,4CAA4C;AAEhF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,cAAc;CACN,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,WAAW;CACH,CAAC;AAKX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY;IACZ,iBAAiB;IACjB,OAAO;IACP,OAAO;IACP,aAAa;IACb,cAAc;CAC4B,CAAC;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+PzB,CAAC"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/store/schema.ts"],"names":[],"mappings":"AAAA;;;;sFAIsF;AAEtF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;mFACmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,CAAC,4CAA4C;AAEhF;4EAC4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,cAAc;CACN,CAAC;AAEX;wEACwE;AACxE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,WAAW;CACH,CAAC;AAKX;;6DAE6D;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY;IACZ,iBAAiB;IACjB,OAAO;IACP,OAAO;IACP,aAAa;IACb,cAAc;CAC4B,CAAC;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+PzB,CAAC"}
@@ -1,62 +1,6 @@
1
1
  /**
2
- * The batch writer — DEC-015.
3
- *
4
- * "The writer deletes everything previously written by `producedBy` for
5
- * `sourceFiles`, then inserts, in one transaction." That sentence hides three
6
- * decisions the decision entry does not make, and getting any of them wrong
7
- * loses data silently. They are made here and each is tested.
8
- *
9
- * ## 1. Invalidation matches on adapter *id* and *repo*, not `producedBy` alone
10
- *
11
- * `producedBy` is `id@version`. Matching the full string would mean an adapter
12
- * upgrade never invalidates anything the old version wrote — the two producers
13
- * would simply coexist, and the graph would hold both readings of every file
14
- * forever. §24.1 is explicit: "an adapter version bump invalidates every node
15
- * and edge that adapter produced". So overlap is computed on the id, and the
16
- * version is what makes the *stale* rows recognisable.
17
- *
18
- * `repo` is a second, equally load-bearing part of the same match, added after
19
- * a real defect: a store holding more than one repository (`descry-runtime`'s
20
- * graph correlator merges a frontend and a backend into one store to trace
21
- * across them, per DEC-228) can have two repos using the same adapter with an
22
- * overlapping relative file path — `src/index.ts`, `package.json`, anything
23
- * common. Without `repo` in this match, writing the second repo's batch reads
24
- * as "adapter X re-ran over a file it already owned" and evicts the first
25
- * repo's run outright — silent cross-repository data loss, not a wrong
26
- * answer. `invalidateAdapter` below is intentionally *not* repo-scoped — its
27
- * own contract is "every repo," a different, explicitly global operation.
28
- *
29
- * ## 2. Prior runs are matched by file-set *overlap*, not equality
30
- *
31
- * A batch is the unit of invalidation, but the batch that previously owned a
32
- * file may have covered a different set of files. Deleting only exact-matching
33
- * runs leaves two rows for the same symbol; deleting only the intersection is
34
- * impossible, because an edge has no file. So every prior run of the same
35
- * adapter that touches *any* of these files is replaced whole — and the files
36
- * it covered that this batch does not re-supply are reported as `evictedFiles`.
37
- * Reporting them is the honest-degradation rule (principle 7): the caller is
38
- * told what fell out, rather than discovering it as a missing edge next week.
39
- *
40
- * ## 3. A run also cleans up after its own previous write
41
- *
42
- * The run id is content-derived from producer, repo, commit and file set — not
43
- * from the nodes. So an adapter re-run at the same commit over the same files
44
- * lands on the *same* run id, and "delete the prior runs" excludes it by
45
- * definition. Without a self-clean pass, rows that run no longer produces stay
46
- * forever: the upsert refreshes what is still there and nothing removes what is
47
- * not. Every write therefore ends by deleting its own run's rows that this batch
48
- * did not supply.
49
- *
50
- * ## 4. Re-supplied nodes are updated, not deleted and recreated
51
- *
52
- * A node id is stable across file moves by construction (DEC-004), so re-parsing
53
- * a file normally yields the ids that were already there. Deleting a prior run's
54
- * nodes wholesale would cascade away every edge *other* runs had pointing into
55
- * them, and those runs will not be re-run. Instead: upsert the ids this batch
56
- * supplies, then delete the prior run — whose remaining nodes are exactly those
57
- * it no longer produces. Edges into a node that genuinely disappeared do cascade
58
- * away, and are reported as `orphanedEdges`, because keeping an edge to a node
59
- * that no longer exists is the wrong-edge failure the precision rule forbids.
2
+ * Batch writer (DEC-015). Prior runs matched on adapter id+repo (not full `producedBy` — §24.1 version bumps invalidate; DEC-228 multi-repo stores need `repo` or cross-repo files silently evict each other), by file-set *overlap* not equality (evicted files reported, principle 7).
3
+ * Run id is content-derived, so a same-commit re-run self-cleans what it stopped producing. Re-supplied nodes are upserted, not deleted+recreated (DEC-004 stable ids) — only genuinely-gone nodes cascade, reported as `orphanedEdges`.
60
4
  */
61
5
  import { type IRBatch } from "@descryy/ir";
62
6
  import type { SqlDriver } from "./driver/driver.ts";
@@ -67,45 +11,27 @@ export interface WriteResult {
67
11
  readonly unresolvedWritten: number;
68
12
  /** Prior runs of the same adapter that this batch replaced. */
69
13
  readonly runsReplaced: number;
70
- /**
71
- * Files a replaced run covered that this batch did not re-supply. Their rows
72
- * are gone and will not come back until the adapter is re-run over them.
73
- * Non-empty is not an error, but it is never silent.
74
- */
14
+ /** Files a replaced run covered that this batch didn't re-supply — gone until
15
+ * re-run. Non-empty is not an error, but never silent. */
75
16
  readonly evictedFiles: readonly string[];
76
- /**
77
- * Edges removed because an endpoint node ceased to exist. Always reported:
78
- * this is the one place the store deletes something nobody asked it to.
79
- */
17
+ /** Edges removed because an endpoint node ceased to exist — the one place
18
+ * the store deletes something nobody asked it to. */
80
19
  readonly orphanedEdges: number;
81
20
  }
82
21
  export interface WriteOptions {
83
22
  /** Injectable so the determinism proof is not at the mercy of the wall clock. */
84
23
  readonly now?: () => number;
85
24
  }
86
- /**
87
- * A run id derived from the batch's content, never a counter.
88
- *
89
- * Re-ingesting an identical batch must land on the same row, or "idempotent"
90
- * cannot even be stated as a property. `sourceFiles` is sorted first so that an
91
- * adapter listing the same files in a different order does not create a second
92
- * run for identical work.
93
- */
25
+ /** Run id derived from the batch's content, never a counter — re-ingesting an
26
+ * identical batch must land on the same row. `sourceFiles` sorted first so
27
+ * order doesn't create a second run for identical work. */
94
28
  export declare function runIdFor(batch: IRBatch): string;
95
- /**
96
- * Write one normalised batch. **Input must already have passed the Normaliser** —
97
- * this function does no validation, on purpose. Two validators drift; one
98
- * validator at the boundary is a boundary.
99
- */
29
+ /** Writes one normalised batch. Input must already have passed the Normaliser —
30
+ * this does no validation, on purpose. Two validators drift. */
100
31
  export declare function writeBatch(driver: SqlDriver, batch: IRBatch, options?: WriteOptions): WriteResult;
101
- /**
102
- * Remove everything an adapter ever produced, at every version, for every repo.
103
- *
104
- * §24.1's invalidation rule, as its own operation rather than a side effect of
105
- * writing. It is deliberately separate from `writeBatch`: an upgraded adapter
106
- * usually re-runs over a subset of files first, and folding this into the write
107
- * path would make a partial re-run delete data it was never going to replace.
108
- */
32
+ /** Removes everything an adapter ever produced, at every version, every repo
33
+ * (§24.1). Kept separate from `writeBatch` — folding it in would make a
34
+ * partial re-run delete data it was never going to replace. */
109
35
  export declare function invalidateAdapter(driver: SqlDriver, adapterId: string): {
110
36
  runsRemoved: number;
111
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../src/store/writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAGH,OAAO,EAAyB,KAAK,OAAO,EAAmC,MAAM,aAAa,CAAC;AAGnG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CA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