@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 -1
  362. package/package.json +11 -2
@@ -1,95 +1,29 @@
1
1
  /**
2
- * Which commits in a history describe a failure, and how we know.
3
- *
4
- * Split out of `source.ts` when the answer stopped being one regex. The git
5
- * source minted an `INCIDENT` for exactly one thing — a commit body carrying
6
- * `This reverts commit <40 hex>` — and that produced **zero** incidents across
7
- * three measured repositories (734/459/203 commits) and two in a real product
8
- * repository. `similarIncidents` was therefore built, tested, correct and
9
- * starved: its recall is not 0%, it is not computable, because it has never
10
- * been given a real incident to find.
11
- *
12
- * ## The rule every mechanism here answers to
13
- *
14
- * `INCIDENT` is an EARNED node (DEC-017). It is never dropped, it survives
15
- * every rebuild, and `INCIDENT_CORRELATED` biases diff-scoping traversal toward
16
- * the files it names for as long as the store exists. A wrong incident is not a
17
- * bad answer that a later run corrects — it is unrecoverable pollution in the
18
- * one table that cannot be recomputed away. So:
19
- *
20
- * **Every mechanism rests on something a person declared. None rests on
21
- * something Descry inferred.**
22
- *
23
- * A revert trailer is written by `git revert`. A `Revert "…"` subject is typed
24
- * by a person or by GitHub's own button on their behalf. `Fixes #123` is a
25
- * developer stating that something was broken and this commit fixed it. What is
26
- * deliberately *not* here is any reading of "fix", "hotfix" or "bug" in prose —
27
- * the original mechanism's own comment says why, and it applies unchanged to
28
- * every mechanism added since: matching on the word "fix" would classify
29
- * ordinary work as an incident.
30
- *
31
- * ## Refusals, not guesses
32
- *
33
- * A `Revert "X"` naming a subject this history does not contain, or containing
34
- * twice, produces a `DetectedRefusal` rather than a ranked guess. Two candidates
35
- * is a genuine ambiguity and picking the nearer one would be recency standing in
36
- * for evidence — the same discipline every resolver in this project follows.
37
- *
38
- * See `DEC-NEXT-incident-minting-beyond-explicit-reverts`.
2
+ * Which commits describe a failure. `INCIDENT` is EARNED (DEC-017, never dropped, biases traversal permanently), so every mechanism rests on something a person declared — never Descry inferring "fix"/"bug" from prose.
3
+ * An ambiguous Revert is a DetectedRefusal, not a ranked guess. See DEC-NEXT-incident-minting-beyond-explicit-reverts.
39
4
  */
40
5
  /** `git revert` writes this. Machine-generated, and the strongest signal available. */
41
6
  const REVERT_TRAILER = /This reverts commit ([0-9a-f]{40})/;
42
- /**
43
- * `Revert "the original subject"` — the subject form, written by a person or by
44
- * GitHub's Revert button, often with no sha anywhere in the commit.
45
- *
46
- * Anchored at the start and requiring the quotes: `Revert the auth change` is
47
- * prose about what the commit does, not a reference to a specific commit, and
48
- * reading it as one would be exactly the inference this module refuses to make.
49
- */
7
+ /** `Revert "the original subject"` form, written by a person or GitHub's
8
+ * button. Anchored + requires quotes: unquoted `Revert the auth change` is
9
+ * prose, not a commit reference, and reading it as one is the inference refused here. */
50
10
  const REVERT_SUBJECT = /^Revert\s+"(.+)"\s*$/;
51
- /**
52
- * A closed list of fix-shaped verbs, and only immediately before the reference.
53
- *
54
- * `Fixes #123` is a developer stating that something was broken. `See #123` and
55
- * `Part of #124` are not — they relate a commit to an issue and say nothing
56
- * about a defect. The verb is what carries the claim, so the verb is what is
57
- * matched; a bare `#123` mints nothing.
58
- *
59
- * `GH-123` is GitHub's own cross-reference form and means the same thing.
60
- */
11
+ /** Closed list of fix-shaped verbs, immediately before the reference. `Fixes
12
+ * #123` claims a defect; `See #123` doesn't — a bare `#123` mints nothing.
13
+ * `GH-123` is GitHub's equivalent cross-reference form. */
61
14
  const ISSUE_VERBS = "fix|fixes|fixed|close|closes|closed|resolve|resolves|resolved";
