@indigoai-us/hq-cloud 6.18.44-alpha.48 → 6.18.44-alpha.49

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 (1021) hide show
  1. package/dist/active-company.test.d.ts +2 -0
  2. package/dist/active-company.test.d.ts.map +1 -0
  3. package/dist/active-company.test.js +149 -0
  4. package/dist/active-company.test.js.map +1 -0
  5. package/dist/agent-codex-instructions.test.d.ts +2 -0
  6. package/dist/agent-codex-instructions.test.d.ts.map +1 -0
  7. package/dist/agent-codex-instructions.test.js +276 -0
  8. package/dist/agent-codex-instructions.test.js.map +1 -0
  9. package/dist/backup-prune.test.d.ts +2 -0
  10. package/dist/backup-prune.test.d.ts.map +1 -0
  11. package/dist/backup-prune.test.js +154 -0
  12. package/dist/backup-prune.test.js.map +1 -0
  13. package/dist/bandwidth.test.d.ts +2 -0
  14. package/dist/bandwidth.test.d.ts.map +1 -0
  15. package/dist/bandwidth.test.js +342 -0
  16. package/dist/bandwidth.test.js.map +1 -0
  17. package/dist/best-effort-error.test.d.ts +2 -0
  18. package/dist/best-effort-error.test.d.ts.map +1 -0
  19. package/dist/best-effort-error.test.js +54 -0
  20. package/dist/best-effort-error.test.js.map +1 -0
  21. package/dist/bin/area-ledger-migration.test.d.ts +2 -0
  22. package/dist/bin/area-ledger-migration.test.d.ts.map +1 -0
  23. package/dist/bin/area-ledger-migration.test.js +410 -0
  24. package/dist/bin/area-ledger-migration.test.js.map +1 -0
  25. package/dist/bin/backup-prune-runner.test.d.ts +2 -0
  26. package/dist/bin/backup-prune-runner.test.d.ts.map +1 -0
  27. package/dist/bin/backup-prune-runner.test.js +22 -0
  28. package/dist/bin/backup-prune-runner.test.js.map +1 -0
  29. package/dist/bin/journal-repair.test.d.ts +2 -0
  30. package/dist/bin/journal-repair.test.d.ts.map +1 -0
  31. package/dist/bin/journal-repair.test.js +53 -0
  32. package/dist/bin/journal-repair.test.js.map +1 -0
  33. package/dist/bin/layout-compatibility.test.d.ts +2 -0
  34. package/dist/bin/layout-compatibility.test.d.ts.map +1 -0
  35. package/dist/bin/layout-compatibility.test.js +87 -0
  36. package/dist/bin/layout-compatibility.test.js.map +1 -0
  37. package/dist/bin/outpost-heartbeat.test.d.ts +7 -0
  38. package/dist/bin/outpost-heartbeat.test.d.ts.map +1 -0
  39. package/dist/bin/outpost-heartbeat.test.js +84 -0
  40. package/dist/bin/outpost-heartbeat.test.js.map +1 -0
  41. package/dist/bin/outpost-session-host.test.d.ts +7 -0
  42. package/dist/bin/outpost-session-host.test.d.ts.map +1 -0
  43. package/dist/bin/outpost-session-host.test.js +52 -0
  44. package/dist/bin/outpost-session-host.test.js.map +1 -0
  45. package/dist/bin/sync-mutation.test.d.ts +2 -0
  46. package/dist/bin/sync-mutation.test.d.ts.map +1 -0
  47. package/dist/bin/sync-mutation.test.js +64 -0
  48. package/dist/bin/sync-mutation.test.js.map +1 -0
  49. package/dist/bin/sync-runner-args.test.d.ts +2 -0
  50. package/dist/bin/sync-runner-args.test.d.ts.map +1 -0
  51. package/dist/bin/sync-runner-args.test.js +82 -0
  52. package/dist/bin/sync-runner-args.test.js.map +1 -0
  53. package/dist/bin/sync-runner-auth-wait.test.d.ts +2 -0
  54. package/dist/bin/sync-runner-auth-wait.test.d.ts.map +1 -0
  55. package/dist/bin/sync-runner-auth-wait.test.js +406 -0
  56. package/dist/bin/sync-runner-auth-wait.test.js.map +1 -0
  57. package/dist/bin/sync-runner-backoff.regression.test.d.ts +29 -0
  58. package/dist/bin/sync-runner-backoff.regression.test.d.ts.map +1 -0
  59. package/dist/bin/sync-runner-backoff.regression.test.js +224 -0
  60. package/dist/bin/sync-runner-backoff.regression.test.js.map +1 -0
  61. package/dist/bin/sync-runner-company.test.d.ts +2 -0
  62. package/dist/bin/sync-runner-company.test.d.ts.map +1 -0
  63. package/dist/bin/sync-runner-company.test.js +2439 -0
  64. package/dist/bin/sync-runner-company.test.js.map +1 -0
  65. package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.d.ts +2 -0
  66. package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.d.ts.map +1 -0
  67. package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.js +648 -0
  68. package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.js.map +1 -0
  69. package/dist/bin/sync-runner-delete-snapshot.bench.test.d.ts +2 -0
  70. package/dist/bin/sync-runner-delete-snapshot.bench.test.d.ts.map +1 -0
  71. package/dist/bin/sync-runner-delete-snapshot.bench.test.js +329 -0
  72. package/dist/bin/sync-runner-delete-snapshot.bench.test.js.map +1 -0
  73. package/dist/bin/sync-runner-events.test.d.ts +2 -0
  74. package/dist/bin/sync-runner-events.test.d.ts.map +1 -0
  75. package/dist/bin/sync-runner-events.test.js +364 -0
  76. package/dist/bin/sync-runner-events.test.js.map +1 -0
  77. package/dist/bin/sync-runner-heap-telemetry.test.d.ts +2 -0
  78. package/dist/bin/sync-runner-heap-telemetry.test.d.ts.map +1 -0
  79. package/dist/bin/sync-runner-heap-telemetry.test.js +1966 -0
  80. package/dist/bin/sync-runner-heap-telemetry.test.js.map +1 -0
  81. package/dist/bin/sync-runner-manifest.test.d.ts +12 -0
  82. package/dist/bin/sync-runner-manifest.test.d.ts.map +1 -0
  83. package/dist/bin/sync-runner-manifest.test.js +921 -0
  84. package/dist/bin/sync-runner-manifest.test.js.map +1 -0
  85. package/dist/bin/sync-runner-planning.test.d.ts +2 -0
  86. package/dist/bin/sync-runner-planning.test.d.ts.map +1 -0
  87. package/dist/bin/sync-runner-planning.test.js +448 -0
  88. package/dist/bin/sync-runner-planning.test.js.map +1 -0
  89. package/dist/bin/sync-runner-post-sync-flags.test.d.ts +2 -0
  90. package/dist/bin/sync-runner-post-sync-flags.test.d.ts.map +1 -0
  91. package/dist/bin/sync-runner-post-sync-flags.test.js +64 -0
  92. package/dist/bin/sync-runner-post-sync-flags.test.js.map +1 -0
  93. package/dist/bin/sync-runner-publish-expansion.test.d.ts +2 -0
  94. package/dist/bin/sync-runner-publish-expansion.test.d.ts.map +1 -0
  95. package/dist/bin/sync-runner-publish-expansion.test.js +54 -0
  96. package/dist/bin/sync-runner-publish-expansion.test.js.map +1 -0
  97. package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts +2 -0
  98. package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts.map +1 -0
  99. package/dist/bin/sync-runner-receiver-unresolved-company.test.js +379 -0
  100. package/dist/bin/sync-runner-receiver-unresolved-company.test.js.map +1 -0
  101. package/dist/bin/sync-runner-rollup.test.d.ts +2 -0
  102. package/dist/bin/sync-runner-rollup.test.d.ts.map +1 -0
  103. package/dist/bin/sync-runner-rollup.test.js +24 -0
  104. package/dist/bin/sync-runner-rollup.test.js.map +1 -0
  105. package/dist/bin/sync-runner-watch-loop.test.d.ts +2 -0
  106. package/dist/bin/sync-runner-watch-loop.test.d.ts.map +1 -0
  107. package/dist/bin/sync-runner-watch-loop.test.js +735 -0
  108. package/dist/bin/sync-runner-watch-loop.test.js.map +1 -0
  109. package/dist/bin/sync-runner-watch-routes.test.d.ts +2 -0
  110. package/dist/bin/sync-runner-watch-routes.test.d.ts.map +1 -0
  111. package/dist/bin/sync-runner-watch-routes.test.js +181 -0
  112. package/dist/bin/sync-runner-watch-routes.test.js.map +1 -0
  113. package/dist/bin/sync-runner.test.d.ts +10 -0
  114. package/dist/bin/sync-runner.test.d.ts.map +1 -0
  115. package/dist/bin/sync-runner.test.js +19084 -0
  116. package/dist/bin/sync-runner.test.js.map +1 -0
  117. package/dist/cli/case-alias.test.d.ts +2 -0
  118. package/dist/cli/case-alias.test.d.ts.map +1 -0
  119. package/dist/cli/case-alias.test.js +96 -0
  120. package/dist/cli/case-alias.test.js.map +1 -0
  121. package/dist/cli/conflict-recovery.test.d.ts +2 -0
  122. package/dist/cli/conflict-recovery.test.d.ts.map +1 -0
  123. package/dist/cli/conflict-recovery.test.js +207 -0
  124. package/dist/cli/conflict-recovery.test.js.map +1 -0
  125. package/dist/cli/conflict-winner.test.d.ts +7 -0
  126. package/dist/cli/conflict-winner.test.d.ts.map +1 -0
  127. package/dist/cli/conflict-winner.test.js +98 -0
  128. package/dist/cli/conflict-winner.test.js.map +1 -0
  129. package/dist/cli/doctor.test.d.ts +13 -0
  130. package/dist/cli/doctor.test.d.ts.map +1 -0
  131. package/dist/cli/doctor.test.js +607 -0
  132. package/dist/cli/doctor.test.js.map +1 -0
  133. package/dist/cli/invite.test.d.ts +5 -0
  134. package/dist/cli/invite.test.d.ts.map +1 -0
  135. package/dist/cli/invite.test.js +178 -0
  136. package/dist/cli/invite.test.js.map +1 -0
  137. package/dist/cli/onepass-pull-planner-regressions.test.d.ts +2 -0
  138. package/dist/cli/onepass-pull-planner-regressions.test.d.ts.map +1 -0
  139. package/dist/cli/onepass-pull-planner-regressions.test.js +300 -0
  140. package/dist/cli/onepass-pull-planner-regressions.test.js.map +1 -0
  141. package/dist/cli/onepass-pull-planner.test.d.ts +2 -0
  142. package/dist/cli/onepass-pull-planner.test.d.ts.map +1 -0
  143. package/dist/cli/onepass-pull-planner.test.js +266 -0
  144. package/dist/cli/onepass-pull-planner.test.js.map +1 -0
  145. package/dist/cli/push-scan-exclusions.test.d.ts +2 -0
  146. package/dist/cli/push-scan-exclusions.test.d.ts.map +1 -0
  147. package/dist/cli/push-scan-exclusions.test.js +99 -0
  148. package/dist/cli/push-scan-exclusions.test.js.map +1 -0
  149. package/dist/cli/reindex-knowledge.test.d.ts +12 -0
  150. package/dist/cli/reindex-knowledge.test.d.ts.map +1 -0
  151. package/dist/cli/reindex-knowledge.test.js +318 -0
  152. package/dist/cli/reindex-knowledge.test.js.map +1 -0
  153. package/dist/cli/reindex.test.d.ts +11 -0
  154. package/dist/cli/reindex.test.d.ts.map +1 -0
  155. package/dist/cli/reindex.test.js +860 -0
  156. package/dist/cli/reindex.test.js.map +1 -0
  157. package/dist/cli/rescue-breaker.test.d.ts +2 -0
  158. package/dist/cli/rescue-breaker.test.d.ts.map +1 -0
  159. package/dist/cli/rescue-breaker.test.js +812 -0
  160. package/dist/cli/rescue-breaker.test.js.map +1 -0
  161. package/dist/cli/rescue-classify-ordering.test.d.ts +2 -0
  162. package/dist/cli/rescue-classify-ordering.test.d.ts.map +1 -0
  163. package/dist/cli/rescue-classify-ordering.test.js +500 -0
  164. package/dist/cli/rescue-classify-ordering.test.js.map +1 -0
  165. package/dist/cli/rescue-clone-diagnostics.test.d.ts +2 -0
  166. package/dist/cli/rescue-clone-diagnostics.test.d.ts.map +1 -0
  167. package/dist/cli/rescue-clone-diagnostics.test.js +101 -0
  168. package/dist/cli/rescue-clone-diagnostics.test.js.map +1 -0
  169. package/dist/cli/rescue-clone-network-retry.test.d.ts +2 -0
  170. package/dist/cli/rescue-clone-network-retry.test.d.ts.map +1 -0
  171. package/dist/cli/rescue-clone-network-retry.test.js +415 -0
  172. package/dist/cli/rescue-clone-network-retry.test.js.map +1 -0
  173. package/dist/cli/rescue-core-stamp.test.d.ts +2 -0
  174. package/dist/cli/rescue-core-stamp.test.d.ts.map +1 -0
  175. package/dist/cli/rescue-core-stamp.test.js +364 -0
  176. package/dist/cli/rescue-core-stamp.test.js.map +1 -0
  177. package/dist/cli/rescue-drift-reconcile.test.d.ts +2 -0
  178. package/dist/cli/rescue-drift-reconcile.test.d.ts.map +1 -0
  179. package/dist/cli/rescue-drift-reconcile.test.js +162 -0
  180. package/dist/cli/rescue-drift-reconcile.test.js.map +1 -0
  181. package/dist/cli/rescue-drop-dir-symlink.test.d.ts +2 -0
  182. package/dist/cli/rescue-drop-dir-symlink.test.d.ts.map +1 -0
  183. package/dist/cli/rescue-drop-dir-symlink.test.js +255 -0
  184. package/dist/cli/rescue-drop-dir-symlink.test.js.map +1 -0
  185. package/dist/cli/rescue-exec-bit-preserve.test.d.ts +2 -0
  186. package/dist/cli/rescue-exec-bit-preserve.test.d.ts.map +1 -0
  187. package/dist/cli/rescue-exec-bit-preserve.test.js +177 -0
  188. package/dist/cli/rescue-exec-bit-preserve.test.js.map +1 -0
  189. package/dist/cli/rescue-hq-root-guard.test.d.ts +2 -0
  190. package/dist/cli/rescue-hq-root-guard.test.d.ts.map +1 -0
  191. package/dist/cli/rescue-hq-root-guard.test.js +210 -0
  192. package/dist/cli/rescue-hq-root-guard.test.js.map +1 -0
  193. package/dist/cli/rescue-journal-reconcile.test.d.ts +2 -0
  194. package/dist/cli/rescue-journal-reconcile.test.d.ts.map +1 -0
  195. package/dist/cli/rescue-journal-reconcile.test.js +186 -0
  196. package/dist/cli/rescue-journal-reconcile.test.js.map +1 -0
  197. package/dist/cli/rescue-keep-local-ignore.test.d.ts +2 -0
  198. package/dist/cli/rescue-keep-local-ignore.test.d.ts.map +1 -0
  199. package/dist/cli/rescue-keep-local-ignore.test.js +315 -0
  200. package/dist/cli/rescue-keep-local-ignore.test.js.map +1 -0
  201. package/dist/cli/rescue-move.test.d.ts +2 -0
  202. package/dist/cli/rescue-move.test.d.ts.map +1 -0
  203. package/dist/cli/rescue-move.test.js +166 -0
  204. package/dist/cli/rescue-move.test.js.map +1 -0
  205. package/dist/cli/rescue-mtime-preserve.test.d.ts +2 -0
  206. package/dist/cli/rescue-mtime-preserve.test.d.ts.map +1 -0
  207. package/dist/cli/rescue-mtime-preserve.test.js +186 -0
  208. package/dist/cli/rescue-mtime-preserve.test.js.map +1 -0
  209. package/dist/cli/rescue-preserve-copy-symlink.test.d.ts +2 -0
  210. package/dist/cli/rescue-preserve-copy-symlink.test.d.ts.map +1 -0
  211. package/dist/cli/rescue-preserve-copy-symlink.test.js +483 -0
  212. package/dist/cli/rescue-preserve-copy-symlink.test.js.map +1 -0
  213. package/dist/cli/rescue-realpath.test.d.ts +2 -0
  214. package/dist/cli/rescue-realpath.test.d.ts.map +1 -0
  215. package/dist/cli/rescue-realpath.test.js +109 -0
  216. package/dist/cli/rescue-realpath.test.js.map +1 -0
  217. package/dist/cli/rescue-restore-flag.test.d.ts +2 -0
  218. package/dist/cli/rescue-restore-flag.test.d.ts.map +1 -0
  219. package/dist/cli/rescue-restore-flag.test.js +82 -0
  220. package/dist/cli/rescue-restore-flag.test.js.map +1 -0
  221. package/dist/cli/rescue-rsync-preflight.test.d.ts +2 -0
  222. package/dist/cli/rescue-rsync-preflight.test.d.ts.map +1 -0
  223. package/dist/cli/rescue-rsync-preflight.test.js +579 -0
  224. package/dist/cli/rescue-rsync-preflight.test.js.map +1 -0
  225. package/dist/cli/rescue-rsync-status.test.d.ts +2 -0
  226. package/dist/cli/rescue-rsync-status.test.d.ts.map +1 -0
  227. package/dist/cli/rescue-rsync-status.test.js +406 -0
  228. package/dist/cli/rescue-rsync-status.test.js.map +1 -0
  229. package/dist/cli/rescue-settings-reconcile.test.d.ts +2 -0
  230. package/dist/cli/rescue-settings-reconcile.test.d.ts.map +1 -0
  231. package/dist/cli/rescue-settings-reconcile.test.js +610 -0
  232. package/dist/cli/rescue-settings-reconcile.test.js.map +1 -0
  233. package/dist/cli/rescue-snapshot-copy.test.d.ts +2 -0
  234. package/dist/cli/rescue-snapshot-copy.test.d.ts.map +1 -0
  235. package/dist/cli/rescue-snapshot-copy.test.js +790 -0
  236. package/dist/cli/rescue-snapshot-copy.test.js.map +1 -0
  237. package/dist/cli/rescue-snapshot-recovery.test.d.ts +2 -0
  238. package/dist/cli/rescue-snapshot-recovery.test.d.ts.map +1 -0
  239. package/dist/cli/rescue-snapshot-recovery.test.js +265 -0
  240. package/dist/cli/rescue-snapshot-recovery.test.js.map +1 -0
  241. package/dist/cli/rescue-snapshot.test.d.ts +2 -0
  242. package/dist/cli/rescue-snapshot.test.d.ts.map +1 -0
  243. package/dist/cli/rescue-snapshot.test.js +46 -0
  244. package/dist/cli/rescue-snapshot.test.js.map +1 -0
  245. package/dist/cli/rescue-source-switch-floor.test.d.ts +2 -0
  246. package/dist/cli/rescue-source-switch-floor.test.d.ts.map +1 -0
  247. package/dist/cli/rescue-source-switch-floor.test.js +247 -0
  248. package/dist/cli/rescue-source-switch-floor.test.js.map +1 -0
  249. package/dist/cli/rescue-unchanged-delete.test.d.ts +2 -0
  250. package/dist/cli/rescue-unchanged-delete.test.d.ts.map +1 -0
  251. package/dist/cli/rescue-unchanged-delete.test.js +305 -0
  252. package/dist/cli/rescue-unchanged-delete.test.js.map +1 -0
  253. package/dist/cli/rescue.reindex.test.d.ts +2 -0
  254. package/dist/cli/rescue.reindex.test.d.ts.map +1 -0
  255. package/dist/cli/rescue.reindex.test.js +72 -0
  256. package/dist/cli/rescue.reindex.test.js.map +1 -0
  257. package/dist/cli/rescue.test.d.ts +2 -0
  258. package/dist/cli/rescue.test.d.ts.map +1 -0
  259. package/dist/cli/rescue.test.js +127 -0
  260. package/dist/cli/rescue.test.js.map +1 -0
  261. package/dist/cli/share-plan-limit-presign.test.d.ts +2 -0
  262. package/dist/cli/share-plan-limit-presign.test.d.ts.map +1 -0
  263. package/dist/cli/share-plan-limit-presign.test.js +271 -0
  264. package/dist/cli/share-plan-limit-presign.test.js.map +1 -0
  265. package/dist/cli/share-presign-transport.test.d.ts +22 -0
  266. package/dist/cli/share-presign-transport.test.d.ts.map +1 -0
  267. package/dist/cli/share-presign-transport.test.js +388 -0
  268. package/dist/cli/share-presign-transport.test.js.map +1 -0
  269. package/dist/cli/share.test.d.ts +5 -0
  270. package/dist/cli/share.test.d.ts.map +1 -0
  271. package/dist/cli/share.test.js +12336 -0
  272. package/dist/cli/share.test.js.map +1 -0
  273. package/dist/cli/streaming-pull-planner.bench.test.d.ts +15 -0
  274. package/dist/cli/streaming-pull-planner.bench.test.d.ts.map +1 -0
  275. package/dist/cli/streaming-pull-planner.bench.test.js +273 -0
  276. package/dist/cli/streaming-pull-planner.bench.test.js.map +1 -0
  277. package/dist/cli/sync-scope.test.d.ts +22 -0
  278. package/dist/cli/sync-scope.test.d.ts.map +1 -0
  279. package/dist/cli/sync-scope.test.js +903 -0
  280. package/dist/cli/sync-scope.test.js.map +1 -0
  281. package/dist/cli/sync.test.d.ts +5 -0
  282. package/dist/cli/sync.test.d.ts.map +1 -0
  283. package/dist/cli/sync.test.js +9028 -0
  284. package/dist/cli/sync.test.js.map +1 -0
  285. package/dist/cli/tombstones.test.d.ts +2 -0
  286. package/dist/cli/tombstones.test.d.ts.map +1 -0
  287. package/dist/cli/tombstones.test.js +120 -0
  288. package/dist/cli/tombstones.test.js.map +1 -0
  289. package/dist/cli/watch-event-push-conflict.test.d.ts +25 -0
  290. package/dist/cli/watch-event-push-conflict.test.d.ts.map +1 -0
  291. package/dist/cli/watch-event-push-conflict.test.js +230 -0
  292. package/dist/cli/watch-event-push-conflict.test.js.map +1 -0
  293. package/dist/client-info.test.d.ts +11 -0
  294. package/dist/client-info.test.d.ts.map +1 -0
  295. package/dist/client-info.test.js +168 -0
  296. package/dist/client-info.test.js.map +1 -0
  297. package/dist/cognito-auth-lock-no-hard-links.test.d.ts +11 -0
  298. package/dist/cognito-auth-lock-no-hard-links.test.d.ts.map +1 -0
  299. package/dist/cognito-auth-lock-no-hard-links.test.js +76 -0
  300. package/dist/cognito-auth-lock-no-hard-links.test.js.map +1 -0
  301. package/dist/cognito-auth.test.d.ts +9 -0
  302. package/dist/cognito-auth.test.d.ts.map +1 -0
  303. package/dist/cognito-auth.test.js +745 -0
  304. package/dist/cognito-auth.test.js.map +1 -0
  305. package/dist/company-resolver.test.d.ts +7 -0
  306. package/dist/company-resolver.test.d.ts.map +1 -0
  307. package/dist/company-resolver.test.js +535 -0
  308. package/dist/company-resolver.test.js.map +1 -0
  309. package/dist/company-slug.test.d.ts +7 -0
  310. package/dist/company-slug.test.d.ts.map +1 -0
  311. package/dist/company-slug.test.js +43 -0
  312. package/dist/company-slug.test.js.map +1 -0
  313. package/dist/company-vault-transport.test.d.ts +12 -0
  314. package/dist/company-vault-transport.test.d.ts.map +1 -0
  315. package/dist/company-vault-transport.test.js +97 -0
  316. package/dist/company-vault-transport.test.js.map +1 -0
  317. package/dist/context.test.d.ts +7 -0
  318. package/dist/context.test.d.ts.map +1 -0
  319. package/dist/context.test.js +646 -0
  320. package/dist/context.test.js.map +1 -0
  321. package/dist/entity-resolver.test.d.ts +10 -0
  322. package/dist/entity-resolver.test.d.ts.map +1 -0
  323. package/dist/entity-resolver.test.js +244 -0
  324. package/dist/entity-resolver.test.js.map +1 -0
  325. package/dist/getindigo-dead-refs-contract.test.d.ts +2 -0
  326. package/dist/getindigo-dead-refs-contract.test.d.ts.map +1 -0
  327. package/dist/getindigo-dead-refs-contract.test.js +58 -0
  328. package/dist/getindigo-dead-refs-contract.test.js.map +1 -0
  329. package/dist/hermetic-test-env.test.d.ts +2 -0
  330. package/dist/hermetic-test-env.test.d.ts.map +1 -0
  331. package/dist/hermetic-test-env.test.js +61 -0
  332. package/dist/hermetic-test-env.test.js.map +1 -0
  333. package/dist/hq-root-recovery.test.d.ts +2 -0
  334. package/dist/hq-root-recovery.test.d.ts.map +1 -0
  335. package/dist/hq-root-recovery.test.js +65 -0
  336. package/dist/hq-root-recovery.test.js.map +1 -0
  337. package/dist/ignore.test.d.ts +10 -0
  338. package/dist/ignore.test.d.ts.map +1 -0
  339. package/dist/ignore.test.js +958 -0
  340. package/dist/ignore.test.js.map +1 -0
  341. package/dist/index.test.d.ts +2 -0
  342. package/dist/index.test.d.ts.map +1 -0
  343. package/dist/index.test.js +26 -0
  344. package/dist/index.test.js.map +1 -0
  345. package/dist/journal-area-ledger-read-boundary.test.d.ts +2 -0
  346. package/dist/journal-area-ledger-read-boundary.test.d.ts.map +1 -0
  347. package/dist/journal-area-ledger-read-boundary.test.js +425 -0
  348. package/dist/journal-area-ledger-read-boundary.test.js.map +1 -0
  349. package/dist/journal-baseline.test.d.ts +2 -0
  350. package/dist/journal-baseline.test.d.ts.map +1 -0
  351. package/dist/journal-baseline.test.js +218 -0
  352. package/dist/journal-baseline.test.js.map +1 -0
  353. package/dist/journal-decode-window.test.d.ts +2 -0
  354. package/dist/journal-decode-window.test.d.ts.map +1 -0
  355. package/dist/journal-decode-window.test.js +99 -0
  356. package/dist/journal-decode-window.test.js.map +1 -0
  357. package/dist/journal-delta-writes.test.d.ts +2 -0
  358. package/dist/journal-delta-writes.test.d.ts.map +1 -0
  359. package/dist/journal-delta-writes.test.js +159 -0
  360. package/dist/journal-delta-writes.test.js.map +1 -0
  361. package/dist/journal-ledger-index.test.d.ts +15 -0
  362. package/dist/journal-ledger-index.test.d.ts.map +1 -0
  363. package/dist/journal-ledger-index.test.js +269 -0
  364. package/dist/journal-ledger-index.test.js.map +1 -0
  365. package/dist/journal-public-boundary.test.d.ts +2 -0
  366. package/dist/journal-public-boundary.test.d.ts.map +1 -0
  367. package/dist/journal-public-boundary.test.js +216 -0
  368. package/dist/journal-public-boundary.test.js.map +1 -0
  369. package/dist/journal-row-store.test.d.ts +2 -0
  370. package/dist/journal-row-store.test.d.ts.map +1 -0
  371. package/dist/journal-row-store.test.js +729 -0
  372. package/dist/journal-row-store.test.js.map +1 -0
  373. package/dist/journal-snapshot-memory-helpers.d.ts +35 -0
  374. package/dist/journal-snapshot-memory-helpers.d.ts.map +1 -0
  375. package/dist/journal-snapshot-memory-helpers.js +298 -0
  376. package/dist/journal-snapshot-memory-helpers.js.map +1 -0
  377. package/dist/journal-snapshot-memory.test.d.ts +2 -0
  378. package/dist/journal-snapshot-memory.test.d.ts.map +1 -0
  379. package/dist/journal-snapshot-memory.test.js +55 -0
  380. package/dist/journal-snapshot-memory.test.js.map +1 -0
  381. package/dist/journal-snapshot-v4-memory.test.d.ts +2 -0
  382. package/dist/journal-snapshot-v4-memory.test.d.ts.map +1 -0
  383. package/dist/journal-snapshot-v4-memory.test.js +24 -0
  384. package/dist/journal-snapshot-v4-memory.test.js.map +1 -0
  385. package/dist/journal-snapshot-v4-writer-memory.test.d.ts +2 -0
  386. package/dist/journal-snapshot-v4-writer-memory.test.d.ts.map +1 -0
  387. package/dist/journal-snapshot-v4-writer-memory.test.js +76 -0
  388. package/dist/journal-snapshot-v4-writer-memory.test.js.map +1 -0
  389. package/dist/journal-snapshot-v4-writer.test.d.ts +2 -0
  390. package/dist/journal-snapshot-v4-writer.test.d.ts.map +1 -0
  391. package/dist/journal-snapshot-v4-writer.test.js +282 -0
  392. package/dist/journal-snapshot-v4-writer.test.js.map +1 -0
  393. package/dist/journal-snapshot-v4.test.d.ts +2 -0
  394. package/dist/journal-snapshot-v4.test.d.ts.map +1 -0
  395. package/dist/journal-snapshot-v4.test.js +281 -0
  396. package/dist/journal-snapshot-v4.test.js.map +1 -0
  397. package/dist/journal-store.test.d.ts +2 -0
  398. package/dist/journal-store.test.d.ts.map +1 -0
  399. package/dist/journal-store.test.js +1227 -0
  400. package/dist/journal-store.test.js.map +1 -0
  401. package/dist/journal-streaming.heap.test.d.ts +2 -0
  402. package/dist/journal-streaming.heap.test.d.ts.map +1 -0
  403. package/dist/journal-streaming.heap.test.js +190 -0
  404. package/dist/journal-streaming.heap.test.js.map +1 -0
  405. package/dist/journal.test.d.ts +9 -0
  406. package/dist/journal.test.d.ts.map +1 -0
  407. package/dist/journal.test.js +1074 -0
  408. package/dist/journal.test.js.map +1 -0
  409. package/dist/kms10-etag-safe-pull.test.d.ts +2 -0
  410. package/dist/kms10-etag-safe-pull.test.d.ts.map +1 -0
  411. package/dist/kms10-etag-safe-pull.test.js +53 -0
  412. package/dist/kms10-etag-safe-pull.test.js.map +1 -0
  413. package/dist/lib/cloud-authoritative.test.d.ts +2 -0
  414. package/dist/lib/cloud-authoritative.test.d.ts.map +1 -0
  415. package/dist/lib/cloud-authoritative.test.js +42 -0
  416. package/dist/lib/cloud-authoritative.test.js.map +1 -0
  417. package/dist/lib/conflict-reconcile.test.d.ts +7 -0
  418. package/dist/lib/conflict-reconcile.test.d.ts.map +1 -0
  419. package/dist/lib/conflict-reconcile.test.js +246 -0
  420. package/dist/lib/conflict-reconcile.test.js.map +1 -0
  421. package/dist/lib/conflict.test.d.ts +9 -0
  422. package/dist/lib/conflict.test.d.ts.map +1 -0
  423. package/dist/lib/conflict.test.js +340 -0
  424. package/dist/lib/conflict.test.js.map +1 -0
  425. package/dist/lib/describe-error.test.d.ts +2 -0
  426. package/dist/lib/describe-error.test.d.ts.map +1 -0
  427. package/dist/lib/describe-error.test.js +148 -0
  428. package/dist/lib/describe-error.test.js.map +1 -0
  429. package/dist/lib/machine-id.test.d.ts +8 -0
  430. package/dist/lib/machine-id.test.d.ts.map +1 -0
  431. package/dist/lib/machine-id.test.js +228 -0
  432. package/dist/lib/machine-id.test.js.map +1 -0
  433. package/dist/lib/net-errors.test.d.ts +2 -0
  434. package/dist/lib/net-errors.test.d.ts.map +1 -0
  435. package/dist/lib/net-errors.test.js +111 -0
  436. package/dist/lib/net-errors.test.js.map +1 -0
  437. package/dist/lib/ontology-entity-meta.test.d.ts +2 -0
  438. package/dist/lib/ontology-entity-meta.test.d.ts.map +1 -0
  439. package/dist/lib/ontology-entity-meta.test.js +79 -0
  440. package/dist/lib/ontology-entity-meta.test.js.map +1 -0
  441. package/dist/lib/ontology-entity-push.test.d.ts +2 -0
  442. package/dist/lib/ontology-entity-push.test.d.ts.map +1 -0
  443. package/dist/lib/ontology-entity-push.test.js +156 -0
  444. package/dist/lib/ontology-entity-push.test.js.map +1 -0
  445. package/dist/lib/personal-connector-settings-sync.test.d.ts +2 -0
  446. package/dist/lib/personal-connector-settings-sync.test.d.ts.map +1 -0
  447. package/dist/lib/personal-connector-settings-sync.test.js +34 -0
  448. package/dist/lib/personal-connector-settings-sync.test.js.map +1 -0
  449. package/dist/lib/readlink-safe.test.d.ts +2 -0
  450. package/dist/lib/readlink-safe.test.d.ts.map +1 -0
  451. package/dist/lib/readlink-safe.test.js +34 -0
  452. package/dist/lib/readlink-safe.test.js.map +1 -0
  453. package/dist/lib/s3-content-checksum.test.d.ts +2 -0
  454. package/dist/lib/s3-content-checksum.test.d.ts.map +1 -0
  455. package/dist/lib/s3-content-checksum.test.js +26 -0
  456. package/dist/lib/s3-content-checksum.test.js.map +1 -0
  457. package/dist/lib/skill-register-landed-bytes.test.d.ts +2 -0
  458. package/dist/lib/skill-register-landed-bytes.test.d.ts.map +1 -0
  459. package/dist/lib/skill-register-landed-bytes.test.js +83 -0
  460. package/dist/lib/skill-register-landed-bytes.test.js.map +1 -0
  461. package/dist/local-path-codec.test.d.ts +14 -0
  462. package/dist/local-path-codec.test.d.ts.map +1 -0
  463. package/dist/local-path-codec.test.js +122 -0
  464. package/dist/local-path-codec.test.js.map +1 -0
  465. package/dist/machine-auth.test.d.ts +14 -0
  466. package/dist/machine-auth.test.d.ts.map +1 -0
  467. package/dist/machine-auth.test.js +1492 -0
  468. package/dist/machine-auth.test.js.map +1 -0
  469. package/dist/machine-token-cache-isolation.test.d.ts +24 -0
  470. package/dist/machine-token-cache-isolation.test.d.ts.map +1 -0
  471. package/dist/machine-token-cache-isolation.test.js +284 -0
  472. package/dist/machine-token-cache-isolation.test.js.map +1 -0
  473. package/dist/manifest/US-002.acceptance.test.d.ts +11 -0
  474. package/dist/manifest/US-002.acceptance.test.d.ts.map +1 -0
  475. package/dist/manifest/US-002.acceptance.test.js +160 -0
  476. package/dist/manifest/US-002.acceptance.test.js.map +1 -0
  477. package/dist/manifest/US-004.acceptance.test.d.ts +12 -0
  478. package/dist/manifest/US-004.acceptance.test.d.ts.map +1 -0
  479. package/dist/manifest/US-004.acceptance.test.js +173 -0
  480. package/dist/manifest/US-004.acceptance.test.js.map +1 -0
  481. package/dist/manifest/bench-gate.d.ts +30 -0
  482. package/dist/manifest/bench-gate.d.ts.map +1 -0
  483. package/dist/manifest/bench-gate.js +47 -0
  484. package/dist/manifest/bench-gate.js.map +1 -0
  485. package/dist/manifest/bench-gate.test.d.ts +2 -0
  486. package/dist/manifest/bench-gate.test.d.ts.map +1 -0
  487. package/dist/manifest/bench-gate.test.js +67 -0
  488. package/dist/manifest/bench-gate.test.js.map +1 -0
  489. package/dist/manifest/build-manifest-resident-parity.test.d.ts +2 -0
  490. package/dist/manifest/build-manifest-resident-parity.test.d.ts.map +1 -0
  491. package/dist/manifest/build-manifest-resident-parity.test.js +69 -0
  492. package/dist/manifest/build-manifest-resident-parity.test.js.map +1 -0
  493. package/dist/manifest/build-manifest.bench.test.d.ts +22 -0
  494. package/dist/manifest/build-manifest.bench.test.d.ts.map +1 -0
  495. package/dist/manifest/build-manifest.bench.test.js +931 -0
  496. package/dist/manifest/build-manifest.bench.test.js.map +1 -0
  497. package/dist/manifest/build-manifest.test.d.ts +10 -0
  498. package/dist/manifest/build-manifest.test.d.ts.map +1 -0
  499. package/dist/manifest/build-manifest.test.js +1220 -0
  500. package/dist/manifest/build-manifest.test.js.map +1 -0
  501. package/dist/manifest/contract.test.d.ts +17 -0
  502. package/dist/manifest/contract.test.d.ts.map +1 -0
  503. package/dist/manifest/contract.test.js +346 -0
  504. package/dist/manifest/contract.test.js.map +1 -0
  505. package/dist/manifest/import-graph.test.d.ts +25 -0
  506. package/dist/manifest/import-graph.test.d.ts.map +1 -0
  507. package/dist/manifest/import-graph.test.js +120 -0
  508. package/dist/manifest/import-graph.test.js.map +1 -0
  509. package/dist/manifest/ledger-shard-isolation.test.d.ts +18 -0
  510. package/dist/manifest/ledger-shard-isolation.test.d.ts.map +1 -0
  511. package/dist/manifest/ledger-shard-isolation.test.js +153 -0
  512. package/dist/manifest/ledger-shard-isolation.test.js.map +1 -0
  513. package/dist/manifest/snapshot-store.test.d.ts +11 -0
  514. package/dist/manifest/snapshot-store.test.d.ts.map +1 -0
  515. package/dist/manifest/snapshot-store.test.js +206 -0
  516. package/dist/manifest/snapshot-store.test.js.map +1 -0
  517. package/dist/manifest/upload-manifest.test.d.ts +10 -0
  518. package/dist/manifest/upload-manifest.test.d.ts.map +1 -0
  519. package/dist/manifest/upload-manifest.test.js +1335 -0
  520. package/dist/manifest/upload-manifest.test.js.map +1 -0
  521. package/dist/manifest-reconcile.test.d.ts +2 -0
  522. package/dist/manifest-reconcile.test.d.ts.map +1 -0
  523. package/dist/manifest-reconcile.test.js +1032 -0
  524. package/dist/manifest-reconcile.test.js.map +1 -0
  525. package/dist/object-io.test.d.ts +11 -0
  526. package/dist/object-io.test.d.ts.map +1 -0
  527. package/dist/object-io.test.js +2376 -0
  528. package/dist/object-io.test.js.map +1 -0
  529. package/dist/operation-lock.test.d.ts +5 -0
  530. package/dist/operation-lock.test.d.ts.map +1 -0
  531. package/dist/operation-lock.test.js +796 -0
  532. package/dist/operation-lock.test.js.map +1 -0
  533. package/dist/outcome-telemetry.test.d.ts +9 -0
  534. package/dist/outcome-telemetry.test.d.ts.map +1 -0
  535. package/dist/outcome-telemetry.test.js +663 -0
  536. package/dist/outcome-telemetry.test.js.map +1 -0
  537. package/dist/outposts/client.test.d.ts +9 -0
  538. package/dist/outposts/client.test.d.ts.map +1 -0
  539. package/dist/outposts/client.test.js +415 -0
  540. package/dist/outposts/client.test.js.map +1 -0
  541. package/dist/outposts/command.test.d.ts +18 -0
  542. package/dist/outposts/command.test.d.ts.map +1 -0
  543. package/dist/outposts/command.test.js +1230 -0
  544. package/dist/outposts/command.test.js.map +1 -0
  545. package/dist/outposts/replica-sync.test.d.ts +2 -0
  546. package/dist/outposts/replica-sync.test.d.ts.map +1 -0
  547. package/dist/outposts/replica-sync.test.js +225 -0
  548. package/dist/outposts/replica-sync.test.js.map +1 -0
  549. package/dist/outposts/self-deploy.test.d.ts +2 -0
  550. package/dist/outposts/self-deploy.test.d.ts.map +1 -0
  551. package/dist/outposts/self-deploy.test.js +218 -0
  552. package/dist/outposts/self-deploy.test.js.map +1 -0
  553. package/dist/outposts/session-heartbeat-bounds.test.d.ts +25 -0
  554. package/dist/outposts/session-heartbeat-bounds.test.d.ts.map +1 -0
  555. package/dist/outposts/session-heartbeat-bounds.test.js +159 -0
  556. package/dist/outposts/session-heartbeat-bounds.test.js.map +1 -0
  557. package/dist/outposts/session-heartbeat-guard.test.d.ts +16 -0
  558. package/dist/outposts/session-heartbeat-guard.test.d.ts.map +1 -0
  559. package/dist/outposts/session-heartbeat-guard.test.js +88 -0
  560. package/dist/outposts/session-heartbeat-guard.test.js.map +1 -0
  561. package/dist/outposts/session-heartbeat-publisher.test.d.ts +10 -0
  562. package/dist/outposts/session-heartbeat-publisher.test.d.ts.map +1 -0
  563. package/dist/outposts/session-heartbeat-publisher.test.js +153 -0
  564. package/dist/outposts/session-heartbeat-publisher.test.js.map +1 -0
  565. package/dist/outposts/session-heartbeat-retain-guard.test.d.ts +18 -0
  566. package/dist/outposts/session-heartbeat-retain-guard.test.d.ts.map +1 -0
  567. package/dist/outposts/session-heartbeat-retain-guard.test.js +106 -0
  568. package/dist/outposts/session-heartbeat-retain-guard.test.js.map +1 -0
  569. package/dist/outposts/session-heartbeat-scan.test.d.ts +20 -0
  570. package/dist/outposts/session-heartbeat-scan.test.d.ts.map +1 -0
  571. package/dist/outposts/session-heartbeat-scan.test.js +242 -0
  572. package/dist/outposts/session-heartbeat-scan.test.js.map +1 -0
  573. package/dist/outposts/session-heartbeat.test.d.ts +11 -0
  574. package/dist/outposts/session-heartbeat.test.d.ts.map +1 -0
  575. package/dist/outposts/session-heartbeat.test.js +387 -0
  576. package/dist/outposts/session-heartbeat.test.js.map +1 -0
  577. package/dist/outposts/session-host-auth.test.d.ts +16 -0
  578. package/dist/outposts/session-host-auth.test.d.ts.map +1 -0
  579. package/dist/outposts/session-host-auth.test.js +284 -0
  580. package/dist/outposts/session-host-auth.test.js.map +1 -0
  581. package/dist/outposts/session-host-command.test.d.ts +10 -0
  582. package/dist/outposts/session-host-command.test.d.ts.map +1 -0
  583. package/dist/outposts/session-host-command.test.js +182 -0
  584. package/dist/outposts/session-host-command.test.js.map +1 -0
  585. package/dist/outposts/session-host-connection.test.d.ts +18 -0
  586. package/dist/outposts/session-host-connection.test.d.ts.map +1 -0
  587. package/dist/outposts/session-host-connection.test.js +392 -0
  588. package/dist/outposts/session-host-connection.test.js.map +1 -0
  589. package/dist/outposts/session-host-fakes.d.ts +61 -0
  590. package/dist/outposts/session-host-fakes.d.ts.map +1 -0
  591. package/dist/outposts/session-host-fakes.js +115 -0
  592. package/dist/outposts/session-host-fakes.js.map +1 -0
  593. package/dist/outposts/session-host-ndjson.test.d.ts +11 -0
  594. package/dist/outposts/session-host-ndjson.test.d.ts.map +1 -0
  595. package/dist/outposts/session-host-ndjson.test.js +73 -0
  596. package/dist/outposts/session-host-ndjson.test.js.map +1 -0
  597. package/dist/outposts/session-host-protocol.test.d.ts +15 -0
  598. package/dist/outposts/session-host-protocol.test.d.ts.map +1 -0
  599. package/dist/outposts/session-host-protocol.test.js +0 -0
  600. package/dist/outposts/session-host-protocol.test.js.map +1 -0
  601. package/dist/outposts/session-host-server.test.d.ts +10 -0
  602. package/dist/outposts/session-host-server.test.d.ts.map +1 -0
  603. package/dist/outposts/session-host-server.test.js +118 -0
  604. package/dist/outposts/session-host-server.test.js.map +1 -0
  605. package/dist/outposts/session-host-sessions.test.d.ts +18 -0
  606. package/dist/outposts/session-host-sessions.test.d.ts.map +1 -0
  607. package/dist/outposts/session-host-sessions.test.js +439 -0
  608. package/dist/outposts/session-host-sessions.test.js.map +1 -0
  609. package/dist/outposts/terminal.test.d.ts +2 -0
  610. package/dist/outposts/terminal.test.d.ts.map +1 -0
  611. package/dist/outposts/terminal.test.js +146 -0
  612. package/dist/outposts/terminal.test.js.map +1 -0
  613. package/dist/outposts/transport.test.d.ts +10 -0
  614. package/dist/outposts/transport.test.d.ts.map +1 -0
  615. package/dist/outposts/transport.test.js +205 -0
  616. package/dist/outposts/transport.test.js.map +1 -0
  617. package/dist/packed-journal-phase2.test.d.ts +2 -0
  618. package/dist/packed-journal-phase2.test.d.ts.map +1 -0
  619. package/dist/packed-journal-phase2.test.js +273 -0
  620. package/dist/packed-journal-phase2.test.js.map +1 -0
  621. package/dist/path-ancestors.test.d.ts +2 -0
  622. package/dist/path-ancestors.test.d.ts.map +1 -0
  623. package/dist/path-ancestors.test.js +21 -0
  624. package/dist/path-ancestors.test.js.map +1 -0
  625. package/dist/personal-vault-exclusions.test.d.ts +22 -0
  626. package/dist/personal-vault-exclusions.test.d.ts.map +1 -0
  627. package/dist/personal-vault-exclusions.test.js +294 -0
  628. package/dist/personal-vault-exclusions.test.js.map +1 -0
  629. package/dist/personal-vault.test.d.ts +18 -0
  630. package/dist/personal-vault.test.d.ts.map +1 -0
  631. package/dist/personal-vault.test.js +1106 -0
  632. package/dist/personal-vault.test.js.map +1 -0
  633. package/dist/plan-limit-pause.test.d.ts +2 -0
  634. package/dist/plan-limit-pause.test.d.ts.map +1 -0
  635. package/dist/plan-limit-pause.test.js +150 -0
  636. package/dist/plan-limit-pause.test.js.map +1 -0
  637. package/dist/plan-limit.fixtures.d.ts +34 -0
  638. package/dist/plan-limit.fixtures.d.ts.map +1 -0
  639. package/dist/plan-limit.fixtures.js +96 -0
  640. package/dist/plan-limit.fixtures.js.map +1 -0
  641. package/dist/plan-limit.test.d.ts +2 -0
  642. package/dist/plan-limit.test.d.ts.map +1 -0
  643. package/dist/plan-limit.test.js +132 -0
  644. package/dist/plan-limit.test.js.map +1 -0
  645. package/dist/prefix-coalesce.test.d.ts +2 -0
  646. package/dist/prefix-coalesce.test.d.ts.map +1 -0
  647. package/dist/prefix-coalesce.test.js +260 -0
  648. package/dist/prefix-coalesce.test.js.map +1 -0
  649. package/dist/private-folder-transport.test.d.ts +2 -0
  650. package/dist/private-folder-transport.test.d.ts.map +1 -0
  651. package/dist/private-folder-transport.test.js +33 -0
  652. package/dist/private-folder-transport.test.js.map +1 -0
  653. package/dist/public-surface.test.d.ts +15 -0
  654. package/dist/public-surface.test.d.ts.map +1 -0
  655. package/dist/public-surface.test.js +110 -0
  656. package/dist/public-surface.test.js.map +1 -0
  657. package/dist/qmd-reindex.test.d.ts +14 -0
  658. package/dist/qmd-reindex.test.d.ts.map +1 -0
  659. package/dist/qmd-reindex.test.js +904 -0
  660. package/dist/qmd-reindex.test.js.map +1 -0
  661. package/dist/read-only-state-dir.test.d.ts +27 -0
  662. package/dist/read-only-state-dir.test.d.ts.map +1 -0
  663. package/dist/read-only-state-dir.test.js +210 -0
  664. package/dist/read-only-state-dir.test.js.map +1 -0
  665. package/dist/remote-pull.test.d.ts +2 -0
  666. package/dist/remote-pull.test.d.ts.map +1 -0
  667. package/dist/remote-pull.test.js +1147 -0
  668. package/dist/remote-pull.test.js.map +1 -0
  669. package/dist/s3-download-stream-hash.test.d.ts +2 -0
  670. package/dist/s3-download-stream-hash.test.d.ts.map +1 -0
  671. package/dist/s3-download-stream-hash.test.js +70 -0
  672. package/dist/s3-download-stream-hash.test.js.map +1 -0
  673. package/dist/s3.list-cost.test.d.ts +2 -0
  674. package/dist/s3.list-cost.test.d.ts.map +1 -0
  675. package/dist/s3.list-cost.test.js +51 -0
  676. package/dist/s3.list-cost.test.js.map +1 -0
  677. package/dist/s3.rename-retry.test.d.ts +2 -0
  678. package/dist/s3.rename-retry.test.d.ts.map +1 -0
  679. package/dist/s3.rename-retry.test.js +217 -0
  680. package/dist/s3.rename-retry.test.js.map +1 -0
  681. package/dist/s3.symlink-materialize.test.d.ts +18 -0
  682. package/dist/s3.symlink-materialize.test.d.ts.map +1 -0
  683. package/dist/s3.symlink-materialize.test.js +591 -0
  684. package/dist/s3.symlink-materialize.test.js.map +1 -0
  685. package/dist/s3.test.d.ts +9 -0
  686. package/dist/s3.test.d.ts.map +1 -0
  687. package/dist/s3.test.js +2091 -0
  688. package/dist/s3.test.js.map +1 -0
  689. package/dist/s3.windows-portability.test.d.ts +12 -0
  690. package/dist/s3.windows-portability.test.d.ts.map +1 -0
  691. package/dist/s3.windows-portability.test.js +228 -0
  692. package/dist/s3.windows-portability.test.js.map +1 -0
  693. package/dist/schemas/signal-types.test.d.ts +2 -0
  694. package/dist/schemas/signal-types.test.d.ts.map +1 -0
  695. package/dist/schemas/signal-types.test.js +65 -0
  696. package/dist/schemas/signal-types.test.js.map +1 -0
  697. package/dist/schemas/source-channels.test.d.ts +2 -0
  698. package/dist/schemas/source-channels.test.d.ts.map +1 -0
  699. package/dist/schemas/source-channels.test.js +65 -0
  700. package/dist/schemas/source-channels.test.js.map +1 -0
  701. package/dist/scope-shrink.test.d.ts +13 -0
  702. package/dist/scope-shrink.test.d.ts.map +1 -0
  703. package/dist/scope-shrink.test.js +558 -0
  704. package/dist/scope-shrink.test.js.map +1 -0
  705. package/dist/session-log-capture.test.d.ts +2 -0
  706. package/dist/session-log-capture.test.d.ts.map +1 -0
  707. package/dist/session-log-capture.test.js +533 -0
  708. package/dist/session-log-capture.test.js.map +1 -0
  709. package/dist/session-log-retention.test.d.ts +2 -0
  710. package/dist/session-log-retention.test.d.ts.map +1 -0
  711. package/dist/session-log-retention.test.js +383 -0
  712. package/dist/session-log-retention.test.js.map +1 -0
  713. package/dist/signals/get.test.d.ts +5 -0
  714. package/dist/signals/get.test.d.ts.map +1 -0
  715. package/dist/signals/get.test.js +254 -0
  716. package/dist/signals/get.test.js.map +1 -0
  717. package/dist/signals/list.test.d.ts +9 -0
  718. package/dist/signals/list.test.d.ts.map +1 -0
  719. package/dist/signals/list.test.js +330 -0
  720. package/dist/signals/list.test.js.map +1 -0
  721. package/dist/skill-telemetry.test.d.ts +2 -0
  722. package/dist/skill-telemetry.test.d.ts.map +1 -0
  723. package/dist/skill-telemetry.test.js +1484 -0
  724. package/dist/skill-telemetry.test.js.map +1 -0
  725. package/dist/sources/get.test.d.ts +5 -0
  726. package/dist/sources/get.test.d.ts.map +1 -0
  727. package/dist/sources/get.test.js +236 -0
  728. package/dist/sources/get.test.js.map +1 -0
  729. package/dist/sources/list.test.d.ts +8 -0
  730. package/dist/sources/list.test.d.ts.map +1 -0
  731. package/dist/sources/list.test.js +318 -0
  732. package/dist/sources/list.test.js.map +1 -0
  733. package/dist/sts-credential-refresh.test.d.ts +2 -0
  734. package/dist/sts-credential-refresh.test.d.ts.map +1 -0
  735. package/dist/sts-credential-refresh.test.js +181 -0
  736. package/dist/sts-credential-refresh.test.js.map +1 -0
  737. package/dist/swallowed-error-sites.test.d.ts +2 -0
  738. package/dist/swallowed-error-sites.test.d.ts.map +1 -0
  739. package/dist/swallowed-error-sites.test.js +209 -0
  740. package/dist/swallowed-error-sites.test.js.map +1 -0
  741. package/dist/swallowed-error-w32.test.d.ts +2 -0
  742. package/dist/swallowed-error-w32.test.d.ts.map +1 -0
  743. package/dist/swallowed-error-w32.test.js +186 -0
  744. package/dist/swallowed-error-w32.test.js.map +1 -0
  745. package/dist/swallowed-error-w33.test.d.ts +2 -0
  746. package/dist/swallowed-error-w33.test.d.ts.map +1 -0
  747. package/dist/swallowed-error-w33.test.js +136 -0
  748. package/dist/swallowed-error-w33.test.js.map +1 -0
  749. package/dist/swallowed-error-w34.test.d.ts +2 -0
  750. package/dist/swallowed-error-w34.test.d.ts.map +1 -0
  751. package/dist/swallowed-error-w34.test.js +110 -0
  752. package/dist/swallowed-error-w34.test.js.map +1 -0
  753. package/dist/swallowed-error-w35.test.d.ts +2 -0
  754. package/dist/swallowed-error-w35.test.d.ts.map +1 -0
  755. package/dist/swallowed-error-w35.test.js +237 -0
  756. package/dist/swallowed-error-w35.test.js.map +1 -0
  757. package/dist/sync/area-ledger-auto-migration.test.d.ts +2 -0
  758. package/dist/sync/area-ledger-auto-migration.test.d.ts.map +1 -0
  759. package/dist/sync/area-ledger-auto-migration.test.js +291 -0
  760. package/dist/sync/area-ledger-auto-migration.test.js.map +1 -0
  761. package/dist/sync/area-ledger-migration.test.d.ts +2 -0
  762. package/dist/sync/area-ledger-migration.test.d.ts.map +1 -0
  763. package/dist/sync/area-ledger-migration.test.js +554 -0
  764. package/dist/sync/area-ledger-migration.test.js.map +1 -0
  765. package/dist/sync/area-ledger-recovery.bench.test.d.ts +2 -0
  766. package/dist/sync/area-ledger-recovery.bench.test.d.ts.map +1 -0
  767. package/dist/sync/area-ledger-recovery.bench.test.js +60 -0
  768. package/dist/sync/area-ledger-recovery.bench.test.js.map +1 -0
  769. package/dist/sync/area-ledger-writer-lock.bench.test.d.ts +2 -0
  770. package/dist/sync/area-ledger-writer-lock.bench.test.d.ts.map +1 -0
  771. package/dist/sync/area-ledger-writer-lock.bench.test.js +57 -0
  772. package/dist/sync/area-ledger-writer-lock.bench.test.js.map +1 -0
  773. package/dist/sync/area-ledger.test.d.ts +2 -0
  774. package/dist/sync/area-ledger.test.d.ts.map +1 -0
  775. package/dist/sync/area-ledger.test.js +1401 -0
  776. package/dist/sync/area-ledger.test.js.map +1 -0
  777. package/dist/sync/area-resolver.test.d.ts +2 -0
  778. package/dist/sync/area-resolver.test.d.ts.map +1 -0
  779. package/dist/sync/area-resolver.test.js +234 -0
  780. package/dist/sync/area-resolver.test.js.map +1 -0
  781. package/dist/sync/base-version-resolver.test.d.ts +2 -0
  782. package/dist/sync/base-version-resolver.test.d.ts.map +1 -0
  783. package/dist/sync/base-version-resolver.test.js +24 -0
  784. package/dist/sync/base-version-resolver.test.js.map +1 -0
  785. package/dist/sync/candidate-uploader.test.d.ts +2 -0
  786. package/dist/sync/candidate-uploader.test.d.ts.map +1 -0
  787. package/dist/sync/candidate-uploader.test.js +132 -0
  788. package/dist/sync/candidate-uploader.test.js.map +1 -0
  789. package/dist/sync/child-process-sync-worker-env.test.d.ts +2 -0
  790. package/dist/sync/child-process-sync-worker-env.test.d.ts.map +1 -0
  791. package/dist/sync/child-process-sync-worker-env.test.js +38 -0
  792. package/dist/sync/child-process-sync-worker-env.test.js.map +1 -0
  793. package/dist/sync/child-process-sync-worker-errors.test.d.ts +2 -0
  794. package/dist/sync/child-process-sync-worker-errors.test.d.ts.map +1 -0
  795. package/dist/sync/child-process-sync-worker-errors.test.js +121 -0
  796. package/dist/sync/child-process-sync-worker-errors.test.js.map +1 -0
  797. package/dist/sync/child-process-sync-worker.test.d.ts +2 -0
  798. package/dist/sync/child-process-sync-worker.test.d.ts.map +1 -0
  799. package/dist/sync/child-process-sync-worker.test.js +279 -0
  800. package/dist/sync/child-process-sync-worker.test.js.map +1 -0
  801. package/dist/sync/content-hash.test.d.ts +2 -0
  802. package/dist/sync/content-hash.test.d.ts.map +1 -0
  803. package/dist/sync/content-hash.test.js +16 -0
  804. package/dist/sync/content-hash.test.js.map +1 -0
  805. package/dist/sync/delta-client.test.d.ts +2 -0
  806. package/dist/sync/delta-client.test.d.ts.map +1 -0
  807. package/dist/sync/delta-client.test.js +97 -0
  808. package/dist/sync/delta-client.test.js.map +1 -0
  809. package/dist/sync/durable-apply.test.d.ts +2 -0
  810. package/dist/sync/durable-apply.test.d.ts.map +1 -0
  811. package/dist/sync/durable-apply.test.js +187 -0
  812. package/dist/sync/durable-apply.test.js.map +1 -0
  813. package/dist/sync/event-sync.test.d.ts +14 -0
  814. package/dist/sync/event-sync.test.d.ts.map +1 -0
  815. package/dist/sync/event-sync.test.js +1717 -0
  816. package/dist/sync/event-sync.test.js.map +1 -0
  817. package/dist/sync/feature-flags.test.d.ts +24 -0
  818. package/dist/sync/feature-flags.test.d.ts.map +1 -0
  819. package/dist/sync/feature-flags.test.js +594 -0
  820. package/dist/sync/feature-flags.test.js.map +1 -0
  821. package/dist/sync/fsync-compat.test.d.ts +2 -0
  822. package/dist/sync/fsync-compat.test.d.ts.map +1 -0
  823. package/dist/sync/fsync-compat.test.js +52 -0
  824. package/dist/sync/fsync-compat.test.js.map +1 -0
  825. package/dist/sync/full-pass-cap-governor.bench.test.d.ts +2 -0
  826. package/dist/sync/full-pass-cap-governor.bench.test.d.ts.map +1 -0
  827. package/dist/sync/full-pass-cap-governor.bench.test.js +179 -0
  828. package/dist/sync/full-pass-cap-governor.bench.test.js.map +1 -0
  829. package/dist/sync/full-pass-caps.test.d.ts +2 -0
  830. package/dist/sync/full-pass-caps.test.d.ts.map +1 -0
  831. package/dist/sync/full-pass-caps.test.js +550 -0
  832. package/dist/sync/full-pass-caps.test.js.map +1 -0
  833. package/dist/sync/idle-full-reconcile.test.d.ts +2 -0
  834. package/dist/sync/idle-full-reconcile.test.d.ts.map +1 -0
  835. package/dist/sync/idle-full-reconcile.test.js +62 -0
  836. package/dist/sync/idle-full-reconcile.test.js.map +1 -0
  837. package/dist/sync/inbound-event-admission.test.d.ts +2 -0
  838. package/dist/sync/inbound-event-admission.test.d.ts.map +1 -0
  839. package/dist/sync/inbound-event-admission.test.js +128 -0
  840. package/dist/sync/inbound-event-admission.test.js.map +1 -0
  841. package/dist/sync/journal-ledger-stream.test.d.ts +12 -0
  842. package/dist/sync/journal-ledger-stream.test.d.ts.map +1 -0
  843. package/dist/sync/journal-ledger-stream.test.js +134 -0
  844. package/dist/sync/journal-ledger-stream.test.js.map +1 -0
  845. package/dist/sync/lease-client.test.d.ts +2 -0
  846. package/dist/sync/lease-client.test.d.ts.map +1 -0
  847. package/dist/sync/lease-client.test.js +119 -0
  848. package/dist/sync/lease-client.test.js.map +1 -0
  849. package/dist/sync/logger.test.d.ts +19 -0
  850. package/dist/sync/logger.test.d.ts.map +1 -0
  851. package/dist/sync/logger.test.js +204 -0
  852. package/dist/sync/logger.test.js.map +1 -0
  853. package/dist/sync/metrics.test.d.ts +19 -0
  854. package/dist/sync/metrics.test.d.ts.map +1 -0
  855. package/dist/sync/metrics.test.js +357 -0
  856. package/dist/sync/metrics.test.js.map +1 -0
  857. package/dist/sync/multipart-uploader.test.d.ts +2 -0
  858. package/dist/sync/multipart-uploader.test.d.ts.map +1 -0
  859. package/dist/sync/multipart-uploader.test.js +141 -0
  860. package/dist/sync/multipart-uploader.test.js.map +1 -0
  861. package/dist/sync/mutation-client.test.d.ts +2 -0
  862. package/dist/sync/mutation-client.test.d.ts.map +1 -0
  863. package/dist/sync/mutation-client.test.js +100 -0
  864. package/dist/sync/mutation-client.test.js.map +1 -0
  865. package/dist/sync/mutation-session.test.d.ts +2 -0
  866. package/dist/sync/mutation-session.test.d.ts.map +1 -0
  867. package/dist/sync/mutation-session.test.js +190 -0
  868. package/dist/sync/mutation-session.test.js.map +1 -0
  869. package/dist/sync/parallel-sync-coordinator.test.d.ts +2 -0
  870. package/dist/sync/parallel-sync-coordinator.test.d.ts.map +1 -0
  871. package/dist/sync/parallel-sync-coordinator.test.js +564 -0
  872. package/dist/sync/parallel-sync-coordinator.test.js.map +1 -0
  873. package/dist/sync/path-leases.test.d.ts +2 -0
  874. package/dist/sync/path-leases.test.d.ts.map +1 -0
  875. package/dist/sync/path-leases.test.js +51 -0
  876. package/dist/sync/path-leases.test.js.map +1 -0
  877. package/dist/sync/per-area-maintenance.test.d.ts +2 -0
  878. package/dist/sync/per-area-maintenance.test.d.ts.map +1 -0
  879. package/dist/sync/per-area-maintenance.test.js +100 -0
  880. package/dist/sync/per-area-maintenance.test.js.map +1 -0
  881. package/dist/sync/push-event.test.d.ts +15 -0
  882. package/dist/sync/push-event.test.d.ts.map +1 -0
  883. package/dist/sync/push-event.test.js +282 -0
  884. package/dist/sync/push-event.test.js.map +1 -0
  885. package/dist/sync/push-receiver.test.d.ts +25 -0
  886. package/dist/sync/push-receiver.test.d.ts.map +1 -0
  887. package/dist/sync/push-receiver.test.js +2851 -0
  888. package/dist/sync/push-receiver.test.js.map +1 -0
  889. package/dist/sync/push-transport.test.d.ts +2 -0
  890. package/dist/sync/push-transport.test.d.ts.map +1 -0
  891. package/dist/sync/push-transport.test.js +70 -0
  892. package/dist/sync/push-transport.test.js.map +1 -0
  893. package/dist/sync/push-walk-matchers.bench.test.d.ts +2 -0
  894. package/dist/sync/push-walk-matchers.bench.test.d.ts.map +1 -0
  895. package/dist/sync/push-walk-matchers.bench.test.js +230 -0
  896. package/dist/sync/push-walk-matchers.bench.test.js.map +1 -0
  897. package/dist/sync/realtime-network-integration.test.d.ts +2 -0
  898. package/dist/sync/realtime-network-integration.test.d.ts.map +1 -0
  899. package/dist/sync/realtime-network-integration.test.js +83 -0
  900. package/dist/sync/realtime-network-integration.test.js.map +1 -0
  901. package/dist/sync/realtime-rollout.test.d.ts +2 -0
  902. package/dist/sync/realtime-rollout.test.d.ts.map +1 -0
  903. package/dist/sync/realtime-rollout.test.js +94 -0
  904. package/dist/sync/realtime-rollout.test.js.map +1 -0
  905. package/dist/sync/realtime-telemetry.test.d.ts +2 -0
  906. package/dist/sync/realtime-telemetry.test.d.ts.map +1 -0
  907. package/dist/sync/realtime-telemetry.test.js +300 -0
  908. package/dist/sync/realtime-telemetry.test.js.map +1 -0
  909. package/dist/sync/receiver-origin-config.test.d.ts +2 -0
  910. package/dist/sync/receiver-origin-config.test.d.ts.map +1 -0
  911. package/dist/sync/receiver-origin-config.test.js +39 -0
  912. package/dist/sync/receiver-origin-config.test.js.map +1 -0
  913. package/dist/sync/reconcile-cursor.test.d.ts +2 -0
  914. package/dist/sync/reconcile-cursor.test.d.ts.map +1 -0
  915. package/dist/sync/reconcile-cursor.test.js +139 -0
  916. package/dist/sync/reconcile-cursor.test.js.map +1 -0
  917. package/dist/sync/remote-file-spool.test.d.ts +2 -0
  918. package/dist/sync/remote-file-spool.test.d.ts.map +1 -0
  919. package/dist/sync/remote-file-spool.test.js +79 -0
  920. package/dist/sync/remote-file-spool.test.js.map +1 -0
  921. package/dist/sync/scope-inventory-client.test.d.ts +2 -0
  922. package/dist/sync/scope-inventory-client.test.d.ts.map +1 -0
  923. package/dist/sync/scope-inventory-client.test.js +110 -0
  924. package/dist/sync/scope-inventory-client.test.js.map +1 -0
  925. package/dist/sync/secret-path-policy.test.d.ts +2 -0
  926. package/dist/sync/secret-path-policy.test.d.ts.map +1 -0
  927. package/dist/sync/secret-path-policy.test.js +183 -0
  928. package/dist/sync/secret-path-policy.test.js.map +1 -0
  929. package/dist/sync/snapshot-client.test.d.ts +2 -0
  930. package/dist/sync/snapshot-client.test.d.ts.map +1 -0
  931. package/dist/sync/snapshot-client.test.js +169 -0
  932. package/dist/sync/snapshot-client.test.js.map +1 -0
  933. package/dist/sync/state-store.test.d.ts +2 -0
  934. package/dist/sync/state-store.test.d.ts.map +1 -0
  935. package/dist/sync/state-store.test.js +1556 -0
  936. package/dist/sync/state-store.test.js.map +1 -0
  937. package/dist/sync/sync-contract.test.d.ts +2 -0
  938. package/dist/sync/sync-contract.test.d.ts.map +1 -0
  939. package/dist/sync/sync-contract.test.js +141 -0
  940. package/dist/sync/sync-contract.test.js.map +1 -0
  941. package/dist/sync/targeted-pull-prefixes.test.d.ts +2 -0
  942. package/dist/sync/targeted-pull-prefixes.test.d.ts.map +1 -0
  943. package/dist/sync/targeted-pull-prefixes.test.js +33 -0
  944. package/dist/sync/targeted-pull-prefixes.test.js.map +1 -0
  945. package/dist/sync/targeted-upsert-exact-list.test.d.ts +2 -0
  946. package/dist/sync/targeted-upsert-exact-list.test.d.ts.map +1 -0
  947. package/dist/sync/targeted-upsert-exact-list.test.js +247 -0
  948. package/dist/sync/targeted-upsert-exact-list.test.js.map +1 -0
  949. package/dist/sync/unchanged-push-events.test.d.ts +2 -0
  950. package/dist/sync/unchanged-push-events.test.d.ts.map +1 -0
  951. package/dist/sync/unchanged-push-events.test.js +76 -0
  952. package/dist/sync/unchanged-push-events.test.js.map +1 -0
  953. package/dist/sync/uploader-finalization.test.d.ts +2 -0
  954. package/dist/sync/uploader-finalization.test.d.ts.map +1 -0
  955. package/dist/sync/uploader-finalization.test.js +107 -0
  956. package/dist/sync/uploader-finalization.test.js.map +1 -0
  957. package/dist/sync-core.test.d.ts +2 -0
  958. package/dist/sync-core.test.d.ts.map +1 -0
  959. package/dist/sync-core.test.js +189 -0
  960. package/dist/sync-core.test.js.map +1 -0
  961. package/dist/sync-progress.test.d.ts +2 -0
  962. package/dist/sync-progress.test.d.ts.map +1 -0
  963. package/dist/sync-progress.test.js +277 -0
  964. package/dist/sync-progress.test.js.map +1 -0
  965. package/dist/telemetry-events.test.d.ts +2 -0
  966. package/dist/telemetry-events.test.d.ts.map +1 -0
  967. package/dist/telemetry-events.test.js +113 -0
  968. package/dist/telemetry-events.test.js.map +1 -0
  969. package/dist/telemetry.test.d.ts +11 -0
  970. package/dist/telemetry.test.d.ts.map +1 -0
  971. package/dist/telemetry.test.js +1603 -0
  972. package/dist/telemetry.test.js.map +1 -0
  973. package/dist/vault-client.test.d.ts +7 -0
  974. package/dist/vault-client.test.d.ts.map +1 -0
  975. package/dist/vault-client.test.js +1334 -0
  976. package/dist/vault-client.test.js.map +1 -0
  977. package/dist/watch-coverage.test.d.ts +2 -0
  978. package/dist/watch-coverage.test.d.ts.map +1 -0
  979. package/dist/watch-coverage.test.js +56 -0
  980. package/dist/watch-coverage.test.js.map +1 -0
  981. package/dist/watch-owner-lease.test.d.ts +2 -0
  982. package/dist/watch-owner-lease.test.d.ts.map +1 -0
  983. package/dist/watch-owner-lease.test.js +364 -0
  984. package/dist/watch-owner-lease.test.js.map +1 -0
  985. package/dist/watch-parent.test.d.ts +2 -0
  986. package/dist/watch-parent.test.d.ts.map +1 -0
  987. package/dist/watch-parent.test.js +131 -0
  988. package/dist/watch-parent.test.js.map +1 -0
  989. package/dist/watch-roots.test.d.ts +18 -0
  990. package/dist/watch-roots.test.d.ts.map +1 -0
  991. package/dist/watch-roots.test.js +395 -0
  992. package/dist/watch-roots.test.js.map +1 -0
  993. package/dist/watcher-continuity-hot-path.test.d.ts +2 -0
  994. package/dist/watcher-continuity-hot-path.test.d.ts.map +1 -0
  995. package/dist/watcher-continuity-hot-path.test.js +40 -0
  996. package/dist/watcher-continuity-hot-path.test.js.map +1 -0
  997. package/dist/watcher-event-gate.test.d.ts +16 -0
  998. package/dist/watcher-event-gate.test.d.ts.map +1 -0
  999. package/dist/watcher-event-gate.test.js +191 -0
  1000. package/dist/watcher-event-gate.test.js.map +1 -0
  1001. package/dist/watcher-replan-sweep.test.d.ts +2 -0
  1002. package/dist/watcher-replan-sweep.test.d.ts.map +1 -0
  1003. package/dist/watcher-replan-sweep.test.js +260 -0
  1004. package/dist/watcher-replan-sweep.test.js.map +1 -0
  1005. package/dist/watcher-stdout.test.d.ts +2 -0
  1006. package/dist/watcher-stdout.test.d.ts.map +1 -0
  1007. package/dist/watcher-stdout.test.js +86 -0
  1008. package/dist/watcher-stdout.test.js.map +1 -0
  1009. package/dist/watcher.test.d.ts +2 -0
  1010. package/dist/watcher.test.d.ts.map +1 -0
  1011. package/dist/watcher.test.js +4329 -0
  1012. package/dist/watcher.test.js.map +1 -0
  1013. package/dist/watcher.warmup-cancel.test.d.ts +2 -0
  1014. package/dist/watcher.warmup-cancel.test.d.ts.map +1 -0
  1015. package/dist/watcher.warmup-cancel.test.js +59 -0
  1016. package/dist/watcher.warmup-cancel.test.js.map +1 -0
  1017. package/dist/watcher.warmup-responsive.test.d.ts +2 -0
  1018. package/dist/watcher.warmup-responsive.test.d.ts.map +1 -0
  1019. package/dist/watcher.warmup-responsive.test.js +62 -0
  1020. package/dist/watcher.warmup-responsive.test.js.map +1 -0
  1021. package/package.json +2 -2
