@indigoai-us/hq-cloud 6.18.44-alpha.9 → 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 -1492
- 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,903 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for scope-aware download (US-005 wiring into `sync()`).
|
|
3
|
-
*
|
|
4
|
-
* Covers the contract added when `syncMode` / `prefixSet` were threaded
|
|
5
|
-
* through `computePullPlan` + the scope-shrink pass:
|
|
6
|
-
*
|
|
7
|
-
* - `all` → no filtering (regression guard lives in sync.test.ts).
|
|
8
|
-
* - `shared` → only keys covered by `prefixSet` download; the rest are
|
|
9
|
-
* classified `skip-out-of-scope` (NOT downloaded).
|
|
10
|
-
* - `custom` → same mechanism, driven by the explicit path list.
|
|
11
|
-
* - Idempotency → a second `shared` pull downloads nothing and removes
|
|
12
|
-
* nothing (the PullRecord makes scope-change a no-op).
|
|
13
|
-
* - Scope shrink → narrowing `all → shared` prunes the now-out-of-scope
|
|
14
|
-
* CLEAN local orphan; a DIRTY orphan aborts with
|
|
15
|
-
* `ScopeShrinkBlockedError` unless `forceScopeShrink`.
|
|
16
|
-
*
|
|
17
|
-
* The security contract (this filter is footprint-only, never an authz
|
|
18
|
-
* boundary) is asserted indirectly: out-of-scope keys are still LISTED and
|
|
19
|
-
* accessible — the engine simply chooses not to materialize them.
|
|
20
|
-
*/
|
|
21
|
-
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
|
22
|
-
import * as fs from "fs";
|
|
23
|
-
import * as path from "path";
|
|
24
|
-
import * as os from "os";
|
|
25
|
-
import { clearContextCache } from "../context.js";
|
|
26
|
-
// Mutable remote-file list so each test controls what the vault returns.
|
|
27
|
-
const REMOTE = {
|
|
28
|
-
current: [
|
|
29
|
-
{ key: "docs/handoff.md", size: 42, lastModified: new Date(), etag: '"abc123"' },
|
|
30
|
-
{ key: "knowledge/readme.md", size: 100, lastModified: new Date(), etag: '"def456"' },
|
|
31
|
-
],
|
|
32
|
-
};
|
|
33
|
-
vi.mock("../s3.js", async (importOriginal) => {
|
|
34
|
-
const actual = await importOriginal();
|
|
35
|
-
const innerFs = await import("fs");
|
|
36
|
-
const innerPath = await import("path");
|
|
37
|
-
const { vi: innerVi } = await import("vitest");
|
|
38
|
-
async function* streamRemoteFiles(_ctx, prefix) {
|
|
39
|
-
for (const remoteFile of prefix === undefined
|
|
40
|
-
? REMOTE.current
|
|
41
|
-
: REMOTE.current.filter((file) => file.key.startsWith(prefix))) {
|
|
42
|
-
yield remoteFile;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
...actual,
|
|
47
|
-
toPosixKey: (key) => key.split("\\").join("/"),
|
|
48
|
-
uploadFile: innerVi.fn().mockResolvedValue(undefined),
|
|
49
|
-
downloadFile: innerVi
|
|
50
|
-
.fn()
|
|
51
|
-
.mockImplementation(async (_ctx, key, localPath) => {
|
|
52
|
-
const dir = innerPath.dirname(localPath);
|
|
53
|
-
if (!innerFs.existsSync(dir))
|
|
54
|
-
innerFs.mkdirSync(dir, { recursive: true });
|
|
55
|
-
// Deterministic per-key body so re-downloads produce a stable hash.
|
|
56
|
-
innerFs.writeFileSync(localPath, `mock:${key}`);
|
|
57
|
-
// Real GETs carry author metadata; surface a fixed uploader sub so
|
|
58
|
-
// journal entries are stamped with a KNOWN author. With no `callerSub`
|
|
59
|
-
// passed (the default for these tests), that author is "foreign", so
|
|
60
|
-
// the scope-shrink prune/block paths behave exactly as pre-guard —
|
|
61
|
-
// only the new own-author retention test passes a matching callerSub.
|
|
62
|
-
return { metadata: { "created-by-sub": "uploader-sub" } };
|
|
63
|
-
}),
|
|
64
|
-
// Honor the scoped-listing prefix like the real ListObjectsV2 call does:
|
|
65
|
-
// `sync()` now lists per in-scope prefix (`listRemoteFilesForScope`), so
|
|
66
|
-
// the mock must return only the keys under the requested prefix for the
|
|
67
|
-
// scoped-listing assertions below to mean anything.
|
|
68
|
-
listRemoteFiles: innerVi
|
|
69
|
-
.fn()
|
|
70
|
-
.mockImplementation(async (_ctx, prefix) => prefix === undefined
|
|
71
|
-
? REMOTE.current
|
|
72
|
-
: REMOTE.current.filter((f) => f.key.startsWith(prefix))),
|
|
73
|
-
streamRemoteFiles,
|
|
74
|
-
deleteRemoteFile: innerVi.fn().mockResolvedValue(undefined),
|
|
75
|
-
// HEAD returns metadata (object exists) for any key still in REMOTE,
|
|
76
|
-
// null otherwise — mirrors the real bucket so the tombstone HEAD-verify
|
|
77
|
-
// pass behaves correctly for out-of-scope (still-present) keys.
|
|
78
|
-
headRemoteFile: innerVi.fn().mockImplementation(async (_ctx, key) => {
|
|
79
|
-
const hit = REMOTE.current.find((r) => r.key === key);
|
|
80
|
-
return hit ? { metadata: {}, size: hit.size, etag: hit.etag } : null;
|
|
81
|
-
}),
|
|
82
|
-
primeObjectTransport: innerVi.fn().mockResolvedValue(undefined),
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
|
-
import { sync } from "./sync.js";
|
|
86
|
-
import { ScopeShrinkBlockedError, ScopeShrinkLargePruneError, } from "../scope-shrink.js";
|
|
87
|
-
import { PERSONAL_VAULT_JOURNAL_SLUG, readJournal, writeJournal, } from "../journal.js";
|
|
88
|
-
import { SESSION_LOGS_PUSH_ONLY_PREFIX } from "../sync/pull-scope.js";
|
|
89
|
-
const mockConfig = {
|
|
90
|
-
apiUrl: "https://vault-api.test",
|
|
91
|
-
authToken: "test-jwt-token",
|
|
92
|
-
region: "us-east-1",
|
|
93
|
-
};
|
|
94
|
-
const mockEntity = {
|
|
95
|
-
uid: "cmp_01ABCDEF",
|
|
96
|
-
slug: "acme",
|
|
97
|
-
bucketName: "hq-vault-acme-123",
|
|
98
|
-
status: "active",
|
|
99
|
-
};
|
|
100
|
-
const mockVendResponse = {
|
|
101
|
-
credentials: {
|
|
102
|
-
accessKeyId: "ASIA_TEST_KEY",
|
|
103
|
-
secretAccessKey: "test-secret",
|
|
104
|
-
sessionToken: "test-session-token",
|
|
105
|
-
expiration: new Date(Date.now() + 15 * 60 * 1000).toISOString(),
|
|
106
|
-
},
|
|
107
|
-
expiresAt: new Date(Date.now() + 15 * 60 * 1000).toISOString(),
|
|
108
|
-
};
|
|
109
|
-
function setupFetchMock(options = {}) {
|
|
110
|
-
const fetchMock = vi.fn().mockImplementation(async (url) => {
|
|
111
|
-
const urlStr = String(url);
|
|
112
|
-
if (urlStr.includes("/entity/check-slug/me")) {
|
|
113
|
-
return {
|
|
114
|
-
ok: true,
|
|
115
|
-
status: 200,
|
|
116
|
-
json: async () => ({ available: false, conflictingCompanyUid: mockEntity.uid }),
|
|
117
|
-
text: async () => "",
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
if (urlStr.includes("/entity/by-slug/") || /\/entity\/cmp_/.test(urlStr)) {
|
|
121
|
-
return { ok: true, status: 200, json: async () => ({ entity: mockEntity }), text: async () => "" };
|
|
122
|
-
}
|
|
123
|
-
if (urlStr.includes("/sts/vend")) {
|
|
124
|
-
return { ok: true, status: 200, json: async () => mockVendResponse, text: async () => "" };
|
|
125
|
-
}
|
|
126
|
-
if (urlStr.includes("/v1/files/tombstones")) {
|
|
127
|
-
return {
|
|
128
|
-
ok: true,
|
|
129
|
-
status: 200,
|
|
130
|
-
json: async () => ({ tombstones: options.tombstones ?? [] }),
|
|
131
|
-
text: async () => "",
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
return { ok: false, status: 404, text: async () => "Not found" };
|
|
135
|
-
});
|
|
136
|
-
vi.stubGlobal("fetch", fetchMock);
|
|
137
|
-
return fetchMock;
|
|
138
|
-
}
|
|
139
|
-
describe("sync — scope-aware download (US-005)", () => {
|
|
140
|
-
let tmpDir;
|
|
141
|
-
let stateDir;
|
|
142
|
-
const companyRel = (p) => path.join(tmpDir, "companies", "acme", p);
|
|
143
|
-
beforeEach(() => {
|
|
144
|
-
clearContextCache();
|
|
145
|
-
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "hq-sync-scope-"));
|
|
146
|
-
stateDir = fs.mkdtempSync(path.join(os.tmpdir(), "hq-state-scope-"));
|
|
147
|
-
process.env.HQ_STATE_DIR = stateDir;
|
|
148
|
-
// Reset the remote list every test (a prior test may have mutated it).
|
|
149
|
-
REMOTE.current = [
|
|
150
|
-
{ key: "docs/handoff.md", size: 42, lastModified: new Date(), etag: '"abc123"' },
|
|
151
|
-
{ key: "knowledge/readme.md", size: 100, lastModified: new Date(), etag: '"def456"' },
|
|
152
|
-
];
|
|
153
|
-
setupFetchMock();
|
|
154
|
-
});
|
|
155
|
-
afterEach(() => {
|
|
156
|
-
vi.unstubAllGlobals();
|
|
157
|
-
vi.clearAllMocks();
|
|
158
|
-
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
159
|
-
fs.rmSync(stateDir, { recursive: true, force: true });
|
|
160
|
-
delete process.env.HQ_STATE_DIR;
|
|
161
|
-
});
|
|
162
|
-
it("shared mode downloads only keys covered by prefixSet; the rest are never even LISTED", async () => {
|
|
163
|
-
const s3 = await import("../s3.js");
|
|
164
|
-
const result = await sync({
|
|
165
|
-
company: "acme",
|
|
166
|
-
vaultConfig: mockConfig,
|
|
167
|
-
hqRoot: tmpDir,
|
|
168
|
-
syncMode: "shared",
|
|
169
|
-
prefixSet: ["knowledge/"],
|
|
170
|
-
});
|
|
171
|
-
expect(result.filesDownloaded).toBe(1);
|
|
172
|
-
// Scoped listing: out-of-scope keys are excluded at LIST time (one
|
|
173
|
-
// ListObjectsV2 per in-scope prefix) rather than listed-then-skipped, so
|
|
174
|
-
// they no longer appear in the plan at all — filesOutOfScope is 0 and the
|
|
175
|
-
// full remote listing is never materialized in memory.
|
|
176
|
-
expect(result.filesOutOfScope).toBe(0);
|
|
177
|
-
const listPrefixes = vi
|
|
178
|
-
.mocked(s3.listRemoteFiles)
|
|
179
|
-
.mock.calls.map((c) => c[1]);
|
|
180
|
-
expect(listPrefixes).toEqual(["knowledge/"]);
|
|
181
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
182
|
-
// docs/handoff.md is out of scope — never materialized.
|
|
183
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(false);
|
|
184
|
-
});
|
|
185
|
-
it("custom mode behaves like shared, driven by the explicit prefix list", async () => {
|
|
186
|
-
const result = await sync({
|
|
187
|
-
company: "acme",
|
|
188
|
-
vaultConfig: mockConfig,
|
|
189
|
-
hqRoot: tmpDir,
|
|
190
|
-
syncMode: "custom",
|
|
191
|
-
prefixSet: ["docs/"],
|
|
192
|
-
});
|
|
193
|
-
expect(result.filesDownloaded).toBe(1);
|
|
194
|
-
expect(result.filesOutOfScope).toBe(0);
|
|
195
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
196
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(false);
|
|
197
|
-
});
|
|
198
|
-
it("shared mode with empty prefixSet downloads nothing and issues zero LIST calls", async () => {
|
|
199
|
-
const s3 = await import("../s3.js");
|
|
200
|
-
const result = await sync({
|
|
201
|
-
company: "acme",
|
|
202
|
-
vaultConfig: mockConfig,
|
|
203
|
-
hqRoot: tmpDir,
|
|
204
|
-
syncMode: "shared",
|
|
205
|
-
prefixSet: [],
|
|
206
|
-
});
|
|
207
|
-
expect(result.filesDownloaded).toBe(0);
|
|
208
|
-
expect(result.filesOutOfScope).toBe(0);
|
|
209
|
-
expect(s3.listRemoteFiles).not.toHaveBeenCalled();
|
|
210
|
-
});
|
|
211
|
-
it("a scoped LIST never marks out-of-scope journaled files as remote-deleted", async () => {
|
|
212
|
-
// Regression for the scoped-listing deletion sweep: seed BOTH files via an
|
|
213
|
-
// all-mode pull (journaling both), then run a shared pull scoped to
|
|
214
|
-
// knowledge/ with auto-recover. docs/handoff.md is absent from the scoped
|
|
215
|
-
// LIST because it was never asked about — the journal-vs-LIST sweep must
|
|
216
|
-
// NOT treat that as a remote delete. (Scope-shrink may quarantine it as an
|
|
217
|
-
// out-of-scope orphan — that is its own, recoverable, contract — so pin
|
|
218
|
-
// the sweep axis: filesTombstoned stays 0.)
|
|
219
|
-
const all = await sync({
|
|
220
|
-
company: "acme",
|
|
221
|
-
vaultConfig: mockConfig,
|
|
222
|
-
hqRoot: tmpDir,
|
|
223
|
-
syncMode: "all",
|
|
224
|
-
});
|
|
225
|
-
expect(all.filesDownloaded).toBe(2);
|
|
226
|
-
const scoped = await sync({
|
|
227
|
-
company: "acme",
|
|
228
|
-
vaultConfig: mockConfig,
|
|
229
|
-
hqRoot: tmpDir,
|
|
230
|
-
syncMode: "shared",
|
|
231
|
-
prefixSet: ["knowledge/"],
|
|
232
|
-
scopeShrinkPolicy: "auto-recover",
|
|
233
|
-
});
|
|
234
|
-
expect(scoped.filesTombstoned).toBe(0);
|
|
235
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
236
|
-
});
|
|
237
|
-
describe("targeted pull narrowing (pullPrefixes)", () => {
|
|
238
|
-
it("lists and plans only the requested prefixes, without touching the rest of the tree", async () => {
|
|
239
|
-
const s3 = await import("../s3.js");
|
|
240
|
-
// Seed everything so the targeted run has out-of-target local state.
|
|
241
|
-
const all = await sync({
|
|
242
|
-
company: "acme",
|
|
243
|
-
vaultConfig: mockConfig,
|
|
244
|
-
hqRoot: tmpDir,
|
|
245
|
-
syncMode: "all",
|
|
246
|
-
});
|
|
247
|
-
expect(all.filesDownloaded).toBe(2);
|
|
248
|
-
vi.mocked(s3.listRemoteFiles).mockClear();
|
|
249
|
-
// Remote update lands under knowledge/ while docs/ is also updated —
|
|
250
|
-
// the targeted pull must fetch only the knowledge/ change.
|
|
251
|
-
REMOTE.current = [
|
|
252
|
-
{ key: "docs/handoff.md", size: 43, lastModified: new Date(), etag: '"abc124"' },
|
|
253
|
-
{ key: "knowledge/readme.md", size: 101, lastModified: new Date(), etag: '"def457"' },
|
|
254
|
-
];
|
|
255
|
-
const targeted = await sync({
|
|
256
|
-
company: "acme",
|
|
257
|
-
vaultConfig: mockConfig,
|
|
258
|
-
hqRoot: tmpDir,
|
|
259
|
-
syncMode: "all",
|
|
260
|
-
pullPrefixes: ["knowledge/"],
|
|
261
|
-
});
|
|
262
|
-
expect(targeted.filesDownloaded).toBe(1);
|
|
263
|
-
const listPrefixes = vi
|
|
264
|
-
.mocked(s3.listRemoteFiles)
|
|
265
|
-
.mock.calls.map((c) => c[1]);
|
|
266
|
-
expect(listPrefixes).toEqual(["knowledge/"]);
|
|
267
|
-
// The out-of-target journaled file was neither re-pulled nor —
|
|
268
|
-
// critically — mistaken for a remote delete (it was never listed).
|
|
269
|
-
expect(targeted.filesTombstoned).toBe(0);
|
|
270
|
-
expect(targeted.scopeOrphansRemoved).toBe(0);
|
|
271
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
272
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
273
|
-
});
|
|
274
|
-
it("rejects an unservable targeted path instead of silently consuming it", async () => {
|
|
275
|
-
const s3 = await import("../s3.js");
|
|
276
|
-
await expect(sync({
|
|
277
|
-
company: "acme",
|
|
278
|
-
vaultConfig: mockConfig,
|
|
279
|
-
hqRoot: tmpDir,
|
|
280
|
-
syncMode: "shared",
|
|
281
|
-
prefixSet: ["knowledge/"],
|
|
282
|
-
pullPrefixes: ["docs/"],
|
|
283
|
-
})).rejects.toThrow("targeted pull paths are outside the durable scope: docs/");
|
|
284
|
-
expect(s3.listRemoteFiles).not.toHaveBeenCalled();
|
|
285
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(false);
|
|
286
|
-
});
|
|
287
|
-
it("a targeted pull still propagates a genuine remote delete INSIDE the target", async () => {
|
|
288
|
-
const all = await sync({
|
|
289
|
-
company: "acme",
|
|
290
|
-
vaultConfig: mockConfig,
|
|
291
|
-
hqRoot: tmpDir,
|
|
292
|
-
syncMode: "all",
|
|
293
|
-
});
|
|
294
|
-
expect(all.filesDownloaded).toBe(2);
|
|
295
|
-
// Peer deleted the knowledge file remotely; docs/ untouched.
|
|
296
|
-
REMOTE.current = [
|
|
297
|
-
{ key: "docs/handoff.md", size: 42, lastModified: new Date(), etag: '"abc123"' },
|
|
298
|
-
];
|
|
299
|
-
const targeted = await sync({
|
|
300
|
-
company: "acme",
|
|
301
|
-
vaultConfig: mockConfig,
|
|
302
|
-
hqRoot: tmpDir,
|
|
303
|
-
syncMode: "all",
|
|
304
|
-
pullPrefixes: ["knowledge/"],
|
|
305
|
-
});
|
|
306
|
-
expect(targeted.filesTombstoned).toBe(1);
|
|
307
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(false);
|
|
308
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
const tombstoneCalls = (m) => m.mock.calls.filter((c) => String(c[0]).includes("/v1/files/tombstones"));
|
|
312
|
-
it("company-mode pull requests FILE_TOMBSTONEs with the company selector", async () => {
|
|
313
|
-
const fetchMock = setupFetchMock();
|
|
314
|
-
await sync({
|
|
315
|
-
company: "acme",
|
|
316
|
-
vaultConfig: mockConfig,
|
|
317
|
-
hqRoot: tmpDir,
|
|
318
|
-
syncMode: "all",
|
|
319
|
-
prefixSet: [],
|
|
320
|
-
});
|
|
321
|
-
expect(tombstoneCalls(fetchMock)).toHaveLength(1);
|
|
322
|
-
expect(String(tombstoneCalls(fetchMock)[0][0])).toContain(`company=${mockEntity.uid}`);
|
|
323
|
-
});
|
|
324
|
-
it("personal-vault pull requests FILE_TOMBSTONEs with personal=1, never a person UID as company", async () => {
|
|
325
|
-
const fetchMock = setupFetchMock();
|
|
326
|
-
await sync({
|
|
327
|
-
company: "acme",
|
|
328
|
-
vaultConfig: mockConfig,
|
|
329
|
-
hqRoot: tmpDir,
|
|
330
|
-
syncMode: "all",
|
|
331
|
-
prefixSet: [],
|
|
332
|
-
personalMode: true,
|
|
333
|
-
});
|
|
334
|
-
expect(tombstoneCalls(fetchMock)).toHaveLength(1);
|
|
335
|
-
const url = String(tombstoneCalls(fetchMock)[0][0]);
|
|
336
|
-
expect(url).toContain("personal=1");
|
|
337
|
-
expect(url).not.toContain("company=");
|
|
338
|
-
});
|
|
339
|
-
it("personal deletion removes a clean local copy, stays suppressed, then accepts a newer recreate", async () => {
|
|
340
|
-
const s3 = await import("../s3.js");
|
|
341
|
-
const deletedPath = path.join(tmpDir, "docs", "handoff.md");
|
|
342
|
-
const now = Date.now();
|
|
343
|
-
REMOTE.current = [
|
|
344
|
-
{
|
|
345
|
-
key: "docs/handoff.md",
|
|
346
|
-
size: 42,
|
|
347
|
-
lastModified: new Date(now - 60_000),
|
|
348
|
-
etag: '"abc123"',
|
|
349
|
-
},
|
|
350
|
-
];
|
|
351
|
-
// Establish the clean local baseline held by a machine that has not yet
|
|
352
|
-
// observed the personal-vault deletion.
|
|
353
|
-
await sync({
|
|
354
|
-
company: "acme",
|
|
355
|
-
vaultConfig: mockConfig,
|
|
356
|
-
hqRoot: tmpDir,
|
|
357
|
-
personalMode: true,
|
|
358
|
-
journalSlug: "personal",
|
|
359
|
-
});
|
|
360
|
-
expect(fs.readFileSync(deletedPath, "utf8")).toBe("mock:docs/handoff.md");
|
|
361
|
-
setupFetchMock({
|
|
362
|
-
tombstones: [
|
|
363
|
-
{ key: "docs/handoff.md", deletedAt: new Date(now).toISOString() },
|
|
364
|
-
],
|
|
365
|
-
});
|
|
366
|
-
vi.mocked(s3.downloadFile).mockClear();
|
|
367
|
-
const deleted = await sync({
|
|
368
|
-
company: "acme",
|
|
369
|
-
vaultConfig: mockConfig,
|
|
370
|
-
hqRoot: tmpDir,
|
|
371
|
-
personalMode: true,
|
|
372
|
-
journalSlug: "personal",
|
|
373
|
-
});
|
|
374
|
-
expect(deleted.filesTombstoned).toBe(1);
|
|
375
|
-
expect(fs.existsSync(deletedPath)).toBe(false);
|
|
376
|
-
expect(s3.downloadFile).not.toHaveBeenCalled();
|
|
377
|
-
// A later pass seeing the same stale object must not materialize an empty
|
|
378
|
-
// placeholder or restore the old bytes after the journal row converges.
|
|
379
|
-
await sync({
|
|
380
|
-
company: "acme",
|
|
381
|
-
vaultConfig: mockConfig,
|
|
382
|
-
hqRoot: tmpDir,
|
|
383
|
-
personalMode: true,
|
|
384
|
-
journalSlug: "personal",
|
|
385
|
-
});
|
|
386
|
-
expect(fs.existsSync(deletedPath)).toBe(false);
|
|
387
|
-
expect(s3.downloadFile).not.toHaveBeenCalled();
|
|
388
|
-
// Tombstones are precedence markers, not permanent path bans. A real
|
|
389
|
-
// object written after the deletion downloads normally.
|
|
390
|
-
REMOTE.current = [
|
|
391
|
-
{
|
|
392
|
-
key: "docs/handoff.md",
|
|
393
|
-
size: 43,
|
|
394
|
-
lastModified: new Date(now + 60_000),
|
|
395
|
-
etag: '"abc124"',
|
|
396
|
-
},
|
|
397
|
-
];
|
|
398
|
-
const recreated = await sync({
|
|
399
|
-
company: "acme",
|
|
400
|
-
vaultConfig: mockConfig,
|
|
401
|
-
hqRoot: tmpDir,
|
|
402
|
-
personalMode: true,
|
|
403
|
-
journalSlug: "personal",
|
|
404
|
-
});
|
|
405
|
-
expect(recreated.filesDownloaded).toBe(1);
|
|
406
|
-
expect(fs.readFileSync(deletedPath, "utf8")).toBe("mock:docs/handoff.md");
|
|
407
|
-
});
|
|
408
|
-
it("is idempotent: a second shared pull downloads and removes nothing", async () => {
|
|
409
|
-
const opts = {
|
|
410
|
-
company: "acme",
|
|
411
|
-
vaultConfig: mockConfig,
|
|
412
|
-
hqRoot: tmpDir,
|
|
413
|
-
syncMode: "shared",
|
|
414
|
-
prefixSet: ["knowledge/"],
|
|
415
|
-
};
|
|
416
|
-
const first = await sync(opts);
|
|
417
|
-
expect(first.filesDownloaded).toBe(1);
|
|
418
|
-
const second = await sync(opts);
|
|
419
|
-
expect(second.filesDownloaded).toBe(0);
|
|
420
|
-
expect(second.scopeOrphansRemoved).toBe(0);
|
|
421
|
-
expect(second.scopeOrphansBlocked).toBe(0);
|
|
422
|
-
// knowledge file still present; nothing churned.
|
|
423
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
424
|
-
});
|
|
425
|
-
it("scope shrink (all → shared) prunes the clean out-of-scope orphan", async () => {
|
|
426
|
-
// First pull EVERYTHING under all-mode.
|
|
427
|
-
const all = await sync({
|
|
428
|
-
company: "acme",
|
|
429
|
-
vaultConfig: mockConfig,
|
|
430
|
-
hqRoot: tmpDir,
|
|
431
|
-
syncMode: "all",
|
|
432
|
-
});
|
|
433
|
-
expect(all.filesDownloaded).toBe(2);
|
|
434
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
435
|
-
// Narrow to shared/knowledge → docs/handoff.md is now a clean orphan.
|
|
436
|
-
const shared = await sync({
|
|
437
|
-
company: "acme",
|
|
438
|
-
vaultConfig: mockConfig,
|
|
439
|
-
hqRoot: tmpDir,
|
|
440
|
-
syncMode: "shared",
|
|
441
|
-
prefixSet: ["knowledge/"],
|
|
442
|
-
});
|
|
443
|
-
expect(shared.scopeOrphansRemoved).toBe(1);
|
|
444
|
-
expect(shared.scopeOrphansBlocked).toBe(0);
|
|
445
|
-
// The clean orphan was pruned; the in-scope file stays.
|
|
446
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(false);
|
|
447
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
448
|
-
});
|
|
449
|
-
it("scope shrink (all → shared) RETAINS the owner's own out-of-scope file", async () => {
|
|
450
|
-
// Corey's exact scenario: the caller authored everything (the mock stamps
|
|
451
|
-
// `created-by-sub: "uploader-sub"`), so passing the matching `callerSub`
|
|
452
|
-
// means narrowing to `shared` must NOT prune their own work — mode only
|
|
453
|
-
// governs mirroring OTHER people's files.
|
|
454
|
-
const all = await sync({
|
|
455
|
-
company: "acme",
|
|
456
|
-
vaultConfig: mockConfig,
|
|
457
|
-
hqRoot: tmpDir,
|
|
458
|
-
syncMode: "all",
|
|
459
|
-
callerSub: "uploader-sub",
|
|
460
|
-
});
|
|
461
|
-
expect(all.filesDownloaded).toBe(2);
|
|
462
|
-
const shared = await sync({
|
|
463
|
-
company: "acme",
|
|
464
|
-
vaultConfig: mockConfig,
|
|
465
|
-
hqRoot: tmpDir,
|
|
466
|
-
syncMode: "shared",
|
|
467
|
-
prefixSet: ["knowledge/"],
|
|
468
|
-
callerSub: "uploader-sub",
|
|
469
|
-
});
|
|
470
|
-
// Out of scope, but authored by the caller → retained, not pruned.
|
|
471
|
-
expect(shared.scopeOrphansRemoved).toBe(0);
|
|
472
|
-
expect(shared.scopeOrphansBlocked).toBe(0);
|
|
473
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
474
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
475
|
-
});
|
|
476
|
-
it("refuses a bulk auto-prune over the safety cap, then proceeds when forced", async () => {
|
|
477
|
-
// Pull both files under all-mode, then narrow to a scope covering neither
|
|
478
|
-
// → 2 clean orphans. With the cap set to 1, the auto-prune is refused.
|
|
479
|
-
await sync({ company: "acme", vaultConfig: mockConfig, hqRoot: tmpDir, syncMode: "all" });
|
|
480
|
-
// Narrow to a scope covering neither file → 2 clean orphans; cap at 1.
|
|
481
|
-
process.env.HQ_SYNC_MAX_AUTO_PRUNE = "1";
|
|
482
|
-
try {
|
|
483
|
-
await expect(sync({
|
|
484
|
-
company: "acme",
|
|
485
|
-
vaultConfig: mockConfig,
|
|
486
|
-
hqRoot: tmpDir,
|
|
487
|
-
syncMode: "shared",
|
|
488
|
-
prefixSet: ["nonexistent/"],
|
|
489
|
-
})).rejects.toBeInstanceOf(ScopeShrinkLargePruneError);
|
|
490
|
-
// Nothing deleted on the refused run.
|
|
491
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
492
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
493
|
-
// Forced: the prune proceeds despite the cap.
|
|
494
|
-
const forced = await sync({
|
|
495
|
-
company: "acme",
|
|
496
|
-
vaultConfig: mockConfig,
|
|
497
|
-
hqRoot: tmpDir,
|
|
498
|
-
syncMode: "shared",
|
|
499
|
-
prefixSet: ["nonexistent/"],
|
|
500
|
-
forceScopeShrink: true,
|
|
501
|
-
});
|
|
502
|
-
expect(forced.scopeOrphansRemoved).toBe(2);
|
|
503
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(false);
|
|
504
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(false);
|
|
505
|
-
}
|
|
506
|
-
finally {
|
|
507
|
-
delete process.env.HQ_SYNC_MAX_AUTO_PRUNE;
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
it("scope shrink aborts on a DIRTY orphan unless forceScopeShrink is set", async () => {
|
|
511
|
-
await sync({
|
|
512
|
-
company: "acme",
|
|
513
|
-
vaultConfig: mockConfig,
|
|
514
|
-
hqRoot: tmpDir,
|
|
515
|
-
syncMode: "all",
|
|
516
|
-
});
|
|
517
|
-
// Locally modify the soon-to-be-orphan so it's dirty (hash mismatch).
|
|
518
|
-
fs.writeFileSync(companyRel("docs/handoff.md"), "LOCAL EDIT — do not delete");
|
|
519
|
-
// Default: abort with the structured error; the dirty file is untouched.
|
|
520
|
-
await expect(sync({
|
|
521
|
-
company: "acme",
|
|
522
|
-
vaultConfig: mockConfig,
|
|
523
|
-
hqRoot: tmpDir,
|
|
524
|
-
syncMode: "shared",
|
|
525
|
-
prefixSet: ["knowledge/"],
|
|
526
|
-
})).rejects.toBeInstanceOf(ScopeShrinkBlockedError);
|
|
527
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
528
|
-
expect(fs.readFileSync(companyRel("docs/handoff.md"), "utf-8")).toBe("LOCAL EDIT — do not delete");
|
|
529
|
-
// With force: the leg proceeds, the dirty file is LEFT ON DISK, only its
|
|
530
|
-
// journal entry is tombstoned.
|
|
531
|
-
const forced = await sync({
|
|
532
|
-
company: "acme",
|
|
533
|
-
vaultConfig: mockConfig,
|
|
534
|
-
hqRoot: tmpDir,
|
|
535
|
-
syncMode: "shared",
|
|
536
|
-
prefixSet: ["knowledge/"],
|
|
537
|
-
forceScopeShrink: true,
|
|
538
|
-
});
|
|
539
|
-
expect(forced.scopeOrphansBlocked).toBe(1);
|
|
540
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
541
|
-
});
|
|
542
|
-
// DEV-1768 fix #3: a scope shrink must QUARANTINE clean orphans (recoverable),
|
|
543
|
-
// never silently delete them. The file leaves its working-tree path but is
|
|
544
|
-
// recoverable under `.hq/scope-quarantine/<slug>/`.
|
|
545
|
-
it("scope shrink QUARANTINES a clean orphan (recoverable), never silent-deletes", async () => {
|
|
546
|
-
const quarantined = path.join(tmpDir, ".hq", "scope-quarantine", "acme", "docs", "handoff.md");
|
|
547
|
-
await sync({ company: "acme", vaultConfig: mockConfig, hqRoot: tmpDir, syncMode: "all" });
|
|
548
|
-
const original = companyRel("docs/handoff.md");
|
|
549
|
-
const bodyBefore = fs.readFileSync(original, "utf-8");
|
|
550
|
-
const shared = await sync({
|
|
551
|
-
company: "acme",
|
|
552
|
-
vaultConfig: mockConfig,
|
|
553
|
-
hqRoot: tmpDir,
|
|
554
|
-
syncMode: "shared",
|
|
555
|
-
prefixSet: ["knowledge/"],
|
|
556
|
-
});
|
|
557
|
-
expect(shared.scopeOrphansRemoved).toBe(1);
|
|
558
|
-
// Gone from the working tree...
|
|
559
|
-
expect(fs.existsSync(original)).toBe(false);
|
|
560
|
-
// ...but recoverable in quarantine, byte-for-byte.
|
|
561
|
-
expect(fs.existsSync(quarantined)).toBe(true);
|
|
562
|
-
expect(fs.readFileSync(quarantined, "utf-8")).toBe(bodyBefore);
|
|
563
|
-
});
|
|
564
|
-
// DEV-1768 fix #1 (recovery) + #2: the background runner path
|
|
565
|
-
// (`scopeShrinkPolicy: "auto-recover"`) must NEVER throw on a scope shrink —
|
|
566
|
-
// it self-heals. This reproduces the EXACT wedge: a buggy `all`-mode pull
|
|
567
|
-
// seeds the journal (all-mode PullRecord + both files), one out-of-scope file
|
|
568
|
-
// is edited locally (dirty), then the real `shared` pull arrives. Under the
|
|
569
|
-
// old code this threw ScopeShrinkBlockedError(all→shared) → exit 2 forever.
|
|
570
|
-
it("auto-recover policy clears an all→shared wedge: dirty kept on disk, clean quarantined, no throw", async () => {
|
|
571
|
-
// 1. Buggy all-mode CLI seed: journals everything + stamps an all-mode record.
|
|
572
|
-
await sync({ company: "acme", vaultConfig: mockConfig, hqRoot: tmpDir, syncMode: "all" });
|
|
573
|
-
// 2. User edits an out-of-scope file → it becomes a DIRTY orphan.
|
|
574
|
-
fs.writeFileSync(companyRel("docs/handoff.md"), "LOCAL EDIT — keep me");
|
|
575
|
-
const quarantinedClean = path.join(tmpDir, ".hq", "scope-quarantine", "acme", "knowledge", "readme.md");
|
|
576
|
-
// 3. The menubar runner's real shared pull. prefixSet covers NEITHER file
|
|
577
|
-
// (docs is dirty-orphan, knowledge becomes a clean orphan) so we exercise
|
|
578
|
-
// both dispositions. Must resolve without throwing.
|
|
579
|
-
const recovered = await sync({
|
|
580
|
-
company: "acme",
|
|
581
|
-
vaultConfig: mockConfig,
|
|
582
|
-
hqRoot: tmpDir,
|
|
583
|
-
syncMode: "shared",
|
|
584
|
-
prefixSet: ["projects/"],
|
|
585
|
-
scopeShrinkPolicy: "auto-recover",
|
|
586
|
-
});
|
|
587
|
-
expect(recovered.aborted).toBe(false);
|
|
588
|
-
// Dirty file: KEPT on disk (un-tracked), counted as blocked-but-kept.
|
|
589
|
-
expect(recovered.scopeOrphansBlocked).toBe(1);
|
|
590
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(true);
|
|
591
|
-
expect(fs.readFileSync(companyRel("docs/handoff.md"), "utf-8")).toBe("LOCAL EDIT — keep me");
|
|
592
|
-
// Clean file: quarantined (recoverable), removed from the working tree.
|
|
593
|
-
expect(recovered.scopeOrphansRemoved).toBe(1);
|
|
594
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(false);
|
|
595
|
-
expect(fs.existsSync(quarantinedClean)).toBe(true);
|
|
596
|
-
// 4. Idempotent: the next auto-recover sync re-flags NOTHING (the orphans
|
|
597
|
-
// were tombstoned, so the wedge does not recur).
|
|
598
|
-
const second = await sync({
|
|
599
|
-
company: "acme",
|
|
600
|
-
vaultConfig: mockConfig,
|
|
601
|
-
hqRoot: tmpDir,
|
|
602
|
-
syncMode: "shared",
|
|
603
|
-
prefixSet: ["projects/"],
|
|
604
|
-
scopeShrinkPolicy: "auto-recover",
|
|
605
|
-
});
|
|
606
|
-
expect(second.scopeOrphansRemoved).toBe(0);
|
|
607
|
-
expect(second.scopeOrphansBlocked).toBe(0);
|
|
608
|
-
});
|
|
609
|
-
// ── US-006: sessions prefix push-only pull-scope exclusion ─────────────────
|
|
610
|
-
// The sessions prefix is PUSH-ONLY: pushed into the vault but never
|
|
611
|
-
// auto-pulled onto grantee laptops in ANY mode (including `all`, which
|
|
612
|
-
// otherwise pulls the whole bucket). The engine expresses this as
|
|
613
|
-
// `excludePrefixes`, applied to the DOWNLOAD filter only — never to
|
|
614
|
-
// scope-shrink, so an authored/pinned session is never orphaned.
|
|
615
|
-
describe("sessions push-only exclusion (US-006)", () => {
|
|
616
|
-
const withSession = () => {
|
|
617
|
-
REMOTE.current = [
|
|
618
|
-
{ key: "knowledge/readme.md", size: 100, lastModified: new Date(), etag: '"def456"' },
|
|
619
|
-
{ key: "sessions/prs_1/2026-07-11T10-00-00.json", size: 50, lastModified: new Date(), etag: '"sess1"' },
|
|
620
|
-
];
|
|
621
|
-
};
|
|
622
|
-
const sessionPath = "sessions/prs_1/2026-07-11T10-00-00.json";
|
|
623
|
-
it("AC4: `all` mode subtracts excludePrefixes — a sessions key is skip-out-of-scope; non-session downloads", async () => {
|
|
624
|
-
withSession();
|
|
625
|
-
const result = await sync({
|
|
626
|
-
company: "acme",
|
|
627
|
-
vaultConfig: mockConfig,
|
|
628
|
-
hqRoot: tmpDir,
|
|
629
|
-
syncMode: "all",
|
|
630
|
-
excludePrefixes: ["sessions/"],
|
|
631
|
-
});
|
|
632
|
-
// `all` normally pulls everything; the exclusion carves sessions out.
|
|
633
|
-
expect(result.filesDownloaded).toBe(1);
|
|
634
|
-
expect(result.filesOutOfScope).toBe(1);
|
|
635
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
636
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(false);
|
|
637
|
-
});
|
|
638
|
-
it("AC4: excludePrefixes is NOT fed to scope-shrink — a previously-pulled session file is never orphaned", async () => {
|
|
639
|
-
withSession();
|
|
640
|
-
// 1. Full pull WITHOUT the exclusion: the session materializes and journals
|
|
641
|
-
// as a pulled (direction:"down") entry under an `all`-mode PullRecord.
|
|
642
|
-
const first = await sync({
|
|
643
|
-
company: "acme",
|
|
644
|
-
vaultConfig: mockConfig,
|
|
645
|
-
hqRoot: tmpDir,
|
|
646
|
-
syncMode: "all",
|
|
647
|
-
});
|
|
648
|
-
expect(first.filesDownloaded).toBe(2);
|
|
649
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(true);
|
|
650
|
-
// 2. Full pull WITH the sessions exclusion. The session is now
|
|
651
|
-
// skip-out-of-scope (not re-pulled) but MUST NOT be pruned: the exclude
|
|
652
|
-
// set never reaches scope-shrink, whose currentPrefixSet stays `[""]`
|
|
653
|
-
// (covers everything). If it WERE fed in, the file would be orphaned.
|
|
654
|
-
const second = await sync({
|
|
655
|
-
company: "acme",
|
|
656
|
-
vaultConfig: mockConfig,
|
|
657
|
-
hqRoot: tmpDir,
|
|
658
|
-
syncMode: "all",
|
|
659
|
-
excludePrefixes: ["sessions/"],
|
|
660
|
-
});
|
|
661
|
-
expect(second.filesOutOfScope).toBe(1);
|
|
662
|
-
expect(second.scopeOrphansRemoved).toBe(0);
|
|
663
|
-
expect(second.scopeOrphansBlocked).toBe(0);
|
|
664
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(true);
|
|
665
|
-
});
|
|
666
|
-
it("AC6: a pinned/in-scope session survives scope-shrink even though excludePrefixes skips its re-pull", async () => {
|
|
667
|
-
withSession();
|
|
668
|
-
// Materialize both under all-mode (knowledge sync + an on-demand session get).
|
|
669
|
-
await sync({ company: "acme", vaultConfig: mockConfig, hqRoot: tmpDir, syncMode: "all" });
|
|
670
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(true);
|
|
671
|
-
// A scoped shared pull whose inclusion prefixSet includes the pinned
|
|
672
|
-
// session key (as resolvePullScope would after `hq files get` pins it),
|
|
673
|
-
// plus the push-only sessions exclusion. The session is NOT re-pulled
|
|
674
|
-
// (exclusion), but the pin keeps it in scope-shrink's currentPrefixSet, so
|
|
675
|
-
// it is retained rather than orphaned.
|
|
676
|
-
const scoped = await sync({
|
|
677
|
-
company: "acme",
|
|
678
|
-
vaultConfig: mockConfig,
|
|
679
|
-
hqRoot: tmpDir,
|
|
680
|
-
syncMode: "shared",
|
|
681
|
-
prefixSet: ["knowledge/", sessionPath],
|
|
682
|
-
excludePrefixes: ["sessions/"],
|
|
683
|
-
});
|
|
684
|
-
expect(scoped.scopeOrphansRemoved).toBe(0);
|
|
685
|
-
expect(scoped.scopeOrphansBlocked).toBe(0);
|
|
686
|
-
// Session is not re-downloaded (excluded) but survives on disk...
|
|
687
|
-
expect(scoped.filesOutOfScope).toBe(1);
|
|
688
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(true);
|
|
689
|
-
// ...and the in-scope knowledge file is retained too.
|
|
690
|
-
expect(fs.existsSync(companyRel("knowledge/readme.md"))).toBe(true);
|
|
691
|
-
});
|
|
692
|
-
// ── feedback_d2082110 follow-up ────────────────────────────────────────
|
|
693
|
-
// `skip-out-of-scope` carries TWO causes with OPPOSITE remedies:
|
|
694
|
-
// membership scope (fixed by raising the access level to `all`) and the
|
|
695
|
-
// push-only sessions exclusion (NOT fixed by that — sessions are withheld
|
|
696
|
-
// in every mode, `all` included, and materialize only via `hq files get`).
|
|
697
|
-
// The `scope-materialization-gap` advisory names the shared→all lever, so
|
|
698
|
-
// it must count and sample ONLY membership-withheld keys. Counting session
|
|
699
|
-
// keys inflates the gap, can fill the sample list with keys the lever will
|
|
700
|
-
// never deliver, and can fire the whole advisory when the membership scope
|
|
701
|
-
// withheld nothing — sending the reporter back into exactly the
|
|
702
|
-
// flip-everything-to-`all`-and-still-miss-files loop the event exists to end.
|
|
703
|
-
describe("materialization gap excludes push-only keys (feedback_d2082110)", () => {
|
|
704
|
-
const collectEvents = () => {
|
|
705
|
-
const events = [];
|
|
706
|
-
return {
|
|
707
|
-
events,
|
|
708
|
-
onEvent: (e) => events.push(e),
|
|
709
|
-
};
|
|
710
|
-
};
|
|
711
|
-
const gapOf = (events) => events.find((e) => e.type === "scope-materialization-gap");
|
|
712
|
-
it("a leg withholding ONLY push-only session keys emits no gap — the shared→all lever would not materialize them", async () => {
|
|
713
|
-
withSession();
|
|
714
|
-
const { events, onEvent } = collectEvents();
|
|
715
|
-
const result = await sync({
|
|
716
|
-
company: "acme",
|
|
717
|
-
vaultConfig: mockConfig,
|
|
718
|
-
hqRoot: tmpDir,
|
|
719
|
-
syncMode: "shared",
|
|
720
|
-
prefixSet: ["knowledge/"],
|
|
721
|
-
excludePrefixes: ["sessions/"],
|
|
722
|
-
onEvent,
|
|
723
|
-
});
|
|
724
|
-
// The session key is still withheld — under scoped listing it never
|
|
725
|
-
// even enters the plan (sessions/ is outside the inclusion scope), so
|
|
726
|
-
// it is not counted on the filesOutOfScope axis either.
|
|
727
|
-
expect(result.filesDownloaded).toBe(1);
|
|
728
|
-
expect(result.filesOutOfScope).toBe(0);
|
|
729
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(false);
|
|
730
|
-
// But the membership scope withheld nothing, so there is no
|
|
731
|
-
// shared-vs-all gap to report and no `all` lever to advertise.
|
|
732
|
-
expect(gapOf(events)).toBeUndefined();
|
|
733
|
-
});
|
|
734
|
-
it("scoped listing withholds membership-out-of-scope keys at LIST time — no gap event, no materialization", async () => {
|
|
735
|
-
// BEHAVIOR CHANGE (targeted-sync scoped listing): a shared leg no
|
|
736
|
-
// longer materializes the full remote listing, so keys outside the
|
|
737
|
-
// membership scope never reach the plan and the
|
|
738
|
-
// `scope-materialization-gap` advisory has nothing to count. The
|
|
739
|
-
// withheld-key telemetry was traded for not holding the whole vault
|
|
740
|
-
// listing in memory on every scoped pull; the classification logic
|
|
741
|
-
// (membership-scope vs push-only) still guards any full listing that
|
|
742
|
-
// reaches the plan (see the all-mode AC4 test and the pinned-session
|
|
743
|
-
// test below).
|
|
744
|
-
REMOTE.current = [
|
|
745
|
-
{ key: "knowledge/readme.md", size: 100, lastModified: new Date(), etag: '"def456"' },
|
|
746
|
-
{ key: "docs/handoff.md", size: 42, lastModified: new Date(), etag: '"abc123"' },
|
|
747
|
-
{ key: sessionPath, size: 50, lastModified: new Date(), etag: '"sess1"' },
|
|
748
|
-
];
|
|
749
|
-
const { events, onEvent } = collectEvents();
|
|
750
|
-
const result = await sync({
|
|
751
|
-
company: "acme",
|
|
752
|
-
vaultConfig: mockConfig,
|
|
753
|
-
hqRoot: tmpDir,
|
|
754
|
-
syncMode: "shared",
|
|
755
|
-
prefixSet: ["knowledge/"],
|
|
756
|
-
excludePrefixes: ["sessions/"],
|
|
757
|
-
onEvent,
|
|
758
|
-
});
|
|
759
|
-
// Only the in-scope key was listed and pulled; the membership-withheld
|
|
760
|
-
// and push-only keys were never listed, so neither materializes and no
|
|
761
|
-
// gap advisory fires.
|
|
762
|
-
expect(result.filesDownloaded).toBe(1);
|
|
763
|
-
expect(result.filesOutOfScope).toBe(0);
|
|
764
|
-
expect(fs.existsSync(companyRel("docs/handoff.md"))).toBe(false);
|
|
765
|
-
expect(fs.existsSync(companyRel(sessionPath))).toBe(false);
|
|
766
|
-
expect(gapOf(events)).toBeUndefined();
|
|
767
|
-
});
|
|
768
|
-
it("a pinned session key withheld on the push-only axis alone is not a membership gap", async () => {
|
|
769
|
-
// Exercises the OTHER classification branch: the key PASSES the
|
|
770
|
-
// inclusion check (it is pinned into prefixSet, as resolvePullScope
|
|
771
|
-
// does after `hq files get`) and is withheld by the exclusion filter.
|
|
772
|
-
withSession();
|
|
773
|
-
const { events, onEvent } = collectEvents();
|
|
774
|
-
const result = await sync({
|
|
775
|
-
company: "acme",
|
|
776
|
-
vaultConfig: mockConfig,
|
|
777
|
-
hqRoot: tmpDir,
|
|
778
|
-
syncMode: "shared",
|
|
779
|
-
prefixSet: ["knowledge/", sessionPath],
|
|
780
|
-
excludePrefixes: ["sessions/"],
|
|
781
|
-
onEvent,
|
|
782
|
-
});
|
|
783
|
-
expect(result.filesDownloaded).toBe(1);
|
|
784
|
-
expect(result.filesOutOfScope).toBe(1);
|
|
785
|
-
expect(gapOf(events)).toBeUndefined();
|
|
786
|
-
});
|
|
787
|
-
});
|
|
788
|
-
});
|
|
789
|
-
// Personal-vault captured transcripts (`workspace/.session-logs/`) are
|
|
790
|
-
// push-only: the capturing machine uploads them, but no personal pull —
|
|
791
|
-
// including `all` mode and a foreground `hq sync --personal` — auto-downloads
|
|
792
|
-
// the prefix. Local retention depends on this: without the exclusion, prune
|
|
793
|
-
// would be undone by the next pull. The engine unions the prefix into the
|
|
794
|
-
// exclude set when `personalMode === true`; tests below do not pass
|
|
795
|
-
// `excludePrefixes` so a missing union would fail.
|
|
796
|
-
describe("personal session-log push-only exclusion", () => {
|
|
797
|
-
const sessionLogKey = `${SESSION_LOGS_PUSH_ONLY_PREFIX}codex/2026/08/rollout.jsonl`;
|
|
798
|
-
const sessionLogPath = () => path.join(tmpDir, ...sessionLogKey.split("/"));
|
|
799
|
-
const withSessionLog = () => {
|
|
800
|
-
REMOTE.current = [
|
|
801
|
-
{ key: "knowledge/readme.md", size: 100, lastModified: new Date(), etag: '"def456"' },
|
|
802
|
-
{ key: sessionLogKey, size: 50, lastModified: new Date(), etag: '"sess-log-1"' },
|
|
803
|
-
];
|
|
804
|
-
};
|
|
805
|
-
it("personal `all` mode never downloads workspace/.session-logs/", async () => {
|
|
806
|
-
withSessionLog();
|
|
807
|
-
const result = await sync({
|
|
808
|
-
company: "acme",
|
|
809
|
-
vaultConfig: mockConfig,
|
|
810
|
-
hqRoot: tmpDir,
|
|
811
|
-
syncMode: "all",
|
|
812
|
-
personalMode: true,
|
|
813
|
-
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
814
|
-
skipReindex: true,
|
|
815
|
-
});
|
|
816
|
-
expect(result.filesDownloaded).toBe(1);
|
|
817
|
-
expect(result.filesOutOfScope).toBe(1);
|
|
818
|
-
expect(fs.existsSync(path.join(tmpDir, "knowledge", "readme.md"))).toBe(true);
|
|
819
|
-
expect(fs.existsSync(sessionLogPath())).toBe(false);
|
|
820
|
-
});
|
|
821
|
-
it("a DEEP_ARCHIVE session-log key is not downloaded and does not tombstone the journal", async () => {
|
|
822
|
-
writeJournal(PERSONAL_VAULT_JOURNAL_SLUG, {
|
|
823
|
-
version: "2",
|
|
824
|
-
lastSync: "",
|
|
825
|
-
pulls: [],
|
|
826
|
-
files: {
|
|
827
|
-
[sessionLogKey]: {
|
|
828
|
-
hash: "a".repeat(64),
|
|
829
|
-
size: 50,
|
|
830
|
-
syncedAt: "2026-08-31T00:00:00.000Z",
|
|
831
|
-
direction: "up",
|
|
832
|
-
remoteEtag: "deep-archive-etag",
|
|
833
|
-
kind: "file",
|
|
834
|
-
},
|
|
835
|
-
},
|
|
836
|
-
});
|
|
837
|
-
REMOTE.current = [
|
|
838
|
-
{
|
|
839
|
-
key: sessionLogKey,
|
|
840
|
-
size: 50,
|
|
841
|
-
lastModified: new Date(),
|
|
842
|
-
etag: "deep-archive-etag",
|
|
843
|
-
storageClass: "DEEP_ARCHIVE",
|
|
844
|
-
},
|
|
845
|
-
];
|
|
846
|
-
const result = await sync({
|
|
847
|
-
company: "acme",
|
|
848
|
-
vaultConfig: mockConfig,
|
|
849
|
-
hqRoot: tmpDir,
|
|
850
|
-
syncMode: "all",
|
|
851
|
-
personalMode: true,
|
|
852
|
-
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
853
|
-
skipReindex: true,
|
|
854
|
-
});
|
|
855
|
-
expect(result.filesDownloaded).toBe(0);
|
|
856
|
-
expect(result.filesTombstoned).toBe(0);
|
|
857
|
-
const s3 = await import("../s3.js");
|
|
858
|
-
expect(s3.downloadFile).not.toHaveBeenCalled();
|
|
859
|
-
expect(fs.existsSync(sessionLogPath())).toBe(false);
|
|
860
|
-
expect(readJournal(PERSONAL_VAULT_JOURNAL_SLUG).files[sessionLogKey]).toMatchObject({
|
|
861
|
-
remoteEtag: "deep-archive-etag",
|
|
862
|
-
});
|
|
863
|
-
});
|
|
864
|
-
it("scope-shrink does not prune a local workspace/.session-logs/ file after the exclusion", async () => {
|
|
865
|
-
withSessionLog();
|
|
866
|
-
const localPath = sessionLogPath();
|
|
867
|
-
fs.mkdirSync(path.dirname(localPath), { recursive: true });
|
|
868
|
-
fs.writeFileSync(localPath, "captured locally\n");
|
|
869
|
-
writeJournal(PERSONAL_VAULT_JOURNAL_SLUG, {
|
|
870
|
-
version: "2",
|
|
871
|
-
lastSync: new Date().toISOString(),
|
|
872
|
-
pulls: [],
|
|
873
|
-
files: {
|
|
874
|
-
[sessionLogKey]: {
|
|
875
|
-
hash: "local-hash",
|
|
876
|
-
size: 18,
|
|
877
|
-
syncedAt: new Date().toISOString(),
|
|
878
|
-
direction: "up",
|
|
879
|
-
remoteEtag: "sess-log-1",
|
|
880
|
-
kind: "file",
|
|
881
|
-
createdBySub: "uploader-sub",
|
|
882
|
-
},
|
|
883
|
-
},
|
|
884
|
-
});
|
|
885
|
-
const result = await sync({
|
|
886
|
-
company: "acme",
|
|
887
|
-
vaultConfig: mockConfig,
|
|
888
|
-
hqRoot: tmpDir,
|
|
889
|
-
syncMode: "all",
|
|
890
|
-
personalMode: true,
|
|
891
|
-
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
892
|
-
skipReindex: true,
|
|
893
|
-
});
|
|
894
|
-
expect(result.filesOutOfScope).toBe(1);
|
|
895
|
-
expect(result.scopeOrphansRemoved).toBe(0);
|
|
896
|
-
expect(result.scopeOrphansBlocked).toBe(0);
|
|
897
|
-
expect(fs.existsSync(localPath)).toBe(true);
|
|
898
|
-
expect(fs.readFileSync(localPath, "utf8")).toBe("captured locally\n");
|
|
899
|
-
expect(readJournal(PERSONAL_VAULT_JOURNAL_SLUG).files[sessionLogKey]).toBeDefined();
|
|
900
|
-
});
|
|
901
|
-
});
|
|
902
|
-
});
|
|
903
|
-
//# sourceMappingURL=sync-scope.test.js.map
|