@indigoai-us/hq-cloud 6.18.44-alpha.8 → 6.18.44
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.
- package/dist/bin/sync-runner-planning.d.ts +12 -0
- package/dist/bin/sync-runner-planning.d.ts.map +1 -1
- package/dist/bin/sync-runner-planning.js +18 -0
- package/dist/bin/sync-runner-planning.js.map +1 -1
- package/dist/bin/sync-runner-watch-loop.d.ts +18 -0
- package/dist/bin/sync-runner-watch-loop.d.ts.map +1 -1
- package/dist/bin/sync-runner-watch-loop.js +75 -6
- package/dist/bin/sync-runner-watch-loop.js.map +1 -1
- package/dist/bin/sync-runner.d.ts +22 -1
- package/dist/bin/sync-runner.d.ts.map +1 -1
- package/dist/bin/sync-runner.js +33 -4
- package/dist/bin/sync-runner.js.map +1 -1
- package/dist/cli/conflict.d.ts.map +1 -1
- package/dist/cli/conflict.js +2 -1
- package/dist/cli/conflict.js.map +1 -1
- package/dist/cli/rescue-core.d.ts +6 -0
- package/dist/cli/rescue-core.d.ts.map +1 -1
- package/dist/cli/rescue-core.js +10 -1
- package/dist/cli/rescue-core.js.map +1 -1
- package/dist/cli/rescue-windows-test-harness.d.ts +19 -0
- package/dist/cli/rescue-windows-test-harness.d.ts.map +1 -0
- package/dist/cli/rescue-windows-test-harness.js +443 -0
- package/dist/cli/rescue-windows-test-harness.js.map +1 -0
- package/dist/company-resolver.d.ts +22 -0
- package/dist/company-resolver.d.ts.map +1 -1
- package/dist/company-resolver.js +1 -1
- package/dist/company-resolver.js.map +1 -1
- package/dist/ignore.d.ts +4 -1
- package/dist/ignore.d.ts.map +1 -1
- package/dist/ignore.js +10 -12
- package/dist/ignore.js.map +1 -1
- package/dist/journal-snapshot-decoder.js +15 -2
- package/dist/journal-snapshot-decoder.js.map +1 -1
- package/dist/sync/durable-apply.d.ts +2 -0
- package/dist/sync/durable-apply.d.ts.map +1 -1
- package/dist/sync/durable-apply.js +9 -12
- package/dist/sync/durable-apply.js.map +1 -1
- package/dist/sync/fsync-compat.d.ts +13 -0
- package/dist/sync/fsync-compat.d.ts.map +1 -0
- package/dist/sync/fsync-compat.js +33 -0
- package/dist/sync/fsync-compat.js.map +1 -0
- package/dist/sync/multipart-uploader.d.ts.map +1 -1
- package/dist/sync/multipart-uploader.js +2 -1
- package/dist/sync/multipart-uploader.js.map +1 -1
- package/dist/sync/scope-inventory-client.d.ts.map +1 -1
- package/dist/sync/scope-inventory-client.js +7 -2
- package/dist/sync/scope-inventory-client.js.map +1 -1
- package/dist/telemetry.d.ts +31 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +177 -17
- package/dist/telemetry.js.map +1 -1
- package/dist/usage-company-fallback.d.ts +104 -0
- package/dist/usage-company-fallback.d.ts.map +1 -0
- package/dist/usage-company-fallback.js +599 -0
- package/dist/usage-company-fallback.js.map +1 -0
- package/dist/watch-owner-lease.d.ts +3 -0
- package/dist/watch-owner-lease.d.ts.map +1 -1
- package/dist/watch-owner-lease.js +14 -3
- package/dist/watch-owner-lease.js.map +1 -1
- package/package.json +2 -2
- package/dist/active-company.test.d.ts +0 -2
- package/dist/active-company.test.d.ts.map +0 -1
- package/dist/active-company.test.js +0 -149
- package/dist/active-company.test.js.map +0 -1
- package/dist/agent-codex-instructions.test.d.ts +0 -2
- package/dist/agent-codex-instructions.test.d.ts.map +0 -1
- package/dist/agent-codex-instructions.test.js +0 -271
- package/dist/agent-codex-instructions.test.js.map +0 -1
- package/dist/backup-prune.test.d.ts +0 -2
- package/dist/backup-prune.test.d.ts.map +0 -1
- package/dist/backup-prune.test.js +0 -154
- package/dist/backup-prune.test.js.map +0 -1
- package/dist/bandwidth.test.d.ts +0 -2
- package/dist/bandwidth.test.d.ts.map +0 -1
- package/dist/bandwidth.test.js +0 -342
- package/dist/bandwidth.test.js.map +0 -1
- package/dist/best-effort-error.test.d.ts +0 -2
- package/dist/best-effort-error.test.d.ts.map +0 -1
- package/dist/best-effort-error.test.js +0 -54
- package/dist/best-effort-error.test.js.map +0 -1
- package/dist/bin/area-ledger-migration.test.d.ts +0 -2
- package/dist/bin/area-ledger-migration.test.d.ts.map +0 -1
- package/dist/bin/area-ledger-migration.test.js +0 -410
- package/dist/bin/area-ledger-migration.test.js.map +0 -1
- package/dist/bin/backup-prune-runner.test.d.ts +0 -2
- package/dist/bin/backup-prune-runner.test.d.ts.map +0 -1
- package/dist/bin/backup-prune-runner.test.js +0 -22
- package/dist/bin/backup-prune-runner.test.js.map +0 -1
- package/dist/bin/journal-repair.test.d.ts +0 -2
- package/dist/bin/journal-repair.test.d.ts.map +0 -1
- package/dist/bin/journal-repair.test.js +0 -53
- package/dist/bin/journal-repair.test.js.map +0 -1
- package/dist/bin/layout-compatibility.test.d.ts +0 -2
- package/dist/bin/layout-compatibility.test.d.ts.map +0 -1
- package/dist/bin/layout-compatibility.test.js +0 -87
- package/dist/bin/layout-compatibility.test.js.map +0 -1
- package/dist/bin/outpost-heartbeat.test.d.ts +0 -7
- package/dist/bin/outpost-heartbeat.test.d.ts.map +0 -1
- package/dist/bin/outpost-heartbeat.test.js +0 -84
- package/dist/bin/outpost-heartbeat.test.js.map +0 -1
- package/dist/bin/outpost-session-host.test.d.ts +0 -7
- package/dist/bin/outpost-session-host.test.d.ts.map +0 -1
- package/dist/bin/outpost-session-host.test.js +0 -52
- package/dist/bin/outpost-session-host.test.js.map +0 -1
- package/dist/bin/sync-mutation.test.d.ts +0 -2
- package/dist/bin/sync-mutation.test.d.ts.map +0 -1
- package/dist/bin/sync-mutation.test.js +0 -64
- package/dist/bin/sync-mutation.test.js.map +0 -1
- package/dist/bin/sync-runner-args.test.d.ts +0 -2
- package/dist/bin/sync-runner-args.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-args.test.js +0 -82
- package/dist/bin/sync-runner-args.test.js.map +0 -1
- package/dist/bin/sync-runner-auth-wait.test.d.ts +0 -2
- package/dist/bin/sync-runner-auth-wait.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-auth-wait.test.js +0 -406
- package/dist/bin/sync-runner-auth-wait.test.js.map +0 -1
- package/dist/bin/sync-runner-backoff.regression.test.d.ts +0 -29
- package/dist/bin/sync-runner-backoff.regression.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-backoff.regression.test.js +0 -224
- package/dist/bin/sync-runner-backoff.regression.test.js.map +0 -1
- package/dist/bin/sync-runner-company.test.d.ts +0 -2
- package/dist/bin/sync-runner-company.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-company.test.js +0 -2439
- package/dist/bin/sync-runner-company.test.js.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.d.ts +0 -2
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.js +0 -648
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.js.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot.bench.test.d.ts +0 -2
- package/dist/bin/sync-runner-delete-snapshot.bench.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot.bench.test.js +0 -329
- package/dist/bin/sync-runner-delete-snapshot.bench.test.js.map +0 -1
- package/dist/bin/sync-runner-events.test.d.ts +0 -2
- package/dist/bin/sync-runner-events.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-events.test.js +0 -364
- package/dist/bin/sync-runner-events.test.js.map +0 -1
- package/dist/bin/sync-runner-heap-telemetry.test.d.ts +0 -2
- package/dist/bin/sync-runner-heap-telemetry.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-heap-telemetry.test.js +0 -1966
- package/dist/bin/sync-runner-heap-telemetry.test.js.map +0 -1
- package/dist/bin/sync-runner-manifest.test.d.ts +0 -12
- package/dist/bin/sync-runner-manifest.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-manifest.test.js +0 -921
- package/dist/bin/sync-runner-manifest.test.js.map +0 -1
- package/dist/bin/sync-runner-planning.test.d.ts +0 -2
- package/dist/bin/sync-runner-planning.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-planning.test.js +0 -448
- package/dist/bin/sync-runner-planning.test.js.map +0 -1
- package/dist/bin/sync-runner-post-sync-flags.test.d.ts +0 -2
- package/dist/bin/sync-runner-post-sync-flags.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-post-sync-flags.test.js +0 -64
- package/dist/bin/sync-runner-post-sync-flags.test.js.map +0 -1
- package/dist/bin/sync-runner-publish-expansion.test.d.ts +0 -2
- package/dist/bin/sync-runner-publish-expansion.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-publish-expansion.test.js +0 -54
- package/dist/bin/sync-runner-publish-expansion.test.js.map +0 -1
- package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts +0 -2
- package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-receiver-unresolved-company.test.js +0 -379
- package/dist/bin/sync-runner-receiver-unresolved-company.test.js.map +0 -1
- package/dist/bin/sync-runner-rollup.test.d.ts +0 -2
- package/dist/bin/sync-runner-rollup.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-rollup.test.js +0 -24
- package/dist/bin/sync-runner-rollup.test.js.map +0 -1
- package/dist/bin/sync-runner-watch-loop.test.d.ts +0 -2
- package/dist/bin/sync-runner-watch-loop.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-watch-loop.test.js +0 -734
- package/dist/bin/sync-runner-watch-loop.test.js.map +0 -1
- package/dist/bin/sync-runner-watch-routes.test.d.ts +0 -2
- package/dist/bin/sync-runner-watch-routes.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-watch-routes.test.js +0 -181
- package/dist/bin/sync-runner-watch-routes.test.js.map +0 -1
- package/dist/bin/sync-runner.test.d.ts +0 -10
- package/dist/bin/sync-runner.test.d.ts.map +0 -1
- package/dist/bin/sync-runner.test.js +0 -18984
- package/dist/bin/sync-runner.test.js.map +0 -1
- package/dist/cli/case-alias.test.d.ts +0 -2
- package/dist/cli/case-alias.test.d.ts.map +0 -1
- package/dist/cli/case-alias.test.js +0 -96
- package/dist/cli/case-alias.test.js.map +0 -1
- package/dist/cli/conflict-recovery.test.d.ts +0 -2
- package/dist/cli/conflict-recovery.test.d.ts.map +0 -1
- package/dist/cli/conflict-recovery.test.js +0 -201
- package/dist/cli/conflict-recovery.test.js.map +0 -1
- package/dist/cli/conflict-winner.test.d.ts +0 -7
- package/dist/cli/conflict-winner.test.d.ts.map +0 -1
- package/dist/cli/conflict-winner.test.js +0 -98
- package/dist/cli/conflict-winner.test.js.map +0 -1
- package/dist/cli/doctor.test.d.ts +0 -13
- package/dist/cli/doctor.test.d.ts.map +0 -1
- package/dist/cli/doctor.test.js +0 -607
- package/dist/cli/doctor.test.js.map +0 -1
- package/dist/cli/invite.test.d.ts +0 -5
- package/dist/cli/invite.test.d.ts.map +0 -1
- package/dist/cli/invite.test.js +0 -178
- package/dist/cli/invite.test.js.map +0 -1
- package/dist/cli/onepass-pull-planner-regressions.test.d.ts +0 -2
- package/dist/cli/onepass-pull-planner-regressions.test.d.ts.map +0 -1
- package/dist/cli/onepass-pull-planner-regressions.test.js +0 -300
- package/dist/cli/onepass-pull-planner-regressions.test.js.map +0 -1
- package/dist/cli/onepass-pull-planner.test.d.ts +0 -2
- package/dist/cli/onepass-pull-planner.test.d.ts.map +0 -1
- package/dist/cli/onepass-pull-planner.test.js +0 -266
- package/dist/cli/onepass-pull-planner.test.js.map +0 -1
- package/dist/cli/push-scan-exclusions.test.d.ts +0 -2
- package/dist/cli/push-scan-exclusions.test.d.ts.map +0 -1
- package/dist/cli/push-scan-exclusions.test.js +0 -99
- package/dist/cli/push-scan-exclusions.test.js.map +0 -1
- package/dist/cli/reindex-knowledge.test.d.ts +0 -12
- package/dist/cli/reindex-knowledge.test.d.ts.map +0 -1
- package/dist/cli/reindex-knowledge.test.js +0 -260
- package/dist/cli/reindex-knowledge.test.js.map +0 -1
- package/dist/cli/reindex.test.d.ts +0 -11
- package/dist/cli/reindex.test.d.ts.map +0 -1
- package/dist/cli/reindex.test.js +0 -811
- package/dist/cli/reindex.test.js.map +0 -1
- package/dist/cli/rescue-breaker.test.d.ts +0 -2
- package/dist/cli/rescue-breaker.test.d.ts.map +0 -1
- package/dist/cli/rescue-breaker.test.js +0 -812
- package/dist/cli/rescue-breaker.test.js.map +0 -1
- package/dist/cli/rescue-classify-ordering.test.d.ts +0 -2
- package/dist/cli/rescue-classify-ordering.test.d.ts.map +0 -1
- package/dist/cli/rescue-classify-ordering.test.js +0 -500
- package/dist/cli/rescue-classify-ordering.test.js.map +0 -1
- package/dist/cli/rescue-clone-diagnostics.test.d.ts +0 -2
- package/dist/cli/rescue-clone-diagnostics.test.d.ts.map +0 -1
- package/dist/cli/rescue-clone-diagnostics.test.js +0 -101
- package/dist/cli/rescue-clone-diagnostics.test.js.map +0 -1
- package/dist/cli/rescue-clone-network-retry.test.d.ts +0 -2
- package/dist/cli/rescue-clone-network-retry.test.d.ts.map +0 -1
- package/dist/cli/rescue-clone-network-retry.test.js +0 -415
- package/dist/cli/rescue-clone-network-retry.test.js.map +0 -1
- package/dist/cli/rescue-core-stamp.test.d.ts +0 -2
- package/dist/cli/rescue-core-stamp.test.d.ts.map +0 -1
- package/dist/cli/rescue-core-stamp.test.js +0 -364
- package/dist/cli/rescue-core-stamp.test.js.map +0 -1
- package/dist/cli/rescue-drift-reconcile.test.d.ts +0 -2
- package/dist/cli/rescue-drift-reconcile.test.d.ts.map +0 -1
- package/dist/cli/rescue-drift-reconcile.test.js +0 -162
- package/dist/cli/rescue-drift-reconcile.test.js.map +0 -1
- package/dist/cli/rescue-drop-dir-symlink.test.d.ts +0 -2
- package/dist/cli/rescue-drop-dir-symlink.test.d.ts.map +0 -1
- package/dist/cli/rescue-drop-dir-symlink.test.js +0 -255
- package/dist/cli/rescue-drop-dir-symlink.test.js.map +0 -1
- package/dist/cli/rescue-exec-bit-preserve.test.d.ts +0 -2
- package/dist/cli/rescue-exec-bit-preserve.test.d.ts.map +0 -1
- package/dist/cli/rescue-exec-bit-preserve.test.js +0 -177
- package/dist/cli/rescue-exec-bit-preserve.test.js.map +0 -1
- package/dist/cli/rescue-hq-root-guard.test.d.ts +0 -2
- package/dist/cli/rescue-hq-root-guard.test.d.ts.map +0 -1
- package/dist/cli/rescue-hq-root-guard.test.js +0 -210
- package/dist/cli/rescue-hq-root-guard.test.js.map +0 -1
- package/dist/cli/rescue-journal-reconcile.test.d.ts +0 -2
- package/dist/cli/rescue-journal-reconcile.test.d.ts.map +0 -1
- package/dist/cli/rescue-journal-reconcile.test.js +0 -186
- package/dist/cli/rescue-journal-reconcile.test.js.map +0 -1
- package/dist/cli/rescue-keep-local-ignore.test.d.ts +0 -2
- package/dist/cli/rescue-keep-local-ignore.test.d.ts.map +0 -1
- package/dist/cli/rescue-keep-local-ignore.test.js +0 -315
- package/dist/cli/rescue-keep-local-ignore.test.js.map +0 -1
- package/dist/cli/rescue-move.test.d.ts +0 -2
- package/dist/cli/rescue-move.test.d.ts.map +0 -1
- package/dist/cli/rescue-move.test.js +0 -166
- package/dist/cli/rescue-move.test.js.map +0 -1
- package/dist/cli/rescue-mtime-preserve.test.d.ts +0 -2
- package/dist/cli/rescue-mtime-preserve.test.d.ts.map +0 -1
- package/dist/cli/rescue-mtime-preserve.test.js +0 -186
- package/dist/cli/rescue-mtime-preserve.test.js.map +0 -1
- package/dist/cli/rescue-preserve-copy-symlink.test.d.ts +0 -2
- package/dist/cli/rescue-preserve-copy-symlink.test.d.ts.map +0 -1
- package/dist/cli/rescue-preserve-copy-symlink.test.js +0 -483
- package/dist/cli/rescue-preserve-copy-symlink.test.js.map +0 -1
- package/dist/cli/rescue-realpath.test.d.ts +0 -2
- package/dist/cli/rescue-realpath.test.d.ts.map +0 -1
- package/dist/cli/rescue-realpath.test.js +0 -109
- package/dist/cli/rescue-realpath.test.js.map +0 -1
- package/dist/cli/rescue-restore-flag.test.d.ts +0 -2
- package/dist/cli/rescue-restore-flag.test.d.ts.map +0 -1
- package/dist/cli/rescue-restore-flag.test.js +0 -82
- package/dist/cli/rescue-restore-flag.test.js.map +0 -1
- package/dist/cli/rescue-rsync-preflight.test.d.ts +0 -2
- package/dist/cli/rescue-rsync-preflight.test.d.ts.map +0 -1
- package/dist/cli/rescue-rsync-preflight.test.js +0 -579
- package/dist/cli/rescue-rsync-preflight.test.js.map +0 -1
- package/dist/cli/rescue-rsync-status.test.d.ts +0 -2
- package/dist/cli/rescue-rsync-status.test.d.ts.map +0 -1
- package/dist/cli/rescue-rsync-status.test.js +0 -406
- package/dist/cli/rescue-rsync-status.test.js.map +0 -1
- package/dist/cli/rescue-settings-reconcile.test.d.ts +0 -2
- package/dist/cli/rescue-settings-reconcile.test.d.ts.map +0 -1
- package/dist/cli/rescue-settings-reconcile.test.js +0 -610
- package/dist/cli/rescue-settings-reconcile.test.js.map +0 -1
- package/dist/cli/rescue-snapshot-copy.test.d.ts +0 -2
- package/dist/cli/rescue-snapshot-copy.test.d.ts.map +0 -1
- package/dist/cli/rescue-snapshot-copy.test.js +0 -790
- package/dist/cli/rescue-snapshot-copy.test.js.map +0 -1
- package/dist/cli/rescue-snapshot-recovery.test.d.ts +0 -2
- package/dist/cli/rescue-snapshot-recovery.test.d.ts.map +0 -1
- package/dist/cli/rescue-snapshot-recovery.test.js +0 -265
- package/dist/cli/rescue-snapshot-recovery.test.js.map +0 -1
- package/dist/cli/rescue-snapshot.test.d.ts +0 -2
- package/dist/cli/rescue-snapshot.test.d.ts.map +0 -1
- package/dist/cli/rescue-snapshot.test.js +0 -46
- package/dist/cli/rescue-snapshot.test.js.map +0 -1
- package/dist/cli/rescue-source-switch-floor.test.d.ts +0 -2
- package/dist/cli/rescue-source-switch-floor.test.d.ts.map +0 -1
- package/dist/cli/rescue-source-switch-floor.test.js +0 -247
- package/dist/cli/rescue-source-switch-floor.test.js.map +0 -1
- package/dist/cli/rescue-unchanged-delete.test.d.ts +0 -2
- package/dist/cli/rescue-unchanged-delete.test.d.ts.map +0 -1
- package/dist/cli/rescue-unchanged-delete.test.js +0 -305
- package/dist/cli/rescue-unchanged-delete.test.js.map +0 -1
- package/dist/cli/rescue.reindex.test.d.ts +0 -2
- package/dist/cli/rescue.reindex.test.d.ts.map +0 -1
- package/dist/cli/rescue.reindex.test.js +0 -72
- package/dist/cli/rescue.reindex.test.js.map +0 -1
- package/dist/cli/rescue.test.d.ts +0 -2
- package/dist/cli/rescue.test.d.ts.map +0 -1
- package/dist/cli/rescue.test.js +0 -127
- package/dist/cli/rescue.test.js.map +0 -1
- package/dist/cli/share-plan-limit-presign.test.d.ts +0 -2
- package/dist/cli/share-plan-limit-presign.test.d.ts.map +0 -1
- package/dist/cli/share-plan-limit-presign.test.js +0 -271
- package/dist/cli/share-plan-limit-presign.test.js.map +0 -1
- package/dist/cli/share-presign-transport.test.d.ts +0 -22
- package/dist/cli/share-presign-transport.test.d.ts.map +0 -1
- package/dist/cli/share-presign-transport.test.js +0 -388
- package/dist/cli/share-presign-transport.test.js.map +0 -1
- package/dist/cli/share.test.d.ts +0 -5
- package/dist/cli/share.test.d.ts.map +0 -1
- package/dist/cli/share.test.js +0 -12335
- package/dist/cli/share.test.js.map +0 -1
- package/dist/cli/streaming-pull-planner.bench.test.d.ts +0 -15
- package/dist/cli/streaming-pull-planner.bench.test.d.ts.map +0 -1
- package/dist/cli/streaming-pull-planner.bench.test.js +0 -273
- package/dist/cli/streaming-pull-planner.bench.test.js.map +0 -1
- package/dist/cli/sync-scope.test.d.ts +0 -22
- package/dist/cli/sync-scope.test.d.ts.map +0 -1
- package/dist/cli/sync-scope.test.js +0 -903
- package/dist/cli/sync-scope.test.js.map +0 -1
- package/dist/cli/sync.test.d.ts +0 -5
- package/dist/cli/sync.test.d.ts.map +0 -1
- package/dist/cli/sync.test.js +0 -9028
- package/dist/cli/sync.test.js.map +0 -1
- package/dist/cli/tombstones.test.d.ts +0 -2
- package/dist/cli/tombstones.test.d.ts.map +0 -1
- package/dist/cli/tombstones.test.js +0 -120
- package/dist/cli/tombstones.test.js.map +0 -1
- package/dist/cli/watch-event-push-conflict.test.d.ts +0 -25
- package/dist/cli/watch-event-push-conflict.test.d.ts.map +0 -1
- package/dist/cli/watch-event-push-conflict.test.js +0 -230
- package/dist/cli/watch-event-push-conflict.test.js.map +0 -1
- package/dist/client-info.test.d.ts +0 -11
- package/dist/client-info.test.d.ts.map +0 -1
- package/dist/client-info.test.js +0 -168
- package/dist/client-info.test.js.map +0 -1
- package/dist/cognito-auth-lock-no-hard-links.test.d.ts +0 -11
- package/dist/cognito-auth-lock-no-hard-links.test.d.ts.map +0 -1
- package/dist/cognito-auth-lock-no-hard-links.test.js +0 -76
- package/dist/cognito-auth-lock-no-hard-links.test.js.map +0 -1
- package/dist/cognito-auth.test.d.ts +0 -9
- package/dist/cognito-auth.test.d.ts.map +0 -1
- package/dist/cognito-auth.test.js +0 -745
- package/dist/cognito-auth.test.js.map +0 -1
- package/dist/company-resolver.test.d.ts +0 -7
- package/dist/company-resolver.test.d.ts.map +0 -1
- package/dist/company-resolver.test.js +0 -533
- package/dist/company-resolver.test.js.map +0 -1
- package/dist/company-slug.test.d.ts +0 -7
- package/dist/company-slug.test.d.ts.map +0 -1
- package/dist/company-slug.test.js +0 -43
- package/dist/company-slug.test.js.map +0 -1
- package/dist/company-vault-transport.test.d.ts +0 -12
- package/dist/company-vault-transport.test.d.ts.map +0 -1
- package/dist/company-vault-transport.test.js +0 -97
- package/dist/company-vault-transport.test.js.map +0 -1
- package/dist/context.test.d.ts +0 -7
- package/dist/context.test.d.ts.map +0 -1
- package/dist/context.test.js +0 -646
- package/dist/context.test.js.map +0 -1
- package/dist/entity-resolver.test.d.ts +0 -10
- package/dist/entity-resolver.test.d.ts.map +0 -1
- package/dist/entity-resolver.test.js +0 -244
- package/dist/entity-resolver.test.js.map +0 -1
- package/dist/getindigo-dead-refs-contract.test.d.ts +0 -2
- package/dist/getindigo-dead-refs-contract.test.d.ts.map +0 -1
- package/dist/getindigo-dead-refs-contract.test.js +0 -58
- package/dist/getindigo-dead-refs-contract.test.js.map +0 -1
- package/dist/hermetic-test-env.test.d.ts +0 -2
- package/dist/hermetic-test-env.test.d.ts.map +0 -1
- package/dist/hermetic-test-env.test.js +0 -61
- package/dist/hermetic-test-env.test.js.map +0 -1
- package/dist/hq-root-recovery.test.d.ts +0 -2
- package/dist/hq-root-recovery.test.d.ts.map +0 -1
- package/dist/hq-root-recovery.test.js +0 -65
- package/dist/hq-root-recovery.test.js.map +0 -1
- package/dist/ignore.test.d.ts +0 -10
- package/dist/ignore.test.d.ts.map +0 -1
- package/dist/ignore.test.js +0 -926
- package/dist/ignore.test.js.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -26
- package/dist/index.test.js.map +0 -1
- package/dist/journal-area-ledger-read-boundary.test.d.ts +0 -2
- package/dist/journal-area-ledger-read-boundary.test.d.ts.map +0 -1
- package/dist/journal-area-ledger-read-boundary.test.js +0 -420
- package/dist/journal-area-ledger-read-boundary.test.js.map +0 -1
- package/dist/journal-baseline.test.d.ts +0 -2
- package/dist/journal-baseline.test.d.ts.map +0 -1
- package/dist/journal-baseline.test.js +0 -218
- package/dist/journal-baseline.test.js.map +0 -1
- package/dist/journal-decode-window.test.d.ts +0 -2
- package/dist/journal-decode-window.test.d.ts.map +0 -1
- package/dist/journal-decode-window.test.js +0 -99
- package/dist/journal-decode-window.test.js.map +0 -1
- package/dist/journal-delta-writes.test.d.ts +0 -2
- package/dist/journal-delta-writes.test.d.ts.map +0 -1
- package/dist/journal-delta-writes.test.js +0 -159
- package/dist/journal-delta-writes.test.js.map +0 -1
- package/dist/journal-ledger-index.test.d.ts +0 -15
- package/dist/journal-ledger-index.test.d.ts.map +0 -1
- package/dist/journal-ledger-index.test.js +0 -269
- package/dist/journal-ledger-index.test.js.map +0 -1
- package/dist/journal-public-boundary.test.d.ts +0 -2
- package/dist/journal-public-boundary.test.d.ts.map +0 -1
- package/dist/journal-public-boundary.test.js +0 -216
- package/dist/journal-public-boundary.test.js.map +0 -1
- package/dist/journal-row-store.test.d.ts +0 -2
- package/dist/journal-row-store.test.d.ts.map +0 -1
- package/dist/journal-row-store.test.js +0 -729
- package/dist/journal-row-store.test.js.map +0 -1
- package/dist/journal-snapshot-memory-helpers.d.ts +0 -33
- package/dist/journal-snapshot-memory-helpers.d.ts.map +0 -1
- package/dist/journal-snapshot-memory-helpers.js +0 -212
- package/dist/journal-snapshot-memory-helpers.js.map +0 -1
- package/dist/journal-snapshot-memory.test.d.ts +0 -2
- package/dist/journal-snapshot-memory.test.d.ts.map +0 -1
- package/dist/journal-snapshot-memory.test.js +0 -47
- package/dist/journal-snapshot-memory.test.js.map +0 -1
- package/dist/journal-snapshot-v4-memory.test.d.ts +0 -2
- package/dist/journal-snapshot-v4-memory.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4-memory.test.js +0 -24
- package/dist/journal-snapshot-v4-memory.test.js.map +0 -1
- package/dist/journal-snapshot-v4-writer-memory.test.d.ts +0 -2
- package/dist/journal-snapshot-v4-writer-memory.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4-writer-memory.test.js +0 -76
- package/dist/journal-snapshot-v4-writer-memory.test.js.map +0 -1
- package/dist/journal-snapshot-v4-writer.test.d.ts +0 -2
- package/dist/journal-snapshot-v4-writer.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4-writer.test.js +0 -282
- package/dist/journal-snapshot-v4-writer.test.js.map +0 -1
- package/dist/journal-snapshot-v4.test.d.ts +0 -2
- package/dist/journal-snapshot-v4.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4.test.js +0 -281
- package/dist/journal-snapshot-v4.test.js.map +0 -1
- package/dist/journal-store.test.d.ts +0 -2
- package/dist/journal-store.test.d.ts.map +0 -1
- package/dist/journal-store.test.js +0 -1227
- package/dist/journal-store.test.js.map +0 -1
- package/dist/journal-streaming.heap.test.d.ts +0 -2
- package/dist/journal-streaming.heap.test.d.ts.map +0 -1
- package/dist/journal-streaming.heap.test.js +0 -190
- package/dist/journal-streaming.heap.test.js.map +0 -1
- package/dist/journal.test.d.ts +0 -9
- package/dist/journal.test.d.ts.map +0 -1
- package/dist/journal.test.js +0 -1074
- package/dist/journal.test.js.map +0 -1
- package/dist/kms10-etag-safe-pull.test.d.ts +0 -2
- package/dist/kms10-etag-safe-pull.test.d.ts.map +0 -1
- package/dist/kms10-etag-safe-pull.test.js +0 -53
- package/dist/kms10-etag-safe-pull.test.js.map +0 -1
- package/dist/lib/cloud-authoritative.test.d.ts +0 -2
- package/dist/lib/cloud-authoritative.test.d.ts.map +0 -1
- package/dist/lib/cloud-authoritative.test.js +0 -42
- package/dist/lib/cloud-authoritative.test.js.map +0 -1
- package/dist/lib/conflict-reconcile.test.d.ts +0 -7
- package/dist/lib/conflict-reconcile.test.d.ts.map +0 -1
- package/dist/lib/conflict-reconcile.test.js +0 -246
- package/dist/lib/conflict-reconcile.test.js.map +0 -1
- package/dist/lib/conflict.test.d.ts +0 -9
- package/dist/lib/conflict.test.d.ts.map +0 -1
- package/dist/lib/conflict.test.js +0 -340
- package/dist/lib/conflict.test.js.map +0 -1
- package/dist/lib/describe-error.test.d.ts +0 -2
- package/dist/lib/describe-error.test.d.ts.map +0 -1
- package/dist/lib/describe-error.test.js +0 -148
- package/dist/lib/describe-error.test.js.map +0 -1
- package/dist/lib/machine-id.test.d.ts +0 -8
- package/dist/lib/machine-id.test.d.ts.map +0 -1
- package/dist/lib/machine-id.test.js +0 -228
- package/dist/lib/machine-id.test.js.map +0 -1
- package/dist/lib/net-errors.test.d.ts +0 -2
- package/dist/lib/net-errors.test.d.ts.map +0 -1
- package/dist/lib/net-errors.test.js +0 -111
- package/dist/lib/net-errors.test.js.map +0 -1
- package/dist/lib/ontology-entity-meta.test.d.ts +0 -2
- package/dist/lib/ontology-entity-meta.test.d.ts.map +0 -1
- package/dist/lib/ontology-entity-meta.test.js +0 -79
- package/dist/lib/ontology-entity-meta.test.js.map +0 -1
- package/dist/lib/ontology-entity-push.test.d.ts +0 -2
- package/dist/lib/ontology-entity-push.test.d.ts.map +0 -1
- package/dist/lib/ontology-entity-push.test.js +0 -156
- package/dist/lib/ontology-entity-push.test.js.map +0 -1
- package/dist/lib/personal-connector-settings-sync.test.d.ts +0 -2
- package/dist/lib/personal-connector-settings-sync.test.d.ts.map +0 -1
- package/dist/lib/personal-connector-settings-sync.test.js +0 -34
- package/dist/lib/personal-connector-settings-sync.test.js.map +0 -1
- package/dist/lib/readlink-safe.test.d.ts +0 -2
- package/dist/lib/readlink-safe.test.d.ts.map +0 -1
- package/dist/lib/readlink-safe.test.js +0 -34
- package/dist/lib/readlink-safe.test.js.map +0 -1
- package/dist/lib/s3-content-checksum.test.d.ts +0 -2
- package/dist/lib/s3-content-checksum.test.d.ts.map +0 -1
- package/dist/lib/s3-content-checksum.test.js +0 -26
- package/dist/lib/s3-content-checksum.test.js.map +0 -1
- package/dist/lib/skill-register-landed-bytes.test.d.ts +0 -2
- package/dist/lib/skill-register-landed-bytes.test.d.ts.map +0 -1
- package/dist/lib/skill-register-landed-bytes.test.js +0 -83
- package/dist/lib/skill-register-landed-bytes.test.js.map +0 -1
- package/dist/local-path-codec.test.d.ts +0 -14
- package/dist/local-path-codec.test.d.ts.map +0 -1
- package/dist/local-path-codec.test.js +0 -122
- package/dist/local-path-codec.test.js.map +0 -1
- package/dist/machine-auth.test.d.ts +0 -14
- package/dist/machine-auth.test.d.ts.map +0 -1
- package/dist/machine-auth.test.js +0 -1482
- package/dist/machine-auth.test.js.map +0 -1
- package/dist/machine-token-cache-isolation.test.d.ts +0 -24
- package/dist/machine-token-cache-isolation.test.d.ts.map +0 -1
- package/dist/machine-token-cache-isolation.test.js +0 -284
- package/dist/machine-token-cache-isolation.test.js.map +0 -1
- package/dist/manifest/US-002.acceptance.test.d.ts +0 -11
- package/dist/manifest/US-002.acceptance.test.d.ts.map +0 -1
- package/dist/manifest/US-002.acceptance.test.js +0 -160
- package/dist/manifest/US-002.acceptance.test.js.map +0 -1
- package/dist/manifest/US-004.acceptance.test.d.ts +0 -12
- package/dist/manifest/US-004.acceptance.test.d.ts.map +0 -1
- package/dist/manifest/US-004.acceptance.test.js +0 -173
- package/dist/manifest/US-004.acceptance.test.js.map +0 -1
- package/dist/manifest/build-manifest-resident-parity.test.d.ts +0 -2
- package/dist/manifest/build-manifest-resident-parity.test.d.ts.map +0 -1
- package/dist/manifest/build-manifest-resident-parity.test.js +0 -69
- package/dist/manifest/build-manifest-resident-parity.test.js.map +0 -1
- package/dist/manifest/build-manifest.bench.test.d.ts +0 -22
- package/dist/manifest/build-manifest.bench.test.d.ts.map +0 -1
- package/dist/manifest/build-manifest.bench.test.js +0 -930
- package/dist/manifest/build-manifest.bench.test.js.map +0 -1
- package/dist/manifest/build-manifest.test.d.ts +0 -10
- package/dist/manifest/build-manifest.test.d.ts.map +0 -1
- package/dist/manifest/build-manifest.test.js +0 -1217
- package/dist/manifest/build-manifest.test.js.map +0 -1
- package/dist/manifest/contract.test.d.ts +0 -17
- package/dist/manifest/contract.test.d.ts.map +0 -1
- package/dist/manifest/contract.test.js +0 -346
- package/dist/manifest/contract.test.js.map +0 -1
- package/dist/manifest/import-graph.test.d.ts +0 -25
- package/dist/manifest/import-graph.test.d.ts.map +0 -1
- package/dist/manifest/import-graph.test.js +0 -120
- package/dist/manifest/import-graph.test.js.map +0 -1
- package/dist/manifest/ledger-shard-isolation.test.d.ts +0 -18
- package/dist/manifest/ledger-shard-isolation.test.d.ts.map +0 -1
- package/dist/manifest/ledger-shard-isolation.test.js +0 -153
- package/dist/manifest/ledger-shard-isolation.test.js.map +0 -1
- package/dist/manifest/snapshot-store.test.d.ts +0 -11
- package/dist/manifest/snapshot-store.test.d.ts.map +0 -1
- package/dist/manifest/snapshot-store.test.js +0 -206
- package/dist/manifest/snapshot-store.test.js.map +0 -1
- package/dist/manifest/upload-manifest.test.d.ts +0 -10
- package/dist/manifest/upload-manifest.test.d.ts.map +0 -1
- package/dist/manifest/upload-manifest.test.js +0 -1335
- package/dist/manifest/upload-manifest.test.js.map +0 -1
- package/dist/manifest-reconcile.test.d.ts +0 -2
- package/dist/manifest-reconcile.test.d.ts.map +0 -1
- package/dist/manifest-reconcile.test.js +0 -1029
- package/dist/manifest-reconcile.test.js.map +0 -1
- package/dist/object-io.test.d.ts +0 -11
- package/dist/object-io.test.d.ts.map +0 -1
- package/dist/object-io.test.js +0 -2376
- package/dist/object-io.test.js.map +0 -1
- package/dist/operation-lock.test.d.ts +0 -5
- package/dist/operation-lock.test.d.ts.map +0 -1
- package/dist/operation-lock.test.js +0 -796
- package/dist/operation-lock.test.js.map +0 -1
- package/dist/outcome-telemetry.test.d.ts +0 -9
- package/dist/outcome-telemetry.test.d.ts.map +0 -1
- package/dist/outcome-telemetry.test.js +0 -663
- package/dist/outcome-telemetry.test.js.map +0 -1
- package/dist/outposts/client.test.d.ts +0 -9
- package/dist/outposts/client.test.d.ts.map +0 -1
- package/dist/outposts/client.test.js +0 -415
- package/dist/outposts/client.test.js.map +0 -1
- package/dist/outposts/command.test.d.ts +0 -18
- package/dist/outposts/command.test.d.ts.map +0 -1
- package/dist/outposts/command.test.js +0 -1230
- package/dist/outposts/command.test.js.map +0 -1
- package/dist/outposts/replica-sync.test.d.ts +0 -2
- package/dist/outposts/replica-sync.test.d.ts.map +0 -1
- package/dist/outposts/replica-sync.test.js +0 -224
- package/dist/outposts/replica-sync.test.js.map +0 -1
- package/dist/outposts/self-deploy.test.d.ts +0 -2
- package/dist/outposts/self-deploy.test.d.ts.map +0 -1
- package/dist/outposts/self-deploy.test.js +0 -218
- package/dist/outposts/self-deploy.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-bounds.test.d.ts +0 -25
- package/dist/outposts/session-heartbeat-bounds.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-bounds.test.js +0 -156
- package/dist/outposts/session-heartbeat-bounds.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-guard.test.d.ts +0 -16
- package/dist/outposts/session-heartbeat-guard.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-guard.test.js +0 -88
- package/dist/outposts/session-heartbeat-guard.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-publisher.test.d.ts +0 -10
- package/dist/outposts/session-heartbeat-publisher.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-publisher.test.js +0 -153
- package/dist/outposts/session-heartbeat-publisher.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-retain-guard.test.d.ts +0 -18
- package/dist/outposts/session-heartbeat-retain-guard.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-retain-guard.test.js +0 -106
- package/dist/outposts/session-heartbeat-retain-guard.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-scan.test.d.ts +0 -20
- package/dist/outposts/session-heartbeat-scan.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-scan.test.js +0 -241
- package/dist/outposts/session-heartbeat-scan.test.js.map +0 -1
- package/dist/outposts/session-heartbeat.test.d.ts +0 -11
- package/dist/outposts/session-heartbeat.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat.test.js +0 -370
- package/dist/outposts/session-heartbeat.test.js.map +0 -1
- package/dist/outposts/session-host-auth.test.d.ts +0 -16
- package/dist/outposts/session-host-auth.test.d.ts.map +0 -1
- package/dist/outposts/session-host-auth.test.js +0 -284
- package/dist/outposts/session-host-auth.test.js.map +0 -1
- package/dist/outposts/session-host-command.test.d.ts +0 -10
- package/dist/outposts/session-host-command.test.d.ts.map +0 -1
- package/dist/outposts/session-host-command.test.js +0 -180
- package/dist/outposts/session-host-command.test.js.map +0 -1
- package/dist/outposts/session-host-connection.test.d.ts +0 -18
- package/dist/outposts/session-host-connection.test.d.ts.map +0 -1
- package/dist/outposts/session-host-connection.test.js +0 -392
- package/dist/outposts/session-host-connection.test.js.map +0 -1
- package/dist/outposts/session-host-fakes.d.ts +0 -61
- package/dist/outposts/session-host-fakes.d.ts.map +0 -1
- package/dist/outposts/session-host-fakes.js +0 -115
- package/dist/outposts/session-host-fakes.js.map +0 -1
- package/dist/outposts/session-host-ndjson.test.d.ts +0 -11
- package/dist/outposts/session-host-ndjson.test.d.ts.map +0 -1
- package/dist/outposts/session-host-ndjson.test.js +0 -73
- package/dist/outposts/session-host-ndjson.test.js.map +0 -1
- package/dist/outposts/session-host-protocol.test.d.ts +0 -15
- package/dist/outposts/session-host-protocol.test.d.ts.map +0 -1
- package/dist/outposts/session-host-protocol.test.js +0 -0
- package/dist/outposts/session-host-protocol.test.js.map +0 -1
- package/dist/outposts/session-host-server.test.d.ts +0 -10
- package/dist/outposts/session-host-server.test.d.ts.map +0 -1
- package/dist/outposts/session-host-server.test.js +0 -118
- package/dist/outposts/session-host-server.test.js.map +0 -1
- package/dist/outposts/session-host-sessions.test.d.ts +0 -18
- package/dist/outposts/session-host-sessions.test.d.ts.map +0 -1
- package/dist/outposts/session-host-sessions.test.js +0 -439
- package/dist/outposts/session-host-sessions.test.js.map +0 -1
- package/dist/outposts/terminal.test.d.ts +0 -2
- package/dist/outposts/terminal.test.d.ts.map +0 -1
- package/dist/outposts/terminal.test.js +0 -146
- package/dist/outposts/terminal.test.js.map +0 -1
- package/dist/outposts/transport.test.d.ts +0 -10
- package/dist/outposts/transport.test.d.ts.map +0 -1
- package/dist/outposts/transport.test.js +0 -205
- package/dist/outposts/transport.test.js.map +0 -1
- package/dist/packed-journal-phase2.test.d.ts +0 -2
- package/dist/packed-journal-phase2.test.d.ts.map +0 -1
- package/dist/packed-journal-phase2.test.js +0 -273
- package/dist/packed-journal-phase2.test.js.map +0 -1
- package/dist/path-ancestors.test.d.ts +0 -2
- package/dist/path-ancestors.test.d.ts.map +0 -1
- package/dist/path-ancestors.test.js +0 -21
- package/dist/path-ancestors.test.js.map +0 -1
- package/dist/personal-vault-exclusions.test.d.ts +0 -22
- package/dist/personal-vault-exclusions.test.d.ts.map +0 -1
- package/dist/personal-vault-exclusions.test.js +0 -294
- package/dist/personal-vault-exclusions.test.js.map +0 -1
- package/dist/personal-vault.test.d.ts +0 -18
- package/dist/personal-vault.test.d.ts.map +0 -1
- package/dist/personal-vault.test.js +0 -1099
- package/dist/personal-vault.test.js.map +0 -1
- package/dist/plan-limit-pause.test.d.ts +0 -2
- package/dist/plan-limit-pause.test.d.ts.map +0 -1
- package/dist/plan-limit-pause.test.js +0 -150
- package/dist/plan-limit-pause.test.js.map +0 -1
- package/dist/plan-limit.fixtures.d.ts +0 -34
- package/dist/plan-limit.fixtures.d.ts.map +0 -1
- package/dist/plan-limit.fixtures.js +0 -96
- package/dist/plan-limit.fixtures.js.map +0 -1
- package/dist/plan-limit.test.d.ts +0 -2
- package/dist/plan-limit.test.d.ts.map +0 -1
- package/dist/plan-limit.test.js +0 -132
- package/dist/plan-limit.test.js.map +0 -1
- package/dist/prefix-coalesce.test.d.ts +0 -2
- package/dist/prefix-coalesce.test.d.ts.map +0 -1
- package/dist/prefix-coalesce.test.js +0 -260
- package/dist/prefix-coalesce.test.js.map +0 -1
- package/dist/private-folder-transport.test.d.ts +0 -2
- package/dist/private-folder-transport.test.d.ts.map +0 -1
- package/dist/private-folder-transport.test.js +0 -33
- package/dist/private-folder-transport.test.js.map +0 -1
- package/dist/public-surface.test.d.ts +0 -15
- package/dist/public-surface.test.d.ts.map +0 -1
- package/dist/public-surface.test.js +0 -110
- package/dist/public-surface.test.js.map +0 -1
- package/dist/qmd-reindex.test.d.ts +0 -14
- package/dist/qmd-reindex.test.d.ts.map +0 -1
- package/dist/qmd-reindex.test.js +0 -899
- package/dist/qmd-reindex.test.js.map +0 -1
- package/dist/read-only-state-dir.test.d.ts +0 -27
- package/dist/read-only-state-dir.test.d.ts.map +0 -1
- package/dist/read-only-state-dir.test.js +0 -167
- package/dist/read-only-state-dir.test.js.map +0 -1
- package/dist/remote-pull.test.d.ts +0 -2
- package/dist/remote-pull.test.d.ts.map +0 -1
- package/dist/remote-pull.test.js +0 -1147
- package/dist/remote-pull.test.js.map +0 -1
- package/dist/s3-download-stream-hash.test.d.ts +0 -2
- package/dist/s3-download-stream-hash.test.d.ts.map +0 -1
- package/dist/s3-download-stream-hash.test.js +0 -70
- package/dist/s3-download-stream-hash.test.js.map +0 -1
- package/dist/s3.list-cost.test.d.ts +0 -2
- package/dist/s3.list-cost.test.d.ts.map +0 -1
- package/dist/s3.list-cost.test.js +0 -51
- package/dist/s3.list-cost.test.js.map +0 -1
- package/dist/s3.rename-retry.test.d.ts +0 -2
- package/dist/s3.rename-retry.test.d.ts.map +0 -1
- package/dist/s3.rename-retry.test.js +0 -217
- package/dist/s3.rename-retry.test.js.map +0 -1
- package/dist/s3.symlink-materialize.test.d.ts +0 -18
- package/dist/s3.symlink-materialize.test.d.ts.map +0 -1
- package/dist/s3.symlink-materialize.test.js +0 -579
- package/dist/s3.symlink-materialize.test.js.map +0 -1
- package/dist/s3.test.d.ts +0 -9
- package/dist/s3.test.d.ts.map +0 -1
- package/dist/s3.test.js +0 -2047
- package/dist/s3.test.js.map +0 -1
- package/dist/s3.windows-portability.test.d.ts +0 -12
- package/dist/s3.windows-portability.test.d.ts.map +0 -1
- package/dist/s3.windows-portability.test.js +0 -223
- package/dist/s3.windows-portability.test.js.map +0 -1
- package/dist/schemas/signal-types.test.d.ts +0 -2
- package/dist/schemas/signal-types.test.d.ts.map +0 -1
- package/dist/schemas/signal-types.test.js +0 -65
- package/dist/schemas/signal-types.test.js.map +0 -1
- package/dist/schemas/source-channels.test.d.ts +0 -2
- package/dist/schemas/source-channels.test.d.ts.map +0 -1
- package/dist/schemas/source-channels.test.js +0 -65
- package/dist/schemas/source-channels.test.js.map +0 -1
- package/dist/scope-shrink.test.d.ts +0 -13
- package/dist/scope-shrink.test.d.ts.map +0 -1
- package/dist/scope-shrink.test.js +0 -558
- package/dist/scope-shrink.test.js.map +0 -1
- package/dist/session-log-capture.test.d.ts +0 -2
- package/dist/session-log-capture.test.d.ts.map +0 -1
- package/dist/session-log-capture.test.js +0 -533
- package/dist/session-log-capture.test.js.map +0 -1
- package/dist/session-log-retention.test.d.ts +0 -2
- package/dist/session-log-retention.test.d.ts.map +0 -1
- package/dist/session-log-retention.test.js +0 -383
- package/dist/session-log-retention.test.js.map +0 -1
- package/dist/signals/get.test.d.ts +0 -5
- package/dist/signals/get.test.d.ts.map +0 -1
- package/dist/signals/get.test.js +0 -254
- package/dist/signals/get.test.js.map +0 -1
- package/dist/signals/list.test.d.ts +0 -9
- package/dist/signals/list.test.d.ts.map +0 -1
- package/dist/signals/list.test.js +0 -330
- package/dist/signals/list.test.js.map +0 -1
- package/dist/skill-telemetry.test.d.ts +0 -2
- package/dist/skill-telemetry.test.d.ts.map +0 -1
- package/dist/skill-telemetry.test.js +0 -1484
- package/dist/skill-telemetry.test.js.map +0 -1
- package/dist/sources/get.test.d.ts +0 -5
- package/dist/sources/get.test.d.ts.map +0 -1
- package/dist/sources/get.test.js +0 -236
- package/dist/sources/get.test.js.map +0 -1
- package/dist/sources/list.test.d.ts +0 -8
- package/dist/sources/list.test.d.ts.map +0 -1
- package/dist/sources/list.test.js +0 -318
- package/dist/sources/list.test.js.map +0 -1
- package/dist/sts-credential-refresh.test.d.ts +0 -2
- package/dist/sts-credential-refresh.test.d.ts.map +0 -1
- package/dist/sts-credential-refresh.test.js +0 -181
- package/dist/sts-credential-refresh.test.js.map +0 -1
- package/dist/swallowed-error-sites.test.d.ts +0 -2
- package/dist/swallowed-error-sites.test.d.ts.map +0 -1
- package/dist/swallowed-error-sites.test.js +0 -199
- package/dist/swallowed-error-sites.test.js.map +0 -1
- package/dist/swallowed-error-w32.test.d.ts +0 -2
- package/dist/swallowed-error-w32.test.d.ts.map +0 -1
- package/dist/swallowed-error-w32.test.js +0 -171
- package/dist/swallowed-error-w32.test.js.map +0 -1
- package/dist/swallowed-error-w33.test.d.ts +0 -2
- package/dist/swallowed-error-w33.test.d.ts.map +0 -1
- package/dist/swallowed-error-w33.test.js +0 -125
- package/dist/swallowed-error-w33.test.js.map +0 -1
- package/dist/swallowed-error-w34.test.d.ts +0 -2
- package/dist/swallowed-error-w34.test.d.ts.map +0 -1
- package/dist/swallowed-error-w34.test.js +0 -110
- package/dist/swallowed-error-w34.test.js.map +0 -1
- package/dist/swallowed-error-w35.test.d.ts +0 -2
- package/dist/swallowed-error-w35.test.d.ts.map +0 -1
- package/dist/swallowed-error-w35.test.js +0 -223
- package/dist/swallowed-error-w35.test.js.map +0 -1
- package/dist/sync/area-ledger-auto-migration.test.d.ts +0 -2
- package/dist/sync/area-ledger-auto-migration.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-auto-migration.test.js +0 -291
- package/dist/sync/area-ledger-auto-migration.test.js.map +0 -1
- package/dist/sync/area-ledger-migration.test.d.ts +0 -2
- package/dist/sync/area-ledger-migration.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-migration.test.js +0 -554
- package/dist/sync/area-ledger-migration.test.js.map +0 -1
- package/dist/sync/area-ledger-recovery.bench.test.d.ts +0 -2
- package/dist/sync/area-ledger-recovery.bench.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-recovery.bench.test.js +0 -60
- package/dist/sync/area-ledger-recovery.bench.test.js.map +0 -1
- package/dist/sync/area-ledger-writer-lock.bench.test.d.ts +0 -2
- package/dist/sync/area-ledger-writer-lock.bench.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-writer-lock.bench.test.js +0 -57
- package/dist/sync/area-ledger-writer-lock.bench.test.js.map +0 -1
- package/dist/sync/area-ledger.test.d.ts +0 -2
- package/dist/sync/area-ledger.test.d.ts.map +0 -1
- package/dist/sync/area-ledger.test.js +0 -1401
- package/dist/sync/area-ledger.test.js.map +0 -1
- package/dist/sync/area-resolver.test.d.ts +0 -2
- package/dist/sync/area-resolver.test.d.ts.map +0 -1
- package/dist/sync/area-resolver.test.js +0 -234
- package/dist/sync/area-resolver.test.js.map +0 -1
- package/dist/sync/base-version-resolver.test.d.ts +0 -2
- package/dist/sync/base-version-resolver.test.d.ts.map +0 -1
- package/dist/sync/base-version-resolver.test.js +0 -24
- package/dist/sync/base-version-resolver.test.js.map +0 -1
- package/dist/sync/candidate-uploader.test.d.ts +0 -2
- package/dist/sync/candidate-uploader.test.d.ts.map +0 -1
- package/dist/sync/candidate-uploader.test.js +0 -132
- package/dist/sync/candidate-uploader.test.js.map +0 -1
- package/dist/sync/child-process-sync-worker-env.test.d.ts +0 -2
- package/dist/sync/child-process-sync-worker-env.test.d.ts.map +0 -1
- package/dist/sync/child-process-sync-worker-env.test.js +0 -38
- package/dist/sync/child-process-sync-worker-env.test.js.map +0 -1
- package/dist/sync/child-process-sync-worker-errors.test.d.ts +0 -2
- package/dist/sync/child-process-sync-worker-errors.test.d.ts.map +0 -1
- package/dist/sync/child-process-sync-worker-errors.test.js +0 -121
- package/dist/sync/child-process-sync-worker-errors.test.js.map +0 -1
- package/dist/sync/child-process-sync-worker.test.d.ts +0 -2
- package/dist/sync/child-process-sync-worker.test.d.ts.map +0 -1
- package/dist/sync/child-process-sync-worker.test.js +0 -262
- package/dist/sync/child-process-sync-worker.test.js.map +0 -1
- package/dist/sync/content-hash.test.d.ts +0 -2
- package/dist/sync/content-hash.test.d.ts.map +0 -1
- package/dist/sync/content-hash.test.js +0 -16
- package/dist/sync/content-hash.test.js.map +0 -1
- package/dist/sync/delta-client.test.d.ts +0 -2
- package/dist/sync/delta-client.test.d.ts.map +0 -1
- package/dist/sync/delta-client.test.js +0 -97
- package/dist/sync/delta-client.test.js.map +0 -1
- package/dist/sync/durable-apply.test.d.ts +0 -2
- package/dist/sync/durable-apply.test.d.ts.map +0 -1
- package/dist/sync/durable-apply.test.js +0 -180
- package/dist/sync/durable-apply.test.js.map +0 -1
- package/dist/sync/event-sync.test.d.ts +0 -14
- package/dist/sync/event-sync.test.d.ts.map +0 -1
- package/dist/sync/event-sync.test.js +0 -1714
- package/dist/sync/event-sync.test.js.map +0 -1
- package/dist/sync/feature-flags.test.d.ts +0 -24
- package/dist/sync/feature-flags.test.d.ts.map +0 -1
- package/dist/sync/feature-flags.test.js +0 -594
- package/dist/sync/feature-flags.test.js.map +0 -1
- package/dist/sync/full-pass-cap-governor.bench.test.d.ts +0 -2
- package/dist/sync/full-pass-cap-governor.bench.test.d.ts.map +0 -1
- package/dist/sync/full-pass-cap-governor.bench.test.js +0 -179
- package/dist/sync/full-pass-cap-governor.bench.test.js.map +0 -1
- package/dist/sync/full-pass-caps.test.d.ts +0 -2
- package/dist/sync/full-pass-caps.test.d.ts.map +0 -1
- package/dist/sync/full-pass-caps.test.js +0 -550
- package/dist/sync/full-pass-caps.test.js.map +0 -1
- package/dist/sync/idle-full-reconcile.test.d.ts +0 -2
- package/dist/sync/idle-full-reconcile.test.d.ts.map +0 -1
- package/dist/sync/idle-full-reconcile.test.js +0 -62
- package/dist/sync/idle-full-reconcile.test.js.map +0 -1
- package/dist/sync/inbound-event-admission.test.d.ts +0 -2
- package/dist/sync/inbound-event-admission.test.d.ts.map +0 -1
- package/dist/sync/inbound-event-admission.test.js +0 -125
- package/dist/sync/inbound-event-admission.test.js.map +0 -1
- package/dist/sync/journal-ledger-stream.test.d.ts +0 -12
- package/dist/sync/journal-ledger-stream.test.d.ts.map +0 -1
- package/dist/sync/journal-ledger-stream.test.js +0 -134
- package/dist/sync/journal-ledger-stream.test.js.map +0 -1
- package/dist/sync/lease-client.test.d.ts +0 -2
- package/dist/sync/lease-client.test.d.ts.map +0 -1
- package/dist/sync/lease-client.test.js +0 -119
- package/dist/sync/lease-client.test.js.map +0 -1
- package/dist/sync/logger.test.d.ts +0 -19
- package/dist/sync/logger.test.d.ts.map +0 -1
- package/dist/sync/logger.test.js +0 -204
- package/dist/sync/logger.test.js.map +0 -1
- package/dist/sync/metrics.test.d.ts +0 -19
- package/dist/sync/metrics.test.d.ts.map +0 -1
- package/dist/sync/metrics.test.js +0 -357
- package/dist/sync/metrics.test.js.map +0 -1
- package/dist/sync/multipart-uploader.test.d.ts +0 -2
- package/dist/sync/multipart-uploader.test.d.ts.map +0 -1
- package/dist/sync/multipart-uploader.test.js +0 -135
- package/dist/sync/multipart-uploader.test.js.map +0 -1
- package/dist/sync/mutation-client.test.d.ts +0 -2
- package/dist/sync/mutation-client.test.d.ts.map +0 -1
- package/dist/sync/mutation-client.test.js +0 -100
- package/dist/sync/mutation-client.test.js.map +0 -1
- package/dist/sync/mutation-session.test.d.ts +0 -2
- package/dist/sync/mutation-session.test.d.ts.map +0 -1
- package/dist/sync/mutation-session.test.js +0 -190
- package/dist/sync/mutation-session.test.js.map +0 -1
- package/dist/sync/parallel-sync-coordinator.test.d.ts +0 -2
- package/dist/sync/parallel-sync-coordinator.test.d.ts.map +0 -1
- package/dist/sync/parallel-sync-coordinator.test.js +0 -564
- package/dist/sync/parallel-sync-coordinator.test.js.map +0 -1
- package/dist/sync/path-leases.test.d.ts +0 -2
- package/dist/sync/path-leases.test.d.ts.map +0 -1
- package/dist/sync/path-leases.test.js +0 -51
- package/dist/sync/path-leases.test.js.map +0 -1
- package/dist/sync/per-area-maintenance.test.d.ts +0 -2
- package/dist/sync/per-area-maintenance.test.d.ts.map +0 -1
- package/dist/sync/per-area-maintenance.test.js +0 -100
- package/dist/sync/per-area-maintenance.test.js.map +0 -1
- package/dist/sync/push-event.test.d.ts +0 -15
- package/dist/sync/push-event.test.d.ts.map +0 -1
- package/dist/sync/push-event.test.js +0 -282
- package/dist/sync/push-event.test.js.map +0 -1
- package/dist/sync/push-receiver.test.d.ts +0 -25
- package/dist/sync/push-receiver.test.d.ts.map +0 -1
- package/dist/sync/push-receiver.test.js +0 -2851
- package/dist/sync/push-receiver.test.js.map +0 -1
- package/dist/sync/push-transport.test.d.ts +0 -2
- package/dist/sync/push-transport.test.d.ts.map +0 -1
- package/dist/sync/push-transport.test.js +0 -70
- package/dist/sync/push-transport.test.js.map +0 -1
- package/dist/sync/push-walk-matchers.bench.test.d.ts +0 -2
- package/dist/sync/push-walk-matchers.bench.test.d.ts.map +0 -1
- package/dist/sync/push-walk-matchers.bench.test.js +0 -230
- package/dist/sync/push-walk-matchers.bench.test.js.map +0 -1
- package/dist/sync/realtime-network-integration.test.d.ts +0 -2
- package/dist/sync/realtime-network-integration.test.d.ts.map +0 -1
- package/dist/sync/realtime-network-integration.test.js +0 -83
- package/dist/sync/realtime-network-integration.test.js.map +0 -1
- package/dist/sync/realtime-rollout.test.d.ts +0 -2
- package/dist/sync/realtime-rollout.test.d.ts.map +0 -1
- package/dist/sync/realtime-rollout.test.js +0 -94
- package/dist/sync/realtime-rollout.test.js.map +0 -1
- package/dist/sync/realtime-telemetry.test.d.ts +0 -2
- package/dist/sync/realtime-telemetry.test.d.ts.map +0 -1
- package/dist/sync/realtime-telemetry.test.js +0 -300
- package/dist/sync/realtime-telemetry.test.js.map +0 -1
- package/dist/sync/receiver-origin-config.test.d.ts +0 -2
- package/dist/sync/receiver-origin-config.test.d.ts.map +0 -1
- package/dist/sync/receiver-origin-config.test.js +0 -39
- package/dist/sync/receiver-origin-config.test.js.map +0 -1
- package/dist/sync/reconcile-cursor.test.d.ts +0 -2
- package/dist/sync/reconcile-cursor.test.d.ts.map +0 -1
- package/dist/sync/reconcile-cursor.test.js +0 -139
- package/dist/sync/reconcile-cursor.test.js.map +0 -1
- package/dist/sync/remote-file-spool.test.d.ts +0 -2
- package/dist/sync/remote-file-spool.test.d.ts.map +0 -1
- package/dist/sync/remote-file-spool.test.js +0 -77
- package/dist/sync/remote-file-spool.test.js.map +0 -1
- package/dist/sync/scope-inventory-client.test.d.ts +0 -2
- package/dist/sync/scope-inventory-client.test.d.ts.map +0 -1
- package/dist/sync/scope-inventory-client.test.js +0 -103
- package/dist/sync/scope-inventory-client.test.js.map +0 -1
- package/dist/sync/secret-path-policy.test.d.ts +0 -2
- package/dist/sync/secret-path-policy.test.d.ts.map +0 -1
- package/dist/sync/secret-path-policy.test.js +0 -183
- package/dist/sync/secret-path-policy.test.js.map +0 -1
- package/dist/sync/snapshot-client.test.d.ts +0 -2
- package/dist/sync/snapshot-client.test.d.ts.map +0 -1
- package/dist/sync/snapshot-client.test.js +0 -169
- package/dist/sync/snapshot-client.test.js.map +0 -1
- package/dist/sync/state-store.test.d.ts +0 -2
- package/dist/sync/state-store.test.d.ts.map +0 -1
- package/dist/sync/state-store.test.js +0 -1556
- package/dist/sync/state-store.test.js.map +0 -1
- package/dist/sync/sync-contract.test.d.ts +0 -2
- package/dist/sync/sync-contract.test.d.ts.map +0 -1
- package/dist/sync/sync-contract.test.js +0 -141
- package/dist/sync/sync-contract.test.js.map +0 -1
- package/dist/sync/targeted-pull-prefixes.test.d.ts +0 -2
- package/dist/sync/targeted-pull-prefixes.test.d.ts.map +0 -1
- package/dist/sync/targeted-pull-prefixes.test.js +0 -33
- package/dist/sync/targeted-pull-prefixes.test.js.map +0 -1
- package/dist/sync/targeted-upsert-exact-list.test.d.ts +0 -2
- package/dist/sync/targeted-upsert-exact-list.test.d.ts.map +0 -1
- package/dist/sync/targeted-upsert-exact-list.test.js +0 -247
- package/dist/sync/targeted-upsert-exact-list.test.js.map +0 -1
- package/dist/sync/unchanged-push-events.test.d.ts +0 -2
- package/dist/sync/unchanged-push-events.test.d.ts.map +0 -1
- package/dist/sync/unchanged-push-events.test.js +0 -76
- package/dist/sync/unchanged-push-events.test.js.map +0 -1
- package/dist/sync/uploader-finalization.test.d.ts +0 -2
- package/dist/sync/uploader-finalization.test.d.ts.map +0 -1
- package/dist/sync/uploader-finalization.test.js +0 -107
- package/dist/sync/uploader-finalization.test.js.map +0 -1
- package/dist/sync-core.test.d.ts +0 -2
- package/dist/sync-core.test.d.ts.map +0 -1
- package/dist/sync-core.test.js +0 -189
- package/dist/sync-core.test.js.map +0 -1
- package/dist/sync-progress.test.d.ts +0 -2
- package/dist/sync-progress.test.d.ts.map +0 -1
- package/dist/sync-progress.test.js +0 -277
- package/dist/sync-progress.test.js.map +0 -1
- package/dist/telemetry-events.test.d.ts +0 -2
- package/dist/telemetry-events.test.d.ts.map +0 -1
- package/dist/telemetry-events.test.js +0 -113
- package/dist/telemetry-events.test.js.map +0 -1
- package/dist/telemetry.test.d.ts +0 -11
- package/dist/telemetry.test.d.ts.map +0 -1
- package/dist/telemetry.test.js +0 -1603
- package/dist/telemetry.test.js.map +0 -1
- package/dist/vault-client.test.d.ts +0 -7
- package/dist/vault-client.test.d.ts.map +0 -1
- package/dist/vault-client.test.js +0 -1334
- package/dist/vault-client.test.js.map +0 -1
- package/dist/watch-coverage.test.d.ts +0 -2
- package/dist/watch-coverage.test.d.ts.map +0 -1
- package/dist/watch-coverage.test.js +0 -56
- package/dist/watch-coverage.test.js.map +0 -1
- package/dist/watch-owner-lease.test.d.ts +0 -2
- package/dist/watch-owner-lease.test.d.ts.map +0 -1
- package/dist/watch-owner-lease.test.js +0 -353
- package/dist/watch-owner-lease.test.js.map +0 -1
- package/dist/watch-parent.test.d.ts +0 -2
- package/dist/watch-parent.test.d.ts.map +0 -1
- package/dist/watch-parent.test.js +0 -131
- package/dist/watch-parent.test.js.map +0 -1
- package/dist/watch-roots.test.d.ts +0 -18
- package/dist/watch-roots.test.d.ts.map +0 -1
- package/dist/watch-roots.test.js +0 -395
- package/dist/watch-roots.test.js.map +0 -1
- package/dist/watcher-continuity-hot-path.test.d.ts +0 -2
- package/dist/watcher-continuity-hot-path.test.d.ts.map +0 -1
- package/dist/watcher-continuity-hot-path.test.js +0 -40
- package/dist/watcher-continuity-hot-path.test.js.map +0 -1
- package/dist/watcher-event-gate.test.d.ts +0 -16
- package/dist/watcher-event-gate.test.d.ts.map +0 -1
- package/dist/watcher-event-gate.test.js +0 -191
- package/dist/watcher-event-gate.test.js.map +0 -1
- package/dist/watcher-replan-sweep.test.d.ts +0 -2
- package/dist/watcher-replan-sweep.test.d.ts.map +0 -1
- package/dist/watcher-replan-sweep.test.js +0 -245
- package/dist/watcher-replan-sweep.test.js.map +0 -1
- package/dist/watcher-stdout.test.d.ts +0 -2
- package/dist/watcher-stdout.test.d.ts.map +0 -1
- package/dist/watcher-stdout.test.js +0 -86
- package/dist/watcher-stdout.test.js.map +0 -1
- package/dist/watcher.test.d.ts +0 -2
- package/dist/watcher.test.d.ts.map +0 -1
- package/dist/watcher.test.js +0 -4301
- package/dist/watcher.test.js.map +0 -1
- package/dist/watcher.warmup-cancel.test.d.ts +0 -2
- package/dist/watcher.warmup-cancel.test.d.ts.map +0 -1
- package/dist/watcher.warmup-cancel.test.js +0 -59
- package/dist/watcher.warmup-cancel.test.js.map +0 -1
- package/dist/watcher.warmup-responsive.test.d.ts +0 -2
- package/dist/watcher.warmup-responsive.test.d.ts.map +0 -1
- package/dist/watcher.warmup-responsive.test.js +0 -62
- package/dist/watcher.warmup-responsive.test.js.map +0 -1
|
@@ -1,1099 +0,0 @@
|
|
|
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. That is neither "missing" nor "present": the row must be
|
|
908
|
-
// left alone rather than classified as a present ignored file and purged.
|
|
909
|
-
fs.mkdirSync(path.join(hqRoot, ".claude", "worktrees"), { recursive: true });
|
|
910
|
-
fs.writeFileSync(path.join(hqRoot, ".claude", "worktrees", "blob"), "x");
|
|
911
|
-
const journal = journalWith([".claude/worktrees/blob/inner.ts"]);
|
|
912
|
-
const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
913
|
-
expect(removed).toEqual([]);
|
|
914
|
-
expect(journal.files[".claude/worktrees/blob/inner.ts"]).toBeDefined();
|
|
915
|
-
});
|
|
916
|
-
it("circuit breaker: present ignored rows are exempt, so a 90% ignore-filtered-present drain proceeds", () => {
|
|
917
|
-
// The breaker exists for the 2026-08-18 class of fault: a transient
|
|
918
|
-
// enumeration/stat failure reclassifying MISSING rows. Whether a PRESENT
|
|
919
|
-
// file is ignored is a deterministic function of the ignore configuration
|
|
920
|
-
// (and a failed `.hqignore` read yields FEWER ignores, never more), so those
|
|
921
|
-
// rows must not be counted against the fraction — otherwise the exact
|
|
922
|
-
// situation this drain exists for (hundreds of thousands of rows under a
|
|
923
|
-
// later ignore rule) is vetoed forever.
|
|
924
|
-
const dir = path.join(hqRoot, ".claude", "worktrees", "wt");
|
|
925
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
926
|
-
const ignoredPresent = Array.from({ length: 1100 }, (_i, n) => {
|
|
927
|
-
fs.writeFileSync(path.join(dir, `f${n}.ts`), "x");
|
|
928
|
-
return `.claude/worktrees/wt/f${n}.ts`;
|
|
929
|
-
});
|
|
930
|
-
const kept = Array.from({ length: 100 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
|
|
931
|
-
const journal = journalWith([...ignoredPresent, ...kept]);
|
|
932
|
-
const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
933
|
-
expect(purge.guardTripped).toBeUndefined();
|
|
934
|
-
expect(purge.removed).toHaveLength(1100);
|
|
935
|
-
expect(purge.byReason["ignore-filtered-present"]).toBe(1100);
|
|
936
|
-
expect(Object.keys(journal.files)).toHaveLength(100);
|
|
937
|
-
});
|
|
938
|
-
it("circuit breaker: a vetoed pass still drops nothing, including present ignored rows", () => {
|
|
939
|
-
// When the missing-row fraction trips the breaker the pass is treated as
|
|
940
|
-
// untrustworthy wholesale — the present-ignored drain waits for the next
|
|
941
|
-
// healthy pass too, and `attempted` reports only the vetoed missing rows.
|
|
942
|
-
const dir = path.join(hqRoot, ".claude", "worktrees", "wt");
|
|
943
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
944
|
-
const ignoredPresent = Array.from({ length: 50 }, (_i, n) => {
|
|
945
|
-
fs.writeFileSync(path.join(dir, `f${n}.ts`), "x");
|
|
946
|
-
return `.claude/worktrees/wt/f${n}.ts`;
|
|
947
|
-
});
|
|
948
|
-
const excludedMissing = Array.from({ length: 1000 }, (_i, n) => `workspace/scratch/f${n}.txt`);
|
|
949
|
-
const kept = Array.from({ length: 200 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
|
|
950
|
-
const journal = journalWith([...ignoredPresent, ...excludedMissing, ...kept]);
|
|
951
|
-
const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
952
|
-
expect(purge.removed).toEqual([]);
|
|
953
|
-
expect(purge.guardTripped).toEqual({ attempted: 1000, totalRows: 1250 });
|
|
954
|
-
expect(Object.keys(journal.files)).toHaveLength(1250);
|
|
955
|
-
});
|
|
956
|
-
it("drains present ignored rows in bounded batches per pass (missing rows are unaffected)", () => {
|
|
957
|
-
// Because present ignored rows bypass the fraction breaker, an accidental
|
|
958
|
-
// blanket ignore rule must not be able to empty the journal in a single
|
|
959
|
-
// pass. The drain is capped per pass so the pruned event surfaces the
|
|
960
|
-
// scope shrink while most rows are still recoverable by fixing the rule.
|
|
961
|
-
const dir = path.join(hqRoot, ".claude", "worktrees", "wt");
|
|
962
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
963
|
-
const ignoredPresent = Array.from({ length: 5 }, (_i, n) => {
|
|
964
|
-
fs.writeFileSync(path.join(dir, `f${n}.ts`), "x");
|
|
965
|
-
return `.claude/worktrees/wt/f${n}.ts`;
|
|
966
|
-
});
|
|
967
|
-
const journal = journalWith([
|
|
968
|
-
...ignoredPresent,
|
|
969
|
-
".claude/worktrees/gone/a.ts", // missing + ignored — not subject to the cap
|
|
970
|
-
".claude/worktrees/gone/b.ts",
|
|
971
|
-
"personal/keep.md",
|
|
972
|
-
]);
|
|
973
|
-
const first = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter, { ignoredPresentBatch: 3 });
|
|
974
|
-
expect(first.guardTripped).toBeUndefined();
|
|
975
|
-
expect(first.byReason["ignore-filtered"]).toBe(2);
|
|
976
|
-
expect(first.byReason["ignore-filtered-present"]).toBe(3);
|
|
977
|
-
expect(first.removed).toHaveLength(5);
|
|
978
|
-
expect(Object.keys(journal.files)).toHaveLength(3); // 2 present ignored + keep
|
|
979
|
-
const second = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter, { ignoredPresentBatch: 3 });
|
|
980
|
-
expect(second.byReason["ignore-filtered-present"]).toBe(2);
|
|
981
|
-
expect(Object.keys(journal.files)).toEqual(["personal/keep.md"]);
|
|
982
|
-
});
|
|
983
|
-
it("exposes a default present-ignored batch large enough to drain a 500k-row backlog in a few passes", () => {
|
|
984
|
-
// ~460k stale rows at 25k/pass drains in ~19 passes (well under an hour at
|
|
985
|
-
// the watcher's cadence) while an accidental blanket rule still needs many
|
|
986
|
-
// passes to do real damage.
|
|
987
|
-
expect(PURGE_IGNORED_PRESENT_BATCH).toBe(25_000);
|
|
988
|
-
});
|
|
989
|
-
// Regression: the 2026-08-18 personal-vault journal wipe. A transient
|
|
990
|
-
// fs.statSync failure on the carve-out dirs (EMFILE under a large 64-way
|
|
991
|
-
// pass, or an FS hiccup during a network storm) made computeAgencySyncPaths /
|
|
992
|
-
// computeSessionLogsSyncPaths fail-soft to [], so `isSyncedWorkspaceCarveKey`
|
|
993
|
-
// no longer recognized their rows and the purge reclassified ~400k
|
|
994
|
-
// workspace/.session-logs + workspace/agency entries as excluded-top-level
|
|
995
|
-
// and dropped them — wiping the journal and stalling sync until a manual
|
|
996
|
-
// restart. Whether a workspace/ KEY belongs to a carve-out is a static fact
|
|
997
|
-
// of its path, so it must survive the carve-out dir being momentarily
|
|
998
|
-
// unstattable. We simulate that by removing the dirs while their rows remain.
|
|
999
|
-
it("keeps workspace carve-out rows when the carve-out dirs are momentarily unstattable", () => {
|
|
1000
|
-
fs.rmSync(path.join(hqRoot, "workspace", ".session-logs"), {
|
|
1001
|
-
recursive: true,
|
|
1002
|
-
force: true,
|
|
1003
|
-
});
|
|
1004
|
-
fs.rmSync(path.join(hqRoot, "workspace", "agency"), {
|
|
1005
|
-
recursive: true,
|
|
1006
|
-
force: true,
|
|
1007
|
-
});
|
|
1008
|
-
const journal = journalWith([
|
|
1009
|
-
"workspace/.session-logs/s.jsonl",
|
|
1010
|
-
"workspace/.session-logs/deep/t.jsonl",
|
|
1011
|
-
"workspace/agency/co/chat.jsonl",
|
|
1012
|
-
"workspace/scratch/tmp.txt", // genuinely excluded — still PURGE
|
|
1013
|
-
".claude/skills/foo/SKILL.md", // base — KEEP
|
|
1014
|
-
]);
|
|
1015
|
-
const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1016
|
-
// Carve-out rows survive the filesystem hiccup...
|
|
1017
|
-
expect(journal.files["workspace/.session-logs/s.jsonl"]).toBeDefined();
|
|
1018
|
-
expect(journal.files["workspace/.session-logs/deep/t.jsonl"]).toBeDefined();
|
|
1019
|
-
expect(journal.files["workspace/agency/co/chat.jsonl"]).toBeDefined();
|
|
1020
|
-
expect(journal.files[".claude/skills/foo/SKILL.md"]).toBeDefined();
|
|
1021
|
-
// ...while genuinely-excluded workspace/ rows are still pruned.
|
|
1022
|
-
expect(removed).toContain("workspace/scratch/tmp.txt");
|
|
1023
|
-
expect(removed).not.toContain("workspace/.session-logs/s.jsonl");
|
|
1024
|
-
expect(removed).not.toContain("workspace/agency/co/chat.jsonl");
|
|
1025
|
-
});
|
|
1026
|
-
it("circuit breaker: refuses a mass purge (>50% of a large journal) and keeps every row", () => {
|
|
1027
|
-
// 1000 genuinely-excluded workspace/ rows + 200 kept base rows = 1200 total;
|
|
1028
|
-
// 83% would be dropped, well over the guard fraction on a >=1000-row journal.
|
|
1029
|
-
const excluded = Array.from({ length: 1000 }, (_i, n) => `workspace/scratch/f${n}.txt`);
|
|
1030
|
-
const kept = Array.from({ length: 200 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
|
|
1031
|
-
const journal = journalWith([...excluded, ...kept]);
|
|
1032
|
-
const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1033
|
-
expect(purge.removed).toEqual([]);
|
|
1034
|
-
expect(purge.guardTripped).toEqual({ attempted: 1000, totalRows: 1200 });
|
|
1035
|
-
// Nothing was actually dropped — the journal survives intact for resume.
|
|
1036
|
-
expect(Object.keys(journal.files)).toHaveLength(1200);
|
|
1037
|
-
for (const k of excluded)
|
|
1038
|
-
expect(journal.files[k]).toBeDefined();
|
|
1039
|
-
});
|
|
1040
|
-
it("circuit breaker: allows a purge of exactly half the journal (guard is strictly >50%)", () => {
|
|
1041
|
-
// 600 excluded of 1200 total = exactly 50%. The contract is "more than
|
|
1042
|
-
// half", so this must NOT trip — otherwise these rows stay candidates every
|
|
1043
|
-
// pass and the journal never converges at the boundary.
|
|
1044
|
-
const excluded = Array.from({ length: 600 }, (_i, n) => `workspace/scratch/f${n}.txt`);
|
|
1045
|
-
const kept = Array.from({ length: 600 }, (_i, n) => `.claude/skills/s${n}/SKILL.md`);
|
|
1046
|
-
const journal = journalWith([...excluded, ...kept]);
|
|
1047
|
-
const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1048
|
-
expect(purge.guardTripped).toBeUndefined();
|
|
1049
|
-
expect(purge.removed).toHaveLength(600);
|
|
1050
|
-
expect(Object.keys(journal.files)).toHaveLength(600);
|
|
1051
|
-
});
|
|
1052
|
-
it("circuit breaker: does NOT guard a small journal, so early-baseline cleanup still applies", () => {
|
|
1053
|
-
// Below PURGE_GUARD_MIN_JOURNAL a high purge fraction is normal baseline
|
|
1054
|
-
// convergence, so the guard must stay out of the way.
|
|
1055
|
-
const journal = journalWith([
|
|
1056
|
-
"workspace/scratch/a.txt",
|
|
1057
|
-
"workspace/scratch/b.txt",
|
|
1058
|
-
".claude/skills/foo/SKILL.md",
|
|
1059
|
-
]);
|
|
1060
|
-
const purge = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1061
|
-
expect(purge.guardTripped).toBeUndefined();
|
|
1062
|
-
expect(purge.removed.sort()).toEqual(["workspace/scratch/a.txt", "workspace/scratch/b.txt"].sort());
|
|
1063
|
-
expect(journal.files[".claude/skills/foo/SKILL.md"]).toBeDefined();
|
|
1064
|
-
});
|
|
1065
|
-
it("defers `.conflict-*` / `.drift-*` litter to the vault-litter drain (remote delete)", () => {
|
|
1066
|
-
// The delete-plan litter drain remotely DELETES these when the local file
|
|
1067
|
-
// is gone — stronger than forgetting the row — so the purge must not touch
|
|
1068
|
-
// them or it would strand the vault object.
|
|
1069
|
-
const journal = journalWith([
|
|
1070
|
-
"CLAUDE.md.conflict-2026-05-13T19-40-40Z-e5797a.md",
|
|
1071
|
-
"personal/.obsidian/graph.json.drift-1779863862-42519",
|
|
1072
|
-
]);
|
|
1073
|
-
const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1074
|
-
expect(removed).toEqual([]);
|
|
1075
|
-
});
|
|
1076
|
-
it("does NOT purge cloud-company keys (owned by the decommission plan)", () => {
|
|
1077
|
-
// A cloud company's stale keys are drained by computeDecommissionPlan,
|
|
1078
|
-
// which deletes them remotely against their journal rows — purging them
|
|
1079
|
-
// here would rob that plan of the rows. `companies/` is never top-level
|
|
1080
|
-
// purged even though it is in PERSONAL_VAULT_EXCLUDED_TOP_LEVEL.
|
|
1081
|
-
const journal = journalWith(["companies/cloudco/knowledge/a.md"]);
|
|
1082
|
-
const { removed } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1083
|
-
expect(removed).toEqual([]);
|
|
1084
|
-
expect(Object.keys(journal.files)).toEqual([
|
|
1085
|
-
"companies/cloudco/knowledge/a.md",
|
|
1086
|
-
]);
|
|
1087
|
-
});
|
|
1088
|
-
it("is a no-op on an already-clean journal", () => {
|
|
1089
|
-
const journal = journalWith(["personal/a.md", "core/b.md"]);
|
|
1090
|
-
const { removed, byReason } = purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, hqRoot, shouldSync, isLitter);
|
|
1091
|
-
expect(removed).toEqual([]);
|
|
1092
|
-
expect(byReason).toEqual({
|
|
1093
|
-
"ignore-filtered": 0,
|
|
1094
|
-
"ignore-filtered-present": 0,
|
|
1095
|
-
"excluded-top-level": 0,
|
|
1096
|
-
});
|
|
1097
|
-
});
|
|
1098
|
-
});
|
|
1099
|
-
//# sourceMappingURL=personal-vault.test.js.map
|