62
15
  /** In the subject, anywhere: a subject is a claim about the commit itself. */
63
16
  const SUBJECT_ISSUE = new RegExp(`\\b(?:${ISSUE_VERBS})\\s+(?:#|GH-)(\\d+)\\b`, "gi");
64
- /**
65
- * In the body, **only in trailer position** — the start of a line, with nothing
66
- * but whitespace before it.
67
- *
68
- * Measured, not supposed. Run over this repository's own history, the
69
- * anywhere-in-the-body form matched three commits, and all three were prose
70
- * *about* the convention rather than uses of it: a sentence quoting
71
- * `"Fixes #123"` as an example, and a bullet reading
72
- * `- issue-reference: \`Fixes #123\` and its closed list…`. A commit message
73
- * discussing the convention is not a commit message using it, and an EARNED
74
- * node minted from one is permanent.
75
- *
76
- * The trailer position is where the convention actually lives — it is what
77
- * GitHub's own tooling emits and what a template puts there — so this costs
78
- * almost no real recall and removes a whole class of false positive. Rule 2:
79
- * when in doubt, omit.
17
+ /** In the body, only in trailer position (line start). Measured: the
18
+ * anywhere-in-body form matched 3 commits here, all prose *about* the
19
+ * convention, not uses of it — and an EARNED node minted from one is permanent. Trailer position is where the convention actually lives. Rule 2.
80
20
  */
81
21
  const BODY_ISSUE = new RegExp(`^[ \\t]*(?:${ISSUE_VERBS})\\s+(?:#|GH-)(\\d+)\\b`, "gim");
82
22
  function pathsOf(commit) {
83
23
  return [...new Set(commit.changes.map((c) => c.path))].sort();
84
24
  }
