@ttsc/unplugin 0.31.0 → 0.31.2

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 (291) hide show
  1. package/lib/core/bridge/projectRecordMoved.js +1 -1
  2. package/lib/core/bridge/projectRecordMoved.js.map +1 -1
  3. package/lib/core/bridge/projectRecordMoved.mjs +1 -1
  4. package/lib/core/bridge/projectRecordMoved.mjs.map +1 -1
  5. package/lib/core/bun/bun.d.cts +3 -2
  6. package/lib/core/bun/bun.d.mts +3 -2
  7. package/lib/core/bun/bun.d.ts +3 -2
  8. package/lib/core/bun/bun.js +8 -4
  9. package/lib/core/bun/bun.js.map +1 -1
  10. package/lib/core/bun/bun.mjs +8 -4
  11. package/lib/core/bun/bun.mjs.map +1 -1
  12. package/lib/core/observer/createInputObserver.js +7 -6
  13. package/lib/core/observer/createInputObserver.js.map +1 -1
  14. package/lib/core/observer/createInputObserver.mjs +7 -6
  15. package/lib/core/observer/createInputObserver.mjs.map +1 -1
  16. package/lib/core/observer/openIsolatedRecursiveWatch.d.cts +11 -12
  17. package/lib/core/observer/openIsolatedRecursiveWatch.d.mts +11 -12
  18. package/lib/core/observer/openIsolatedRecursiveWatch.d.ts +11 -12
  19. package/lib/core/observer/openIsolatedRecursiveWatch.js +11 -12
  20. package/lib/core/observer/openIsolatedRecursiveWatch.js.map +1 -1
  21. package/lib/core/observer/openIsolatedRecursiveWatch.mjs +11 -12
  22. package/lib/core/observer/openIsolatedRecursiveWatch.mjs.map +1 -1
  23. package/lib/core/transform/cache/TtscCachedProjectTransform.d.cts +12 -3
  24. package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +12 -3
  25. package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +12 -3
  26. package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +2 -0
  27. package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +2 -0
  28. package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +2 -0
  29. package/lib/core/transform/cache/selectCachedGenerationAction.js +1 -1
  30. package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
  31. package/lib/core/transform/cache/selectCachedGenerationAction.mjs +1 -1
  32. package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
  33. package/lib/core/transform/deliverCachedTransform.d.cts +36 -0
  34. package/lib/core/transform/deliverCachedTransform.d.mts +36 -0
  35. package/lib/core/transform/deliverCachedTransform.d.ts +36 -0
  36. package/lib/core/transform/deliverCachedTransform.js +73 -0
  37. package/lib/core/transform/deliverCachedTransform.js.map +1 -0
  38. package/lib/core/transform/deliverCachedTransform.mjs +71 -0
  39. package/lib/core/transform/deliverCachedTransform.mjs.map +1 -0
  40. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.cts +2 -2
  41. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.mts +2 -2
  42. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.ts +2 -2
  43. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js +6 -2
  44. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js.map +1 -1
  45. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs +6 -2
  46. package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs.map +1 -1
  47. package/lib/core/transform/envelope/selectExternalInputPaths.d.cts +3 -5
  48. package/lib/core/transform/envelope/selectExternalInputPaths.d.mts +3 -5
  49. package/lib/core/transform/envelope/selectExternalInputPaths.d.ts +3 -5
  50. package/lib/core/transform/envelope/selectExternalInputPaths.js +8 -7
  51. package/lib/core/transform/envelope/selectExternalInputPaths.js.map +1 -1
  52. package/lib/core/transform/envelope/selectExternalInputPaths.mjs +8 -7
  53. package/lib/core/transform/envelope/selectExternalInputPaths.mjs.map +1 -1
  54. package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.cts +15 -12
  55. package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.mts +15 -12
  56. package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.ts +15 -12
  57. package/lib/core/transform/generation/captureFailedGenerationInputStates.js +1 -1
  58. package/lib/core/transform/generation/captureFailedGenerationInputStates.js.map +1 -1
  59. package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs +1 -1
  60. package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs.map +1 -1
  61. package/lib/core/transform/generation/captureTransformGeneration.js +1 -1
  62. package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
  63. package/lib/core/transform/generation/captureTransformGeneration.mjs +1 -1
  64. package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
  65. package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js +2 -2
  66. package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js.map +1 -1
  67. package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs +2 -2
  68. package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs.map +1 -1
  69. package/lib/core/transform/generation/selectTransformAttemptDisposition.d.cts +3 -1
  70. package/lib/core/transform/generation/selectTransformAttemptDisposition.d.mts +3 -1
  71. package/lib/core/transform/generation/selectTransformAttemptDisposition.d.ts +3 -1
  72. package/lib/core/transform/generation/selectTransformAttemptDisposition.js +3 -1
  73. package/lib/core/transform/generation/selectTransformAttemptDisposition.js.map +1 -1
  74. package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs +3 -1
  75. package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs.map +1 -1
  76. package/lib/core/transform/generation/transformProject.d.cts +9 -7
  77. package/lib/core/transform/generation/transformProject.d.mts +9 -7
  78. package/lib/core/transform/generation/transformProject.d.ts +9 -7
  79. package/lib/core/transform/generation/transformProject.js +14 -9
  80. package/lib/core/transform/generation/transformProject.js.map +1 -1
  81. package/lib/core/transform/generation/transformProject.mjs +14 -9
  82. package/lib/core/transform/generation/transformProject.mjs.map +1 -1
  83. package/lib/core/transform/inputs/pluginSourceFilesDigest.d.cts +9 -3
  84. package/lib/core/transform/inputs/pluginSourceFilesDigest.d.mts +9 -3
  85. package/lib/core/transform/inputs/pluginSourceFilesDigest.d.ts +9 -3
  86. package/lib/core/transform/inputs/pluginSourceFilesDigest.js +10 -4
  87. package/lib/core/transform/inputs/pluginSourceFilesDigest.js.map +1 -1
  88. package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs +11 -5
  89. package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs.map +1 -1
  90. package/lib/core/transform/inputs/pluginSourceHolds.d.cts +4 -2
  91. package/lib/core/transform/inputs/pluginSourceHolds.d.mts +4 -2
  92. package/lib/core/transform/inputs/pluginSourceHolds.d.ts +4 -2
  93. package/lib/core/transform/inputs/pluginSourceHolds.js +9 -4
  94. package/lib/core/transform/inputs/pluginSourceHolds.js.map +1 -1
  95. package/lib/core/transform/inputs/pluginSourceHolds.mjs +9 -4
  96. package/lib/core/transform/inputs/pluginSourceHolds.mjs.map +1 -1
  97. package/lib/core/transform/inputs/pluginSourceState.d.cts +3 -1
  98. package/lib/core/transform/inputs/pluginSourceState.d.mts +3 -1
  99. package/lib/core/transform/inputs/pluginSourceState.d.ts +3 -1
  100. package/lib/core/transform/inputs/pluginSourceState.js +8 -3
  101. package/lib/core/transform/inputs/pluginSourceState.js.map +1 -1
  102. package/lib/core/transform/inputs/pluginSourceState.mjs +8 -3
  103. package/lib/core/transform/inputs/pluginSourceState.mjs.map +1 -1
  104. package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.cts +18 -5
  105. package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.mts +18 -5
  106. package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.ts +18 -5
  107. package/lib/core/transform/inputs/preparePluginBuildEnvironments.js +53 -12
  108. package/lib/core/transform/inputs/preparePluginBuildEnvironments.js.map +1 -1
  109. package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs +53 -12
  110. package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs.map +1 -1
  111. package/lib/core/transform/tracker/broker/WatchBroker.d.cts +14 -4
  112. package/lib/core/transform/tracker/broker/WatchBroker.d.mts +14 -4
  113. package/lib/core/transform/tracker/broker/WatchBroker.d.ts +14 -4
  114. package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.cts +63 -0
  115. package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.mts +63 -0
  116. package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.ts +63 -0
  117. package/lib/core/transform/tracker/broker/WatchBrokerTransport.js +89 -0
  118. package/lib/core/transform/tracker/broker/WatchBrokerTransport.js.map +1 -0
  119. package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs +89 -0
  120. package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs.map +1 -0
  121. package/lib/core/transform/tracker/broker/drainWatchBroker.d.cts +8 -8
  122. package/lib/core/transform/tracker/broker/drainWatchBroker.d.mts +8 -8
  123. package/lib/core/transform/tracker/broker/drainWatchBroker.d.ts +8 -8
  124. package/lib/core/transform/tracker/broker/drainWatchBroker.js +12 -13
  125. package/lib/core/transform/tracker/broker/drainWatchBroker.js.map +1 -1
  126. package/lib/core/transform/tracker/broker/drainWatchBroker.mjs +12 -13
  127. package/lib/core/transform/tracker/broker/drainWatchBroker.mjs.map +1 -1
  128. package/lib/core/transform/tracker/broker/getWatchBroker.d.cts +18 -15
  129. package/lib/core/transform/tracker/broker/getWatchBroker.d.mts +18 -15
  130. package/lib/core/transform/tracker/broker/getWatchBroker.d.ts +18 -15
  131. package/lib/core/transform/tracker/broker/getWatchBroker.js +87 -17
  132. package/lib/core/transform/tracker/broker/getWatchBroker.js.map +1 -1
  133. package/lib/core/transform/tracker/broker/getWatchBroker.mjs +87 -17
  134. package/lib/core/transform/tracker/broker/getWatchBroker.mjs.map +1 -1
  135. package/lib/core/transform/tracker/broker/openBrokeredWatch.d.cts +5 -5
  136. package/lib/core/transform/tracker/broker/openBrokeredWatch.d.mts +5 -5
  137. package/lib/core/transform/tracker/broker/openBrokeredWatch.d.ts +5 -5
  138. package/lib/core/transform/tracker/broker/openBrokeredWatch.js +11 -14
  139. package/lib/core/transform/tracker/broker/openBrokeredWatch.js.map +1 -1
  140. package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs +11 -14
  141. package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs.map +1 -1
  142. package/lib/core/transform/tracker/broker/usesWatchBroker.d.cts +7 -7
  143. package/lib/core/transform/tracker/broker/usesWatchBroker.d.mts +7 -7
  144. package/lib/core/transform/tracker/broker/usesWatchBroker.d.ts +7 -7
  145. package/lib/core/transform/tracker/broker/usesWatchBroker.js +7 -7
  146. package/lib/core/transform/tracker/broker/usesWatchBroker.mjs +7 -7
  147. package/lib/core/transform/tracker/broker/watchBrokerSource.d.cts +9 -10
  148. package/lib/core/transform/tracker/broker/watchBrokerSource.d.mts +9 -10
  149. package/lib/core/transform/tracker/broker/watchBrokerSource.d.ts +9 -10
  150. package/lib/core/transform/tracker/broker/watchBrokerSource.js +10 -11
  151. package/lib/core/transform/tracker/broker/watchBrokerSource.js.map +1 -1
  152. package/lib/core/transform/tracker/broker/watchBrokerSource.mjs +10 -11
  153. package/lib/core/transform/tracker/broker/watchBrokerSource.mjs.map +1 -1
  154. package/lib/core/transform/transformTtsc.d.cts +7 -4
  155. package/lib/core/transform/transformTtsc.d.mts +7 -4
  156. package/lib/core/transform/transformTtsc.d.ts +7 -4
  157. package/lib/core/transform/transformTtsc.js +38 -93
  158. package/lib/core/transform/transformTtsc.js.map +1 -1
  159. package/lib/core/transform/transformTtsc.mjs +38 -93
  160. package/lib/core/transform/transformTtsc.mjs.map +1 -1
  161. package/lib/core/transform/validation/TtscGenerationProof.d.cts +105 -0
  162. package/lib/core/transform/validation/TtscGenerationProof.d.mts +105 -0
  163. package/lib/core/transform/validation/TtscGenerationProof.d.ts +105 -0
  164. package/lib/core/transform/validation/TtscGenerationProof.js +149 -0
  165. package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -0
  166. package/lib/core/transform/validation/TtscGenerationProof.mjs +149 -0
  167. package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -0
  168. package/lib/core/transform/validation/captureUniversalHostInputValidation.js +2 -2
  169. package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
  170. package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +2 -2
  171. package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
  172. package/lib/core/transform/validation/matchesCachedSource.d.cts +18 -15
  173. package/lib/core/transform/validation/matchesCachedSource.d.mts +18 -15
  174. package/lib/core/transform/validation/matchesCachedSource.d.ts +18 -15
  175. package/lib/core/transform/validation/matchesCachedSource.js +28 -22
  176. package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
  177. package/lib/core/transform/validation/matchesCachedSource.mjs +28 -22
  178. package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
  179. package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.cts +3 -2
  180. package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.mts +3 -2
  181. package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.ts +3 -2
  182. package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +4 -4
  183. package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
  184. package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +4 -4
  185. package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
  186. package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.cts +2 -1
  187. package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.mts +2 -1
  188. package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.ts +2 -1
  189. package/lib/core/transform/validation/matchesNarrowPersistentInputs.js +2 -2
  190. package/lib/core/transform/validation/matchesNarrowPersistentInputs.js.map +1 -1
  191. package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs +2 -2
  192. package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs.map +1 -1
  193. package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.cts +3 -2
  194. package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.mts +3 -2
  195. package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.ts +3 -2
  196. package/lib/core/transform/validation/matchesUniversalHostInputTrees.js +7 -5
  197. package/lib/core/transform/validation/matchesUniversalHostInputTrees.js.map +1 -1
  198. package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs +7 -5
  199. package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs.map +1 -1
  200. package/lib/core/transform/validation/matchesUniversalHostInputs.d.cts +3 -2
  201. package/lib/core/transform/validation/matchesUniversalHostInputs.d.mts +3 -2
  202. package/lib/core/transform/validation/matchesUniversalHostInputs.d.ts +3 -2
  203. package/lib/core/transform/validation/matchesUniversalHostInputs.js +5 -5
  204. package/lib/core/transform/validation/matchesUniversalHostInputs.js.map +1 -1
  205. package/lib/core/transform/validation/matchesUniversalHostInputs.mjs +5 -5
  206. package/lib/core/transform/validation/matchesUniversalHostInputs.mjs.map +1 -1
  207. package/lib/core/transform/validation/nativeInputPredicatesHold.d.cts +5 -4
  208. package/lib/core/transform/validation/nativeInputPredicatesHold.d.mts +5 -4
  209. package/lib/core/transform/validation/nativeInputPredicatesHold.d.ts +5 -4
  210. package/lib/core/transform/validation/nativeInputPredicatesHold.js +31 -12
  211. package/lib/core/transform/validation/nativeInputPredicatesHold.js.map +1 -1
  212. package/lib/core/transform/validation/nativeInputPredicatesHold.mjs +31 -12
  213. package/lib/core/transform/validation/nativeInputPredicatesHold.mjs.map +1 -1
  214. package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.cts +2 -1
  215. package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.mts +2 -1
  216. package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.ts +2 -1
  217. package/lib/core/transform/validation/notificationsProveProgramUnchanged.js +2 -2
  218. package/lib/core/transform/validation/notificationsProveProgramUnchanged.js.map +1 -1
  219. package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs +2 -2
  220. package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs.map +1 -1
  221. package/lib/core/transform/watch/captureWatchInputBaseline.d.cts +4 -0
  222. package/lib/core/transform/watch/captureWatchInputBaseline.d.mts +4 -0
  223. package/lib/core/transform/watch/captureWatchInputBaseline.d.ts +4 -0
  224. package/lib/core/transform/watch/captureWatchInputBaseline.js +3 -0
  225. package/lib/core/transform/watch/captureWatchInputBaseline.js.map +1 -1
  226. package/lib/core/transform/watch/captureWatchInputBaseline.mjs +3 -0
  227. package/lib/core/transform/watch/captureWatchInputBaseline.mjs.map +1 -1
  228. package/lib/core/transform/watch/captureWatchInputBaselines.d.cts +2 -0
  229. package/lib/core/transform/watch/captureWatchInputBaselines.d.mts +2 -0
  230. package/lib/core/transform/watch/captureWatchInputBaselines.d.ts +2 -0
  231. package/lib/core/transform/watch/captureWatchInputBaselines.js +3 -1
  232. package/lib/core/transform/watch/captureWatchInputBaselines.js.map +1 -1
  233. package/lib/core/transform/watch/captureWatchInputBaselines.mjs +3 -1
  234. package/lib/core/transform/watch/captureWatchInputBaselines.mjs.map +1 -1
  235. package/lib/core/transform/watch/notifyWatchInputs.js +3 -0
  236. package/lib/core/transform/watch/notifyWatchInputs.js.map +1 -1
  237. package/lib/core/transform/watch/notifyWatchInputs.mjs +3 -0
  238. package/lib/core/transform/watch/notifyWatchInputs.mjs.map +1 -1
  239. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.cts +5 -2
  240. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.mts +5 -2
  241. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.ts +5 -2
  242. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js +6 -3
  243. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js.map +1 -1
  244. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs +6 -3
  245. package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs.map +1 -1
  246. package/lib/core/turbopack/turbopack.js +2 -1
  247. package/lib/core/turbopack/turbopack.js.map +1 -1
  248. package/lib/core/turbopack/turbopack.mjs +2 -1
  249. package/lib/core/turbopack/turbopack.mjs.map +1 -1
  250. package/package.json +3 -3
  251. package/src/core/bridge/projectRecordMoved.ts +3 -1
  252. package/src/core/bun/bun.ts +8 -4
  253. package/src/core/observer/createInputObserver.ts +8 -5
  254. package/src/core/observer/openIsolatedRecursiveWatch.ts +11 -12
  255. package/src/core/transform/cache/TtscCachedProjectTransform.ts +13 -3
  256. package/src/core/transform/cache/selectCachedGenerationAction.ts +9 -1
  257. package/src/core/transform/deliverCachedTransform.ts +97 -0
  258. package/src/core/transform/envelope/selectDeclaredProjectInputKeys.ts +5 -2
  259. package/src/core/transform/envelope/selectExternalInputPaths.ts +7 -7
  260. package/src/core/transform/filesystem/TtscTransformFilesystemOperations.ts +15 -12
  261. package/src/core/transform/generation/captureFailedGenerationInputStates.ts +1 -0
  262. package/src/core/transform/generation/captureTransformGeneration.ts +6 -1
  263. package/src/core/transform/generation/failedGenerationEnvironmentChanged.ts +12 -2
  264. package/src/core/transform/generation/selectTransformAttemptDisposition.ts +3 -1
  265. package/src/core/transform/generation/transformProject.ts +13 -9
  266. package/src/core/transform/inputs/pluginSourceFilesDigest.ts +11 -4
  267. package/src/core/transform/inputs/pluginSourceHolds.ts +13 -3
  268. package/src/core/transform/inputs/pluginSourceState.ts +8 -2
  269. package/src/core/transform/inputs/preparePluginBuildEnvironments.ts +64 -11
  270. package/src/core/transform/tracker/broker/WatchBroker.ts +15 -4
  271. package/src/core/transform/tracker/broker/WatchBrokerTransport.ts +82 -0
  272. package/src/core/transform/tracker/broker/drainWatchBroker.ts +12 -13
  273. package/src/core/transform/tracker/broker/getWatchBroker.ts +89 -18
  274. package/src/core/transform/tracker/broker/openBrokeredWatch.ts +11 -14
  275. package/src/core/transform/tracker/broker/usesWatchBroker.ts +7 -7
  276. package/src/core/transform/tracker/broker/watchBrokerSource.ts +10 -11
  277. package/src/core/transform/transformTtsc.ts +38 -92
  278. package/src/core/transform/validation/TtscGenerationProof.ts +201 -0
  279. package/src/core/transform/validation/captureUniversalHostInputValidation.ts +2 -1
  280. package/src/core/transform/validation/matchesCachedSource.ts +27 -21
  281. package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +5 -3
  282. package/src/core/transform/validation/matchesNarrowPersistentInputs.ts +3 -1
  283. package/src/core/transform/validation/matchesUniversalHostInputTrees.ts +8 -3
  284. package/src/core/transform/validation/matchesUniversalHostInputs.ts +6 -4
  285. package/src/core/transform/validation/nativeInputPredicatesHold.ts +36 -14
  286. package/src/core/transform/validation/notificationsProveProgramUnchanged.ts +3 -1
  287. package/src/core/transform/watch/captureWatchInputBaseline.ts +4 -0
  288. package/src/core/transform/watch/captureWatchInputBaselines.ts +7 -1
  289. package/src/core/transform/watch/notifyWatchInputs.ts +3 -0
  290. package/src/core/transform/watch/watchInputEvidenceMatchesDisk.ts +12 -2
  291. package/src/core/turbopack/turbopack.ts +2 -1