@@ -0,0 +1,1106 @@
1
+ /**
2
+ * Unit tests for the personal-vault path-discovery helpers.
3
+ *
4
+ * These cover the column-anchored `cloud: true` exclusion-marker regex and
5
+ * the `companies/{slug}/` enumeration filter — both are pure functions over
6
+ * disk + caller-supplied option sets, so we exercise them against tmp
7
+ * directories rather than mocking fs. Local (non-cloud) companies sync to
8
+ * the personal vault by DEFAULT: a missing/markerless `company.yaml` is
9
+ * INCLUDED; only an explicit `cloud: true` marker, membership via
10
+ * `teamSyncedSlugs`, or a `cloud_uid: cmp_*` entry in
11
+ * `companies/manifest.yaml` opts a company out.
12
+ *
13
+ * The sync-runner-level integration (team-synced slug derivation,
14
+ * decommission of cloud-promoted companies, end-to-end share() invocation)
15
+ * lives in `bin/sync-runner.test.ts` — tests G, H, I.
16
+ */
17
+ import { describe, it, expect, beforeEach, afterEach } from "vitest";
18
+ import * as fs from "fs";
19
+ import * as os from "os";
20
+ import * as path from "path";
21
+ import { computeContinuityPointerPaths, computePersonalCompanySubdirs, computePersonalVaultPaths, readCloudBackedSlugsFromManifest, CONTINUITY_POINTER_REL, computeAgencySyncPaths, AGENCY_SYNC_REL, computeSessionLogsSyncPaths, SESSION_LOGS_SYNC_REL, PERSONAL_VAULT_COMPANY_EXCLUDED_SLUGS, PERSONAL_VAULT_EXCLUDED_TOP_LEVEL, isPersonalVaultDeletionExcluded, purgeExcludedPersonalVaultJournalEntries, PURGE_IGNORED_PRESENT_BATCH, } from "./personal-vault.js";
22
+ describe("personal-vault helpers", () => {
23
+ let hqRoot;
24
+ beforeEach(() => {
25
+ hqRoot = fs.mkdtempSync(path.join(os.tmpdir(), "hq-pv-test-"));
26
+ });
27
+ afterEach(() => {
28
+ fs.rmSync(hqRoot, { recursive: true, force: true });
29
+ });
30
+ /** Helper: write `companies/{slug}/company.yaml` with arbitrary content. */
31
+ function writeCompany(slug, yaml) {
32
+ const dir = path.join(hqRoot, "companies", slug);
33
+ fs.mkdirSync(dir, { recursive: true });
34
+ if (yaml !== null)
35
+ fs.writeFileSync(path.join(dir, "company.yaml"), yaml);
36
+ }
37
+ /** Helper: relative-paths-sorted projection of an absolute-path list. */
38
+ function rel(abs) {
39
+ return abs.map((p) => path.relative(hqRoot, p)).sort();
40
+ }
41
+ // ── Exported constants ─────────────────────────────────────────────────
42
+ it("constants: PERSONAL_VAULT_EXCLUDED_TOP_LEVEL keeps the canonical four directories", () => {
43
+ // These four are the original directory exclusions and must never be lost.
44
+ for (const name of [".git", "companies", "repos", "workspace"]) {
45
+ expect(PERSONAL_VAULT_EXCLUDED_TOP_LEVEL).toContain(name);
46
+ }
47
+ });
48
+ it("constants: PERSONAL_VAULT_EXCLUDED_TOP_LEVEL also excludes Node project markers", () => {
49
+ // An HQ root is a DATA tree, never a Node project. When one of these files
50
+ // lands there — an accidental `npm init`, a stray `npm install` — syncing it
51
+ // makes every other machine's HQ root look like a Node project too, and the
52
+ // outpost hygiene guard that would otherwise clean the contamination stands
53
+ // down on every one of them. One stray file disables the fleet's defence.
54
+ for (const name of [
55
+ "package.json",
56
+ "package-lock.json",
57
+ "pnpm-lock.yaml",
58
+ "yarn.lock",
59
+ "pnpm-workspace.yaml",
60
+ "node_modules",
61
+ ]) {
62
+ expect(PERSONAL_VAULT_EXCLUDED_TOP_LEVEL).toContain(name);
63
+ }
64
+ });
65
+ it("constants: PERSONAL_VAULT_EXCLUDED_TOP_LEVEL excludes the global-install `bin/`", () => {
66
+ // `npm install -g` with its prefix resolved to the HQ root writes `bin/`
67
+ // (symlinks into ../lib/node_modules) alongside lib/node_modules. It is
68
+ // neither a node_modules nor a lockfile, so every other marker above can be
69
+ // excluded and this debris still rides the vault to every machine — which is
70
+ // exactly what reached two outposts as dangling symlinks and aborted the
71
+ // personal vault's journal checkpoint on each sync.
72
+ expect(PERSONAL_VAULT_EXCLUDED_TOP_LEVEL).toContain("bin");
73
+ });
74
+ it("constants: PERSONAL_VAULT_EXCLUDED_TOP_LEVEL does NOT exclude the HQ layout trees", () => {
75
+ // Guard against over-broad additions: `personal/` and `core/` carry real
76
+ // user data and were deliberately re-INCLUDED (user directive 2026-05-13).
77
+ // A future "just exclude the noisy top-level dir" edit must not take them.
78
+ for (const name of ["personal", "core", "data"]) {
79
+ expect(PERSONAL_VAULT_EXCLUDED_TOP_LEVEL).not.toContain(name);
80
+ }
81
+ });
82
+ it("constants: PERSONAL_VAULT_COMPANY_EXCLUDED_SLUGS hard-lists `_template`", () => {
83
+ expect(PERSONAL_VAULT_COMPANY_EXCLUDED_SLUGS).toContain("_template");
84
+ });
85
+ // ── computePersonalCompanySubdirs: default inclusion ───────────────────
86
+ // Local companies sync to the personal vault by default. A missing or
87
+ // markerless company.yaml is INCLUDED — only an explicit `cloud: true`
88
+ // marker (or membership) opts a company OUT.
89
+ it("default: includes a company with NO company.yaml", () => {
90
+ writeCompany("foo", null);
91
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
92
+ path.join("companies", "foo"),
93
+ ]);
94
+ });
95
+ it("default: includes a company with an empty company.yaml", () => {
96
+ writeCompany("foo", "");
97
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
98
+ path.join("companies", "foo"),
99
+ ]);
100
+ });
101
+ it("default: includes a company explicitly marked `cloud: false`", () => {
102
+ writeCompany("foo", "cloud: false\nname: Foo\n");
103
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
104
+ path.join("companies", "foo"),
105
+ ]);
106
+ });
107
+ it("default: includes a company.yaml with no `cloud:` key at all", () => {
108
+ writeCompany("foo", "name: Foo\nslug: foo\n");
109
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
110
+ path.join("companies", "foo"),
111
+ ]);
112
+ });
113
+ // ── computePersonalCompanySubdirs: `cloud: true` exclusion-marker ──────
114
+ it("marker: excludes canonical `cloud: true` at column 0", () => {
115
+ writeCompany("foo", "cloud: true\nname: Foo\n");
116
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
117
+ });
118
+ it("marker: excludes `cloud:true` (no space after colon)", () => {
119
+ writeCompany("foo", "cloud:true\n");
120
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
121
+ });
122
+ it("marker: excludes with a trailing comment after `cloud: true`", () => {
123
+ writeCompany("foo", "cloud: true # cloud-backed, synced to team bucket\n");
124
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
125
+ });
126
+ it("marker: excludes with CRLF line endings", () => {
127
+ writeCompany("foo", "cloud: true\r\nname: Foo\r\n");
128
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
129
+ });
130
+ it("marker: excludes `cloud: true` even when it is NOT the first line", () => {
131
+ writeCompany("foo", "name: Foo\nslug: foo\ncloud: true\n");
132
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
133
+ });
134
+ // ── computePersonalCompanySubdirs: marker fails OPEN (still included) ───
135
+ // A marker that isn't the canonical column-0 lowercase `cloud: true`
136
+ // shape `/designate-team` emits does NOT exclude — the company stays in
137
+ // the personal vault, which is the safe default.
138
+ it("marker: nested `cloud: true` does NOT exclude (column-0 anchor)", () => {
139
+ writeCompany("foo", "meta:\n cloud: true\n");
140
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
141
+ path.join("companies", "foo"),
142
+ ]);
143
+ });
144
+ it("marker: list-item style `- cloud: true` does NOT exclude", () => {
145
+ writeCompany("foo", "tags:\n- cloud: true\n");
146
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
147
+ path.join("companies", "foo"),
148
+ ]);
149
+ });
150
+ it("marker: flow-mapping `{ cloud: true }` does NOT exclude", () => {
151
+ writeCompany("foo", "{ cloud: true }\n");
152
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
153
+ path.join("companies", "foo"),
154
+ ]);
155
+ });
156
+ it("marker: YAML-alt boolean spellings (True, TRUE, yes, on) do NOT exclude", () => {
157
+ for (const variant of ["cloud: True\n", "cloud: TRUE\n", "cloud: yes\n", "cloud: on\n"]) {
158
+ writeCompany("foo", variant);
159
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
160
+ path.join("companies", "foo"),
161
+ ]);
162
+ fs.rmSync(path.join(hqRoot, "companies", "foo"), { recursive: true });
163
+ }
164
+ });
165
+ it("marker: quoted `cloud: \"true\"` does NOT exclude (quote breaks the literal-true match)", () => {
166
+ writeCompany("foo", 'cloud: "true"\n');
167
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
168
+ path.join("companies", "foo"),
169
+ ]);
170
+ });
171
+ it("marker: `cloud: truthy` does NOT exclude (word-boundary guard)", () => {
172
+ writeCompany("foo", "cloud: truthy\n");
173
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
174
+ path.join("companies", "foo"),
175
+ ]);
176
+ });
177
+ // ── Subdir-level filters ───────────────────────────────────────────────
178
+ it("filter: skips _template even when it would otherwise be included", () => {
179
+ writeCompany("_template", null);
180
+ writeCompany("real", null);
181
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
182
+ path.join("companies", "real"),
183
+ ]);
184
+ });
185
+ it("filter: skips slugs in the teamSyncedSlugs set (cloud-backed)", () => {
186
+ writeCompany("free", null);
187
+ writeCompany("team-acme", null);
188
+ expect(rel(computePersonalCompanySubdirs(hqRoot, new Set(["team-acme"])))).toEqual([path.join("companies", "free")]);
189
+ });
190
+ // Manifest cloud_uid is the durable cloud-backed signal when the runner
191
+ // has no membership fanout (agent `--personal` ritual). Without this,
192
+ // multi-GB team trees re-enter the personal vault every cycle.
193
+ it("filter: skips slugs with cloud_uid in companies/manifest.yaml", () => {
194
+ writeCompany("local-only", null);
195
+ writeCompany("indigo", null); // no company.yaml cloud:true
196
+ fs.mkdirSync(path.join(hqRoot, "companies"), { recursive: true });
197
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml"), [
198
+ "companies:",
199
+ " indigo:",
200
+ " name: Indigo",
201
+ " cloud_uid: cmp_01KQ2RYAHXHDPCTY9GPQPTH3DG",
202
+ " bucket_name: hq-vault-cmp-01kq2ryahxhdpcty9gpqpth3dg",
203
+ " local-only:",
204
+ " name: Local Only",
205
+ "",
206
+ ].join("\n"));
207
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
208
+ path.join("companies", "local-only"),
209
+ ]);
210
+ expect([...readCloudBackedSlugsFromManifest(hqRoot)].sort()).toEqual([
211
+ "indigo",
212
+ ]);
213
+ });
214
+ it("filter: missing/unreadable manifest fails open (local companies still included)", () => {
215
+ writeCompany("foo", null);
216
+ // no companies/manifest.yaml
217
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
218
+ path.join("companies", "foo"),
219
+ ]);
220
+ expect(readCloudBackedSlugsFromManifest(hqRoot).size).toBe(0);
221
+ });
222
+ it("filter: skips stray files under companies/ (only directories considered)", () => {
223
+ // Hypothetical: someone drops a README.md at companies/. Should not
224
+ // crash, should not be enumerated as a company subdir.
225
+ fs.mkdirSync(path.join(hqRoot, "companies"), { recursive: true });
226
+ fs.writeFileSync(path.join(hqRoot, "companies", "README.md"), "# README");
227
+ writeCompany("real", null);
228
+ expect(rel(computePersonalCompanySubdirs(hqRoot))).toEqual([
229
+ path.join("companies", "real"),
230
+ ]);
231
+ });
232
+ it("filter: missing hqRoot/companies/ returns []", () => {
233
+ // No `companies/` dir at all (fresh install or atypical layout).
234
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
235
+ });
236
+ // ── computePersonalVaultPaths: top-level + company-subdir composition ──
237
+ it("composition: local company subdirs are included by default (no opt-in flag)", () => {
238
+ fs.mkdirSync(path.join(hqRoot, ".claude"));
239
+ fs.mkdirSync(path.join(hqRoot, "knowledge"));
240
+ writeCompany("foo", null);
241
+ writeCompany("bar", "cloud: true\n");
242
+ const out = rel(computePersonalVaultPaths(hqRoot));
243
+ // Top-level entries present.
244
+ expect(out).toContain(".claude");
245
+ expect(out).toContain("knowledge");
246
+ // Local (non-cloud) company included; cloud-marked one excluded.
247
+ expect(out).toContain(path.join("companies", "foo"));
248
+ expect(out).not.toContain(path.join("companies", "bar"));
249
+ // The companies/ top-level entry itself is never present — only specific
250
+ // eligible subdirs. Preserves the invariant that share() never walks
251
+ // the whole companies/ tree under personalMode.
252
+ expect(out).not.toContain("companies");
253
+ });
254
+ it("composition: a stray Node project in the HQ root never reaches the vault", () => {
255
+ // The exact contamination found on this fleet: an `npm init -y` stub, the
256
+ // lockfile a misdirected `npm install` left behind, and its node_modules.
257
+ fs.mkdirSync(path.join(hqRoot, "personal"));
258
+ fs.mkdirSync(path.join(hqRoot, "node_modules"));
259
+ fs.writeFileSync(path.join(hqRoot, "package.json"), '{"name":"hq"}');
260
+ fs.writeFileSync(path.join(hqRoot, "package-lock.json"), "{}");
261
+ fs.writeFileSync(path.join(hqRoot, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
262
+ fs.writeFileSync(path.join(hqRoot, "yarn.lock"), "");
263
+ fs.writeFileSync(path.join(hqRoot, "pnpm-workspace.yaml"), "packages: []");
264
+ const out = rel(computePersonalVaultPaths(hqRoot));
265
+ expect(out).toContain("personal");
266
+ for (const name of [
267
+ "package.json",
268
+ "package-lock.json",
269
+ "pnpm-lock.yaml",
270
+ "yarn.lock",
271
+ "pnpm-workspace.yaml",
272
+ "node_modules",
273
+ ]) {
274
+ expect(out).not.toContain(name);
275
+ }
276
+ });
277
+ it("composition: a misdirected global install's `bin/` never reaches the vault", () => {
278
+ // The exact shape found on outposts primary and 2 on 2026-09-07: `bin/`
279
+ // holding symlinks into ../lib/node_modules, still present (and dangling)
280
+ // after the CLI tree beside it had been removed. Once in the vault these
281
+ // keys mapped to no configured area and aborted the whole checkpoint, so
282
+ // deletes never persisted and every machine re-pulled them forever.
283
+ fs.mkdirSync(path.join(hqRoot, "personal"));
284
+ fs.mkdirSync(path.join(hqRoot, "bin"));
285
+ fs.symlinkSync("../lib/node_modules/@indigoai-us/hq-cli/dist/index.js", path.join(hqRoot, "bin", "hq"));
286
+ fs.symlinkSync("../lib/node_modules/@indigoai-us/hq-cli/dist/bin/hq-auth-refresh.js", path.join(hqRoot, "bin", "hq-auth-refresh"));
287
+ const out = rel(computePersonalVaultPaths(hqRoot));
288
+ expect(out).toContain("personal");
289
+ expect(out).not.toContain("bin");
290
+ expect(out).not.toContain(path.join("bin", "hq"));
291
+ });
292
+ it("composition: teamSyncedSlugs filter excludes cloud-backed companies", () => {
293
+ writeCompany("foo", null);
294
+ writeCompany("synced", null);
295
+ const out = rel(computePersonalVaultPaths(hqRoot, {
296
+ teamSyncedSlugs: new Set(["synced"]),
297
+ }));
298
+ expect(out).toContain(path.join("companies", "foo"));
299
+ expect(out).not.toContain(path.join("companies", "synced"));
300
+ });
301
+ it("composition: missing hqRoot returns []", () => {
302
+ fs.rmSync(hqRoot, { recursive: true });
303
+ expect(computePersonalVaultPaths(hqRoot)).toEqual([]);
304
+ });
305
+ // ── companies/manifest.yaml inclusion ─────────────────────────────────
306
+ //
307
+ // The manifest is the routing source-of-truth (which slugs exist, which
308
+ // are cloud-backed, what their company UIDs are). The vault needs a
309
+ // single canonical copy: without it, a fresh machine joining the
310
+ // personal vault has no way to enumerate which non-cloud companies it
311
+ // expects to pull. Special-cased because companies/ itself is in
312
+ // PERSONAL_VAULT_EXCLUDED_TOP_LEVEL.
313
+ it("manifest: includes companies/manifest.yaml when present (default opts)", () => {
314
+ fs.mkdirSync(path.join(hqRoot, "companies"));
315
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml"), "companies:\n foo: {}\n");
316
+ fs.mkdirSync(path.join(hqRoot, ".claude"));
317
+ const out = rel(computePersonalVaultPaths(hqRoot));
318
+ expect(out).toContain(path.join("companies", "manifest.yaml"));
319
+ expect(out).toContain(".claude");
320
+ });
321
+ it("manifest: included even when there are no eligible company subdirs", () => {
322
+ fs.mkdirSync(path.join(hqRoot, "companies"));
323
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml"), "companies: {}\n");
324
+ const out = rel(computePersonalVaultPaths(hqRoot));
325
+ expect(out).toContain(path.join("companies", "manifest.yaml"));
326
+ });
327
+ it("manifest: absent file is not included (no crash, no phantom entry)", () => {
328
+ fs.mkdirSync(path.join(hqRoot, "companies"));
329
+ // No manifest.yaml written.
330
+ const out = rel(computePersonalVaultPaths(hqRoot));
331
+ expect(out).not.toContain(path.join("companies", "manifest.yaml"));
332
+ });
333
+ it("manifest: missing companies/ directory entirely is not an error", () => {
334
+ // Fresh install or atypical layout: no companies/ dir at all.
335
+ fs.mkdirSync(path.join(hqRoot, ".claude"));
336
+ expect(() => computePersonalVaultPaths(hqRoot)).not.toThrow();
337
+ const out = rel(computePersonalVaultPaths(hqRoot));
338
+ expect(out).toContain(".claude");
339
+ expect(out).not.toContain(path.join("companies", "manifest.yaml"));
340
+ });
341
+ it("manifest: ONLY manifest.yaml is special-cased — other companies/ root files stay excluded", () => {
342
+ // Anti-test: only manifest.yaml gets the bypass. A stray README.md at
343
+ // companies/ root or a directory called `_template` must still be
344
+ // filtered (the latter by company-eligibility, the former silently).
345
+ fs.mkdirSync(path.join(hqRoot, "companies"));
346
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml"), "companies: {}\n");
347
+ fs.writeFileSync(path.join(hqRoot, "companies", "README.md"), "# companies tree");
348
+ const out = rel(computePersonalVaultPaths(hqRoot));
349
+ expect(out).toContain(path.join("companies", "manifest.yaml"));
350
+ expect(out).not.toContain(path.join("companies", "README.md"));
351
+ });
352
+ it("manifest: composes with local company subdirs", () => {
353
+ fs.mkdirSync(path.join(hqRoot, "companies"));
354
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml"), "companies:\n foo: {cloud_uid: null}\n team-acme: {cloud_uid: cmp_01XYZ}\n");
355
+ writeCompany("foo", null);
356
+ writeCompany("team-acme", "cloud: true\n");
357
+ const out = rel(computePersonalVaultPaths(hqRoot, {
358
+ teamSyncedSlugs: new Set(["team-acme"]),
359
+ }));
360
+ // Manifest + non-cloud subdir, NOT team-acme.
361
+ expect(out).toContain(path.join("companies", "manifest.yaml"));
362
+ expect(out).toContain(path.join("companies", "foo"));
363
+ expect(out).not.toContain(path.join("companies", "team-acme"));
364
+ });
365
+ it("manifest: stray `manifest.yaml.conflict-*` litter is never enumerated as a company", () => {
366
+ // Regression guard for DEV-1719's secondary symptom: when the personal
367
+ // push accumulated `companies/manifest.yaml.conflict-<ts>.yaml` mirror
368
+ // files, those FILES must never be mis-counted as company subdirs (they
369
+ // are not directories) nor leak into the push set. The real manifest.yaml
370
+ // is still included; the conflict litter is not.
371
+ fs.mkdirSync(path.join(hqRoot, "companies"));
372
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml"), "companies: {}\n");
373
+ fs.writeFileSync(path.join(hqRoot, "companies", "manifest.yaml.conflict-2026-06-08T10-00-00Z-ab12cd.yaml"), "companies: {}\n");
374
+ // Not treated as a company subdir (only directories are eligible).
375
+ expect(computePersonalCompanySubdirs(hqRoot)).toEqual([]);
376
+ // Push set carries the real manifest, never the conflict litter.
377
+ const out = rel(computePersonalVaultPaths(hqRoot));
378
+ expect(out).toContain(path.join("companies", "manifest.yaml"));
379
+ expect(out.some((p) => p.includes("manifest.yaml.conflict-"))).toBe(false);
380
+ });
381
+ });
382
+ // ─────────────────────────────────────────────────────────────────────────
383
+ // DEV-1778 — session-continuity pointer carve-out.
384
+ //
385
+ // `workspace/` is in PERSONAL_VAULT_EXCLUDED_TOP_LEVEL (machine-local by
386
+ // design). The ONE exception is the session pointer
387
+ // `workspace/threads/handoff.json` + the single thread file it references via
388
+ // `thread_path`, so a `/handoff` on one machine reaches a second machine.
389
+ // Mirrors the companies/manifest.yaml special-case: a narrow file-level
390
+ // re-include that never broadens the rest of workspace/.
391
+ // ─────────────────────────────────────────────────────────────────────────
392
+ describe("personal-vault: continuity-pointer carve-out", () => {
393
+ let hqRoot;
394
+ beforeEach(() => {
395
+ hqRoot = fs.mkdtempSync(path.join(os.tmpdir(), "hq-cont-test-"));
396
+ });
397
+ afterEach(() => {
398
+ fs.rmSync(hqRoot, { recursive: true, force: true });
399
+ });
400
+ /** Helper: relative-paths-sorted projection of an absolute-path list. */
401
+ function rel(abs) {
402
+ return abs.map((p) => path.relative(hqRoot, p)).sort();
403
+ }
404
+ const THREADS = path.join("workspace", "threads");
405
+ /** Write workspace/threads/handoff.json with the given object. */
406
+ function writeHandoff(obj, raw) {
407
+ const dir = path.join(hqRoot, THREADS);
408
+ fs.mkdirSync(dir, { recursive: true });
409
+ fs.writeFileSync(path.join(dir, "handoff.json"), raw !== undefined ? raw : JSON.stringify(obj));
410
+ }
411
+ /** Write a thread file under workspace/threads/ and return its rel path. */
412
+ function writeThread(name) {
413
+ const dir = path.join(hqRoot, THREADS);
414
+ fs.mkdirSync(dir, { recursive: true });
415
+ fs.writeFileSync(path.join(dir, name), "{}");
416
+ return path.join(THREADS, name).split(path.sep).join("/");
417
+ }
418
+ it("constant: CONTINUITY_POINTER_REL is the canonical pointer path", () => {
419
+ expect(CONTINUITY_POINTER_REL).toBe("workspace/threads/handoff.json");
420
+ });
421
+ it("includes handoff.json + the thread file it points to", () => {
422
+ const threadRel = writeThread("T-20260617-1200-demo.json");
423
+ writeHandoff({ thread_path: threadRel });
424
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
425
+ path.join(THREADS, "T-20260617-1200-demo.json"),
426
+ path.join(THREADS, "handoff.json"),
427
+ ].sort());
428
+ });
429
+ it("carve-out composes into computePersonalVaultPaths", () => {
430
+ const threadRel = writeThread("T-20260617-1200-demo.json");
431
+ writeHandoff({ thread_path: threadRel });
432
+ fs.mkdirSync(path.join(hqRoot, ".claude"));
433
+ const out = rel(computePersonalVaultPaths(hqRoot));
434
+ expect(out).toContain(path.join(THREADS, "handoff.json"));
435
+ expect(out).toContain(path.join(THREADS, "T-20260617-1200-demo.json"));
436
+ // Sibling top-level dirs still travel; the rest of workspace/ does not.
437
+ expect(out).toContain(".claude");
438
+ });
439
+ it("does NOT broaden the rest of workspace/ (siblings/other threads stay local)", () => {
440
+ const threadRel = writeThread("T-active.json");
441
+ writeThread("T-old.json"); // an inactive thread — must NOT sync
442
+ writeHandoff({ thread_path: threadRel });
443
+ // Unrelated workspace litter that must stay machine-local.
444
+ fs.mkdirSync(path.join(hqRoot, "workspace", "locks"), { recursive: true });
445
+ fs.writeFileSync(path.join(hqRoot, "workspace", "locks", "x.lock"), "1");
446
+ fs.writeFileSync(path.join(hqRoot, "workspace", "threads", "INDEX.md"), "#");
447
+ const out = rel(computePersonalVaultPaths(hqRoot));
448
+ expect(out).toContain(path.join(THREADS, "handoff.json"));
449
+ expect(out).toContain(path.join(THREADS, "T-active.json"));
450
+ expect(out).not.toContain(path.join(THREADS, "T-old.json"));
451
+ expect(out).not.toContain(path.join(THREADS, "INDEX.md"));
452
+ expect(out.some((p) => p.startsWith(path.join("workspace", "locks")))).toBe(false);
453
+ });
454
+ it("handoff.json present but thread_path absent → only the pointer", () => {
455
+ writeHandoff({ message: "no pointer field" });
456
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
457
+ path.join(THREADS, "handoff.json"),
458
+ ]);
459
+ });
460
+ it("handoff.json points to a non-existent thread file → only the pointer", () => {
461
+ writeHandoff({ thread_path: "workspace/threads/T-ghost.json" });
462
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
463
+ path.join(THREADS, "handoff.json"),
464
+ ]);
465
+ });
466
+ it("no handoff.json at all → empty (nothing to carry)", () => {
467
+ fs.mkdirSync(path.join(hqRoot, THREADS), { recursive: true });
468
+ expect(computeContinuityPointerPaths(hqRoot)).toEqual([]);
469
+ });
470
+ it("malformed handoff.json → fail-soft to pointer only (no throw)", () => {
471
+ writeHandoff(null, "{ this is : not json ]");
472
+ expect(() => computeContinuityPointerPaths(hqRoot)).not.toThrow();
473
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
474
+ path.join(THREADS, "handoff.json"),
475
+ ]);
476
+ });
477
+ // ── Security: thread_path must never escape workspace/threads/ ──────────
478
+ it("rejects an absolute thread_path (only the pointer is included)", () => {
479
+ // Put a real file at the absolute target so the ONLY thing rejecting it
480
+ // is the containment guard, not a missing-file fallthrough.
481
+ const evil = path.join(hqRoot, "secret.txt");
482
+ fs.writeFileSync(evil, "top secret");
483
+ writeHandoff({ thread_path: evil });
484
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
485
+ path.join(THREADS, "handoff.json"),
486
+ ]);
487
+ });
488
+ it("rejects a traversal thread_path (../../.env) — no smuggling out of threads/", () => {
489
+ fs.writeFileSync(path.join(hqRoot, ".env"), "SECRET=1");
490
+ writeHandoff({ thread_path: "workspace/threads/../../.env" });
491
+ const out = rel(computeContinuityPointerPaths(hqRoot));
492
+ expect(out).toEqual([path.join(THREADS, "handoff.json")]);
493
+ expect(out.some((p) => p.endsWith(".env"))).toBe(false);
494
+ });
495
+ it("rejects a thread_path under workspace/ but outside threads/", () => {
496
+ fs.mkdirSync(path.join(hqRoot, "workspace", "reports"), {
497
+ recursive: true,
498
+ });
499
+ fs.writeFileSync(path.join(hqRoot, "workspace", "reports", "secret.md"), "x");
500
+ writeHandoff({ thread_path: "workspace/reports/secret.md" });
501
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
502
+ path.join(THREADS, "handoff.json"),
503
+ ]);
504
+ });
505
+ it("rejects a symlink that escapes threads/ (realpath containment)", () => {
506
+ // A thread_path that names an in-threads symlink whose target is OUTSIDE
507
+ // threads/ must be rejected by the realpath re-check.
508
+ fs.writeFileSync(path.join(hqRoot, "outside.txt"), "secret");
509
+ fs.mkdirSync(path.join(hqRoot, THREADS), { recursive: true });
510
+ const link = path.join(hqRoot, THREADS, "escape.json");
511
+ try {
512
+ fs.symlinkSync(path.join(hqRoot, "outside.txt"), link);
513
+ }
514
+ catch {
515
+ // Platform without symlink support — skip the assertion gracefully.
516
+ return;
517
+ }
518
+ writeHandoff({ thread_path: "workspace/threads/escape.json" });
519
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
520
+ path.join(THREADS, "handoff.json"),
521
+ ]);
522
+ });
523
+ it("R-F35: rejects threads symlinks below hqRoot while allowing symlinked hqRoot ancestors", () => {
524
+ const privateThreads = path.join(hqRoot, "repos", "private");
525
+ fs.mkdirSync(privateThreads, { recursive: true });
526
+ fs.mkdirSync(path.join(hqRoot, "workspace"), { recursive: true });
527
+ fs.writeFileSync(path.join(privateThreads, "handoff.json"), JSON.stringify({
528
+ thread_path: "workspace/threads/T-private.json",
529
+ }));
530
+ fs.writeFileSync(path.join(privateThreads, "T-private.json"), "{}");
531
+ fs.symlinkSync(privateThreads, path.join(hqRoot, THREADS), "dir");
532
+ expect(rel(computeContinuityPointerPaths(hqRoot))).toEqual([
533
+ path.join(THREADS, "handoff.json"),
534
+ ]);
535
+ const realParent = fs.mkdtempSync(path.join(os.tmpdir(), "hq-cont-real-"));
536
+ const aliasParent = fs.mkdtempSync(path.join(os.tmpdir(), "hq-cont-alias-"));
537
+ const realRoot = path.join(realParent, "root");
538
+ const aliasRoot = path.join(aliasParent, "root-link");
539
+ try {
540
+ fs.mkdirSync(path.join(realRoot, THREADS), { recursive: true });
541
+ fs.writeFileSync(path.join(realRoot, THREADS, "handoff.json"), JSON.stringify({ thread_path: "workspace/threads/T-active.json" }));
542
+ fs.writeFileSync(path.join(realRoot, THREADS, "T-active.json"), "{}");
543
+ fs.symlinkSync(realRoot, aliasRoot, "dir");
544
+ const aliasRel = computeContinuityPointerPaths(aliasRoot)
545
+ .map((p) => path.relative(aliasRoot, p))
546
+ .sort();
547
+ expect(aliasRel).toEqual([
548
+ path.join(THREADS, "T-active.json"),
549
+ path.join(THREADS, "handoff.json"),
550
+ ].sort());
551
+ }
552
+ finally {
553
+ fs.rmSync(realParent, { recursive: true, force: true });
554
+ fs.rmSync(aliasParent, { recursive: true, force: true });
555
+ }
556
+ });
557
+ });
558
+ // ─────────────────────────────────────────────────────────────────────────
559
+ // workspace/agency carve-out — sync the agency-team workspace across machines.
560
+ //
561
+ // Like the continuity pointer, this pierces the workspace/ top-level exclusion
562
+ // for ONE subtree: workspace/agency/<company>/<team>/ (hq-pack-agency chat
563
+ // inboxes + roster/state), so an agency team picked up on a second machine sees
564
+ // the same conversation it had on the first. The rest of workspace/ stays local.
565
+ // ─────────────────────────────────────────────────────────────────────────
566
+ describe("personal-vault: agency-workspace carve-out", () => {
567
+ let hqRoot;
568
+ beforeEach(() => {
569
+ hqRoot = fs.mkdtempSync(path.join(os.tmpdir(), "hq-agency-test-"));
570
+ });
571
+ afterEach(() => {
572
+ fs.rmSync(hqRoot, { recursive: true, force: true });
573
+ });
574
+ const relAll = (abs) => abs.map((p) => path.relative(hqRoot, p)).sort();
575
+ it("constant: AGENCY_SYNC_REL is workspace/agency", () => {
576
+ expect(AGENCY_SYNC_REL).toBe("workspace/agency");
577
+ });
578
+ it("includes workspace/agency when it exists", () => {
579
+ fs.mkdirSync(path.join(hqRoot, "workspace", "agency", "acme", "growth"), {
580
+ recursive: true,
581
+ });
582
+ expect(relAll(computeAgencySyncPaths(hqRoot))).toEqual([
583
+ path.join("workspace", "agency"),
584
+ ]);
585
+ });
586
+ it("empty when workspace/agency is absent (fail-soft)", () => {
587
+ fs.mkdirSync(path.join(hqRoot, "workspace"), { recursive: true });
588
+ expect(computeAgencySyncPaths(hqRoot)).toEqual([]);
589
+ });
590
+ it("composes into computePersonalVaultPaths without broadening workspace/", () => {
591
+ fs.mkdirSync(path.join(hqRoot, "workspace", "agency", "acme", "growth"), {
592
+ recursive: true,
593
+ });
594
+ fs.mkdirSync(path.join(hqRoot, "workspace", "locks"), { recursive: true });
595
+ fs.writeFileSync(path.join(hqRoot, "workspace", "locks", "x.lock"), "1");
596
+ fs.mkdirSync(path.join(hqRoot, ".claude"), { recursive: true });
597
+ const out = relAll(computePersonalVaultPaths(hqRoot));
598
+ expect(out).toContain(path.join("workspace", "agency"));
599
+ expect(out).toContain(".claude");
600
+ expect(out.some((p) => p.startsWith(path.join("workspace", "locks")))).toBe(false);
601
+ });
602
+ });
603
+ // ─────────────────────────────────────────────────────────────────────────
604
+ // Session-logs carve-out (workspace/.session-logs) — reindex-captured Claude
605
+ // Code transcripts pierce the workspace/ exclusion and round-trip to the vault.
606
+ // ─────────────────────────────────────────────────────────────────────────
607
+ describe("personal-vault: session-logs carve-out", () => {
608
+ let hqRoot;
609
+ beforeEach(() => {
610
+ hqRoot = fs.mkdtempSync(path.join(os.tmpdir(), "hq-sesslog-test-"));
611
+ });
612
+ afterEach(() => {
613
+ fs.rmSync(hqRoot, { recursive: true, force: true });
614
+ });
615
+ const relAll = (abs) => abs.map((p) => path.relative(hqRoot, p)).sort();
616
+ it("constant: SESSION_LOGS_SYNC_REL is workspace/.session-logs", () => {
617
+ expect(SESSION_LOGS_SYNC_REL).toBe("workspace/.session-logs");
618
+ });
619
+ it("includes workspace/.session-logs when it exists", () => {
620
+ fs.mkdirSync(path.join(hqRoot, "workspace", ".session-logs", "tool-results"), {
621
+ recursive: true,
622
+ });
623
+ expect(relAll(computeSessionLogsSyncPaths(hqRoot))).toEqual([
624
+ path.join("workspace", ".session-logs"),
625
+ ]);
626
+ });
627
+ it("empty when workspace/.session-logs is absent (fail-soft)", () => {
628
+ fs.mkdirSync(path.join(hqRoot, "workspace"), { recursive: true });
629
+ expect(computeSessionLogsSyncPaths(hqRoot)).toEqual([]);
630
+ });
631
+ it("composes into computePersonalVaultPaths without broadening workspace/", () => {
632
+ fs.mkdirSync(path.join(hqRoot, "workspace", ".session-logs"), { recursive: true });
633
+ fs.writeFileSync(path.join(hqRoot, "workspace", ".session-logs", "session.jsonl"), "l\n");
634
+ // A sibling under workspace/ that must STAY local.
635
+ fs.mkdirSync(path.join(hqRoot, "workspace", "locks"), { recursive: true });
636
+ fs.writeFileSync(path.join(hqRoot, "workspace", "locks", "x.lock"), "1");
637
+ fs.mkdirSync(path.join(hqRoot, ".claude"), { recursive: true });
638
+ const out = relAll(computePersonalVaultPaths(hqRoot));
639
+ expect(out).toContain(path.join("workspace", ".session-logs"));
640
+ expect(out).toContain(".claude");
641
+ // The carve-out is exactly the .session-logs subtree — no other workspace/
642
+ // sibling is pulled in.
643
+ expect(out.some((p) => p.startsWith(path.join("workspace", "locks")))).toBe(false);
644
+ });
645
+ });
646
+ // ─────────────────────────────────────────────────────────────────────────
647
+ describe("personal-vault: isPersonalVaultDeletionExcluded", () => {
648
+ it("protects release scaffold + reindex-generated skill wrappers", () => {
649
+ expect(isPersonalVaultDeletionExcluded("workspace/.session-logs")).toBe(true);
650
+ expect(isPersonalVaultDeletionExcluded("workspace/.session-logs/codex/session.jsonl")).toBe(true);
651
+ // Nested leftovers after a company is decommissioned from the personal
652
+ // bucket: VaultAccessRole's DeleteObject deny is unanchored (`hq-vault-*/workspace/.session-logs/*`).
653
+ expect(isPersonalVaultDeletionExcluded("companies/indigo/workspace/.session-logs/canary-noncurrent-v1.jsonl")).toBe(true);
654
+ expect(isPersonalVaultDeletionExcluded("companies/indigo/workspace/.session-logs")).toBe(true);
655
+ // An ancestor must remain ordinary so this guard never broadens into a
656
+ // workspace-wide delete-propagation exemption.
657
+ expect(isPersonalVaultDeletionExcluded("workspace")).toBe(false);
658
+ expect(isPersonalVaultDeletionExcluded("workspace/.session-logs-old/x")).toBe(false);
659
+ expect(isPersonalVaultDeletionExcluded("companies/indigo/workspace/.session-logs-old/x")).toBe(false);
660
+ expect(isPersonalVaultDeletionExcluded("companies/indigo/workspace/sessions/foo.json")).toBe(false);
661
+ expect(isPersonalVaultDeletionExcluded("a/b/workspace/.session-logs/nested.jsonl")).toBe(true);
662
+ expect(isPersonalVaultDeletionExcluded("workspace/.session-logsX/x")).toBe(false);
663
+ expect(isPersonalVaultDeletionExcluded("core")).toBe(true);
664
+ expect(isPersonalVaultDeletionExcluded("core/policies/x.md")).toBe(true);
665
+ expect(isPersonalVaultDeletionExcluded(".claude/skills")).toBe(true);
666
+ expect(isPersonalVaultDeletionExcluded(".claude/skills/core:demo/SKILL.md")).toBe(true);
667
+ });
668
+ it("protects reindex-generated command links from delete-propagation", () => {
669
+ // The generated <ns>:<cmd>.md links reindex surfaces — recreated locally by
670
+ // `hq reindex`, so a local absence is not user intent.
671
+ expect(isPersonalVaultDeletionExcluded(".claude/commands/core:demo.md")).toBe(true);
672
+ expect(isPersonalVaultDeletionExcluded(".claude/commands/indigo:signals.md")).toBe(true);
673
+ expect(isPersonalVaultDeletionExcluded(".claude/commands/hq-pack-demo:hello.md")).toBe(true);
674
+ // Win32-encoded colon form is protected too.
675
+ expect(isPersonalVaultDeletionExcluded(".claude/commands/indigo%3Asignals.md")).toBe(true);
676
+ });
677
+ it("does NOT protect hand-authored native commands (deletion IS user intent)", () => {
678
+ // A non-namespaced native slash command the user authored directly under
679
+ // .claude/commands/ must still delete-propagate, unlike the skill farm.
680
+ expect(isPersonalVaultDeletionExcluded(".claude/commands/deploy.md")).toBe(false);
681
+ expect(isPersonalVaultDeletionExcluded(".claude/commands")).toBe(false);
682
+ // And an ordinary user file is never protected.
683
+ expect(isPersonalVaultDeletionExcluded("knowledge/notes.md")).toBe(false);
684
+ });
685
+ });
686
+ // ─────────────────────────────────────────────────────────────────────────
687
+ // Stale-journal convergence (never-completing personal-vault sync fix).
688
+ //
689
+ // The push WALK already prunes excluded trees, but journal rows written before
690
+ // an exclusion rule existed were never removed and were re-diffed on every
691
+ // push forever. `purgeExcludedPersonalVaultJournalEntries` drops them, using
692
+ // the EXACT same exclusion mechanisms the push applies: the shared ignore
693
+ // filter + personal-vault defaults (`shouldSync`), the `.conflict-*` ephemeral
694
+ // basename pattern, and the `workspace/` top-level exclusion (which lives at
695
+ // the walk-root level and is invisible to `shouldSync`).
696
+ describe("personal-vault: purgeExcludedPersonalVaultJournalEntries", () => {
697
+ let hqRoot;
698
+ // Real push-side filter chain (mirrors createPushRunContext personalMode).
699
+ let shouldSync;
700
+ // Real vault-litter predicate the push delete-plan uses (`.conflict-*` /
701
+ // `.drift-*`) — the purge defers to it instead of dropping the row.
702
+ let isLitter;
703
+ beforeEach(async () => {
704
+ hqRoot = fs.mkdtempSync(path.join(os.tmpdir(), "pv-purge-"));
705
+ const { createIgnoreFilter } = await import("./ignore.js");
706
+ const { wrapFilterWithPersonalVaultDefaults } = await import("./personal-vault-exclusions.js");
707
+ const { isVaultLitterArtifact } = await import("./cli/share.js");
708
+ isLitter = isVaultLitterArtifact;
709
+ shouldSync = wrapFilterWithPersonalVaultDefaults(createIgnoreFilter(hqRoot), hqRoot, () => { });
710
+ // Materialize the workspace carve-outs so the continuity / agency /
711
+ // session-log roots resolve to real paths (they are read from disk).
712
+ fs.mkdirSync(path.join(hqRoot, "workspace", "threads"), { recursive: true });
713
+ fs.writeFileSync(path.join(hqRoot, "workspace", "threads", "handoff.json"), JSON.stringify({ thread_path: "workspace/threads/T-active.md" }));
714
+ fs.writeFileSync(path.join(hqRoot, "workspace", "threads", "T-active.md"), "active");
715
+ fs.mkdirSync(path.join(hqRoot, "workspace", "agency", "co"), {
716
+ recursive: true,
717
+ });
718
+ fs.writeFileSync(path.join(hqRoot, "workspace", "agency", "co", "chat.jsonl"), "{}");
719
+ fs.mkdirSync(path.join(hqRoot, "workspace", ".session-logs"), {
720
+ recursive: true,
721
+ });
722
+ fs.writeFileSync(path.join(hqRoot, "workspace", ".session-logs", "s.jsonl"), "{}");
723
+ });
724
+ afterEach(() => {
725
+ fs.rmSync(hqRoot, { recursive: true, force: true });
726
+ });
727
+ const journalWith = (keys) => ({
728
+ version: "2",
729
+ lastSync: "",
730
+ pulls: [],
731
+ files: Object.fromEntries(keys.map((k) => [k, { hash: "h", size: 1, mtimeMs: 1, direction: "up" }])),
732
+ });
733
+ it("counts each 59,020-row purge population once while preserving its exact denominator", () => {
734
+ const rowCount = 59_020;
735
+ const files = {};
736
+ for (let index = 0; index < rowCount; index += 1) {
737
+ files[`personal/notes/entry-${index}.md`] = {
738
+ hash: "h",
739
+ size: index,
740
+ mtimeMs: index,
741
+ syncedAt: "2026-09-16T00:00:00.000Z",
742
+ direction: "up",
743
+ };
744
+ }
745
+ let keyEnumerations = 0;
746
+ const journal = {
747
+ version: "2",
748
+ lastSync: "",
749
+ pulls: [],
750
+ files: new Proxy(files, {
751
+ ownKeys(target) {
752
+ keyEnumerations += 1;
753
+ return Reflect.ownKeys(target);
754
+ },
755
+ }),
756
+ };
757
+ const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, () => true, () => false);
758
+ expect(purge).toEqual({
759
+ removed: [],
760
+ byReason: {
761
+ "ignore-filtered": 0,
762
+ "ignore-filtered-present": 0,
763
+ "excluded-top-level": 0,
764
+ },
765
+ });
766
+ expect(keyEnumerations).toBe(1);
767
+ });
768
+ it("purges the orphaned excluded classes and keeps legit + carve-out + owned rows", () => {
769
+ const journal = journalWith([
770
+ // legit content — KEEP
771
+ "personal/notes.md",
772
+ "core/policies/x.md",
773
+ ".claude/skills/foo/SKILL.md",
774
+ "companies/manifest.yaml",
775
+ "companies/localco/knowledge/n.md",
776
+ // workspace carve-outs — KEEP
777
+ "workspace/threads/handoff.json",
778
+ "workspace/threads/T-active.md",
779
+ "workspace/agency/co/chat.jsonl",
780
+ "workspace/.session-logs/s.jsonl",
781
+ // owned by OTHER mechanisms — KEEP (deferred, not purged here)
782
+ ".conflict-2026-08-01T00-00-00Z-abcd1234.md", // vault-litter drain (remote delete)
783
+ "personal/.obsidian/x.json.drift-1779863862-42519", // rescue-drift litter
784
+ ".claude/skills/core:demo/SKILL.md", // reindex mirror, delete-excluded
785
+ // orphaned excluded classes with NO other owner — PURGE
786
+ ".claude/worktrees/wt1/a.ts",
787
+ ".claude/worktrees/wt1/deep/b.ts",
788
+ "personal/node_modules/pkg/index.js",
789
+ ".hq-conflicts/mirror.md",
790
+ "workspace/threads/T-old-2026-01-01.md",
791
+ "workspace/scratch/tmp.txt",
792
+ "workspace/worktrees/wt2/c.ts",
793
+ ]);
794
+ const { removed, byReason } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
795
+ // Only the orphaned excluded rows were dropped.
796
+ expect(removed.sort()).toEqual([
797
+ ".claude/worktrees/wt1/a.ts",
798
+ ".claude/worktrees/wt1/deep/b.ts",
799
+ "personal/node_modules/pkg/index.js",
800
+ ".hq-conflicts/mirror.md",
801
+ "workspace/threads/T-old-2026-01-01.md",
802
+ "workspace/scratch/tmp.txt",
803
+ "workspace/worktrees/wt2/c.ts",
804
+ ].sort());
805
+ // Litter, reindex mirrors, carve-outs, and legit content all survive.
806
+ for (const kept of [
807
+ "personal/notes.md",
808
+ "core/policies/x.md",
809
+ ".claude/skills/foo/SKILL.md",
810
+ "companies/manifest.yaml",
811
+ "companies/localco/knowledge/n.md",
812
+ "workspace/threads/handoff.json",
813
+ "workspace/threads/T-active.md",
814
+ "workspace/agency/co/chat.jsonl",
815
+ "workspace/.session-logs/s.jsonl",
816
+ ".conflict-2026-08-01T00-00-00Z-abcd1234.md",
817
+ "personal/.obsidian/x.json.drift-1779863862-42519",
818
+ ".claude/skills/core:demo/SKILL.md",
819
+ ]) {
820
+ expect(journal.files[kept]).toBeDefined();
821
+ }
822
+ // Reason breakdown: shouldSync catches worktrees + node_modules +
823
+ // .hq-conflicts; the workspace top-level exclusion catches non-carve-outs.
824
+ //
825
+ // `workspace/worktrees/` moved buckets when it became a DEFAULT_IGNORES
826
+ // entry: it used to reach the purge only via this file's personal-vault
827
+ // `workspace` top-level rule, so it counted as `excluded-top-level`. The
828
+ // general sync filter now catches it first, so it counts as
829
+ // `ignore-filtered`. The set of removed rows asserted above is unchanged —
830
+ // this is an attribution shift, not a behaviour change. It also records the
831
+ // gap that motivated the DEFAULT_IGNORES entry: before it, worktrees were
832
+ // excluded from the PERSONAL vault only, so a company vault (and, because
833
+ // the same filter drives chokidar's descent, the file watcher) still walked
834
+ // them.
835
+ expect(byReason["ignore-filtered"]).toBe(5); // 2 .claude worktrees + workspace worktree + node_modules + .hq-conflicts
836
+ expect(byReason["excluded-top-level"]).toBe(2); // T-old + scratch
837
+ });
838
+ it("prunes ignore-filtered rows whether or not the file is present, but retains a pending in-scope delete", () => {
839
+ // An ignore-filtered row is inert bookkeeping either way: the push walk
840
+ // never descends into the ignored tree and the pull leg refuses the key, so
841
+ // nothing ever reads the row again — it is only re-serialized and re-lstat'd
842
+ // on every pass. A PRESENT ignored file is therefore purged too (reason
843
+ // `ignore-filtered-present`, kept distinct for the event summary). An
844
+ // in-scope missing file is ambiguous user intent and must remain available
845
+ // to the ordinary delete/tombstone planner.
846
+ fs.mkdirSync(path.join(hqRoot, ".claude", "worktrees", "live"), {
847
+ recursive: true,
848
+ });
849
+ fs.writeFileSync(path.join(hqRoot, ".claude", "worktrees", "live", "present.ts"), "live");
850
+ const journal = journalWith([
851
+ ".claude/worktrees/gone/stranded.ts",
852
+ ".claude/worktrees/live/present.ts",
853
+ "personal/pending-user-delete.md",
854
+ ]);
855
+ const { removed, byReason } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
856
+ expect(removed.sort()).toEqual([".claude/worktrees/gone/stranded.ts", ".claude/worktrees/live/present.ts"].sort());
857
+ expect(byReason).toEqual({
858
+ "ignore-filtered": 1,
859
+ "ignore-filtered-present": 1,
860
+ "excluded-top-level": 0,
861
+ });
862
+ expect(journal.files["personal/pending-user-delete.md"]).toBeDefined();
863
+ });
864
+ // Regression: the 2026-09-05 sync-runner CPU/RAM drain. `workspace/agency/`
865
+ // and `workspace/.session-logs/` are synced carve-outs, so ~460k rows for
866
+ // agency workflow logs and session transcripts were journaled before the
867
+ // operator added `.hqignore` rules for them. The files stayed on disk, so the
868
+ // missing-only purge never touched the rows: the 206MB journal was
869
+ // structuredClone'd and re-serialized on every pass (3–4GB heap, ~50% CPU,
870
+ // repeated OOM kills). A row under a LATER ignore rule must drain even when
871
+ // its file is still present.
872
+ it("drains present carve-out rows once a later .hqignore rule excludes them", async () => {
873
+ fs.mkdirSync(path.join(hqRoot, "workspace", "agency", "workflows", "feedback"), {
874
+ recursive: true,
875
+ });
876
+ fs.writeFileSync(path.join(hqRoot, "workspace", "agency", "workflows", "feedback", "run.jsonl"), "{}");
877
+ fs.mkdirSync(path.join(hqRoot, "workspace", ".session-logs", "claude"), {
878
+ recursive: true,
879
+ });
880
+ fs.writeFileSync(path.join(hqRoot, "workspace", ".session-logs", "claude", "t.jsonl"), "{}");
881
+ const journal = journalWith([
882
+ "workspace/agency/workflows/feedback/run.jsonl",
883
+ "workspace/.session-logs/claude/t.jsonl",
884
+ "workspace/.session-logs/s.jsonl",
885
+ "workspace/agency/co/chat.jsonl", // still in scope — KEEP
886
+ "personal/notes.md", // in scope — KEEP
887
+ ]);
888
+ // Baseline: no ignore rule yet, every present carve-out row is retained.
889
+ expect(purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter).removed).toEqual([]);
890
+ // The operator adds the rules AFTER the rows were journaled.
891
+ fs.writeFileSync(path.join(hqRoot, ".hqignore"), ["workspace/agency/workflows/", "/workspace/.session-logs/", ""].join("\n"));
892
+ const { createIgnoreFilter } = await import("./ignore.js");
893
+ const { wrapFilterWithPersonalVaultDefaults } = await import("./personal-vault-exclusions.js");
894
+ const laterShouldSync = wrapFilterWithPersonalVaultDefaults(createIgnoreFilter(hqRoot), hqRoot, () => { });
895
+ const { removed, byReason } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, laterShouldSync, isLitter);
896
+ expect(removed.sort()).toEqual([
897
+ "workspace/agency/workflows/feedback/run.jsonl",
898
+ "workspace/.session-logs/claude/t.jsonl",
899
+ "workspace/.session-logs/s.jsonl",
900
+ ].sort());
901
+ expect(byReason["ignore-filtered-present"]).toBe(3);
902
+ expect(journal.files["workspace/agency/co/chat.jsonl"]).toBeDefined();
903
+ expect(journal.files["personal/notes.md"]).toBeDefined();
904
+ });
905
+ it("retains a row whose lstat fails with anything other than ENOENT (never treats an error as presence)", () => {
906
+ // A regular file where the journal expects a directory makes lstat fail
907
+ // with ENOTDIR on POSIX. That is neither "missing" nor "present": the row
908
+ // must be left alone (personal-vault.ts:812). Windows reports ENOENT for
909
+ // the same path, and ENOENT is "missing", so the row is purged.
910
+ fs.mkdirSync(path.join(hqRoot, ".claude", "worktrees"), { recursive: true });
911
+ fs.writeFileSync(path.join(hqRoot, ".claude", "worktrees", "blob"), "x");
912
+ const journal = journalWith([".claude/worktrees/blob/inner.ts"]);
913
+ const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
914
+ if (process.platform === "win32") {
915
+ expect(removed).toEqual([".claude/worktrees/blob/inner.ts"]);
916
+ expect(journal.files[".claude/worktrees/blob/inner.ts"]).toBeUndefined();
917
+ }
918
+ else {
919
+ expect(removed).toEqual([]);
920
+ expect(journal.files[".claude/worktrees/blob/inner.ts"]).toBeDefined();
921
+ }
922
+ });
923
+ it("circuit breaker: present ignored rows are exempt, so a 90% ignore-filtered-present drain proceeds", () => {
924
+ // The breaker exists for the 2026-08-18 class of fault: a transient
925
+ // enumeration/stat failure reclassifying MISSING rows. Whether a PRESENT
926
+ // file is ignored is a deterministic function of the ignore configuration
927
+ // (and a failed `.hqignore` read yields FEWER ignores, never more), so those
928
+ // rows must not be counted against the fraction — otherwise the exact
929
+ // situation this drain exists for (hundreds of thousands of rows under a
930
+ // later ignore rule) is vetoed forever.
931
+ const dir = path.join(hqRoot, ".claude", "worktrees", "wt");
932
+ fs.mkdirSync(dir, { recursive: true });
933
+ const ignoredPresent = Array.from({ length: 1100 }, (_i, n) => {
934
+ fs.writeFileSync(path.join(dir, `f${n}.ts`), "x");
935
+ return `.claude/worktrees/wt/f${n}.ts`;
936
+ });
937
+ const kept = Array.from({ length: 100 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
938
+ const journal = journalWith([...ignoredPresent, ...kept]);
939
+ const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
940
+ expect(purge.guardTripped).toBeUndefined();
941
+ expect(purge.removed).toHaveLength(1100);
942
+ expect(purge.byReason["ignore-filtered-present"]).toBe(1100);
943
+ expect(Object.keys(journal.files)).toHaveLength(100);
944
+ });
945
+ it("circuit breaker: a vetoed pass still drops nothing, including present ignored rows", () => {
946
+ // When the missing-row fraction trips the breaker the pass is treated as
947
+ // untrustworthy wholesale — the present-ignored drain waits for the next
948
+ // healthy pass too, and `attempted` reports only the vetoed missing rows.
949
+ const dir = path.join(hqRoot, ".claude", "worktrees", "wt");
950
+ fs.mkdirSync(dir, { recursive: true });
951
+ const ignoredPresent = Array.from({ length: 50 }, (_i, n) => {
952
+ fs.writeFileSync(path.join(dir, `f${n}.ts`), "x");
953
+ return `.claude/worktrees/wt/f${n}.ts`;
954
+ });
955
+ const excludedMissing = Array.from({ length: 1000 }, (_i, n) => `workspace/scratch/f${n}.txt`);
956
+ const kept = Array.from({ length: 200 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
957
+ const journal = journalWith([...ignoredPresent, ...excludedMissing, ...kept]);
958
+ const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
959
+ expect(purge.removed).toEqual([]);
960
+ expect(purge.guardTripped).toEqual({ attempted: 1000, totalRows: 1250 });
961
+ expect(Object.keys(journal.files)).toHaveLength(1250);
962
+ });
963
+ it("drains present ignored rows in bounded batches per pass (missing rows are unaffected)", () => {
964
+ // Because present ignored rows bypass the fraction breaker, an accidental
965
+ // blanket ignore rule must not be able to empty the journal in a single
966
+ // pass. The drain is capped per pass so the pruned event surfaces the
967
+ // scope shrink while most rows are still recoverable by fixing the rule.
968
+ const dir = path.join(hqRoot, ".claude", "worktrees", "wt");
969
+ fs.mkdirSync(dir, { recursive: true });
970
+ const ignoredPresent = Array.from({ length: 5 }, (_i, n) => {
971
+ fs.writeFileSync(path.join(dir, `f${n}.ts`), "x");
972
+ return `.claude/worktrees/wt/f${n}.ts`;
973
+ });
974
+ const journal = journalWith([
975
+ ...ignoredPresent,
976
+ ".claude/worktrees/gone/a.ts", // missing + ignored — not subject to the cap
977
+ ".claude/worktrees/gone/b.ts",
978
+ "personal/keep.md",
979
+ ]);
980
+ const first = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter, { ignoredPresentBatch: 3 });
981
+ expect(first.guardTripped).toBeUndefined();
982
+ expect(first.byReason["ignore-filtered"]).toBe(2);
983
+ expect(first.byReason["ignore-filtered-present"]).toBe(3);
984
+ expect(first.removed).toHaveLength(5);
985
+ expect(Object.keys(journal.files)).toHaveLength(3); // 2 present ignored + keep
986
+ const second = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter, { ignoredPresentBatch: 3 });
987
+ expect(second.byReason["ignore-filtered-present"]).toBe(2);
988
+ expect(Object.keys(journal.files)).toEqual(["personal/keep.md"]);
989
+ });
990
+ it("exposes a default present-ignored batch large enough to drain a 500k-row backlog in a few passes", () => {
991
+ // ~460k stale rows at 25k/pass drains in ~19 passes (well under an hour at
992
+ // the watcher's cadence) while an accidental blanket rule still needs many
993
+ // passes to do real damage.
994
+ expect(PURGE_IGNORED_PRESENT_BATCH).toBe(25_000);
995
+ });
996
+ // Regression: the 2026-08-18 personal-vault journal wipe. A transient
997
+ // fs.statSync failure on the carve-out dirs (EMFILE under a large 64-way
998
+ // pass, or an FS hiccup during a network storm) made computeAgencySyncPaths /
999
+ // computeSessionLogsSyncPaths fail-soft to [], so `isSyncedWorkspaceCarveKey`
1000
+ // no longer recognized their rows and the purge reclassified ~400k
1001
+ // workspace/.session-logs + workspace/agency entries as excluded-top-level
1002
+ // and dropped them — wiping the journal and stalling sync until a manual
1003
+ // restart. Whether a workspace/ KEY belongs to a carve-out is a static fact
1004
+ // of its path, so it must survive the carve-out dir being momentarily
1005
+ // unstattable. We simulate that by removing the dirs while their rows remain.
1006
+ it("keeps workspace carve-out rows when the carve-out dirs are momentarily unstattable", () => {
1007
+ fs.rmSync(path.join(hqRoot, "workspace", ".session-logs"), {
1008
+ recursive: true,
1009
+ force: true,
1010
+ });
1011
+ fs.rmSync(path.join(hqRoot, "workspace", "agency"), {
1012
+ recursive: true,
1013
+ force: true,
1014
+ });
1015
+ const journal = journalWith([
1016
+ "workspace/.session-logs/s.jsonl",
1017
+ "workspace/.session-logs/deep/t.jsonl",
1018
+ "workspace/agency/co/chat.jsonl",
1019
+ "workspace/scratch/tmp.txt", // genuinely excluded — still PURGE
1020
+ ".claude/skills/foo/SKILL.md", // base — KEEP
1021
+ ]);
1022
+ const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1023
+ // Carve-out rows survive the filesystem hiccup...
1024
+ expect(journal.files["workspace/.session-logs/s.jsonl"]).toBeDefined();
1025
+ expect(journal.files["workspace/.session-logs/deep/t.jsonl"]).toBeDefined();
1026
+ expect(journal.files["workspace/agency/co/chat.jsonl"]).toBeDefined();
1027
+ expect(journal.files[".claude/skills/foo/SKILL.md"]).toBeDefined();
1028
+ // ...while genuinely-excluded workspace/ rows are still pruned.
1029
+ expect(removed).toContain("workspace/scratch/tmp.txt");
1030
+ expect(removed).not.toContain("workspace/.session-logs/s.jsonl");
1031
+ expect(removed).not.toContain("workspace/agency/co/chat.jsonl");
1032
+ });
1033
+ it("circuit breaker: refuses a mass purge (>50% of a large journal) and keeps every row", () => {
1034
+ // 1000 genuinely-excluded workspace/ rows + 200 kept base rows = 1200 total;
1035
+ // 83% would be dropped, well over the guard fraction on a >=1000-row journal.
1036
+ const excluded = Array.from({ length: 1000 }, (_i, n) => `workspace/scratch/f${n}.txt`);
1037
+ const kept = Array.from({ length: 200 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
1038
+ const journal = journalWith([...excluded, ...kept]);
1039
+ const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1040
+ expect(purge.removed).toEqual([]);
1041
+ expect(purge.guardTripped).toEqual({ attempted: 1000, totalRows: 1200 });
1042
+ // Nothing was actually dropped — the journal survives intact for resume.
1043
+ expect(Object.keys(journal.files)).toHaveLength(1200);
1044
+ for (const k of excluded)
1045
+ expect(journal.files[k]).toBeDefined();
1046
+ });
1047
+ it("circuit breaker: allows a purge of exactly half the journal (guard is strictly >50%)", () => {
1048
+ // 600 excluded of 1200 total = exactly 50%. The contract is "more than
1049
+ // half", so this must NOT trip — otherwise these rows stay candidates every
1050
+ // pass and the journal never converges at the boundary.
1051
+ const excluded = Array.from({ length: 600 }, (_i, n) => `workspace/scratch/f${n}.txt`);
1052
+ const kept = Array.from({ length: 600 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
1053
+ const journal = journalWith([...excluded, ...kept]);
1054
+ const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1055
+ expect(purge.guardTripped).toBeUndefined();
1056
+ expect(purge.removed).toHaveLength(600);
1057
+ expect(Object.keys(journal.files)).toHaveLength(600);
1058
+ });
1059
+ it("circuit breaker: does NOT guard a small journal, so early-baseline cleanup still applies", () => {
1060
+ // Below PURGE_GUARD_MIN_JOURNAL a high purge fraction is normal baseline
1061
+ // convergence, so the guard must stay out of the way.
1062
+ const journal = journalWith([
1063
+ "workspace/scratch/a.txt",
1064
+ "workspace/scratch/b.txt",
1065
+ ".claude/skills/foo/SKILL.md",
1066
+ ]);
1067
+ const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1068
+ expect(purge.guardTripped).toBeUndefined();
1069
+ expect(purge.removed.sort()).toEqual(["workspace/scratch/a.txt", "workspace/scratch/b.txt"].sort());
1070
+ expect(journal.files[".claude/skills/foo/SKILL.md"]).toBeDefined();
1071
+ });
1072
+ it("defers `.conflict-*` / `.drift-*` litter to the vault-litter drain (remote delete)", () => {
1073
+ // The delete-plan litter drain remotely DELETES these when the local file
1074
+ // is gone — stronger than forgetting the row — so the purge must not touch
1075
+ // them or it would strand the vault object.
1076
+ const journal = journalWith([
1077
+ "CLAUDE.md.conflict-2026-05-13T19-40-40Z-e5797a.md",
1078
+ "personal/.obsidian/graph.json.drift-1779863862-42519",
1079
+ ]);
1080
+ const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1081
+ expect(removed).toEqual([]);
1082
+ });
1083
+ it("does NOT purge cloud-company keys (owned by the decommission plan)", () => {
1084
+ // A cloud company's stale keys are drained by computeDecommissionPlan,
1085
+ // which deletes them remotely against their journal rows — purging them
1086
+ // here would rob that plan of the rows. `companies/` is never top-level
1087
+ // purged even though it is in PERSONAL_VAULT_EXCLUDED_TOP_LEVEL.
1088
+ const journal = journalWith(["companies/cloudco/knowledge/a.md"]);
1089
+ const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1090
+ expect(removed).toEqual([]);
1091
+ expect(Object.keys(journal.files)).toEqual([
1092
+ "companies/cloudco/knowledge/a.md",
1093
+ ]);
1094
+ });
1095
+ it("is a no-op on an already-clean journal", () => {
1096
+ const journal = journalWith(["personal/a.md", "core/b.md"]);
1097
+ const { removed, byReason } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
1098
+ expect(removed).toEqual([]);
1099
+ expect(byReason).toEqual({
1100
+ "ignore-filtered": 0,
1101
+ "ignore-filtered-present": 0,
1102
+ "excluded-top-level": 0,
1103
+ });
1104
+ });
1105
+ });
1106
+ //# sourceMappingURL=personal-vault.test.js.map