85
- /**
86
- * Every incident this history declares, plus every revert whose target it does
87
- * not contain.
88
- *
89
- * `commits` is the history as `readHistory` returns it — newest first. Order is
90
- * not relied on for correctness: a revert's target is found by timestamp, so
91
- * the result is identical for any permutation of the same commits.
92
- */
25
+ /** Every incident this history declares, plus every revert whose target it
26
+ * lacks. Order-independent: a revert's target is found by timestamp. */
93
27
  export function detectIncidents(commits) {
94
28
  const incidents = [];
95
29
  const refusals = [];
@@ -104,9 +38,8 @@ export function detectIncidents(commits) {
104
38
  existing.push(commit);
105
39
  }
106
40
  for (const commit of commits) {
107
- // The trailer first, and exclusively: `git revert` writes both the trailer
108
- // and the `Revert "…"` subject, so reading the subject as an independent
109
- // mechanism would mint one incident twice under two different names.
41
+ // Trailer first, exclusively: git revert writes both trailer and subject,
42
+ // so reading the subject too would mint one incident under two names.
110
43
  const revertedSha = REVERT_TRAILER.exec(commit.body)?.[1];
111
44
  if (revertedSha !== undefined) {
112
45
  const target = bySha.get(revertedSha);
@@ -125,9 +58,8 @@ export function detectIncidents(commits) {
125
58
  }
126
59
  const quoted = REVERT_SUBJECT.exec(commit.subject)?.[1];
127
60
  if (quoted !== undefined) {
128
- // Backwards only. A commit cannot revert something that had not happened
129
- // when it was written, and a same-subject commit landing afterwards is a
130
- // different commit that happens to share a name.
61
+ // Backwards only: a commit can't revert something written after it, and
62
+ // a same-subject commit landing later just happens to share a name.
131
63
  const candidates = (bySubject.get(quoted) ?? []).filter((c) => c.timestamp < commit.timestamp);
132
64
  if (candidates.length === 1) {
133
65
  const target = candidates[0];
@@ -157,10 +89,8 @@ export function detectIncidents(commits) {
157
89
  }
158
90
  continue;
159
91
  }
160
- // An issue reference is a claim about a *defect*, made by the person who
161
- // fixed it. Read from the subject anywhere and from the body only in
162
- // trailer position — see `BODY_ISSUE` for the three false positives that
163
- // distinction was measured against.
92
+ // An issue reference claims a defect. Read from the subject anywhere,
93
+ // from the body only in trailer position — see BODY_ISSUE's measurement.
164
94
  const refs = new Set();
165
95
  for (const match of commit.subject.matchAll(SUBJECT_ISSUE))
166
96
  refs.add(`#${match[1]}`);
@@ -176,8 +106,8 @@ export function detectIncidents(commits) {
176
106
  });
177
107
  }
178
108
  }
179
- // Deterministic: two runs over the same history must produce a byte-identical
180
- // batch, or the store's content hash moves for no reason.
109
+ // Deterministic: two runs must produce a byte-identical batch, or the
110
+ // store's content hash moves for no reason.
181
111
  incidents.sort((a, b) => a.fix.sha.localeCompare(b.fix.sha) || (a.issueRef ?? "").localeCompare(b.issueRef ?? ""));
182
112
  refusals.sort((a, b) => a.fixSha.localeCompare(b.fixSha) || a.rawTarget.localeCompare(b.rawTarget));
183
113
  unresolvedTrailers.sort((a, b) => a.fix.sha.localeCompare(b.fix.sha));
@@ -1 +1 @@
1
- {"version":3,"file":"incidents.js","sourceRoot":"","sources":["../../../src/sources/git/incidents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAiEH,uFAAuF;AACvF,MAAM,cAAc,GAAG,oCAAoC,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,WAAW,GAAG,+DAA+D,CAAC;AAEpF,8EAA8E;AAC9E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AM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACpG,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAEtE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;AACrD,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,9 +1,11 @@
1
1
  export { createGitSource, revertedShaOf, GIT_SOURCE_ID, GIT_SOURCE_VERSION, UNDIRECTED_EDGE_TYPES, } from "./source.ts";
2
2
  export type { GitSourceOptions } from "./source.ts";
3
- export { readHistory, gitHead, isGitRepository, filesInCommit, changedFiles, resolveCommitBySha, logForPath, } from "./history.ts";
3
+ export { readHistory, gitHead, isGitRepository, GitUnavailableError, isPathTrackedByGit, filesInCommit, changedFiles, resolveCommitBySha, logForPath, } from "./history.ts";
4
4
  export type { Commit, CommitChange, HistoryOptions, PathLogCommit, PathLogOptions, PathLogResult, } from "./history.ts";
5
- export { gitDiff, gitWorkingTreeDiff, TOTAL_PATCH_BUDGET_REASON_PREFIX } from "./diff.ts";
6
- export type { GitDiffFile, GitDiffOptions, GitWorkingTreeDiffOptions } from "./diff.ts";
5
+ export { gitDiff, gitWorkingTreeChange, gitWorkingTreeDiff, TOTAL_PATCH_BUDGET_REASON_PREFIX } from "./diff.ts";
6
+ export { uncommittedAmong, workingTreeChangedFiles } from "./history.ts";
7
+ export type { WorkingTreeFilesOptions } from "./history.ts";
8
+ export type { GitDiffFile, GitDiffOptions, GitWorkingTreeChange, GitWorkingTreeChangeOptions, GitWorkingTreeDiffOptions, } from "./diff.ts";
7
9
  export { detectIncidents } from "./incidents.ts";
8
10
  export type { DetectedIncident, DetectedRefusal, IncidentDetection, IncidentMechanism, UnresolvedTrailer, } from "./incidents.ts";
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sources/git/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EACL,WAAW,EACX,OAAO,EACP,eAAe,EACf,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,MAAM,EACN,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAC1F,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sources/git/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EACL,WAAW,EACX,OAAO,EACP,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,MAAM,EACN,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACzE,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,YAAY,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export { createGitSource, revertedShaOf, GIT_SOURCE_ID, GIT_SOURCE_VERSION, UNDIRECTED_EDGE_TYPES, } from "./source.js";
2
- export { readHistory, gitHead, isGitRepository, filesInCommit, changedFiles, resolveCommitBySha, logForPath, } from "./history.js";
3
- export { gitDiff, gitWorkingTreeDiff, TOTAL_PATCH_BUDGET_REASON_PREFIX } from "./diff.js";
2
+ export { readHistory, gitHead, isGitRepository, GitUnavailableError, isPathTrackedByGit, filesInCommit, changedFiles, resolveCommitBySha, logForPath, } from "./history.js";
3
+ export { gitDiff, gitWorkingTreeChange, gitWorkingTreeDiff, TOTAL_PATCH_BUDGET_REASON_PREFIX } from "./diff.js";
4
+ export { uncommittedAmong, workingTreeChangedFiles } from "./history.js";
4
5
  export { detectIncidents } from "./incidents.js";
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sources/git/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,WAAW,EACX,OAAO,EACP,eAAe,EACf,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,GACX,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sources/git/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,WAAW,EACX,OAAO,EACP,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,UAAU,GACX,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAUzE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,93 +1,23 @@
1
1
  /**
2
- * The git history `IRSource` — architecture §11.6 and §11.7.
3
- *
4
- * It is an `IRSource` and **not** a `LanguageAdapter`, which is the whole reason
5
- * that split exists: history is a producer of IR with no parser, no language and
6
- * no resolution beyond R0, and without the narrower interface it would need a
7
- * second write path — and a second write path is how un-provenanced rows reach
8
- * storage.
9
- *
10
- * ## Everything here is R0, and that is not a formality
11
- *
12
- * Co-change is not code analysis. It observes that two files were edited in the
13
- * same commit, which is evidence about *people*, not about program structure.
14
- * R0's confidence ceiling (DEC-019) therefore caps every edge this source emits
15
- * at 0.5, and §11A.5's reliability cap makes any finding resting on one Class C
16
- * — a behavioural prediction that must be live-confirmed or dropped. That is the
17
- * correct treatment: "these two files usually change together" is a hint for a
18
- * human, never a claim about what breaks.
19
- *
20
- * ## Precision over recall, applied three times
21
- *
22
- * 1. **Merge commits are excluded from co-change.** A merge's file list is the
23
- * union of both branches, so counting it would report every file in a large
24
- * merge as coupled to every other. This exclusion is scoped to co-change —
25
- * it does **not** apply to resolving what a revert names (see below): a
26
- * revert of "Merge pull request #N" is a real incident whose target
27
- * happens to be a merge commit, and excluding it from co-change is not a
28
- * reason to also make it unresolvable as an incident.
29
- * 2. **Large commits are excluded.** A commit touching hundreds of files is a
30
- * reformat or a dependency bump; including it adds O(n²) edges that mean
31
- * nothing.
32
- * 3. **Only explicit reverts become incidents.** A commit whose message merely
33
- * contains "fix" is not evidence of an incident. `git revert` writes a
34
- * machine-generated `This reverts commit <sha>.` line, and that is the only
35
- * signal used.
36
- *
37
- * ## Resolving what a revert names
38
- *
39
- * `readHistory` indexes commits reachable from `HEAD`, minus merges. A revert
40
- * commit's target sha can miss that index for two reasons that have nothing to
41
- * do with whether the incident is real: the target is a merge commit (excluded
42
- * above), or the target was never merged as itself — a squash/rebase-merge
43
- * workflow (GitHub's default) discards the original commits and only the
44
- * squashed commit survives on `HEAD`, so "Revert PR #N" names a sha that is
45
- * either real-but-unreachable (still sitting on an abandoned branch) or
46
- * genuinely gone (garbage-collected after the branch was deleted). Measured
47
- * against 5 real repos, 6 of 9 real reverts fell into these two buckets and
48
- * were silently dropped by a naive index lookup.
49
- *
50
- * `resolveCommitBySha` is the fallback: it goes straight to the object
51
- * database (`git cat-file` / `git diff-tree`), which enforces neither
52
- * constraint `readHistory` applies. It resolves the merge case and the
53
- * unreachable-but-present case. Only the genuinely-gone case still fails, and
54
- * that failure is disclosed via `unresolved` (below) rather than dropped with
55
- * no trace — this is the fallback CLAUDE.md rule 7 requires labelling.
2
+ * Git history `IRSource` (§11.6/§11.7) — an `IRSource`, not a `LanguageAdapter`: one write path, no un-provenanced rows. Everything is R0; DEC-019 caps confidence at 0.5 and §11A.5 caps any finding at Class C — co-change is evidence about people, not code.
3
+ * Precision over recall: merge commits excluded from co-change (not from revert resolution below), large commits excluded, only explicit-revert trailers become incidents.
4
+ * `resolveCommitBySha` recovers reverts the primary index misses (6/9 real reverts, 5 repos, needed it); a genuinely-gone target is disclosed via `unresolved`, never dropped (rule 7).
56
5
  */
57
6
  import { type IRSource } from "@descryy/ir";
58
7
  import { type Commit, type HistoryOptions } from "./history.ts";
59
8
  export declare const GIT_SOURCE_ID = "git-history";
60
9
  export declare const GIT_SOURCE_VERSION = "0.1.0";
61
- /**
62
- * `CHANGES_WITH` is a symmetric relationship stored in one canonical direction.
63
- *
64
- * Emitting both directions would double the edge count and make the pair count
65
- * twice in any per-edge aggregate. The cost is that a caller must traverse it
66
- * undirected — `direction: "both"` — and forgetting that yields a *missing*
67
- * edge, which is a disclosed gap rather than a wrong answer. That asymmetry is
68
- * why this is the safe default and not the convenient one.
69
- */
10
+ /** `CHANGES_WITH` is symmetric, stored one direction only — a caller must
11
+ * traverse `direction: "both"`, or gets a disclosed missing edge, not a wrong one. */
70
12
  export declare const UNDIRECTED_EDGE_TYPES: readonly ["CHANGES_WITH"];
71
13
  export interface GitSourceOptions extends HistoryOptions {
72
14
  readonly repo: string;
73
15
  readonly cwd: string;
74
- /**
75
- * Minimum times two files must change together before an edge is emitted.
76
- *
77
- * **Provisional.** The architecture's own illustration is that 18x co-change
78
- * is a warning and 2x is noise, which fixes the shape of the threshold but not
79
- * its value; §32's tuning register has no number for it either. 5 is a
80
- * defensible floor for a repo with a few hundred commits and is expected to
81
- * move once measured. See DEC-033.
82
- */
16
+ /** Minimum times two files must co-change before an edge is emitted.
17
+ * Provisional — 5 is a defensible floor, expected to move once measured (DEC-033). */
83
18
  readonly minSupport?: number;
84
- /**
85
- * Minimum `support / timesTheSourceFileChanged`.
86
- *
87
- * Support alone over-reports the files that change constantly: a config file
88
- * touched in half of all commits co-occurs with everything. Confidence is what
89
- * separates "coupled" from "always busy".
90
- */
19
+ /** Minimum `support / timesFileChanged` — support alone over-reports files
20
+ * that change constantly; this separates "coupled" from "always busy". */
91
21
  readonly minConfidence?: number;
92
22
  }
93
23
  export declare function revertedShaOf(commit: Commit): string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/sources/git/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,EAQL,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAC3C,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAG1C;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,2BAA4B,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAiBD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG3D;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,QAAQ,CA0WnE"}
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/sources/git/source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAQL,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,aAA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KAAK,EAAE,EAAE;QACT,UAAU,EAAE,EAAE;KACf,CAAC;AACJ,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * §14.6 for one change against a base branch — the shape `cross_pr` actually has.
3
+ *
4
+ * ## Why the base branch is the second member of the set
5
+ *
6
+ * `migration-heads.ts` computes heads across a *set of changes*, and `cross_pr`
7
+ * has one. That is not a mismatch, it is a missing member: the set the
8
+ * migration runner will see after this merge is **base's migrations plus this
9
+ * change's**, and heads over that union is exactly the computation the runner
10
+ * performs when it refuses with *"multiple head revisions are present"*.
11
+ *
12
+ * So base is read as a change with its own id. Nothing about the check changes;
13
+ * it is given the set it was always meant to have.
14
+ *
15
+ * ## The one wrong sentence this must not say
16
+ *
17
+ * A base branch that already forks produces two heads whatever the change does.
18
+ * Reporting that as *this* change's conflict is a wrong sentence about the wrong
19
+ * person, and it would fire on every change to such a repository until someone
20
+ * fixed a fork they did not create.
21
+ *
22
+ * So base is measured **alone** first. Its head count is a fact about base:
23
+ *
24
+ * | base alone | what this reports |
25
+ * | --- | --- |
26
+ * | one head | the union is computed and `baseHead` is supplied, so stale-history is checked too |
27
+ * | more than one | a disclosure naming base's fork, and no conflict attributed to the change |
28
+ * | none — no migrations at all | the change's own migrations, with nothing to fork from |
29
+ *
30
+ * ## Reading base without checking it out
31
+ *
32
+ * `git ls-tree` names base's files and `git show base:<path>` reads one. Neither
33
+ * touches the working tree, so this is safe to run mid-edit — which is the only
34
+ * time anyone runs a pre-merge check.
35
+ *
36
+ * The tree is narrowed by {@link looksLikeMigration} before anything is read. A
37
+ * base branch is thousands of paths and its migrations are dozens; reading all
38
+ * of them to discover that would be the check's whole cost paid for nothing.
39
+ *
40
+ * ## Everything here is R0 and the ceiling follows
41
+ *
42
+ * A regex over source text, per `read.ts`. The class column is a ceiling rather
43
+ * than a floor, so a conflict computed from these records caps at C however
44
+ * certain the arithmetic above it. Reaching A needs the framework's own
45
+ * migration history, which needs the tool installed and run, and nothing here
46
+ * installs or runs anything.
47
+ */
48
+ import type { MigrationHeadReport } from "../../multipr/migration-heads.ts";
49
+ import type { MigrationReadReport } from "./read.ts";
50
+ /** A migration no runner will see, because of where it is. */
51
+ export interface MisplacedMigration {
52
+ readonly file: string;
53
+ readonly revision: string;
54
+ /** The dialect it parses as — the same one this repository already uses. */
55
+ readonly dialect: string;
56
+ }
57
+ export interface MigrationsAcrossChange {
58
+ /** Base's own migrations, read from the tree rather than the working copy. */
59
+ readonly base: MigrationReadReport;
60
+ /** What this change adds or edits. */
61
+ readonly change: MigrationReadReport;
62
+ /**
63
+ * Base's single head, or `null` when base has none or more than one.
64
+ *
65
+ * `null` for two different reasons and the notes say which. Supplying it is
66
+ * what enables the stale-history check one level up.
67
+ */
68
+ readonly baseHead: string | null;
69
+ /** Heads over the union — the computation the migration runner performs. */
70
+ readonly report: MigrationHeadReport;
71
+ /**
72
+ * Well-formed migrations sitting where no migration tool looks.
73
+ *
74
+ * Not part of the head computation, and that is the point: the runner cannot
75
+ * see them either, so a merge that "leaves one head" can be true and
76
+ * incomplete at once.
77
+ */
78
+ readonly misplaced: readonly MisplacedMigration[];
79
+ readonly notes: readonly string[];
80
+ }
81
+ export interface AcrossChangeOptions {
82
+ /** Cap on files read per side. Truncation is disclosed, never silent. */
83
+ readonly maxFiles?: number;
84
+ /** Paths this change touched. Read from git when not supplied. */
85
+ readonly changedFiles?: readonly string[];
86
+ }
87
+ /**
88
+ * Read both sides of a merge and compute the heads it would leave.
89
+ *
90
+ * @param base the branch this change would merge into
91
+ * @param head the tip being reviewed
92
+ */
93
+ export declare function readMigrationsAcrossChange(cwd: string, base: string, head: string, options?: AcrossChangeOptions): Promise<MigrationsAcrossChange>;
94
+ //# sourceMappingURL=across-change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"across-change.d.ts","sourceRoot":"","sources":["../../../src/sources/migrations/across-change.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG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