@@ -0,0 +1,89 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Common lifecycle seam for the native Windows stdio broker and macOS IPC.
5
+ *
6
+ * The transport owns framing and demand references only. Ordered native
7
+ * notifications and per-registration readiness remain backend responsibilities;
8
+ * a successful send cannot certify coverage or cache reuse.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation One transport seam preserves explicit failure and reference ownership for both supported broker backends.
11
+ * @evidence contracts/common.md#clear-and-simple-design Callers express send, demand and retirement through this namespace instead of duplicating platform checks or modifying a ChildProcess.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Supported child streams and IPC APIs are used without replacing runtime methods.
13
+ * @evidence contracts/common.md#meaningful-documentation Native prose separates transport completion from native watch authority.
14
+ * @evidence contracts/portability.md#os-neutral-implementation Native selection stays at broker startup; all tracker and observer consumers share these operations.
15
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Member operations own their delegated cost.
16
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work The broker owner selects transport and sharing lifetime.
17
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This namespace itself retains no transport registry.
18
+ */
19
+ exports.WatchBrokerTransport = void 0;
20
+ (function (WatchBrokerTransport) {
21
+ /**
22
+ * Queue a message on the selected transport. False refuses delivery; true
23
+ * only means queued, with actual acknowledgment or failure still
24
+ * outstanding.
25
+ *
26
+ * @evidence contracts/common.md#principled-implementation Native and IPC transports preserve separate queue acceptance and observed backend replies.
27
+ * @evidence contracts/common.md#clear-and-simple-design One selection delegates framing to the startup-owned transport.
28
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No queue result is upgraded into readiness or a native drain.
29
+ * @evidence contracts/common.md#meaningful-documentation Native prose states the limited meaning of the returned boolean.
30
+ * @evidence contracts/portability.md#os-neutral-implementation Explicit stdio capability takes precedence over optional IPC.
31
+ * @evidence contracts/performance.md#efficient-algorithms Transport selection is fixed work; JSON framing, message bytes and pipe backpressure belong to the selected sender.
32
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Sending an effect does not own computation reuse.
33
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The selected sender and request owner retain queued bytes and outstanding acknowledgment state.
34
+ */
35
+ function send(broker, message) {
36
+ return broker.transport === undefined
37
+ ? broker.child.send?.(message) === true
38
+ : broker.transport.send(message);
39
+ }
40
+ WatchBrokerTransport.send = send;
41
+ /**
42
+ * Keep the selected reply channel live exactly while caller demand exists.
43
+ * Counts belong to registration/drain owners; native references are flags.
44
+ *
45
+ * @evidence contracts/common.md#principled-implementation Outstanding requests retain both process and reply channel, preventing host exit before acknowledgment.
46
+ * @evidence contracts/common.md#clear-and-simple-design One operation applies the caller's aggregated demand to either transport.
47
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Optional Bun IPC methods are used as capabilities without installing replacements.
48
+ * @evidence contracts/common.md#meaningful-documentation Native prose identifies count ownership and flag semantics.
49
+ * @evidence contracts/portability.md#os-neutral-implementation Optional IPC methods and a selected native pipe capability express runtime differences.
50
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Reference toggling selects no data-processing algorithm.
51
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work This effect owns no shared computation.
52
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The caller supplies aggregate demand; removing the last demand unreferences process and reply channel without asserting native termination.
53
+ */
54
+ function reference(broker, active) {
55
+ if (broker.transport !== undefined)
56
+ broker.transport.reference(active);
57
+ else if (active) {
58
+ broker.child.ref();
59
+ broker.child.channel?.ref?.();
60
+ }
61
+ else {
62
+ broker.child.unref();
63
+ broker.child.channel?.unref?.();
64
+ }
65
+ }
66
+ WatchBrokerTransport.reference = reference;
67
+ /**
68
+ * End this broker's request stream. The last-registration owner separately
69
+ * attempts process termination; closing a channel is not proof of child
70
+ * exit.
71
+ *
72
+ * @evidence contracts/common.md#principled-implementation Channel retirement is distinct from process exit and native resource closure.
73
+ * @evidence contracts/common.md#clear-and-simple-design Startup-owned transport closes its request stream without platform checks in consumers.
74
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Supported end/disconnect operations preserve native ownership without synthetic exit acknowledgment.
75
+ * @evidence contracts/common.md#meaningful-documentation Native prose identifies the independent termination attempt and limited closure meaning.
76
+ * @evidence contracts/portability.md#os-neutral-implementation Selected stream closure and optional IPC disconnection keep platform details behind the transport seam.
77
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Closing one channel selects no processing algorithm.
78
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Retirement owns no computation reuse.
79
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The selected transport ends its input; process kill and actual native cleanup remain the broker and backend's responsibilities.
80
+ */
81
+ function close(broker) {
82
+ if (broker.transport !== undefined)
83
+ broker.transport.close();
84
+ else
85
+ broker.child.disconnect?.();
86
+ }
87
+ WatchBrokerTransport.close = close;
88
+ })(exports.WatchBrokerTransport || (exports.WatchBrokerTransport = {}));
89
+ //# sourceMappingURL=WatchBrokerTransport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WatchBrokerTransport.js","sources":["../../../../../src/core/transform/tracker/broker/WatchBrokerTransport.ts"],"sourcesContent":[null],"names":["WatchBrokerTransport"],"mappings":";;AAEA;;;;;;;;;;;;;;;AAeG;AACcA;AAAjB,CAAA,UAAiB,oBAAoB,EAAA;AACnC;;;;;;;;;;;;;AAaG;AACH,IAAA,SAAgB,IAAI,CAAC,MAAmB,EAAE,OAAgB,EAAA;AACxD,QAAA,OAAO,MAAM,CAAC,SAAS,KAAK;cACxB,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,OAAiB,CAAC,KAAK;cAC3C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;IACpC;AAJgB,IAAA,oBAAA,CAAA,IAAI,OAInB;AAED;;;;;;;;;;;;AAYG;AACH,IAAA,SAAgB,SAAS,CAAC,MAAmB,EAAE,MAAe,EAAA;AAC5D,QAAA,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;AAAE,YAAA,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;aACjE,IAAI,MAAM,EAAE;AACf,YAAA,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;YAClB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI;QAC/B;aAAO;AACL,YAAA,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;YACpB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,IAAI;QACjC;IACF;AATgB,IAAA,oBAAA,CAAA,SAAS,YASxB;AAED;;;;;;;;;;;;;AAaG;IACH,SAAgB,KAAK,CAAC,MAAmB,EAAA;AACvC,QAAA,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;AAAE,YAAA,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE;;AACvD,YAAA,MAAM,CAAC,KAAK,CAAC,UAAU,IAAI;IAClC;AAHgB,IAAA,oBAAA,CAAA,KAAK,QAGpB;AACH,CAAC,EA/DgBA,4BAAoB,KAApBA,4BAAoB,GAAA,EAAA,CAAA,CAAA;;"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Common lifecycle seam for the native Windows stdio broker and macOS IPC.
3
+ *
4
+ * The transport owns framing and demand references only. Ordered native
5
+ * notifications and per-registration readiness remain backend responsibilities;
6
+ * a successful send cannot certify coverage or cache reuse.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation One transport seam preserves explicit failure and reference ownership for both supported broker backends.
9
+ * @evidence contracts/common.md#clear-and-simple-design Callers express send, demand and retirement through this namespace instead of duplicating platform checks or modifying a ChildProcess.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Supported child streams and IPC APIs are used without replacing runtime methods.
11
+ * @evidence contracts/common.md#meaningful-documentation Native prose separates transport completion from native watch authority.
12
+ * @evidence contracts/portability.md#os-neutral-implementation Native selection stays at broker startup; all tracker and observer consumers share these operations.
13
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Member operations own their delegated cost.
14
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work The broker owner selects transport and sharing lifetime.
15
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This namespace itself retains no transport registry.
16
+ */
17
+ var WatchBrokerTransport;
18
+ (function (WatchBrokerTransport) {
19
+ /**
20
+ * Queue a message on the selected transport. False refuses delivery; true
21
+ * only means queued, with actual acknowledgment or failure still
22
+ * outstanding.
23
+ *
24
+ * @evidence contracts/common.md#principled-implementation Native and IPC transports preserve separate queue acceptance and observed backend replies.
25
+ * @evidence contracts/common.md#clear-and-simple-design One selection delegates framing to the startup-owned transport.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No queue result is upgraded into readiness or a native drain.
27
+ * @evidence contracts/common.md#meaningful-documentation Native prose states the limited meaning of the returned boolean.
28
+ * @evidence contracts/portability.md#os-neutral-implementation Explicit stdio capability takes precedence over optional IPC.
29
+ * @evidence contracts/performance.md#efficient-algorithms Transport selection is fixed work; JSON framing, message bytes and pipe backpressure belong to the selected sender.
30
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Sending an effect does not own computation reuse.
31
+ * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The selected sender and request owner retain queued bytes and outstanding acknowledgment state.
32
+ */
33
+ function send(broker, message) {
34
+ return broker.transport === undefined
35
+ ? broker.child.send?.(message) === true
36
+ : broker.transport.send(message);
37
+ }
38
+ WatchBrokerTransport.send = send;
39
+ /**
40
+ * Keep the selected reply channel live exactly while caller demand exists.
41
+ * Counts belong to registration/drain owners; native references are flags.
42
+ *
43
+ * @evidence contracts/common.md#principled-implementation Outstanding requests retain both process and reply channel, preventing host exit before acknowledgment.
44
+ * @evidence contracts/common.md#clear-and-simple-design One operation applies the caller's aggregated demand to either transport.
45
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Optional Bun IPC methods are used as capabilities without installing replacements.
46
+ * @evidence contracts/common.md#meaningful-documentation Native prose identifies count ownership and flag semantics.
47
+ * @evidence contracts/portability.md#os-neutral-implementation Optional IPC methods and a selected native pipe capability express runtime differences.
48
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Reference toggling selects no data-processing algorithm.
49
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work This effect owns no shared computation.
50
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The caller supplies aggregate demand; removing the last demand unreferences process and reply channel without asserting native termination.
51
+ */
52
+ function reference(broker, active) {
53
+ if (broker.transport !== undefined)
54
+ broker.transport.reference(active);
55
+ else if (active) {
56
+ broker.child.ref();
57
+ broker.child.channel?.ref?.();
58
+ }
59
+ else {
60
+ broker.child.unref();
61
+ broker.child.channel?.unref?.();
62
+ }
63
+ }
64
+ WatchBrokerTransport.reference = reference;
65
+ /**
66
+ * End this broker's request stream. The last-registration owner separately
67
+ * attempts process termination; closing a channel is not proof of child
68
+ * exit.
69
+ *
70
+ * @evidence contracts/common.md#principled-implementation Channel retirement is distinct from process exit and native resource closure.
71
+ * @evidence contracts/common.md#clear-and-simple-design Startup-owned transport closes its request stream without platform checks in consumers.
72
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Supported end/disconnect operations preserve native ownership without synthetic exit acknowledgment.
73
+ * @evidence contracts/common.md#meaningful-documentation Native prose identifies the independent termination attempt and limited closure meaning.
74
+ * @evidence contracts/portability.md#os-neutral-implementation Selected stream closure and optional IPC disconnection keep platform details behind the transport seam.
75
+ * @evidenceExclude contracts/performance.md#efficient-algorithms Closing one channel selects no processing algorithm.
76
+ * @evidenceExclude contracts/performance.md#reuse-equivalent-work Retirement owns no computation reuse.
77
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The selected transport ends its input; process kill and actual native cleanup remain the broker and backend's responsibilities.
78
+ */
79
+ function close(broker) {
80
+ if (broker.transport !== undefined)
81
+ broker.transport.close();
82
+ else
83
+ broker.child.disconnect?.();
84
+ }
85
+ WatchBrokerTransport.close = close;
86
+ })(WatchBrokerTransport || (WatchBrokerTransport = {}));
87
+
88
+ export { WatchBrokerTransport };
89
+ //# sourceMappingURL=WatchBrokerTransport.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WatchBrokerTransport.mjs","sources":["../../../../../src/core/transform/tracker/broker/WatchBrokerTransport.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;AAeG;AACG,IAAW;AAAjB,CAAA,UAAiB,oBAAoB,EAAA;AACnC;;;;;;;;;;;;;AAaG;AACH,IAAA,SAAgB,IAAI,CAAC,MAAmB,EAAE,OAAgB,EAAA;AACxD,QAAA,OAAO,MAAM,CAAC,SAAS,KAAK;cACxB,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,OAAiB,CAAC,KAAK;cAC3C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;IACpC;AAJgB,IAAA,oBAAA,CAAA,IAAI,OAInB;AAED;;;;;;;;;;;;AAYG;AACH,IAAA,SAAgB,SAAS,CAAC,MAAmB,EAAE,MAAe,EAAA;AAC5D,QAAA,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;AAAE,YAAA,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;aACjE,IAAI,MAAM,EAAE;AACf,YAAA,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;YAClB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI;QAC/B;aAAO;AACL,YAAA,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;YACpB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,IAAI;QACjC;IACF;AATgB,IAAA,oBAAA,CAAA,SAAS,YASxB;AAED;;;;;;;;;;;;;AAaG;IACH,SAAgB,KAAK,CAAC,MAAmB,EAAA;AACvC,QAAA,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;AAAE,YAAA,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE;;AACvD,YAAA,MAAM,CAAC,KAAK,CAAC,UAAU,IAAI;IAClC;AAHgB,IAAA,oBAAA,CAAA,KAAK,QAGpB;AACH,CAAC,EA/DgB,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;;;;"}
@@ -2,13 +2,13 @@ import type { WatchBroker } from "./WatchBroker.cjs";
2
2
  /**
3
3
  * Ask the watch broker to acknowledge, and resolve with whether it did.
4
4
  *
5
- * The child answers after two turns of its own loop, so a watch callback it had
6
- * already queued has run, and the ordered IPC channel puts every message it
7
- * sent before the reply ahead of the reply. That is the same proof an
8
- * in-process watcher gets from a macrotask turn, rather than the fixed wait
9
- * this replaces, which guessed at the crossing (samchon/ttsc#1272). On macOS
10
- * the child answers once each stream it can prove has delivered a probe, which
11
- * takes the service's latency (samchon/ttsc#1453).
5
+ * Windows answers after consuming currently queued native completions to an
6
+ * observed empty port. macOS answers once each provable stream has delivered a
7
+ * probe, including the service's latency (#1453). Ordered transport applies
8
+ * every preceding event before the reply. These are current backend frontiers,
9
+ * not atomic timestamp classification of concurrent writes. The optional direct
10
+ * fs.watch program retains its explicit two-turn frontier for protocol tests;
11
+ * it does not supply Windows production proof (#1719).
12
12
  *
13
13
  * A broker that never answers must not hold a delivery, so the wait gives up
14
14
  * after a threshold of twice the probe timeout: the child itself gives up on a
@@ -48,7 +48,7 @@ import type { WatchBroker } from "./WatchBroker.cjs";
48
48
  * Native paragraphs and parameters explain ordering, coverage, sharing and
49
49
  * false deadlines under the documentation skill.
50
50
  * @evidence contracts/portability.md#os-neutral-implementation
51
- * OS-neutral host delivery delegates Windows loop ordering and macOS stream
51
+ * OS-neutral host delivery delegates Windows completion-port drainage and macOS stream
52
52
  * probing to the native broker rather than applying one universal timing guess.
53
53
  * @evidence contracts/performance.md#efficient-algorithms
54
54
  * A covering memo query uses fixed identity/id lookup. New requests copy all N
@@ -2,13 +2,13 @@ import type { WatchBroker } from "./WatchBroker.mjs";
2
2
  /**
3
3
  * Ask the watch broker to acknowledge, and resolve with whether it did.
4
4
  *
5
- * The child answers after two turns of its own loop, so a watch callback it had
6
- * already queued has run, and the ordered IPC channel puts every message it
7
- * sent before the reply ahead of the reply. That is the same proof an
8
- * in-process watcher gets from a macrotask turn, rather than the fixed wait
9
- * this replaces, which guessed at the crossing (samchon/ttsc#1272). On macOS
10
- * the child answers once each stream it can prove has delivered a probe, which
11
- * takes the service's latency (samchon/ttsc#1453).
5
+ * Windows answers after consuming currently queued native completions to an
6
+ * observed empty port. macOS answers once each provable stream has delivered a
7
+ * probe, including the service's latency (#1453). Ordered transport applies
8
+ * every preceding event before the reply. These are current backend frontiers,
9
+ * not atomic timestamp classification of concurrent writes. The optional direct
10
+ * fs.watch program retains its explicit two-turn frontier for protocol tests;
11
+ * it does not supply Windows production proof (#1719).
12
12
  *
13
13
  * A broker that never answers must not hold a delivery, so the wait gives up
14
14
  * after a threshold of twice the probe timeout: the child itself gives up on a
@@ -48,7 +48,7 @@ import type { WatchBroker } from "./WatchBroker.mjs";
48
48
  * Native paragraphs and parameters explain ordering, coverage, sharing and
49
49
  * false deadlines under the documentation skill.
50
50
  * @evidence contracts/portability.md#os-neutral-implementation
51
- * OS-neutral host delivery delegates Windows loop ordering and macOS stream
51
+ * OS-neutral host delivery delegates Windows completion-port drainage and macOS stream
52
52
  * probing to the native broker rather than applying one universal timing guess.
53
53
  * @evidence contracts/performance.md#efficient-algorithms
54
54
  * A covering memo query uses fixed identity/id lookup. New requests copy all N
@@ -2,13 +2,13 @@ import type { WatchBroker } from "./WatchBroker";
2
2
  /**
3
3
  * Ask the watch broker to acknowledge, and resolve with whether it did.
4
4
  *
5
- * The child answers after two turns of its own loop, so a watch callback it had
6
- * already queued has run, and the ordered IPC channel puts every message it
7
- * sent before the reply ahead of the reply. That is the same proof an
8
- * in-process watcher gets from a macrotask turn, rather than the fixed wait
9
- * this replaces, which guessed at the crossing (samchon/ttsc#1272). On macOS
10
- * the child answers once each stream it can prove has delivered a probe, which
11
- * takes the service's latency (samchon/ttsc#1453).
5
+ * Windows answers after consuming currently queued native completions to an
6
+ * observed empty port. macOS answers once each provable stream has delivered a
7
+ * probe, including the service's latency (#1453). Ordered transport applies
8
+ * every preceding event before the reply. These are current backend frontiers,
9
+ * not atomic timestamp classification of concurrent writes. The optional direct
10
+ * fs.watch program retains its explicit two-turn frontier for protocol tests;
11
+ * it does not supply Windows production proof (#1719).
12
12
  *
13
13
  * A broker that never answers must not hold a delivery, so the wait gives up
14
14
  * after a threshold of twice the probe timeout: the child itself gives up on a
@@ -48,7 +48,7 @@ import type { WatchBroker } from "./WatchBroker";
48
48
  * Native paragraphs and parameters explain ordering, coverage, sharing and
49
49
  * false deadlines under the documentation skill.
50
50
  * @evidence contracts/portability.md#os-neutral-implementation
51
- * OS-neutral host delivery delegates Windows loop ordering and macOS stream
51
+ * OS-neutral host delivery delegates Windows completion-port drainage and macOS stream
52
52
  * probing to the native broker rather than applying one universal timing guess.
53
53
  * @evidence contracts/performance.md#efficient-algorithms
54
54
  * A covering memo query uses fixed identity/id lookup. New requests copy all N
@@ -1,17 +1,18 @@
1
1
  'use strict';
2
2
 
3
3
  var WATCH_PROBE_TIMEOUT_MS = require('./WATCH_PROBE_TIMEOUT_MS.js');
4
+ var WatchBrokerTransport = require('./WatchBrokerTransport.js');
4
5
 
5
6
  /**
6
7
  * Ask the watch broker to acknowledge, and resolve with whether it did.
7
8
  *
8
- * The child answers after two turns of its own loop, so a watch callback it had
9
- * already queued has run, and the ordered IPC channel puts every message it
10
- * sent before the reply ahead of the reply. That is the same proof an
11
- * in-process watcher gets from a macrotask turn, rather than the fixed wait
12
- * this replaces, which guessed at the crossing (samchon/ttsc#1272). On macOS
13
- * the child answers once each stream it can prove has delivered a probe, which
14
- * takes the service's latency (samchon/ttsc#1453).
9
+ * Windows answers after consuming currently queued native completions to an
10
+ * observed empty port. macOS answers once each provable stream has delivered a
11
+ * probe, including the service's latency (#1453). Ordered transport applies
12
+ * every preceding event before the reply. These are current backend frontiers,
13
+ * not atomic timestamp classification of concurrent writes. The optional direct
14
+ * fs.watch program retains its explicit two-turn frontier for protocol tests;
15
+ * it does not supply Windows production proof (#1719).
15
16
  *
16
17
  * A broker that never answers must not hold a delivery, so the wait gives up
17
18
  * after a threshold of twice the probe timeout: the child itself gives up on a
@@ -51,7 +52,7 @@ var WATCH_PROBE_TIMEOUT_MS = require('./WATCH_PROBE_TIMEOUT_MS.js');
51
52
  * Native paragraphs and parameters explain ordering, coverage, sharing and
52
53
  * false deadlines under the documentation skill.
53
54
  * @evidence contracts/portability.md#os-neutral-implementation
54
- * OS-neutral host delivery delegates Windows loop ordering and macOS stream
55
+ * OS-neutral host delivery delegates Windows completion-port drainage and macOS stream
55
56
  * probing to the native broker rather than applying one universal timing guess.
56
57
  * @evidence contracts/performance.md#efficient-algorithms
57
58
  * A covering memo query uses fixed identity/id lookup. New requests copy all N
@@ -108,8 +109,7 @@ function startWatchBrokerDrain(broker, timeout, scope) {
108
109
  broker.drainScopes?.delete(id);
109
110
  broker.pendingDrains -= 1;
110
111
  if (broker.pendingDrains === 0 && broker.pendingRegistrations === 0) {
111
- broker.child.unref();
112
- broker.child.channel?.unref?.();
112
+ WatchBrokerTransport.WatchBrokerTransport.reference(broker, false);
113
113
  }
114
114
  resolve(answered);
115
115
  };
@@ -119,12 +119,11 @@ function startWatchBrokerDrain(broker, timeout, scope) {
119
119
  // the reference the loop can empty while a delivery waits here, and the
120
120
  // process exits mid-build with nothing to report.
121
121
  broker.pendingDrains += 1;
122
- broker.child.ref();
123
- broker.child.channel?.ref?.();
122
+ WatchBrokerTransport.WatchBrokerTransport.reference(broker, true);
124
123
  const timer = setTimeout(() => release(false), timeout);
125
124
  broker.drains.set(id, release);
126
125
  (broker.drainScopes ??= new Map()).set(id, scope);
127
- if (broker.child.send?.({ id, op: "drain" }) !== true) {
126
+ if (WatchBrokerTransport.WatchBrokerTransport.send(broker, { id, op: "drain" }) !== true) {
128
127
  release(false);
129
128
  }
130
129
  });
@@ -1 +1 @@
1
- {"version":3,"file":"drainWatchBroker.js","sources":["../../../../../src/core/transform/tracker/broker/drainWatchBroker.ts"],"sourcesContent":[null],"names":["WATCH_PROBE_TIMEOUT_MS"],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEG;AACG,SAAU,gBAAgB,CAC9B,MAAmB,EACnB,UAAkB,CAAC,GAAGA,6CAAsB,EAC5C,YAAqB,EAAA;;;AAIrB,IAAA,IACE,MAAM,CAAC,QAAQ,KAAK,SAAS;SAC5B,YAAY,KAAK,SAAS;YACzB,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,EACnD;QACA,OAAO,MAAM,CAAC,QAAQ;IACxB;IACA,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,CAAC,GAAG,MAAM,CAAC,aAAa;AACrB,SAAA,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,KAAK,CAAC,MAAM;SAClC,GAAG,CAAC,CAAC,CAAC,E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zB,QAAA,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;QAClB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI;AAC7B,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC;AAC9B,QAAA,CAAC,MAAM,CAAC,WAAW,KAAK,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC;AACjD,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAAE;YACrD,OAAO,CAAC,KAAK,CAAC;QAChB;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"drainWatchBroker.js","sources":["../../../../../src/core/transform/tracker/broker/drainWatchBroker.ts"],"sourcesContent":[null],"names":["WATCH_PROBE_TIMEOUT_MS","WatchBrokerTransport"],"mappings":";;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEG;AACG,SAAU,gBAAgB,CAC9B,MAAmB,EACnB,UAAkB,CAAC,GAAGA,6CAAsB,EAC5C,YAAqB,EAAA;;;AAIrB,IAAA,IACE,MAAM,CAAC,QAAQ,KAAK,SAAS;SAC5B,YAAY,KAAK,SAAS;YACzB,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,EACnD;QACA,OAAO,MAAM,CAAC,QAAQ;IACxB;IACA,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,CAAC,GAAG,MAAM,CAAC,aAAa;AACrB,SAAA,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,KAAK,CAAC,MAAM;SAClC,GAAG,CA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AC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;AAC5C,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC;AAC9B,QAAA,CAAC,MAAM,CAAC,WAAW,KAAK,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC;AACjD,QAAA,IAAIA,yCAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAAE;YACnE,OAAO,CAAC,KAAK,CAAC;QAChB;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
@@ -1,15 +1,16 @@
1
1
  import { WATCH_PROBE_TIMEOUT_MS } from './WATCH_PROBE_TIMEOUT_MS.mjs';
2
+ import { WatchBrokerTransport } from './WatchBrokerTransport.mjs';
2
3
 
3
4
  /**
4
5
  * Ask the watch broker to acknowledge, and resolve with whether it did.
5
6
  *
6
- * The child answers after two turns of its own loop, so a watch callback it had
7
- * already queued has run, and the ordered IPC channel puts every message it
8
- * sent before the reply ahead of the reply. That is the same proof an
9
- * in-process watcher gets from a macrotask turn, rather than the fixed wait
10
- * this replaces, which guessed at the crossing (samchon/ttsc#1272). On macOS
11
- * the child answers once each stream it can prove has delivered a probe, which
12
- * takes the service's latency (samchon/ttsc#1453).
7
+ * Windows answers after consuming currently queued native completions to an
8
+ * observed empty port. macOS answers once each provable stream has delivered a
9
+ * probe, including the service's latency (#1453). Ordered transport applies
10
+ * every preceding event before the reply. These are current backend frontiers,
11
+ * not atomic timestamp classification of concurrent writes. The optional direct
12
+ * fs.watch program retains its explicit two-turn frontier for protocol tests;
13
+ * it does not supply Windows production proof (#1719).
13
14
  *
14
15
  * A broker that never answers must not hold a delivery, so the wait gives up
15
16
  * after a threshold of twice the probe timeout: the child itself gives up on a
@@ -49,7 +50,7 @@ import { WATCH_PROBE_TIMEOUT_MS } from './WATCH_PROBE_TIMEOUT_MS.mjs';
49
50
  * Native paragraphs and parameters explain ordering, coverage, sharing and
50
51
  * false deadlines under the documentation skill.
51
52
  * @evidence contracts/portability.md#os-neutral-implementation
52
- * OS-neutral host delivery delegates Windows loop ordering and macOS stream
53
+ * OS-neutral host delivery delegates Windows completion-port drainage and macOS stream
53
54
  * probing to the native broker rather than applying one universal timing guess.
54
55
  * @evidence contracts/performance.md#efficient-algorithms
55
56
  * A covering memo query uses fixed identity/id lookup. New requests copy all N
@@ -106,8 +107,7 @@ function startWatchBrokerDrain(broker, timeout, scope) {
106
107
  broker.drainScopes?.delete(id);
107
108
  broker.pendingDrains -= 1;
108
109
  if (broker.pendingDrains === 0 && broker.pendingRegistrations === 0) {
109
- broker.child.unref();
110
- broker.child.channel?.unref?.();
110
+ WatchBrokerTransport.reference(broker, false);
111
111
  }
112
112
  resolve(answered);
113
113
  };
@@ -117,12 +117,11 @@ function startWatchBrokerDrain(broker, timeout, scope) {
117
117
  // the reference the loop can empty while a delivery waits here, and the
118
118
  // process exits mid-build with nothing to report.
119
119
  broker.pendingDrains += 1;
120
- broker.child.ref();
121
- broker.child.channel?.ref?.();
120
+ WatchBrokerTransport.reference(broker, true);
122
121
  const timer = setTimeout(() => release(false), timeout);
123
122
  broker.drains.set(id, release);
124
123
  (broker.drainScopes ??= new Map()).set(id, scope);
125
- if (broker.child.send?.({ id, op: "drain" }) !== true) {
124
+ if (WatchBrokerTransport.send(broker, { id, op: "drain" }) !== true) {
126
125
  release(false);
127
126
  }
128
127
  });
@@ -1 +1 @@
1
- {"version":3,"file":"drainWatchBroker.mjs","sources":["../../../../../src/core/transform/tracker/broker/drainWatchBroker.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEG;AACG,SAAU,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,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;AACxB,YAAA,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC;AAC9B,YAAA,MAAM,CAAC,aAAa,IAAI,CAAC;AACzB,YAAA,IAAI,MAAM,CAAC,aAAa,KAAK,CAAC,IAAI,MAAM,CAAC,oBAAoB,KAAK,CAAC,EAAE;AACnE,gBAAA,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;gBACpB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,IAAI;YACjC;YACA,OAAO,CAAC,QAAQ,CAAC;AACnB,QAAA,CAAC;;;;;;AAMD,QAAA,MAAM,CAAC,aAAa,IAAI,CAAC;AACzB,QAAA,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;QAClB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI;AAC7B,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC;AAC9B,QAAA,CAAC,MAAM,CAAC,WAAW,KAAK,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC;AACjD,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAAE;YACrD,OAAO,CAAC,KAAK,CAAC;QAChB;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"drainWatchBroker.mjs","sources":["../../../../../src/core/transform/tracker/broker/drainWatchBroker.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEG;AACG,SAAU,gBAAgB,CAC9B,MAAmB,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C,EAAE,CAAC;AACxB,YAAA,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC;AAC9B,YAAA,MAAM,CAAC,aAAa,IAAI,CAAC;AACzB,YAAA,IAAI,MAAM,CAAC,aAAa,KAAK,CAAC,IAAI,MAAM,CAAC,oBAAoB,KAAK,CAAC,EAAE;AACnE,gBAAA,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC;YAC/C;YACA,OAAO,CAAC,QAAQ,CAAC;AACnB,QAAA,CAAC;;;;;;AAMD,QAAA,MAAM,CAAC,aAAa,IAAI,CAAC;AACzB,QAAA,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;AAC5C,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC;AAC9B,QAAA,CAAC,MAAM,CAAC,WAAW,KAAK,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC;AACjD,QAAA,IAAI,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,IAAI,EAAE;YACnE,OAAO,CAAC,KAAK,CAAC;QAChB;AACF,IAAA,CAAC,CAAC;AACJ;;;;"}
@@ -6,11 +6,11 @@ import type { WatchBroker } from "./WatchBroker.cjs";
6
6
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
7
7
  * each native backend:
8
8
  *
9
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
10
- * whole process when a watched temporary tree is deleted. In the child that
11
- * crash becomes an ordinary exit that fails the affected trackers, and those
12
- * generations fall back to proving themselves from recorded state instead of
13
- * taking the host down.
9
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
10
+ * filter excludes access-time notifications: reads must not masquerade as
11
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
12
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
13
+ * Node fs-event handle is opened in the host or an intermediate process.
14
14
  * - On macOS, libuv serves every directory watch of one event loop through a
15
15
  * single FSEventStream and re-creates it whenever any watch in that loop
16
16
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -19,10 +19,11 @@ import type { WatchBroker } from "./WatchBroker.cjs";
19
19
  * passes each drop on as a gap (samchon/ttsc#1425); see
20
20
  * {@link watchBrokerSource}.
21
21
  *
22
- * Registration/drain owners unreference the child and IPC channel after their
22
+ * Registration/drain owners unreference the child and its transport after their
23
23
  * outstanding acknowledgments finish; startup itself returns a referenced
24
- * child. Last-registration closure attempts disconnection and termination. This
25
- * accessor has no independent shutdown deadline or exit wait.
24
+ * child. Last-registration closure ends the request stream and attempts
25
+ * termination. This accessor has no independent shutdown deadline or exit
26
+ * wait.
26
27
  *
27
28
  * @evidence contracts/common.md#principled-implementation
28
29
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -38,13 +39,15 @@ import type { WatchBroker } from "./WatchBroker.cjs";
38
39
  * Native platform-reason list and lifecycle paragraph explain isolation and
39
40
  * process ownership under the documentation skill.
40
41
  * @evidence contracts/portability.md#os-neutral-implementation
41
- * OS-neutral startup uses this process's executable and argument-array spawn;
42
- * native FSEvents loading and platform differences remain in this boundary.
42
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
43
+ * native __watch command; macOS uses this runtime and supported FSEvents.
44
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
45
+ * inside this boundary.
43
46
  * @evidence contracts/performance.md#efficient-algorithms
44
- * A current-holder read is fixed work. Cold startup includes optional native
45
- * module resolution/warning, child source construction and native process/IPC
46
- * creation; resolution/path/source bytes and process startup cost do not
47
- * vanish into one spawn call. Failure visits R registrations and D drain
47
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
48
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
49
+ * reports missing capability and constructs its child program and IPC channel.
50
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
48
51
  * callbacks, whose native/reference/sink work remains delegated; it does not
49
52
  * enumerate watched source trees.
50
53
  * Enabled private tracing serializes the actual executable/source argv and
@@ -56,7 +59,7 @@ import type { WatchBroker } from "./WatchBroker.cjs";
56
59
  * a health certificate; binding installation changes are not re-resolved
57
60
  * while it remains current, and sink exceptions can interrupt failure handling.
58
61
  * @evidence contracts/performance.md#bound-retention-and-release-resources
59
- * One current module holder retains a child and registration/drain maps;
62
+ * One current module holder retains a direct child and registration/drain maps;
60
63
  * those populations and caller-retained retired brokers have no cap here.
61
64
  * Request owners manage references/timers, and last closure attempts native
62
65
  * disconnection/kill rather than proving exit. Completed failure routing
@@ -6,11 +6,11 @@ import type { WatchBroker } from "./WatchBroker.mjs";
6
6
  * caller-supplied watch capabilities can bypass it. Isolation has a reason on
7
7
  * each native backend:
8
8
  *
9
- * - Node's Windows fs-event backend can hit a native assertion that aborts the
10
- * whole process when a watched temporary tree is deleted. In the child that
11
- * crash becomes an ordinary exit that fails the affected trackers, and those
12
- * generations fall back to proving themselves from recorded state instead of
13
- * taking the host down.
9
+ * - Windows runs ttsc's native completion-port helper directly. Its directory
10
+ * filter excludes access-time notifications: reads must not masquerade as
11
+ * writes (#1719). Actual writes, metadata changes, native loss and failed
12
+ * coverage remain observable; equal bytes cannot erase an A-B-A event. No
13
+ * Node fs-event handle is opened in the host or an intermediate process.
14
14
  * - On macOS, libuv serves every directory watch of one event loop through a
15
15
  * single FSEventStream and re-creates it whenever any watch in that loop
16
16
  * opens or closes, losing the events in between (samchon/ttsc#1418), and it
@@ -19,10 +19,11 @@ import type { WatchBroker } from "./WatchBroker.mjs";
19
19
  * passes each drop on as a gap (samchon/ttsc#1425); see
20
20
  * {@link watchBrokerSource}.
21
21
  *
22
- * Registration/drain owners unreference the child and IPC channel after their
22
+ * Registration/drain owners unreference the child and its transport after their
23
23
  * outstanding acknowledgments finish; startup itself returns a referenced
24
- * child. Last-registration closure attempts disconnection and termination. This
25
- * accessor has no independent shutdown deadline or exit wait.
24
+ * child. Last-registration closure ends the request stream and attempts
25
+ * termination. This accessor has no independent shutdown deadline or exit
26
+ * wait.
26
27
  *
27
28
  * @evidence contracts/common.md#principled-implementation
28
29
  * Native watches run in a protocol child. Error/exit dispatch reports failure
@@ -38,13 +39,15 @@ import type { WatchBroker } from "./WatchBroker.mjs";
38
39
  * Native platform-reason list and lifecycle paragraph explain isolation and
39
40
  * process ownership under the documentation skill.
40
41
  * @evidence contracts/portability.md#os-neutral-implementation
41
- * OS-neutral startup uses this process's executable and argument-array spawn;
42
- * native FSEvents loading and platform differences remain in this boundary.
42
+ * Windows resolves the same ttsc binary as its compiler owner and uses the
43
+ * native __watch command; macOS uses this runtime and supported FSEvents.
44
+ * Argument-array spawn, hidden Windows processes and ordered transport stay
45
+ * inside this boundary.
43
46
  * @evidence contracts/performance.md#efficient-algorithms
44
- * A current-holder read is fixed work. Cold startup includes optional native
45
- * module resolution/warning, child source construction and native process/IPC
46
- * creation; resolution/path/source bytes and process startup cost do not
47
- * vanish into one spawn call. Failure visits R registrations and D drain
47
+ * A current-holder read is fixed work. Windows cold startup resolves the ttsc
48
+ * binary and opens native protocol pipes; macOS resolves the optional binding,
49
+ * reports missing capability and constructs its child program and IPC channel.
50
+ * Resolution/path/source bytes and native process startup cost remain real. Failure visits R registrations and D drain
48
51
  * callbacks, whose native/reference/sink work remains delegated; it does not
49
52
  * enumerate watched source trees.
50
53
  * Enabled private tracing serializes the actual executable/source argv and
@@ -56,7 +59,7 @@ import type { WatchBroker } from "./WatchBroker.mjs";
56
59
  * a health certificate; binding installation changes are not re-resolved
57
60
  * while it remains current, and sink exceptions can interrupt failure handling.
58
61
  * @evidence contracts/performance.md#bound-retention-and-release-resources
59
- * One current module holder retains a child and registration/drain maps;
62
+ * One current module holder retains a direct child and registration/drain maps;
60
63
  * those populations and caller-retained retired brokers have no cap here.
61
64
  * Request owners manage references/timers, and last closure attempts native
62
65
  * disconnection/kill rather than proving exit. Completed failure routing