@indigoai-us/hq-cloud 6.18.44-alpha.8 → 6.18.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/sync-runner-planning.d.ts +12 -0
- package/dist/bin/sync-runner-planning.d.ts.map +1 -1
- package/dist/bin/sync-runner-planning.js +18 -0
- package/dist/bin/sync-runner-planning.js.map +1 -1
- package/dist/bin/sync-runner-watch-loop.d.ts +18 -0
- package/dist/bin/sync-runner-watch-loop.d.ts.map +1 -1
- package/dist/bin/sync-runner-watch-loop.js +75 -6
- package/dist/bin/sync-runner-watch-loop.js.map +1 -1
- package/dist/bin/sync-runner.d.ts +22 -1
- package/dist/bin/sync-runner.d.ts.map +1 -1
- package/dist/bin/sync-runner.js +33 -4
- package/dist/bin/sync-runner.js.map +1 -1
- package/dist/cli/conflict.d.ts.map +1 -1
- package/dist/cli/conflict.js +2 -1
- package/dist/cli/conflict.js.map +1 -1
- package/dist/cli/rescue-core.d.ts +6 -0
- package/dist/cli/rescue-core.d.ts.map +1 -1
- package/dist/cli/rescue-core.js +10 -1
- package/dist/cli/rescue-core.js.map +1 -1
- package/dist/cli/rescue-windows-test-harness.d.ts +19 -0
- package/dist/cli/rescue-windows-test-harness.d.ts.map +1 -0
- package/dist/cli/rescue-windows-test-harness.js +443 -0
- package/dist/cli/rescue-windows-test-harness.js.map +1 -0
- package/dist/company-resolver.d.ts +22 -0
- package/dist/company-resolver.d.ts.map +1 -1
- package/dist/company-resolver.js +1 -1
- package/dist/company-resolver.js.map +1 -1
- package/dist/ignore.d.ts +4 -1
- package/dist/ignore.d.ts.map +1 -1
- package/dist/ignore.js +10 -12
- package/dist/ignore.js.map +1 -1
- package/dist/journal-snapshot-decoder.js +15 -2
- package/dist/journal-snapshot-decoder.js.map +1 -1
- package/dist/sync/durable-apply.d.ts +2 -0
- package/dist/sync/durable-apply.d.ts.map +1 -1
- package/dist/sync/durable-apply.js +9 -12
- package/dist/sync/durable-apply.js.map +1 -1
- package/dist/sync/fsync-compat.d.ts +13 -0
- package/dist/sync/fsync-compat.d.ts.map +1 -0
- package/dist/sync/fsync-compat.js +33 -0
- package/dist/sync/fsync-compat.js.map +1 -0
- package/dist/sync/multipart-uploader.d.ts.map +1 -1
- package/dist/sync/multipart-uploader.js +2 -1
- package/dist/sync/multipart-uploader.js.map +1 -1
- package/dist/sync/scope-inventory-client.d.ts.map +1 -1
- package/dist/sync/scope-inventory-client.js +7 -2
- package/dist/sync/scope-inventory-client.js.map +1 -1
- package/dist/telemetry.d.ts +31 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +177 -17
- package/dist/telemetry.js.map +1 -1
- package/dist/usage-company-fallback.d.ts +104 -0
- package/dist/usage-company-fallback.d.ts.map +1 -0
- package/dist/usage-company-fallback.js +599 -0
- package/dist/usage-company-fallback.js.map +1 -0
- package/dist/watch-owner-lease.d.ts +3 -0
- package/dist/watch-owner-lease.d.ts.map +1 -1
- package/dist/watch-owner-lease.js +14 -3
- package/dist/watch-owner-lease.js.map +1 -1
- package/package.json +2 -2
- package/dist/active-company.test.d.ts +0 -2
- package/dist/active-company.test.d.ts.map +0 -1
- package/dist/active-company.test.js +0 -149
- package/dist/active-company.test.js.map +0 -1
- package/dist/agent-codex-instructions.test.d.ts +0 -2
- package/dist/agent-codex-instructions.test.d.ts.map +0 -1
- package/dist/agent-codex-instructions.test.js +0 -271
- package/dist/agent-codex-instructions.test.js.map +0 -1
- package/dist/backup-prune.test.d.ts +0 -2
- package/dist/backup-prune.test.d.ts.map +0 -1
- package/dist/backup-prune.test.js +0 -154
- package/dist/backup-prune.test.js.map +0 -1
- package/dist/bandwidth.test.d.ts +0 -2
- package/dist/bandwidth.test.d.ts.map +0 -1
- package/dist/bandwidth.test.js +0 -342
- package/dist/bandwidth.test.js.map +0 -1
- package/dist/best-effort-error.test.d.ts +0 -2
- package/dist/best-effort-error.test.d.ts.map +0 -1
- package/dist/best-effort-error.test.js +0 -54
- package/dist/best-effort-error.test.js.map +0 -1
- package/dist/bin/area-ledger-migration.test.d.ts +0 -2
- package/dist/bin/area-ledger-migration.test.d.ts.map +0 -1
- package/dist/bin/area-ledger-migration.test.js +0 -410
- package/dist/bin/area-ledger-migration.test.js.map +0 -1
- package/dist/bin/backup-prune-runner.test.d.ts +0 -2
- package/dist/bin/backup-prune-runner.test.d.ts.map +0 -1
- package/dist/bin/backup-prune-runner.test.js +0 -22
- package/dist/bin/backup-prune-runner.test.js.map +0 -1
- package/dist/bin/journal-repair.test.d.ts +0 -2
- package/dist/bin/journal-repair.test.d.ts.map +0 -1
- package/dist/bin/journal-repair.test.js +0 -53
- package/dist/bin/journal-repair.test.js.map +0 -1
- package/dist/bin/layout-compatibility.test.d.ts +0 -2
- package/dist/bin/layout-compatibility.test.d.ts.map +0 -1
- package/dist/bin/layout-compatibility.test.js +0 -87
- package/dist/bin/layout-compatibility.test.js.map +0 -1
- package/dist/bin/outpost-heartbeat.test.d.ts +0 -7
- package/dist/bin/outpost-heartbeat.test.d.ts.map +0 -1
- package/dist/bin/outpost-heartbeat.test.js +0 -84
- package/dist/bin/outpost-heartbeat.test.js.map +0 -1
- package/dist/bin/outpost-session-host.test.d.ts +0 -7
- package/dist/bin/outpost-session-host.test.d.ts.map +0 -1
- package/dist/bin/outpost-session-host.test.js +0 -52
- package/dist/bin/outpost-session-host.test.js.map +0 -1
- package/dist/bin/sync-mutation.test.d.ts +0 -2
- package/dist/bin/sync-mutation.test.d.ts.map +0 -1
- package/dist/bin/sync-mutation.test.js +0 -64
- package/dist/bin/sync-mutation.test.js.map +0 -1
- package/dist/bin/sync-runner-args.test.d.ts +0 -2
- package/dist/bin/sync-runner-args.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-args.test.js +0 -82
- package/dist/bin/sync-runner-args.test.js.map +0 -1
- package/dist/bin/sync-runner-auth-wait.test.d.ts +0 -2
- package/dist/bin/sync-runner-auth-wait.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-auth-wait.test.js +0 -406
- package/dist/bin/sync-runner-auth-wait.test.js.map +0 -1
- package/dist/bin/sync-runner-backoff.regression.test.d.ts +0 -29
- package/dist/bin/sync-runner-backoff.regression.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-backoff.regression.test.js +0 -224
- package/dist/bin/sync-runner-backoff.regression.test.js.map +0 -1
- package/dist/bin/sync-runner-company.test.d.ts +0 -2
- package/dist/bin/sync-runner-company.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-company.test.js +0 -2439
- package/dist/bin/sync-runner-company.test.js.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.d.ts +0 -2
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.js +0 -648
- package/dist/bin/sync-runner-delete-snapshot-mixed.bench.test.js.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot.bench.test.d.ts +0 -2
- package/dist/bin/sync-runner-delete-snapshot.bench.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-delete-snapshot.bench.test.js +0 -329
- package/dist/bin/sync-runner-delete-snapshot.bench.test.js.map +0 -1
- package/dist/bin/sync-runner-events.test.d.ts +0 -2
- package/dist/bin/sync-runner-events.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-events.test.js +0 -364
- package/dist/bin/sync-runner-events.test.js.map +0 -1
- package/dist/bin/sync-runner-heap-telemetry.test.d.ts +0 -2
- package/dist/bin/sync-runner-heap-telemetry.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-heap-telemetry.test.js +0 -1966
- package/dist/bin/sync-runner-heap-telemetry.test.js.map +0 -1
- package/dist/bin/sync-runner-manifest.test.d.ts +0 -12
- package/dist/bin/sync-runner-manifest.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-manifest.test.js +0 -921
- package/dist/bin/sync-runner-manifest.test.js.map +0 -1
- package/dist/bin/sync-runner-planning.test.d.ts +0 -2
- package/dist/bin/sync-runner-planning.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-planning.test.js +0 -448
- package/dist/bin/sync-runner-planning.test.js.map +0 -1
- package/dist/bin/sync-runner-post-sync-flags.test.d.ts +0 -2
- package/dist/bin/sync-runner-post-sync-flags.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-post-sync-flags.test.js +0 -64
- package/dist/bin/sync-runner-post-sync-flags.test.js.map +0 -1
- package/dist/bin/sync-runner-publish-expansion.test.d.ts +0 -2
- package/dist/bin/sync-runner-publish-expansion.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-publish-expansion.test.js +0 -54
- package/dist/bin/sync-runner-publish-expansion.test.js.map +0 -1
- package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts +0 -2
- package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-receiver-unresolved-company.test.js +0 -379
- package/dist/bin/sync-runner-receiver-unresolved-company.test.js.map +0 -1
- package/dist/bin/sync-runner-rollup.test.d.ts +0 -2
- package/dist/bin/sync-runner-rollup.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-rollup.test.js +0 -24
- package/dist/bin/sync-runner-rollup.test.js.map +0 -1
- package/dist/bin/sync-runner-watch-loop.test.d.ts +0 -2
- package/dist/bin/sync-runner-watch-loop.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-watch-loop.test.js +0 -734
- package/dist/bin/sync-runner-watch-loop.test.js.map +0 -1
- package/dist/bin/sync-runner-watch-routes.test.d.ts +0 -2
- package/dist/bin/sync-runner-watch-routes.test.d.ts.map +0 -1
- package/dist/bin/sync-runner-watch-routes.test.js +0 -181
- package/dist/bin/sync-runner-watch-routes.test.js.map +0 -1
- package/dist/bin/sync-runner.test.d.ts +0 -10
- package/dist/bin/sync-runner.test.d.ts.map +0 -1
- package/dist/bin/sync-runner.test.js +0 -18984
- package/dist/bin/sync-runner.test.js.map +0 -1
- package/dist/cli/case-alias.test.d.ts +0 -2
- package/dist/cli/case-alias.test.d.ts.map +0 -1
- package/dist/cli/case-alias.test.js +0 -96
- package/dist/cli/case-alias.test.js.map +0 -1
- package/dist/cli/conflict-recovery.test.d.ts +0 -2
- package/dist/cli/conflict-recovery.test.d.ts.map +0 -1
- package/dist/cli/conflict-recovery.test.js +0 -201
- package/dist/cli/conflict-recovery.test.js.map +0 -1
- package/dist/cli/conflict-winner.test.d.ts +0 -7
- package/dist/cli/conflict-winner.test.d.ts.map +0 -1
- package/dist/cli/conflict-winner.test.js +0 -98
- package/dist/cli/conflict-winner.test.js.map +0 -1
- package/dist/cli/doctor.test.d.ts +0 -13
- package/dist/cli/doctor.test.d.ts.map +0 -1
- package/dist/cli/doctor.test.js +0 -607
- package/dist/cli/doctor.test.js.map +0 -1
- package/dist/cli/invite.test.d.ts +0 -5
- package/dist/cli/invite.test.d.ts.map +0 -1
- package/dist/cli/invite.test.js +0 -178
- package/dist/cli/invite.test.js.map +0 -1
- package/dist/cli/onepass-pull-planner-regressions.test.d.ts +0 -2
- package/dist/cli/onepass-pull-planner-regressions.test.d.ts.map +0 -1
- package/dist/cli/onepass-pull-planner-regressions.test.js +0 -300
- package/dist/cli/onepass-pull-planner-regressions.test.js.map +0 -1
- package/dist/cli/onepass-pull-planner.test.d.ts +0 -2
- package/dist/cli/onepass-pull-planner.test.d.ts.map +0 -1
- package/dist/cli/onepass-pull-planner.test.js +0 -266
- package/dist/cli/onepass-pull-planner.test.js.map +0 -1
- package/dist/cli/push-scan-exclusions.test.d.ts +0 -2
- package/dist/cli/push-scan-exclusions.test.d.ts.map +0 -1
- package/dist/cli/push-scan-exclusions.test.js +0 -99
- package/dist/cli/push-scan-exclusions.test.js.map +0 -1
- package/dist/cli/reindex-knowledge.test.d.ts +0 -12
- package/dist/cli/reindex-knowledge.test.d.ts.map +0 -1
- package/dist/cli/reindex-knowledge.test.js +0 -260
- package/dist/cli/reindex-knowledge.test.js.map +0 -1
- package/dist/cli/reindex.test.d.ts +0 -11
- package/dist/cli/reindex.test.d.ts.map +0 -1
- package/dist/cli/reindex.test.js +0 -811
- package/dist/cli/reindex.test.js.map +0 -1
- package/dist/cli/rescue-breaker.test.d.ts +0 -2
- package/dist/cli/rescue-breaker.test.d.ts.map +0 -1
- package/dist/cli/rescue-breaker.test.js +0 -812
- package/dist/cli/rescue-breaker.test.js.map +0 -1
- package/dist/cli/rescue-classify-ordering.test.d.ts +0 -2
- package/dist/cli/rescue-classify-ordering.test.d.ts.map +0 -1
- package/dist/cli/rescue-classify-ordering.test.js +0 -500
- package/dist/cli/rescue-classify-ordering.test.js.map +0 -1
- package/dist/cli/rescue-clone-diagnostics.test.d.ts +0 -2
- package/dist/cli/rescue-clone-diagnostics.test.d.ts.map +0 -1
- package/dist/cli/rescue-clone-diagnostics.test.js +0 -101
- package/dist/cli/rescue-clone-diagnostics.test.js.map +0 -1
- package/dist/cli/rescue-clone-network-retry.test.d.ts +0 -2
- package/dist/cli/rescue-clone-network-retry.test.d.ts.map +0 -1
- package/dist/cli/rescue-clone-network-retry.test.js +0 -415
- package/dist/cli/rescue-clone-network-retry.test.js.map +0 -1
- package/dist/cli/rescue-core-stamp.test.d.ts +0 -2
- package/dist/cli/rescue-core-stamp.test.d.ts.map +0 -1
- package/dist/cli/rescue-core-stamp.test.js +0 -364
- package/dist/cli/rescue-core-stamp.test.js.map +0 -1
- package/dist/cli/rescue-drift-reconcile.test.d.ts +0 -2
- package/dist/cli/rescue-drift-reconcile.test.d.ts.map +0 -1
- package/dist/cli/rescue-drift-reconcile.test.js +0 -162
- package/dist/cli/rescue-drift-reconcile.test.js.map +0 -1
- package/dist/cli/rescue-drop-dir-symlink.test.d.ts +0 -2
- package/dist/cli/rescue-drop-dir-symlink.test.d.ts.map +0 -1
- package/dist/cli/rescue-drop-dir-symlink.test.js +0 -255
- package/dist/cli/rescue-drop-dir-symlink.test.js.map +0 -1
- package/dist/cli/rescue-exec-bit-preserve.test.d.ts +0 -2
- package/dist/cli/rescue-exec-bit-preserve.test.d.ts.map +0 -1
- package/dist/cli/rescue-exec-bit-preserve.test.js +0 -177
- package/dist/cli/rescue-exec-bit-preserve.test.js.map +0 -1
- package/dist/cli/rescue-hq-root-guard.test.d.ts +0 -2
- package/dist/cli/rescue-hq-root-guard.test.d.ts.map +0 -1
- package/dist/cli/rescue-hq-root-guard.test.js +0 -210
- package/dist/cli/rescue-hq-root-guard.test.js.map +0 -1
- package/dist/cli/rescue-journal-reconcile.test.d.ts +0 -2
- package/dist/cli/rescue-journal-reconcile.test.d.ts.map +0 -1
- package/dist/cli/rescue-journal-reconcile.test.js +0 -186
- package/dist/cli/rescue-journal-reconcile.test.js.map +0 -1
- package/dist/cli/rescue-keep-local-ignore.test.d.ts +0 -2
- package/dist/cli/rescue-keep-local-ignore.test.d.ts.map +0 -1
- package/dist/cli/rescue-keep-local-ignore.test.js +0 -315
- package/dist/cli/rescue-keep-local-ignore.test.js.map +0 -1
- package/dist/cli/rescue-move.test.d.ts +0 -2
- package/dist/cli/rescue-move.test.d.ts.map +0 -1
- package/dist/cli/rescue-move.test.js +0 -166
- package/dist/cli/rescue-move.test.js.map +0 -1
- package/dist/cli/rescue-mtime-preserve.test.d.ts +0 -2
- package/dist/cli/rescue-mtime-preserve.test.d.ts.map +0 -1
- package/dist/cli/rescue-mtime-preserve.test.js +0 -186
- package/dist/cli/rescue-mtime-preserve.test.js.map +0 -1
- package/dist/cli/rescue-preserve-copy-symlink.test.d.ts +0 -2
- package/dist/cli/rescue-preserve-copy-symlink.test.d.ts.map +0 -1
- package/dist/cli/rescue-preserve-copy-symlink.test.js +0 -483
- package/dist/cli/rescue-preserve-copy-symlink.test.js.map +0 -1
- package/dist/cli/rescue-realpath.test.d.ts +0 -2
- package/dist/cli/rescue-realpath.test.d.ts.map +0 -1
- package/dist/cli/rescue-realpath.test.js +0 -109
- package/dist/cli/rescue-realpath.test.js.map +0 -1
- package/dist/cli/rescue-restore-flag.test.d.ts +0 -2
- package/dist/cli/rescue-restore-flag.test.d.ts.map +0 -1
- package/dist/cli/rescue-restore-flag.test.js +0 -82
- package/dist/cli/rescue-restore-flag.test.js.map +0 -1
- package/dist/cli/rescue-rsync-preflight.test.d.ts +0 -2
- package/dist/cli/rescue-rsync-preflight.test.d.ts.map +0 -1
- package/dist/cli/rescue-rsync-preflight.test.js +0 -579
- package/dist/cli/rescue-rsync-preflight.test.js.map +0 -1
- package/dist/cli/rescue-rsync-status.test.d.ts +0 -2
- package/dist/cli/rescue-rsync-status.test.d.ts.map +0 -1
- package/dist/cli/rescue-rsync-status.test.js +0 -406
- package/dist/cli/rescue-rsync-status.test.js.map +0 -1
- package/dist/cli/rescue-settings-reconcile.test.d.ts +0 -2
- package/dist/cli/rescue-settings-reconcile.test.d.ts.map +0 -1
- package/dist/cli/rescue-settings-reconcile.test.js +0 -610
- package/dist/cli/rescue-settings-reconcile.test.js.map +0 -1
- package/dist/cli/rescue-snapshot-copy.test.d.ts +0 -2
- package/dist/cli/rescue-snapshot-copy.test.d.ts.map +0 -1
- package/dist/cli/rescue-snapshot-copy.test.js +0 -790
- package/dist/cli/rescue-snapshot-copy.test.js.map +0 -1
- package/dist/cli/rescue-snapshot-recovery.test.d.ts +0 -2
- package/dist/cli/rescue-snapshot-recovery.test.d.ts.map +0 -1
- package/dist/cli/rescue-snapshot-recovery.test.js +0 -265
- package/dist/cli/rescue-snapshot-recovery.test.js.map +0 -1
- package/dist/cli/rescue-snapshot.test.d.ts +0 -2
- package/dist/cli/rescue-snapshot.test.d.ts.map +0 -1
- package/dist/cli/rescue-snapshot.test.js +0 -46
- package/dist/cli/rescue-snapshot.test.js.map +0 -1
- package/dist/cli/rescue-source-switch-floor.test.d.ts +0 -2
- package/dist/cli/rescue-source-switch-floor.test.d.ts.map +0 -1
- package/dist/cli/rescue-source-switch-floor.test.js +0 -247
- package/dist/cli/rescue-source-switch-floor.test.js.map +0 -1
- package/dist/cli/rescue-unchanged-delete.test.d.ts +0 -2
- package/dist/cli/rescue-unchanged-delete.test.d.ts.map +0 -1
- package/dist/cli/rescue-unchanged-delete.test.js +0 -305
- package/dist/cli/rescue-unchanged-delete.test.js.map +0 -1
- package/dist/cli/rescue.reindex.test.d.ts +0 -2
- package/dist/cli/rescue.reindex.test.d.ts.map +0 -1
- package/dist/cli/rescue.reindex.test.js +0 -72
- package/dist/cli/rescue.reindex.test.js.map +0 -1
- package/dist/cli/rescue.test.d.ts +0 -2
- package/dist/cli/rescue.test.d.ts.map +0 -1
- package/dist/cli/rescue.test.js +0 -127
- package/dist/cli/rescue.test.js.map +0 -1
- package/dist/cli/share-plan-limit-presign.test.d.ts +0 -2
- package/dist/cli/share-plan-limit-presign.test.d.ts.map +0 -1
- package/dist/cli/share-plan-limit-presign.test.js +0 -271
- package/dist/cli/share-plan-limit-presign.test.js.map +0 -1
- package/dist/cli/share-presign-transport.test.d.ts +0 -22
- package/dist/cli/share-presign-transport.test.d.ts.map +0 -1
- package/dist/cli/share-presign-transport.test.js +0 -388
- package/dist/cli/share-presign-transport.test.js.map +0 -1
- package/dist/cli/share.test.d.ts +0 -5
- package/dist/cli/share.test.d.ts.map +0 -1
- package/dist/cli/share.test.js +0 -12335
- package/dist/cli/share.test.js.map +0 -1
- package/dist/cli/streaming-pull-planner.bench.test.d.ts +0 -15
- package/dist/cli/streaming-pull-planner.bench.test.d.ts.map +0 -1
- package/dist/cli/streaming-pull-planner.bench.test.js +0 -273
- package/dist/cli/streaming-pull-planner.bench.test.js.map +0 -1
- package/dist/cli/sync-scope.test.d.ts +0 -22
- package/dist/cli/sync-scope.test.d.ts.map +0 -1
- package/dist/cli/sync-scope.test.js +0 -903
- package/dist/cli/sync-scope.test.js.map +0 -1
- package/dist/cli/sync.test.d.ts +0 -5
- package/dist/cli/sync.test.d.ts.map +0 -1
- package/dist/cli/sync.test.js +0 -9028
- package/dist/cli/sync.test.js.map +0 -1
- package/dist/cli/tombstones.test.d.ts +0 -2
- package/dist/cli/tombstones.test.d.ts.map +0 -1
- package/dist/cli/tombstones.test.js +0 -120
- package/dist/cli/tombstones.test.js.map +0 -1
- package/dist/cli/watch-event-push-conflict.test.d.ts +0 -25
- package/dist/cli/watch-event-push-conflict.test.d.ts.map +0 -1
- package/dist/cli/watch-event-push-conflict.test.js +0 -230
- package/dist/cli/watch-event-push-conflict.test.js.map +0 -1
- package/dist/client-info.test.d.ts +0 -11
- package/dist/client-info.test.d.ts.map +0 -1
- package/dist/client-info.test.js +0 -168
- package/dist/client-info.test.js.map +0 -1
- package/dist/cognito-auth-lock-no-hard-links.test.d.ts +0 -11
- package/dist/cognito-auth-lock-no-hard-links.test.d.ts.map +0 -1
- package/dist/cognito-auth-lock-no-hard-links.test.js +0 -76
- package/dist/cognito-auth-lock-no-hard-links.test.js.map +0 -1
- package/dist/cognito-auth.test.d.ts +0 -9
- package/dist/cognito-auth.test.d.ts.map +0 -1
- package/dist/cognito-auth.test.js +0 -745
- package/dist/cognito-auth.test.js.map +0 -1
- package/dist/company-resolver.test.d.ts +0 -7
- package/dist/company-resolver.test.d.ts.map +0 -1
- package/dist/company-resolver.test.js +0 -533
- package/dist/company-resolver.test.js.map +0 -1
- package/dist/company-slug.test.d.ts +0 -7
- package/dist/company-slug.test.d.ts.map +0 -1
- package/dist/company-slug.test.js +0 -43
- package/dist/company-slug.test.js.map +0 -1
- package/dist/company-vault-transport.test.d.ts +0 -12
- package/dist/company-vault-transport.test.d.ts.map +0 -1
- package/dist/company-vault-transport.test.js +0 -97
- package/dist/company-vault-transport.test.js.map +0 -1
- package/dist/context.test.d.ts +0 -7
- package/dist/context.test.d.ts.map +0 -1
- package/dist/context.test.js +0 -646
- package/dist/context.test.js.map +0 -1
- package/dist/entity-resolver.test.d.ts +0 -10
- package/dist/entity-resolver.test.d.ts.map +0 -1
- package/dist/entity-resolver.test.js +0 -244
- package/dist/entity-resolver.test.js.map +0 -1
- package/dist/getindigo-dead-refs-contract.test.d.ts +0 -2
- package/dist/getindigo-dead-refs-contract.test.d.ts.map +0 -1
- package/dist/getindigo-dead-refs-contract.test.js +0 -58
- package/dist/getindigo-dead-refs-contract.test.js.map +0 -1
- package/dist/hermetic-test-env.test.d.ts +0 -2
- package/dist/hermetic-test-env.test.d.ts.map +0 -1
- package/dist/hermetic-test-env.test.js +0 -61
- package/dist/hermetic-test-env.test.js.map +0 -1
- package/dist/hq-root-recovery.test.d.ts +0 -2
- package/dist/hq-root-recovery.test.d.ts.map +0 -1
- package/dist/hq-root-recovery.test.js +0 -65
- package/dist/hq-root-recovery.test.js.map +0 -1
- package/dist/ignore.test.d.ts +0 -10
- package/dist/ignore.test.d.ts.map +0 -1
- package/dist/ignore.test.js +0 -926
- package/dist/ignore.test.js.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -26
- package/dist/index.test.js.map +0 -1
- package/dist/journal-area-ledger-read-boundary.test.d.ts +0 -2
- package/dist/journal-area-ledger-read-boundary.test.d.ts.map +0 -1
- package/dist/journal-area-ledger-read-boundary.test.js +0 -420
- package/dist/journal-area-ledger-read-boundary.test.js.map +0 -1
- package/dist/journal-baseline.test.d.ts +0 -2
- package/dist/journal-baseline.test.d.ts.map +0 -1
- package/dist/journal-baseline.test.js +0 -218
- package/dist/journal-baseline.test.js.map +0 -1
- package/dist/journal-decode-window.test.d.ts +0 -2
- package/dist/journal-decode-window.test.d.ts.map +0 -1
- package/dist/journal-decode-window.test.js +0 -99
- package/dist/journal-decode-window.test.js.map +0 -1
- package/dist/journal-delta-writes.test.d.ts +0 -2
- package/dist/journal-delta-writes.test.d.ts.map +0 -1
- package/dist/journal-delta-writes.test.js +0 -159
- package/dist/journal-delta-writes.test.js.map +0 -1
- package/dist/journal-ledger-index.test.d.ts +0 -15
- package/dist/journal-ledger-index.test.d.ts.map +0 -1
- package/dist/journal-ledger-index.test.js +0 -269
- package/dist/journal-ledger-index.test.js.map +0 -1
- package/dist/journal-public-boundary.test.d.ts +0 -2
- package/dist/journal-public-boundary.test.d.ts.map +0 -1
- package/dist/journal-public-boundary.test.js +0 -216
- package/dist/journal-public-boundary.test.js.map +0 -1
- package/dist/journal-row-store.test.d.ts +0 -2
- package/dist/journal-row-store.test.d.ts.map +0 -1
- package/dist/journal-row-store.test.js +0 -729
- package/dist/journal-row-store.test.js.map +0 -1
- package/dist/journal-snapshot-memory-helpers.d.ts +0 -33
- package/dist/journal-snapshot-memory-helpers.d.ts.map +0 -1
- package/dist/journal-snapshot-memory-helpers.js +0 -212
- package/dist/journal-snapshot-memory-helpers.js.map +0 -1
- package/dist/journal-snapshot-memory.test.d.ts +0 -2
- package/dist/journal-snapshot-memory.test.d.ts.map +0 -1
- package/dist/journal-snapshot-memory.test.js +0 -47
- package/dist/journal-snapshot-memory.test.js.map +0 -1
- package/dist/journal-snapshot-v4-memory.test.d.ts +0 -2
- package/dist/journal-snapshot-v4-memory.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4-memory.test.js +0 -24
- package/dist/journal-snapshot-v4-memory.test.js.map +0 -1
- package/dist/journal-snapshot-v4-writer-memory.test.d.ts +0 -2
- package/dist/journal-snapshot-v4-writer-memory.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4-writer-memory.test.js +0 -76
- package/dist/journal-snapshot-v4-writer-memory.test.js.map +0 -1
- package/dist/journal-snapshot-v4-writer.test.d.ts +0 -2
- package/dist/journal-snapshot-v4-writer.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4-writer.test.js +0 -282
- package/dist/journal-snapshot-v4-writer.test.js.map +0 -1
- package/dist/journal-snapshot-v4.test.d.ts +0 -2
- package/dist/journal-snapshot-v4.test.d.ts.map +0 -1
- package/dist/journal-snapshot-v4.test.js +0 -281
- package/dist/journal-snapshot-v4.test.js.map +0 -1
- package/dist/journal-store.test.d.ts +0 -2
- package/dist/journal-store.test.d.ts.map +0 -1
- package/dist/journal-store.test.js +0 -1227
- package/dist/journal-store.test.js.map +0 -1
- package/dist/journal-streaming.heap.test.d.ts +0 -2
- package/dist/journal-streaming.heap.test.d.ts.map +0 -1
- package/dist/journal-streaming.heap.test.js +0 -190
- package/dist/journal-streaming.heap.test.js.map +0 -1
- package/dist/journal.test.d.ts +0 -9
- package/dist/journal.test.d.ts.map +0 -1
- package/dist/journal.test.js +0 -1074
- package/dist/journal.test.js.map +0 -1
- package/dist/kms10-etag-safe-pull.test.d.ts +0 -2
- package/dist/kms10-etag-safe-pull.test.d.ts.map +0 -1
- package/dist/kms10-etag-safe-pull.test.js +0 -53
- package/dist/kms10-etag-safe-pull.test.js.map +0 -1
- package/dist/lib/cloud-authoritative.test.d.ts +0 -2
- package/dist/lib/cloud-authoritative.test.d.ts.map +0 -1
- package/dist/lib/cloud-authoritative.test.js +0 -42
- package/dist/lib/cloud-authoritative.test.js.map +0 -1
- package/dist/lib/conflict-reconcile.test.d.ts +0 -7
- package/dist/lib/conflict-reconcile.test.d.ts.map +0 -1
- package/dist/lib/conflict-reconcile.test.js +0 -246
- package/dist/lib/conflict-reconcile.test.js.map +0 -1
- package/dist/lib/conflict.test.d.ts +0 -9
- package/dist/lib/conflict.test.d.ts.map +0 -1
- package/dist/lib/conflict.test.js +0 -340
- package/dist/lib/conflict.test.js.map +0 -1
- package/dist/lib/describe-error.test.d.ts +0 -2
- package/dist/lib/describe-error.test.d.ts.map +0 -1
- package/dist/lib/describe-error.test.js +0 -148
- package/dist/lib/describe-error.test.js.map +0 -1
- package/dist/lib/machine-id.test.d.ts +0 -8
- package/dist/lib/machine-id.test.d.ts.map +0 -1
- package/dist/lib/machine-id.test.js +0 -228
- package/dist/lib/machine-id.test.js.map +0 -1
- package/dist/lib/net-errors.test.d.ts +0 -2
- package/dist/lib/net-errors.test.d.ts.map +0 -1
- package/dist/lib/net-errors.test.js +0 -111
- package/dist/lib/net-errors.test.js.map +0 -1
- package/dist/lib/ontology-entity-meta.test.d.ts +0 -2
- package/dist/lib/ontology-entity-meta.test.d.ts.map +0 -1
- package/dist/lib/ontology-entity-meta.test.js +0 -79
- package/dist/lib/ontology-entity-meta.test.js.map +0 -1
- package/dist/lib/ontology-entity-push.test.d.ts +0 -2
- package/dist/lib/ontology-entity-push.test.d.ts.map +0 -1
- package/dist/lib/ontology-entity-push.test.js +0 -156
- package/dist/lib/ontology-entity-push.test.js.map +0 -1
- package/dist/lib/personal-connector-settings-sync.test.d.ts +0 -2
- package/dist/lib/personal-connector-settings-sync.test.d.ts.map +0 -1
- package/dist/lib/personal-connector-settings-sync.test.js +0 -34
- package/dist/lib/personal-connector-settings-sync.test.js.map +0 -1
- package/dist/lib/readlink-safe.test.d.ts +0 -2
- package/dist/lib/readlink-safe.test.d.ts.map +0 -1
- package/dist/lib/readlink-safe.test.js +0 -34
- package/dist/lib/readlink-safe.test.js.map +0 -1
- package/dist/lib/s3-content-checksum.test.d.ts +0 -2
- package/dist/lib/s3-content-checksum.test.d.ts.map +0 -1
- package/dist/lib/s3-content-checksum.test.js +0 -26
- package/dist/lib/s3-content-checksum.test.js.map +0 -1
- package/dist/lib/skill-register-landed-bytes.test.d.ts +0 -2
- package/dist/lib/skill-register-landed-bytes.test.d.ts.map +0 -1
- package/dist/lib/skill-register-landed-bytes.test.js +0 -83
- package/dist/lib/skill-register-landed-bytes.test.js.map +0 -1
- package/dist/local-path-codec.test.d.ts +0 -14
- package/dist/local-path-codec.test.d.ts.map +0 -1
- package/dist/local-path-codec.test.js +0 -122
- package/dist/local-path-codec.test.js.map +0 -1
- package/dist/machine-auth.test.d.ts +0 -14
- package/dist/machine-auth.test.d.ts.map +0 -1
- package/dist/machine-auth.test.js +0 -1482
- package/dist/machine-auth.test.js.map +0 -1
- package/dist/machine-token-cache-isolation.test.d.ts +0 -24
- package/dist/machine-token-cache-isolation.test.d.ts.map +0 -1
- package/dist/machine-token-cache-isolation.test.js +0 -284
- package/dist/machine-token-cache-isolation.test.js.map +0 -1
- package/dist/manifest/US-002.acceptance.test.d.ts +0 -11
- package/dist/manifest/US-002.acceptance.test.d.ts.map +0 -1
- package/dist/manifest/US-002.acceptance.test.js +0 -160
- package/dist/manifest/US-002.acceptance.test.js.map +0 -1
- package/dist/manifest/US-004.acceptance.test.d.ts +0 -12
- package/dist/manifest/US-004.acceptance.test.d.ts.map +0 -1
- package/dist/manifest/US-004.acceptance.test.js +0 -173
- package/dist/manifest/US-004.acceptance.test.js.map +0 -1
- package/dist/manifest/build-manifest-resident-parity.test.d.ts +0 -2
- package/dist/manifest/build-manifest-resident-parity.test.d.ts.map +0 -1
- package/dist/manifest/build-manifest-resident-parity.test.js +0 -69
- package/dist/manifest/build-manifest-resident-parity.test.js.map +0 -1
- package/dist/manifest/build-manifest.bench.test.d.ts +0 -22
- package/dist/manifest/build-manifest.bench.test.d.ts.map +0 -1
- package/dist/manifest/build-manifest.bench.test.js +0 -930
- package/dist/manifest/build-manifest.bench.test.js.map +0 -1
- package/dist/manifest/build-manifest.test.d.ts +0 -10
- package/dist/manifest/build-manifest.test.d.ts.map +0 -1
- package/dist/manifest/build-manifest.test.js +0 -1217
- package/dist/manifest/build-manifest.test.js.map +0 -1
- package/dist/manifest/contract.test.d.ts +0 -17
- package/dist/manifest/contract.test.d.ts.map +0 -1
- package/dist/manifest/contract.test.js +0 -346
- package/dist/manifest/contract.test.js.map +0 -1
- package/dist/manifest/import-graph.test.d.ts +0 -25
- package/dist/manifest/import-graph.test.d.ts.map +0 -1
- package/dist/manifest/import-graph.test.js +0 -120
- package/dist/manifest/import-graph.test.js.map +0 -1
- package/dist/manifest/ledger-shard-isolation.test.d.ts +0 -18
- package/dist/manifest/ledger-shard-isolation.test.d.ts.map +0 -1
- package/dist/manifest/ledger-shard-isolation.test.js +0 -153
- package/dist/manifest/ledger-shard-isolation.test.js.map +0 -1
- package/dist/manifest/snapshot-store.test.d.ts +0 -11
- package/dist/manifest/snapshot-store.test.d.ts.map +0 -1
- package/dist/manifest/snapshot-store.test.js +0 -206
- package/dist/manifest/snapshot-store.test.js.map +0 -1
- package/dist/manifest/upload-manifest.test.d.ts +0 -10
- package/dist/manifest/upload-manifest.test.d.ts.map +0 -1
- package/dist/manifest/upload-manifest.test.js +0 -1335
- package/dist/manifest/upload-manifest.test.js.map +0 -1
- package/dist/manifest-reconcile.test.d.ts +0 -2
- package/dist/manifest-reconcile.test.d.ts.map +0 -1
- package/dist/manifest-reconcile.test.js +0 -1029
- package/dist/manifest-reconcile.test.js.map +0 -1
- package/dist/object-io.test.d.ts +0 -11
- package/dist/object-io.test.d.ts.map +0 -1
- package/dist/object-io.test.js +0 -2376
- package/dist/object-io.test.js.map +0 -1
- package/dist/operation-lock.test.d.ts +0 -5
- package/dist/operation-lock.test.d.ts.map +0 -1
- package/dist/operation-lock.test.js +0 -796
- package/dist/operation-lock.test.js.map +0 -1
- package/dist/outcome-telemetry.test.d.ts +0 -9
- package/dist/outcome-telemetry.test.d.ts.map +0 -1
- package/dist/outcome-telemetry.test.js +0 -663
- package/dist/outcome-telemetry.test.js.map +0 -1
- package/dist/outposts/client.test.d.ts +0 -9
- package/dist/outposts/client.test.d.ts.map +0 -1
- package/dist/outposts/client.test.js +0 -415
- package/dist/outposts/client.test.js.map +0 -1
- package/dist/outposts/command.test.d.ts +0 -18
- package/dist/outposts/command.test.d.ts.map +0 -1
- package/dist/outposts/command.test.js +0 -1230
- package/dist/outposts/command.test.js.map +0 -1
- package/dist/outposts/replica-sync.test.d.ts +0 -2
- package/dist/outposts/replica-sync.test.d.ts.map +0 -1
- package/dist/outposts/replica-sync.test.js +0 -224
- package/dist/outposts/replica-sync.test.js.map +0 -1
- package/dist/outposts/self-deploy.test.d.ts +0 -2
- package/dist/outposts/self-deploy.test.d.ts.map +0 -1
- package/dist/outposts/self-deploy.test.js +0 -218
- package/dist/outposts/self-deploy.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-bounds.test.d.ts +0 -25
- package/dist/outposts/session-heartbeat-bounds.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-bounds.test.js +0 -156
- package/dist/outposts/session-heartbeat-bounds.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-guard.test.d.ts +0 -16
- package/dist/outposts/session-heartbeat-guard.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-guard.test.js +0 -88
- package/dist/outposts/session-heartbeat-guard.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-publisher.test.d.ts +0 -10
- package/dist/outposts/session-heartbeat-publisher.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-publisher.test.js +0 -153
- package/dist/outposts/session-heartbeat-publisher.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-retain-guard.test.d.ts +0 -18
- package/dist/outposts/session-heartbeat-retain-guard.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-retain-guard.test.js +0 -106
- package/dist/outposts/session-heartbeat-retain-guard.test.js.map +0 -1
- package/dist/outposts/session-heartbeat-scan.test.d.ts +0 -20
- package/dist/outposts/session-heartbeat-scan.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat-scan.test.js +0 -241
- package/dist/outposts/session-heartbeat-scan.test.js.map +0 -1
- package/dist/outposts/session-heartbeat.test.d.ts +0 -11
- package/dist/outposts/session-heartbeat.test.d.ts.map +0 -1
- package/dist/outposts/session-heartbeat.test.js +0 -370
- package/dist/outposts/session-heartbeat.test.js.map +0 -1
- package/dist/outposts/session-host-auth.test.d.ts +0 -16
- package/dist/outposts/session-host-auth.test.d.ts.map +0 -1
- package/dist/outposts/session-host-auth.test.js +0 -284
- package/dist/outposts/session-host-auth.test.js.map +0 -1
- package/dist/outposts/session-host-command.test.d.ts +0 -10
- package/dist/outposts/session-host-command.test.d.ts.map +0 -1
- package/dist/outposts/session-host-command.test.js +0 -180
- package/dist/outposts/session-host-command.test.js.map +0 -1
- package/dist/outposts/session-host-connection.test.d.ts +0 -18
- package/dist/outposts/session-host-connection.test.d.ts.map +0 -1
- package/dist/outposts/session-host-connection.test.js +0 -392
- package/dist/outposts/session-host-connection.test.js.map +0 -1
- package/dist/outposts/session-host-fakes.d.ts +0 -61
- package/dist/outposts/session-host-fakes.d.ts.map +0 -1
- package/dist/outposts/session-host-fakes.js +0 -115
- package/dist/outposts/session-host-fakes.js.map +0 -1
- package/dist/outposts/session-host-ndjson.test.d.ts +0 -11
- package/dist/outposts/session-host-ndjson.test.d.ts.map +0 -1
- package/dist/outposts/session-host-ndjson.test.js +0 -73
- package/dist/outposts/session-host-ndjson.test.js.map +0 -1
- package/dist/outposts/session-host-protocol.test.d.ts +0 -15
- package/dist/outposts/session-host-protocol.test.d.ts.map +0 -1
- package/dist/outposts/session-host-protocol.test.js +0 -0
- package/dist/outposts/session-host-protocol.test.js.map +0 -1
- package/dist/outposts/session-host-server.test.d.ts +0 -10
- package/dist/outposts/session-host-server.test.d.ts.map +0 -1
- package/dist/outposts/session-host-server.test.js +0 -118
- package/dist/outposts/session-host-server.test.js.map +0 -1
- package/dist/outposts/session-host-sessions.test.d.ts +0 -18
- package/dist/outposts/session-host-sessions.test.d.ts.map +0 -1
- package/dist/outposts/session-host-sessions.test.js +0 -439
- package/dist/outposts/session-host-sessions.test.js.map +0 -1
- package/dist/outposts/terminal.test.d.ts +0 -2
- package/dist/outposts/terminal.test.d.ts.map +0 -1
- package/dist/outposts/terminal.test.js +0 -146
- package/dist/outposts/terminal.test.js.map +0 -1
- package/dist/outposts/transport.test.d.ts +0 -10
- package/dist/outposts/transport.test.d.ts.map +0 -1
- package/dist/outposts/transport.test.js +0 -205
- package/dist/outposts/transport.test.js.map +0 -1
- package/dist/packed-journal-phase2.test.d.ts +0 -2
- package/dist/packed-journal-phase2.test.d.ts.map +0 -1
- package/dist/packed-journal-phase2.test.js +0 -273
- package/dist/packed-journal-phase2.test.js.map +0 -1
- package/dist/path-ancestors.test.d.ts +0 -2
- package/dist/path-ancestors.test.d.ts.map +0 -1
- package/dist/path-ancestors.test.js +0 -21
- package/dist/path-ancestors.test.js.map +0 -1
- package/dist/personal-vault-exclusions.test.d.ts +0 -22
- package/dist/personal-vault-exclusions.test.d.ts.map +0 -1
- package/dist/personal-vault-exclusions.test.js +0 -294
- package/dist/personal-vault-exclusions.test.js.map +0 -1
- package/dist/personal-vault.test.d.ts +0 -18
- package/dist/personal-vault.test.d.ts.map +0 -1
- package/dist/personal-vault.test.js +0 -1099
- package/dist/personal-vault.test.js.map +0 -1
- package/dist/plan-limit-pause.test.d.ts +0 -2
- package/dist/plan-limit-pause.test.d.ts.map +0 -1
- package/dist/plan-limit-pause.test.js +0 -150
- package/dist/plan-limit-pause.test.js.map +0 -1
- package/dist/plan-limit.fixtures.d.ts +0 -34
- package/dist/plan-limit.fixtures.d.ts.map +0 -1
- package/dist/plan-limit.fixtures.js +0 -96
- package/dist/plan-limit.fixtures.js.map +0 -1
- package/dist/plan-limit.test.d.ts +0 -2
- package/dist/plan-limit.test.d.ts.map +0 -1
- package/dist/plan-limit.test.js +0 -132
- package/dist/plan-limit.test.js.map +0 -1
- package/dist/prefix-coalesce.test.d.ts +0 -2
- package/dist/prefix-coalesce.test.d.ts.map +0 -1
- package/dist/prefix-coalesce.test.js +0 -260
- package/dist/prefix-coalesce.test.js.map +0 -1
- package/dist/private-folder-transport.test.d.ts +0 -2
- package/dist/private-folder-transport.test.d.ts.map +0 -1
- package/dist/private-folder-transport.test.js +0 -33
- package/dist/private-folder-transport.test.js.map +0 -1
- package/dist/public-surface.test.d.ts +0 -15
- package/dist/public-surface.test.d.ts.map +0 -1
- package/dist/public-surface.test.js +0 -110
- package/dist/public-surface.test.js.map +0 -1
- package/dist/qmd-reindex.test.d.ts +0 -14
- package/dist/qmd-reindex.test.d.ts.map +0 -1
- package/dist/qmd-reindex.test.js +0 -899
- package/dist/qmd-reindex.test.js.map +0 -1
- package/dist/read-only-state-dir.test.d.ts +0 -27
- package/dist/read-only-state-dir.test.d.ts.map +0 -1
- package/dist/read-only-state-dir.test.js +0 -167
- package/dist/read-only-state-dir.test.js.map +0 -1
- package/dist/remote-pull.test.d.ts +0 -2
- package/dist/remote-pull.test.d.ts.map +0 -1
- package/dist/remote-pull.test.js +0 -1147
- package/dist/remote-pull.test.js.map +0 -1
- package/dist/s3-download-stream-hash.test.d.ts +0 -2
- package/dist/s3-download-stream-hash.test.d.ts.map +0 -1
- package/dist/s3-download-stream-hash.test.js +0 -70
- package/dist/s3-download-stream-hash.test.js.map +0 -1
- package/dist/s3.list-cost.test.d.ts +0 -2
- package/dist/s3.list-cost.test.d.ts.map +0 -1
- package/dist/s3.list-cost.test.js +0 -51
- package/dist/s3.list-cost.test.js.map +0 -1
- package/dist/s3.rename-retry.test.d.ts +0 -2
- package/dist/s3.rename-retry.test.d.ts.map +0 -1
- package/dist/s3.rename-retry.test.js +0 -217
- package/dist/s3.rename-retry.test.js.map +0 -1
- package/dist/s3.symlink-materialize.test.d.ts +0 -18
- package/dist/s3.symlink-materialize.test.d.ts.map +0 -1
- package/dist/s3.symlink-materialize.test.js +0 -579
- package/dist/s3.symlink-materialize.test.js.map +0 -1
- package/dist/s3.test.d.ts +0 -9
- package/dist/s3.test.d.ts.map +0 -1
- package/dist/s3.test.js +0 -2047
- package/dist/s3.test.js.map +0 -1
- package/dist/s3.windows-portability.test.d.ts +0 -12
- package/dist/s3.windows-portability.test.d.ts.map +0 -1
- package/dist/s3.windows-portability.test.js +0 -223
- package/dist/s3.windows-portability.test.js.map +0 -1
- package/dist/schemas/signal-types.test.d.ts +0 -2
- package/dist/schemas/signal-types.test.d.ts.map +0 -1
- package/dist/schemas/signal-types.test.js +0 -65
- package/dist/schemas/signal-types.test.js.map +0 -1
- package/dist/schemas/source-channels.test.d.ts +0 -2
- package/dist/schemas/source-channels.test.d.ts.map +0 -1
- package/dist/schemas/source-channels.test.js +0 -65
- package/dist/schemas/source-channels.test.js.map +0 -1
- package/dist/scope-shrink.test.d.ts +0 -13
- package/dist/scope-shrink.test.d.ts.map +0 -1
- package/dist/scope-shrink.test.js +0 -558
- package/dist/scope-shrink.test.js.map +0 -1
- package/dist/session-log-capture.test.d.ts +0 -2
- package/dist/session-log-capture.test.d.ts.map +0 -1
- package/dist/session-log-capture.test.js +0 -533
- package/dist/session-log-capture.test.js.map +0 -1
- package/dist/session-log-retention.test.d.ts +0 -2
- package/dist/session-log-retention.test.d.ts.map +0 -1
- package/dist/session-log-retention.test.js +0 -383
- package/dist/session-log-retention.test.js.map +0 -1
- package/dist/signals/get.test.d.ts +0 -5
- package/dist/signals/get.test.d.ts.map +0 -1
- package/dist/signals/get.test.js +0 -254
- package/dist/signals/get.test.js.map +0 -1
- package/dist/signals/list.test.d.ts +0 -9
- package/dist/signals/list.test.d.ts.map +0 -1
- package/dist/signals/list.test.js +0 -330
- package/dist/signals/list.test.js.map +0 -1
- package/dist/skill-telemetry.test.d.ts +0 -2
- package/dist/skill-telemetry.test.d.ts.map +0 -1
- package/dist/skill-telemetry.test.js +0 -1484
- package/dist/skill-telemetry.test.js.map +0 -1
- package/dist/sources/get.test.d.ts +0 -5
- package/dist/sources/get.test.d.ts.map +0 -1
- package/dist/sources/get.test.js +0 -236
- package/dist/sources/get.test.js.map +0 -1
- package/dist/sources/list.test.d.ts +0 -8
- package/dist/sources/list.test.d.ts.map +0 -1
- package/dist/sources/list.test.js +0 -318
- package/dist/sources/list.test.js.map +0 -1
- package/dist/sts-credential-refresh.test.d.ts +0 -2
- package/dist/sts-credential-refresh.test.d.ts.map +0 -1
- package/dist/sts-credential-refresh.test.js +0 -181
- package/dist/sts-credential-refresh.test.js.map +0 -1
- package/dist/swallowed-error-sites.test.d.ts +0 -2
- package/dist/swallowed-error-sites.test.d.ts.map +0 -1
- package/dist/swallowed-error-sites.test.js +0 -199
- package/dist/swallowed-error-sites.test.js.map +0 -1
- package/dist/swallowed-error-w32.test.d.ts +0 -2
- package/dist/swallowed-error-w32.test.d.ts.map +0 -1
- package/dist/swallowed-error-w32.test.js +0 -171
- package/dist/swallowed-error-w32.test.js.map +0 -1
- package/dist/swallowed-error-w33.test.d.ts +0 -2
- package/dist/swallowed-error-w33.test.d.ts.map +0 -1
- package/dist/swallowed-error-w33.test.js +0 -125
- package/dist/swallowed-error-w33.test.js.map +0 -1
- package/dist/swallowed-error-w34.test.d.ts +0 -2
- package/dist/swallowed-error-w34.test.d.ts.map +0 -1
- package/dist/swallowed-error-w34.test.js +0 -110
- package/dist/swallowed-error-w34.test.js.map +0 -1
- package/dist/swallowed-error-w35.test.d.ts +0 -2
- package/dist/swallowed-error-w35.test.d.ts.map +0 -1
- package/dist/swallowed-error-w35.test.js +0 -223
- package/dist/swallowed-error-w35.test.js.map +0 -1
- package/dist/sync/area-ledger-auto-migration.test.d.ts +0 -2
- package/dist/sync/area-ledger-auto-migration.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-auto-migration.test.js +0 -291
- package/dist/sync/area-ledger-auto-migration.test.js.map +0 -1
- package/dist/sync/area-ledger-migration.test.d.ts +0 -2
- package/dist/sync/area-ledger-migration.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-migration.test.js +0 -554
- package/dist/sync/area-ledger-migration.test.js.map +0 -1
- package/dist/sync/area-ledger-recovery.bench.test.d.ts +0 -2
- package/dist/sync/area-ledger-recovery.bench.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-recovery.bench.test.js +0 -60
- package/dist/sync/area-ledger-recovery.bench.test.js.map +0 -1
- package/dist/sync/area-ledger-writer-lock.bench.test.d.ts +0 -2
- package/dist/sync/area-ledger-writer-lock.bench.test.d.ts.map +0 -1
- package/dist/sync/area-ledger-writer-lock.bench.test.js +0 -57
- package/dist/sync/area-ledger-writer-lock.bench.test.js.map +0 -1
- package/dist/sync/area-ledger.test.d.ts +0 -2
- package/dist/sync/area-ledger.test.d.ts.map +0 -1
- package/dist/sync/area-ledger.test.js +0 -1401
- package/dist/sync/area-ledger.test.js.map +0 -1
- package/dist/sync/area-resolver.test.d.ts +0 -2
- package/dist/sync/area-resolver.test.d.ts.map +0 -1
- package/dist/sync/area-resolver.test.js +0 -234
- package/dist/sync/area-resolver.test.js.map +0 -1
- package/dist/sync/base-version-resolver.test.d.ts +0 -2
- package/dist/sync/base-version-resolver.test.d.ts.map +0 -1
- package/dist/sync/base-version-resolver.test.js +0 -24
- package/dist/sync/base-version-resolver.test.js.map +0 -1
- package/dist/sync/candidate-uploader.test.d.ts +0 -2
- package/dist/sync/candidate-uploader.test.d.ts.map +0 -1
- package/dist/sync/candidate-uploader.test.js +0 -132
- package/dist/sync/candidate-uploader.test.js.map +0 -1
- package/dist/sync/child-process-sync-worker-env.test.d.ts +0 -2
- package/dist/sync/child-process-sync-worker-env.test.d.ts.map +0 -1
- package/dist/sync/child-process-sync-worker-env.test.js +0 -38
- package/dist/sync/child-process-sync-worker-env.test.js.map +0 -1
- package/dist/sync/child-process-sync-worker-errors.test.d.ts +0 -2
- package/dist/sync/child-process-sync-worker-errors.test.d.ts.map +0 -1
- package/dist/sync/child-process-sync-worker-errors.test.js +0 -121
- package/dist/sync/child-process-sync-worker-errors.test.js.map +0 -1
- package/dist/sync/child-process-sync-worker.test.d.ts +0 -2
- package/dist/sync/child-process-sync-worker.test.d.ts.map +0 -1
- package/dist/sync/child-process-sync-worker.test.js +0 -262
- package/dist/sync/child-process-sync-worker.test.js.map +0 -1
- package/dist/sync/content-hash.test.d.ts +0 -2
- package/dist/sync/content-hash.test.d.ts.map +0 -1
- package/dist/sync/content-hash.test.js +0 -16
- package/dist/sync/content-hash.test.js.map +0 -1
- package/dist/sync/delta-client.test.d.ts +0 -2
- package/dist/sync/delta-client.test.d.ts.map +0 -1
- package/dist/sync/delta-client.test.js +0 -97
- package/dist/sync/delta-client.test.js.map +0 -1
- package/dist/sync/durable-apply.test.d.ts +0 -2
- package/dist/sync/durable-apply.test.d.ts.map +0 -1
- package/dist/sync/durable-apply.test.js +0 -180
- package/dist/sync/durable-apply.test.js.map +0 -1
- package/dist/sync/event-sync.test.d.ts +0 -14
- package/dist/sync/event-sync.test.d.ts.map +0 -1
- package/dist/sync/event-sync.test.js +0 -1714
- package/dist/sync/event-sync.test.js.map +0 -1
- package/dist/sync/feature-flags.test.d.ts +0 -24
- package/dist/sync/feature-flags.test.d.ts.map +0 -1
- package/dist/sync/feature-flags.test.js +0 -594
- package/dist/sync/feature-flags.test.js.map +0 -1
- package/dist/sync/full-pass-cap-governor.bench.test.d.ts +0 -2
- package/dist/sync/full-pass-cap-governor.bench.test.d.ts.map +0 -1
- package/dist/sync/full-pass-cap-governor.bench.test.js +0 -179
- package/dist/sync/full-pass-cap-governor.bench.test.js.map +0 -1
- package/dist/sync/full-pass-caps.test.d.ts +0 -2
- package/dist/sync/full-pass-caps.test.d.ts.map +0 -1
- package/dist/sync/full-pass-caps.test.js +0 -550
- package/dist/sync/full-pass-caps.test.js.map +0 -1
- package/dist/sync/idle-full-reconcile.test.d.ts +0 -2
- package/dist/sync/idle-full-reconcile.test.d.ts.map +0 -1
- package/dist/sync/idle-full-reconcile.test.js +0 -62
- package/dist/sync/idle-full-reconcile.test.js.map +0 -1
- package/dist/sync/inbound-event-admission.test.d.ts +0 -2
- package/dist/sync/inbound-event-admission.test.d.ts.map +0 -1
- package/dist/sync/inbound-event-admission.test.js +0 -125
- package/dist/sync/inbound-event-admission.test.js.map +0 -1
- package/dist/sync/journal-ledger-stream.test.d.ts +0 -12
- package/dist/sync/journal-ledger-stream.test.d.ts.map +0 -1
- package/dist/sync/journal-ledger-stream.test.js +0 -134
- package/dist/sync/journal-ledger-stream.test.js.map +0 -1
- package/dist/sync/lease-client.test.d.ts +0 -2
- package/dist/sync/lease-client.test.d.ts.map +0 -1
- package/dist/sync/lease-client.test.js +0 -119
- package/dist/sync/lease-client.test.js.map +0 -1
- package/dist/sync/logger.test.d.ts +0 -19
- package/dist/sync/logger.test.d.ts.map +0 -1
- package/dist/sync/logger.test.js +0 -204
- package/dist/sync/logger.test.js.map +0 -1
- package/dist/sync/metrics.test.d.ts +0 -19
- package/dist/sync/metrics.test.d.ts.map +0 -1
- package/dist/sync/metrics.test.js +0 -357
- package/dist/sync/metrics.test.js.map +0 -1
- package/dist/sync/multipart-uploader.test.d.ts +0 -2
- package/dist/sync/multipart-uploader.test.d.ts.map +0 -1
- package/dist/sync/multipart-uploader.test.js +0 -135
- package/dist/sync/multipart-uploader.test.js.map +0 -1
- package/dist/sync/mutation-client.test.d.ts +0 -2
- package/dist/sync/mutation-client.test.d.ts.map +0 -1
- package/dist/sync/mutation-client.test.js +0 -100
- package/dist/sync/mutation-client.test.js.map +0 -1
- package/dist/sync/mutation-session.test.d.ts +0 -2
- package/dist/sync/mutation-session.test.d.ts.map +0 -1
- package/dist/sync/mutation-session.test.js +0 -190
- package/dist/sync/mutation-session.test.js.map +0 -1
- package/dist/sync/parallel-sync-coordinator.test.d.ts +0 -2
- package/dist/sync/parallel-sync-coordinator.test.d.ts.map +0 -1
- package/dist/sync/parallel-sync-coordinator.test.js +0 -564
- package/dist/sync/parallel-sync-coordinator.test.js.map +0 -1
- package/dist/sync/path-leases.test.d.ts +0 -2
- package/dist/sync/path-leases.test.d.ts.map +0 -1
- package/dist/sync/path-leases.test.js +0 -51
- package/dist/sync/path-leases.test.js.map +0 -1
- package/dist/sync/per-area-maintenance.test.d.ts +0 -2
- package/dist/sync/per-area-maintenance.test.d.ts.map +0 -1
- package/dist/sync/per-area-maintenance.test.js +0 -100
- package/dist/sync/per-area-maintenance.test.js.map +0 -1
- package/dist/sync/push-event.test.d.ts +0 -15
- package/dist/sync/push-event.test.d.ts.map +0 -1
- package/dist/sync/push-event.test.js +0 -282
- package/dist/sync/push-event.test.js.map +0 -1
- package/dist/sync/push-receiver.test.d.ts +0 -25
- package/dist/sync/push-receiver.test.d.ts.map +0 -1
- package/dist/sync/push-receiver.test.js +0 -2851
- package/dist/sync/push-receiver.test.js.map +0 -1
- package/dist/sync/push-transport.test.d.ts +0 -2
- package/dist/sync/push-transport.test.d.ts.map +0 -1
- package/dist/sync/push-transport.test.js +0 -70
- package/dist/sync/push-transport.test.js.map +0 -1
- package/dist/sync/push-walk-matchers.bench.test.d.ts +0 -2
- package/dist/sync/push-walk-matchers.bench.test.d.ts.map +0 -1
- package/dist/sync/push-walk-matchers.bench.test.js +0 -230
- package/dist/sync/push-walk-matchers.bench.test.js.map +0 -1
- package/dist/sync/realtime-network-integration.test.d.ts +0 -2
- package/dist/sync/realtime-network-integration.test.d.ts.map +0 -1
- package/dist/sync/realtime-network-integration.test.js +0 -83
- package/dist/sync/realtime-network-integration.test.js.map +0 -1
- package/dist/sync/realtime-rollout.test.d.ts +0 -2
- package/dist/sync/realtime-rollout.test.d.ts.map +0 -1
- package/dist/sync/realtime-rollout.test.js +0 -94
- package/dist/sync/realtime-rollout.test.js.map +0 -1
- package/dist/sync/realtime-telemetry.test.d.ts +0 -2
- package/dist/sync/realtime-telemetry.test.d.ts.map +0 -1
- package/dist/sync/realtime-telemetry.test.js +0 -300
- package/dist/sync/realtime-telemetry.test.js.map +0 -1
- package/dist/sync/receiver-origin-config.test.d.ts +0 -2
- package/dist/sync/receiver-origin-config.test.d.ts.map +0 -1
- package/dist/sync/receiver-origin-config.test.js +0 -39
- package/dist/sync/receiver-origin-config.test.js.map +0 -1
- package/dist/sync/reconcile-cursor.test.d.ts +0 -2
- package/dist/sync/reconcile-cursor.test.d.ts.map +0 -1
- package/dist/sync/reconcile-cursor.test.js +0 -139
- package/dist/sync/reconcile-cursor.test.js.map +0 -1
- package/dist/sync/remote-file-spool.test.d.ts +0 -2
- package/dist/sync/remote-file-spool.test.d.ts.map +0 -1
- package/dist/sync/remote-file-spool.test.js +0 -77
- package/dist/sync/remote-file-spool.test.js.map +0 -1
- package/dist/sync/scope-inventory-client.test.d.ts +0 -2
- package/dist/sync/scope-inventory-client.test.d.ts.map +0 -1
- package/dist/sync/scope-inventory-client.test.js +0 -103
- package/dist/sync/scope-inventory-client.test.js.map +0 -1
- package/dist/sync/secret-path-policy.test.d.ts +0 -2
- package/dist/sync/secret-path-policy.test.d.ts.map +0 -1
- package/dist/sync/secret-path-policy.test.js +0 -183
- package/dist/sync/secret-path-policy.test.js.map +0 -1
- package/dist/sync/snapshot-client.test.d.ts +0 -2
- package/dist/sync/snapshot-client.test.d.ts.map +0 -1
- package/dist/sync/snapshot-client.test.js +0 -169
- package/dist/sync/snapshot-client.test.js.map +0 -1
- package/dist/sync/state-store.test.d.ts +0 -2
- package/dist/sync/state-store.test.d.ts.map +0 -1
- package/dist/sync/state-store.test.js +0 -1556
- package/dist/sync/state-store.test.js.map +0 -1
- package/dist/sync/sync-contract.test.d.ts +0 -2
- package/dist/sync/sync-contract.test.d.ts.map +0 -1
- package/dist/sync/sync-contract.test.js +0 -141
- package/dist/sync/sync-contract.test.js.map +0 -1
- package/dist/sync/targeted-pull-prefixes.test.d.ts +0 -2
- package/dist/sync/targeted-pull-prefixes.test.d.ts.map +0 -1
- package/dist/sync/targeted-pull-prefixes.test.js +0 -33
- package/dist/sync/targeted-pull-prefixes.test.js.map +0 -1
- package/dist/sync/targeted-upsert-exact-list.test.d.ts +0 -2
- package/dist/sync/targeted-upsert-exact-list.test.d.ts.map +0 -1
- package/dist/sync/targeted-upsert-exact-list.test.js +0 -247
- package/dist/sync/targeted-upsert-exact-list.test.js.map +0 -1
- package/dist/sync/unchanged-push-events.test.d.ts +0 -2
- package/dist/sync/unchanged-push-events.test.d.ts.map +0 -1
- package/dist/sync/unchanged-push-events.test.js +0 -76
- package/dist/sync/unchanged-push-events.test.js.map +0 -1
- package/dist/sync/uploader-finalization.test.d.ts +0 -2
- package/dist/sync/uploader-finalization.test.d.ts.map +0 -1
- package/dist/sync/uploader-finalization.test.js +0 -107
- package/dist/sync/uploader-finalization.test.js.map +0 -1
- package/dist/sync-core.test.d.ts +0 -2
- package/dist/sync-core.test.d.ts.map +0 -1
- package/dist/sync-core.test.js +0 -189
- package/dist/sync-core.test.js.map +0 -1
- package/dist/sync-progress.test.d.ts +0 -2
- package/dist/sync-progress.test.d.ts.map +0 -1
- package/dist/sync-progress.test.js +0 -277
- package/dist/sync-progress.test.js.map +0 -1
- package/dist/telemetry-events.test.d.ts +0 -2
- package/dist/telemetry-events.test.d.ts.map +0 -1
- package/dist/telemetry-events.test.js +0 -113
- package/dist/telemetry-events.test.js.map +0 -1
- package/dist/telemetry.test.d.ts +0 -11
- package/dist/telemetry.test.d.ts.map +0 -1
- package/dist/telemetry.test.js +0 -1603
- package/dist/telemetry.test.js.map +0 -1
- package/dist/vault-client.test.d.ts +0 -7
- package/dist/vault-client.test.d.ts.map +0 -1
- package/dist/vault-client.test.js +0 -1334
- package/dist/vault-client.test.js.map +0 -1
- package/dist/watch-coverage.test.d.ts +0 -2
- package/dist/watch-coverage.test.d.ts.map +0 -1
- package/dist/watch-coverage.test.js +0 -56
- package/dist/watch-coverage.test.js.map +0 -1
- package/dist/watch-owner-lease.test.d.ts +0 -2
- package/dist/watch-owner-lease.test.d.ts.map +0 -1
- package/dist/watch-owner-lease.test.js +0 -353
- package/dist/watch-owner-lease.test.js.map +0 -1
- package/dist/watch-parent.test.d.ts +0 -2
- package/dist/watch-parent.test.d.ts.map +0 -1
- package/dist/watch-parent.test.js +0 -131
- package/dist/watch-parent.test.js.map +0 -1
- package/dist/watch-roots.test.d.ts +0 -18
- package/dist/watch-roots.test.d.ts.map +0 -1
- package/dist/watch-roots.test.js +0 -395
- package/dist/watch-roots.test.js.map +0 -1
- package/dist/watcher-continuity-hot-path.test.d.ts +0 -2
- package/dist/watcher-continuity-hot-path.test.d.ts.map +0 -1
- package/dist/watcher-continuity-hot-path.test.js +0 -40
- package/dist/watcher-continuity-hot-path.test.js.map +0 -1
- package/dist/watcher-event-gate.test.d.ts +0 -16
- package/dist/watcher-event-gate.test.d.ts.map +0 -1
- package/dist/watcher-event-gate.test.js +0 -191
- package/dist/watcher-event-gate.test.js.map +0 -1
- package/dist/watcher-replan-sweep.test.d.ts +0 -2
- package/dist/watcher-replan-sweep.test.d.ts.map +0 -1
- package/dist/watcher-replan-sweep.test.js +0 -245
- package/dist/watcher-replan-sweep.test.js.map +0 -1
- package/dist/watcher-stdout.test.d.ts +0 -2
- package/dist/watcher-stdout.test.d.ts.map +0 -1
- package/dist/watcher-stdout.test.js +0 -86
- package/dist/watcher-stdout.test.js.map +0 -1
- package/dist/watcher.test.d.ts +0 -2
- package/dist/watcher.test.d.ts.map +0 -1
- package/dist/watcher.test.js +0 -4301
- package/dist/watcher.test.js.map +0 -1
- package/dist/watcher.warmup-cancel.test.d.ts +0 -2
- package/dist/watcher.warmup-cancel.test.d.ts.map +0 -1
- package/dist/watcher.warmup-cancel.test.js +0 -59
- package/dist/watcher.warmup-cancel.test.js.map +0 -1
- package/dist/watcher.warmup-responsive.test.d.ts +0 -2
- package/dist/watcher.warmup-responsive.test.d.ts.map +0 -1
- package/dist/watcher.warmup-responsive.test.js +0 -62
- package/dist/watcher.warmup-responsive.test.js.map +0 -1
|
@@ -1,930 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stat-walk benchmark for the manifest builder (US-002).
|
|
3
|
-
*
|
|
4
|
-
* The acceptance bar is a cost bar, not a correctness one: a 70,000-file HQ
|
|
5
|
-
* root must be enumerable in under 2 seconds and under 64 MB of resident
|
|
6
|
-
* growth, because this runs in the background on a laptop that is also
|
|
7
|
-
* running the user's editor. A regression here does not break the audit — it
|
|
8
|
-
* makes the machine feel slow, which is the failure mode that gets the whole
|
|
9
|
-
* feature switched off.
|
|
10
|
-
*
|
|
11
|
-
* The measurement is deliberately narrow:
|
|
12
|
-
*
|
|
13
|
-
* - the fixture is built ONCE in `beforeAll` and excluded from the timing;
|
|
14
|
-
* - files are empty, so the numbers describe directory traversal + `lstat`,
|
|
15
|
-
* not disk throughput;
|
|
16
|
-
* - `hashPolicy: "ledger-only"` guarantees not a single byte of content is
|
|
17
|
-
* read, so sha256 throughput cannot mask a walk regression;
|
|
18
|
-
* - only `walkStats.walkMs` is asserted — the builder's own measurement of
|
|
19
|
-
* the walk, not the harness's view of the whole call.
|
|
20
|
-
*/
|
|
21
|
-
import * as fs from "node:fs";
|
|
22
|
-
import * as os from "node:os";
|
|
23
|
-
import * as path from "node:path";
|
|
24
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
25
|
-
import { buildSyncManifest, DEFAULT_MANIFEST_YIELD_EVERY, setBuildManifestMemoryReferencesHookForTest, } from "./build-manifest.js";
|
|
26
|
-
import { SYNC_MANIFEST_DEFAULT_CHUNK_BYTE_BUDGET, SYNC_MANIFEST_MAX_CHUNK_BYTES, assertSyncManifestPath, } from "./contract.js";
|
|
27
|
-
import { createIgnoreFilter } from "../ignore.js";
|
|
28
|
-
import { PERSONAL_VAULT_JOURNAL_SLUG, hashFile } from "../journal.js";
|
|
29
|
-
import { collectGarbage, acquireGc as acquireMemoryGc, usedBytes } from "../journal-snapshot-memory-helpers.js";
|
|
30
|
-
import { wrapFilterWithPersonalVaultDefaults } from "../personal-vault-exclusions.js";
|
|
31
|
-
import { runManifestUploadPass } from "./upload-manifest.js";
|
|
32
|
-
const FILE_COUNT = 70_000;
|
|
33
|
-
const DIRECTORY_COUNT = 700;
|
|
34
|
-
const WALK_RUN_COUNT = 7;
|
|
35
|
-
const CONTROL_DIRECTORY_COUNT = 700;
|
|
36
|
-
const CONTROL_FILE_COUNT = 70_000;
|
|
37
|
-
/**
|
|
38
|
-
* The cost gates are a paired walk/control ratio and resident-memory growth.
|
|
39
|
-
* The control performs the production walk's entry preparation: filtering,
|
|
40
|
-
* path canonicalisation, contract validation, metadata map and yield cadence,
|
|
41
|
-
* but does not call the production walker. A genuine per-entry allocation,
|
|
42
|
-
* syscall, or traversal step raises the ratio even when a slow runner makes
|
|
43
|
-
* both workloads take longer.
|
|
44
|
-
*
|
|
45
|
-
* The paired-ratio gate supersedes the scaled wall-clock assertion. The ratio
|
|
46
|
-
* is machine-independent; a wall-clock bound never was. A scaled wall-clock
|
|
47
|
-
* budget needs a fixed reference control time; when this fixture changed, that
|
|
48
|
-
* constant silently became stale and the assertion stopped constraining the
|
|
49
|
-
* walk. This was a maintenance trap that already failed once. Absolute timings
|
|
50
|
-
* remain in the output for diagnosis, but are not a product gate.
|
|
51
|
-
*
|
|
52
|
-
* Each of the seven trials starts by warming the fixture with the control,
|
|
53
|
-
* then measures one control. The fixture is warmed the same way again before
|
|
54
|
-
* measuring the production walk. That gives each side the same dentry and
|
|
55
|
-
* page-cache condition, instead of silently giving the walk the control's
|
|
56
|
-
* warm cache. The gate compares the median of the paired ratios: it neither
|
|
57
|
-
* combines two different order statistics nor lets one unusually fast walk
|
|
58
|
-
* hide a regression. The larger 70,000-file control keeps its timing noise
|
|
59
|
-
* materially below the 15% regression this gate is intended to catch.
|
|
60
|
-
*
|
|
61
|
-
* A duplicate `lstat` of the path just walked is the Linux lower-bound control:
|
|
62
|
-
* the old unpaired measurement made it look nearly free, but paired warm-cache
|
|
63
|
-
* samples still distinguish it from healthy work. This file does NOT run in
|
|
64
|
-
* `pnpm test`; `vitest.bench.config.ts` and the `manifest-bench` CI job run it
|
|
65
|
-
* alone in one fork.
|
|
66
|
-
*/
|
|
67
|
-
// Ubuntu 24.04 paired medians: healthy 1.04–1.07 (four samples); duplicate
|
|
68
|
-
// lstat 1.16–1.21; different-path lstat 1.21–1.31; and redundant per-entry
|
|
69
|
-
// path construction 1.14–1.18. Linux therefore uses 1.10: 2.8% above the
|
|
70
|
-
// slowest healthy sample and 3.6% below the smallest claimed regression.
|
|
71
|
-
// macOS retains its previous ceiling while Linux is tightened here; this
|
|
72
|
-
// change makes no new cross-platform calibration claim.
|
|
73
|
-
const MAX_WALK_TO_CONTROL_RATIO = process.platform === "linux" ? 1.1 : 2.3;
|
|
74
|
-
const MAX_RSS_GROWTH_BYTES = 64 * 1024 * 1024;
|
|
75
|
-
/**
|
|
76
|
-
* Cold-ledger hash benchmark: how much does the FIRST pass after an upgrade
|
|
77
|
-
* cost when the journal has no reusable hash for anything?
|
|
78
|
-
*
|
|
79
|
-
* This is the case that broke on a real machine. The personal vault held
|
|
80
|
-
* ~690k files, the journal predated hashing, and the then-default `auto`
|
|
81
|
-
* policy therefore READ every one of them: 9m40s and 2.9 GB peak RSS for a
|
|
82
|
-
* step that runs after every sync cycle. The stat walk is not the problem —
|
|
83
|
-
* opening files is.
|
|
84
|
-
*
|
|
85
|
-
* 5,000 files is enough to measure per-file open+read+digest cost honestly
|
|
86
|
-
* while keeping the fixture buildable in CI; the numbers are printed so the
|
|
87
|
-
* README can quote a measured figure rather than a guess.
|
|
88
|
-
*/
|
|
89
|
-
const HASH_FILE_COUNT = 5_000;
|
|
90
|
-
const HASH_FILE_BYTES = 4 * 1024;
|
|
91
|
-
/**
|
|
92
|
-
* `vitest.bench.config.ts` starts the single worker with `--expose-gc`, so each
|
|
93
|
-
* RSS baseline follows a collection of the fixture-construction garbage. The
|
|
94
|
-
* old VM-context fallback exposed a collector for a different global and did
|
|
95
|
-
* not collect this worker's heap, which made macOS charge the fixture to the
|
|
96
|
-
* walk.
|
|
97
|
-
*/
|
|
98
|
-
function acquireGc() {
|
|
99
|
-
const exposed = globalThis.gc;
|
|
100
|
-
if (typeof exposed === "function")
|
|
101
|
-
return exposed;
|
|
102
|
-
throw new Error("manifest benchmark requires a worker started with --expose-gc");
|
|
103
|
-
}
|
|
104
|
-
let base;
|
|
105
|
-
let hqRoot;
|
|
106
|
-
let stateDir;
|
|
107
|
-
let controlDirectories;
|
|
108
|
-
let controlShouldSync;
|
|
109
|
-
let fixtureBuildMs;
|
|
110
|
-
async function measureWalkControl() {
|
|
111
|
-
const startedAt = performance.now();
|
|
112
|
-
const records = new Map();
|
|
113
|
-
let sinceYield = 0;
|
|
114
|
-
for (const directory of controlDirectories) {
|
|
115
|
-
const directoryPath = path.join(hqRoot, "bench", directory);
|
|
116
|
-
const relativeDirectory = `bench/${directory}`;
|
|
117
|
-
const entries = fs.readdirSync(directoryPath, { withFileTypes: true });
|
|
118
|
-
for (const entry of entries) {
|
|
119
|
-
if (!entry.isFile())
|
|
120
|
-
continue;
|
|
121
|
-
const entryPath = path.join(directoryPath, entry.name);
|
|
122
|
-
if (!controlShouldSync(entryPath, false))
|
|
123
|
-
continue;
|
|
124
|
-
const manifestPath = relativeDirectory.concat("/", entry.name).normalize("NFC");
|
|
125
|
-
assertSyncManifestPath("path", manifestPath);
|
|
126
|
-
if (records.has(manifestPath))
|
|
127
|
-
continue;
|
|
128
|
-
const stats = fs.lstatSync(entryPath);
|
|
129
|
-
records.set(manifestPath, {
|
|
130
|
-
mtimeMs: Math.floor(stats.mtimeMs),
|
|
131
|
-
size: stats.size,
|
|
132
|
-
isSymlink: stats.isSymbolicLink(),
|
|
133
|
-
});
|
|
134
|
-
if (++sinceYield >= DEFAULT_MANIFEST_YIELD_EVERY) {
|
|
135
|
-
sinceYield = 0;
|
|
136
|
-
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
expect(records.size).toBe(CONTROL_FILE_COUNT);
|
|
141
|
-
return performance.now() - startedAt;
|
|
142
|
-
}
|
|
143
|
-
async function measureBuildManifestWalk() {
|
|
144
|
-
const result = await buildSyncManifest({
|
|
145
|
-
scope: { kind: "personal" },
|
|
146
|
-
hqRoot,
|
|
147
|
-
stateDir,
|
|
148
|
-
installationId: "install-bench",
|
|
149
|
-
machineId: "machine-bench",
|
|
150
|
-
source: "cli",
|
|
151
|
-
sequence: 1,
|
|
152
|
-
hashPolicy: "ledger-only",
|
|
153
|
-
listJournalsImpl: () => [],
|
|
154
|
-
// Well above the budget: the assertion below is what fails on a
|
|
155
|
-
// regression, not a truncated walk that would silently "pass" fast.
|
|
156
|
-
maxWallMs: 120_000,
|
|
157
|
-
persistSnapshot: false,
|
|
158
|
-
});
|
|
159
|
-
expect(result.walkStats.truncated).toBe(false);
|
|
160
|
-
expect(result.walkStats.filesWalked).toBe(FILE_COUNT);
|
|
161
|
-
expect(result.walkStats.hashedFiles).toBe(0);
|
|
162
|
-
return result.walkStats.walkMs;
|
|
163
|
-
}
|
|
164
|
-
function median(values) {
|
|
165
|
-
const sorted = [...values].sort((left, right) => left - right);
|
|
166
|
-
return sorted[Math.floor(sorted.length / 2)];
|
|
167
|
-
}
|
|
168
|
-
describe("buildSyncManifest stat-walk benchmark", () => {
|
|
169
|
-
beforeAll(() => {
|
|
170
|
-
const fixtureStartedAt = performance.now();
|
|
171
|
-
base = fs.mkdtempSync(path.join(os.tmpdir(), "hq-manifest-bench-"));
|
|
172
|
-
hqRoot = path.join(base, "hq");
|
|
173
|
-
stateDir = path.join(base, "state");
|
|
174
|
-
fs.mkdirSync(stateDir, { recursive: true });
|
|
175
|
-
// 700 directories x 100 files: wide enough that per-directory `readdir`
|
|
176
|
-
// overhead is represented, shallow enough to stay realistic for an HQ root.
|
|
177
|
-
const perDirectory = FILE_COUNT / DIRECTORY_COUNT;
|
|
178
|
-
for (let dirIndex = 0; dirIndex < DIRECTORY_COUNT; dirIndex++) {
|
|
179
|
-
const dir = path.join(hqRoot, "bench", `d${dirIndex}`);
|
|
180
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
181
|
-
for (let fileIndex = 0; fileIndex < perDirectory; fileIndex++) {
|
|
182
|
-
fs.writeFileSync(path.join(dir, `f${fileIndex}.md`), "");
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
controlDirectories = fs
|
|
186
|
-
.readdirSync(path.join(hqRoot, "bench"), { withFileTypes: true })
|
|
187
|
-
.filter((entry) => entry.isDirectory())
|
|
188
|
-
.slice(0, CONTROL_DIRECTORY_COUNT)
|
|
189
|
-
.map((entry) => entry.name);
|
|
190
|
-
expect(controlDirectories).toHaveLength(CONTROL_DIRECTORY_COUNT);
|
|
191
|
-
controlShouldSync = wrapFilterWithPersonalVaultDefaults(createIgnoreFilter(hqRoot), hqRoot, () => { });
|
|
192
|
-
fixtureBuildMs = performance.now() - fixtureStartedAt;
|
|
193
|
-
}, 300_000);
|
|
194
|
-
afterAll(() => {
|
|
195
|
-
fs.rmSync(base, { recursive: true, force: true });
|
|
196
|
-
});
|
|
197
|
-
it(`walks ${FILE_COUNT} files within budget`, async () => {
|
|
198
|
-
const forceGc = acquireGc();
|
|
199
|
-
const measurements = [];
|
|
200
|
-
let rssGrowth = 0;
|
|
201
|
-
let heapGrowth = 0;
|
|
202
|
-
for (let run = 0; run < WALK_RUN_COUNT; run += 1) {
|
|
203
|
-
// Run the same preparation before each side of the pair. Measuring a
|
|
204
|
-
// control and then timing the walk would make cache warmth a hidden,
|
|
205
|
-
// asymmetric input to the ratio.
|
|
206
|
-
forceGc();
|
|
207
|
-
await measureWalkControl();
|
|
208
|
-
forceGc();
|
|
209
|
-
const controlMs = await measureWalkControl();
|
|
210
|
-
forceGc();
|
|
211
|
-
await measureWalkControl();
|
|
212
|
-
forceGc();
|
|
213
|
-
const memoryBefore = run === 0 ? process.memoryUsage() : undefined;
|
|
214
|
-
const walkMs = await measureBuildManifestWalk();
|
|
215
|
-
if (memoryBefore !== undefined) {
|
|
216
|
-
forceGc();
|
|
217
|
-
const memoryAfter = process.memoryUsage();
|
|
218
|
-
rssGrowth = memoryAfter.rss - memoryBefore.rss;
|
|
219
|
-
heapGrowth = memoryAfter.heapUsed - memoryBefore.heapUsed;
|
|
220
|
-
}
|
|
221
|
-
measurements.push({ controlMs, walkMs });
|
|
222
|
-
}
|
|
223
|
-
const medianControlMs = median(measurements.map((measurement) => measurement.controlMs));
|
|
224
|
-
const medianWalkMs = median(measurements.map((measurement) => measurement.walkMs));
|
|
225
|
-
const ratios = measurements.map((measurement) => measurement.walkMs / measurement.controlMs);
|
|
226
|
-
const medianWalkToControlRatio = median(ratios);
|
|
227
|
-
// macOS's allocator retains mapped pages after a V8 collection, so its RSS
|
|
228
|
-
// delta includes allocator mappings left by the fixture even though the
|
|
229
|
-
// retained manifest heap is small. This stat-only walk owns no content
|
|
230
|
-
// buffers or native allocations; heap growth is therefore the comparable
|
|
231
|
-
// retained-code metric on macOS. Linux keeps the product's RSS gate.
|
|
232
|
-
const memoryGrowth = process.platform === "darwin" ? heapGrowth : rssGrowth;
|
|
233
|
-
const memoryMetric = process.platform === "darwin" ? "heap" : "RSS";
|
|
234
|
-
// Print every trial so a CI run records the machine-normalised evidence,
|
|
235
|
-
// rather than only a pass/fail verdict from its current runner pool.
|
|
236
|
-
process.stdout.write(`manifest stat-walk: fixture ${fixtureBuildMs.toFixed(1)}ms; ${measurements.map((measurement) => `${measurement.walkMs}ms/${measurement.controlMs.toFixed(1)}ms=${(measurement.walkMs / measurement.controlMs).toFixed(2)}`).join(", ")}; ` +
|
|
237
|
-
`median walk ${medianWalkMs}ms, median control ${medianControlMs.toFixed(1)}ms, ` +
|
|
238
|
-
`median paired ratio ${medianWalkToControlRatio.toFixed(2)}, ` +
|
|
239
|
-
`${(rssGrowth / (1024 * 1024)).toFixed(1)}MB RSS, ` +
|
|
240
|
-
`${(heapGrowth / (1024 * 1024)).toFixed(1)}MB heap; ` +
|
|
241
|
-
`${(memoryGrowth / (1024 * 1024)).toFixed(1)}MB ${memoryMetric} for ${FILE_COUNT} files\n`);
|
|
242
|
-
expect(medianWalkToControlRatio).toBeLessThan(MAX_WALK_TO_CONTROL_RATIO);
|
|
243
|
-
expect(memoryGrowth).toBeLessThan(MAX_RSS_GROWTH_BYTES);
|
|
244
|
-
}, 120_000);
|
|
245
|
-
});
|
|
246
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
247
|
-
// Resident manifest boundary (memory)
|
|
248
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
249
|
-
/**
|
|
250
|
-
* This is deliberately larger than the ordinary 70k walk fixture. The post-
|
|
251
|
-
* sync full reconcile that motivated this gate retains the manifest result for
|
|
252
|
-
* upload, so its graph scales with the whole scope rather than one chunk. A
|
|
253
|
-
* 200k-file fixture keeps that cardinality (and every whole-scope map/object
|
|
254
|
-
* shape) representative while fitting in the benchmark job's isolated runner.
|
|
255
|
-
*/
|
|
256
|
-
const RESIDENT_FILE_COUNT = 200_000;
|
|
257
|
-
const RESIDENT_DIRECTORY_COUNT = 2_000;
|
|
258
|
-
const RESIDENT_FILES_PER_DIRECTORY = RESIDENT_FILE_COUNT / RESIDENT_DIRECTORY_COUNT;
|
|
259
|
-
// Origin/main measured 123.2 MiB after three churned full builds. The 110 MiB
|
|
260
|
-
// ceiling requires at least a 10.7% reduction while leaving ~14 MiB of
|
|
261
|
-
// headroom over the expected post-change result on the benchmark runner.
|
|
262
|
-
const MAX_RESIDENT_BOUNDARY_BYTES = 110 * 1024 * 1024;
|
|
263
|
-
function bytesPerFile(bytes) {
|
|
264
|
-
return bytes / RESIDENT_FILE_COUNT;
|
|
265
|
-
}
|
|
266
|
-
describe("buildSyncManifest resident boundary", () => {
|
|
267
|
-
let residentBase;
|
|
268
|
-
let residentRoot;
|
|
269
|
-
let residentStateDir;
|
|
270
|
-
let residentEmptyHash;
|
|
271
|
-
let collect;
|
|
272
|
-
let residentReferencesForAttribution;
|
|
273
|
-
beforeAll(() => {
|
|
274
|
-
residentBase = fs.mkdtempSync(path.join(os.tmpdir(), "hq-manifest-resident-"));
|
|
275
|
-
residentRoot = path.join(residentBase, "hq");
|
|
276
|
-
residentStateDir = path.join(residentBase, "state");
|
|
277
|
-
fs.mkdirSync(residentStateDir, { recursive: true });
|
|
278
|
-
for (let directoryIndex = 0; directoryIndex < RESIDENT_DIRECTORY_COUNT; directoryIndex += 1) {
|
|
279
|
-
const directory = path.join(residentRoot, "resident", `d${directoryIndex}`);
|
|
280
|
-
fs.mkdirSync(directory, { recursive: true });
|
|
281
|
-
for (let fileIndex = 0; fileIndex < RESIDENT_FILES_PER_DIRECTORY; fileIndex += 1) {
|
|
282
|
-
fs.writeFileSync(path.join(directory, `f${fileIndex}.md`), "");
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
residentEmptyHash = hashFile(path.join(residentRoot, "resident", "d0", "f0.md"));
|
|
286
|
-
collect = acquireMemoryGc();
|
|
287
|
-
}, 600_000);
|
|
288
|
-
afterAll(() => {
|
|
289
|
-
setBuildManifestMemoryReferencesHookForTest(undefined);
|
|
290
|
-
fs.rmSync(residentBase, { recursive: true, force: true });
|
|
291
|
-
});
|
|
292
|
-
function ledgerFor(generation) {
|
|
293
|
-
const files = Object.create(null);
|
|
294
|
-
for (let directoryIndex = 0; directoryIndex < RESIDENT_DIRECTORY_COUNT; directoryIndex += 1) {
|
|
295
|
-
for (let fileIndex = 0; fileIndex < RESIDENT_FILES_PER_DIRECTORY; fileIndex += 1) {
|
|
296
|
-
const relative = `resident/d${directoryIndex}/f${fileIndex}.md`;
|
|
297
|
-
const stats = fs.lstatSync(path.join(residentRoot, relative));
|
|
298
|
-
files[relative] = {
|
|
299
|
-
hash: residentEmptyHash,
|
|
300
|
-
size: stats.size,
|
|
301
|
-
mtimeMs: Math.floor(stats.mtimeMs),
|
|
302
|
-
syncedAt: `2026-09-12T00:00:0${generation}.000Z`,
|
|
303
|
-
direction: generation % 2 === 0 ? "up" : "down",
|
|
304
|
-
remoteEtag: `resident-${generation}-${directoryIndex % 29}`,
|
|
305
|
-
};
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
let journal = {
|
|
309
|
-
version: "2",
|
|
310
|
-
lastSync: "2026-09-12T00:00:00.000Z",
|
|
311
|
-
files,
|
|
312
|
-
pulls: [],
|
|
313
|
-
};
|
|
314
|
-
return () => {
|
|
315
|
-
const current = journal;
|
|
316
|
-
journal = undefined;
|
|
317
|
-
if (!current)
|
|
318
|
-
throw new Error("resident benchmark ledger was read more than once");
|
|
319
|
-
return [{ slug: PERSONAL_VAULT_JOURNAL_SLUG, path: "/state/resident.json", journal: current }];
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
async function measureResidentBoundary(generation, retainReferences = false, options = {}) {
|
|
323
|
-
collectGarbage(collect);
|
|
324
|
-
const baseline = usedBytes();
|
|
325
|
-
let references;
|
|
326
|
-
let boundary = 0;
|
|
327
|
-
setBuildManifestMemoryReferencesHookForTest((sample) => {
|
|
328
|
-
references = sample;
|
|
329
|
-
if (retainReferences)
|
|
330
|
-
residentReferencesForAttribution = sample;
|
|
331
|
-
collectGarbage(collect);
|
|
332
|
-
boundary = usedBytes();
|
|
333
|
-
});
|
|
334
|
-
try {
|
|
335
|
-
const result = await buildSyncManifest({
|
|
336
|
-
scope: { kind: "personal" },
|
|
337
|
-
hqRoot: residentRoot,
|
|
338
|
-
stateDir: residentStateDir,
|
|
339
|
-
installationId: "resident-install",
|
|
340
|
-
machineId: "resident-machine",
|
|
341
|
-
source: "cli",
|
|
342
|
-
sequence: generation,
|
|
343
|
-
hashPolicy: "never",
|
|
344
|
-
forceFull: options.forceFull ?? true,
|
|
345
|
-
listJournalsImpl: options.listJournalsImpl ?? ledgerFor(generation),
|
|
346
|
-
maxWallMs: 600_000,
|
|
347
|
-
persistSnapshot: options.persistSnapshot ?? false,
|
|
348
|
-
});
|
|
349
|
-
if (options.forceFull !== false)
|
|
350
|
-
expect(result.mode).toBe("full");
|
|
351
|
-
expect(result.walkStats.filesWalked).toBe(options.expectedFilesWalked ?? RESIDENT_FILE_COUNT);
|
|
352
|
-
}
|
|
353
|
-
finally {
|
|
354
|
-
setBuildManifestMemoryReferencesHookForTest(undefined);
|
|
355
|
-
}
|
|
356
|
-
if (!references)
|
|
357
|
-
throw new Error("resident benchmark did not observe the manifest boundary");
|
|
358
|
-
return {
|
|
359
|
-
baseline,
|
|
360
|
-
boundary,
|
|
361
|
-
growth: boundary - baseline,
|
|
362
|
-
walkRecords: references.walkRecords.size,
|
|
363
|
-
ledgerEntries: references.ledgerEntries.size,
|
|
364
|
-
entries: references.entries.length,
|
|
365
|
-
snapshotEntries: Object.keys(references.snapshotEntries).length,
|
|
366
|
-
changed: references.changed?.length ?? 0,
|
|
367
|
-
present: references.present?.size ?? 0,
|
|
368
|
-
removed: references.removed?.length ?? 0,
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
function releasedBytes(release) {
|
|
372
|
-
const before = usedBytes();
|
|
373
|
-
release();
|
|
374
|
-
collectGarbage(collect);
|
|
375
|
-
return before - usedBytes();
|
|
376
|
-
}
|
|
377
|
-
function clearSnapshotEntries(entries) {
|
|
378
|
-
for (const key in entries)
|
|
379
|
-
delete entries[key];
|
|
380
|
-
}
|
|
381
|
-
function attributeFullBoundary() {
|
|
382
|
-
const references = residentReferencesForAttribution;
|
|
383
|
-
if (!references)
|
|
384
|
-
throw new Error("resident benchmark did not retain full-boundary references");
|
|
385
|
-
// Release in reverse dependency order. Strings shared by two structures are
|
|
386
|
-
// charged to the last owner, making this a reproducible retained-graph
|
|
387
|
-
// attribution rather than a double-counted object-size estimate.
|
|
388
|
-
const snapshotEntries = releasedBytes(() => clearSnapshotEntries(references.snapshotEntries));
|
|
389
|
-
const entries = releasedBytes(() => {
|
|
390
|
-
references.entries.length = 0;
|
|
391
|
-
});
|
|
392
|
-
const walkRecords = releasedBytes(() => {
|
|
393
|
-
references.walkRecords.clear();
|
|
394
|
-
});
|
|
395
|
-
const ledgerEntries = releasedBytes(() => {
|
|
396
|
-
references.ledgerEntries.clear();
|
|
397
|
-
});
|
|
398
|
-
return { walkRecords, ledgerEntries, entries, snapshotEntries, changed: 0, present: 0, removed: 0 };
|
|
399
|
-
}
|
|
400
|
-
async function attributeDeltaTransients() {
|
|
401
|
-
let baseResult = await buildSyncManifest({
|
|
402
|
-
scope: { kind: "personal" },
|
|
403
|
-
hqRoot: residentRoot,
|
|
404
|
-
stateDir: residentStateDir,
|
|
405
|
-
installationId: "resident-install",
|
|
406
|
-
machineId: "resident-machine",
|
|
407
|
-
source: "cli",
|
|
408
|
-
sequence: 5,
|
|
409
|
-
hashPolicy: "never",
|
|
410
|
-
forceFull: true,
|
|
411
|
-
listJournalsImpl: ledgerFor(5),
|
|
412
|
-
maxWallMs: 600_000,
|
|
413
|
-
});
|
|
414
|
-
expect(baseResult.mode).toBe("full");
|
|
415
|
-
// A previous full result is not part of the delta boundary. Release it
|
|
416
|
-
// before measuring so its entries cannot be mischarged to `changed`.
|
|
417
|
-
baseResult = undefined;
|
|
418
|
-
collectGarbage(collect);
|
|
419
|
-
const changedAt = new Date(Date.parse("2026-09-12T01:00:00.000Z"));
|
|
420
|
-
for (let directoryIndex = 0; directoryIndex < RESIDENT_DIRECTORY_COUNT; directoryIndex += 1) {
|
|
421
|
-
for (let fileIndex = 0; fileIndex < RESIDENT_FILES_PER_DIRECTORY; fileIndex += 1) {
|
|
422
|
-
fs.utimesSync(path.join(residentRoot, "resident", `d${directoryIndex}`, `f${fileIndex}.md`), changedAt, changedAt);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
await measureResidentBoundary(6, true, { forceFull: false, persistSnapshot: true });
|
|
426
|
-
// The test hook runs while `buildSyncManifest` still has its source-journal
|
|
427
|
-
// call frame. Its compact LedgerIndex is retained through `references`,
|
|
428
|
-
// but the fabricated JournalSummary is not part of this delta boundary.
|
|
429
|
-
// Let that caller frame die before charging a release to one transient.
|
|
430
|
-
collectGarbage(collect);
|
|
431
|
-
const references = residentReferencesForAttribution;
|
|
432
|
-
if (!references?.changed) {
|
|
433
|
-
throw new Error("resident benchmark did not retain delta transients");
|
|
434
|
-
}
|
|
435
|
-
// `snapshotEntries` omits stat-only paths, so the old `present` set was
|
|
436
|
-
// not removable on its own. The builder now checks the walk-key set first
|
|
437
|
-
// and snapshot ownership second, then clears the key set at its last use.
|
|
438
|
-
// A new `present` allocation would recreate the whole-scope transient.
|
|
439
|
-
expect(references.present).toBeUndefined();
|
|
440
|
-
const present = 0;
|
|
441
|
-
const changed = releasedBytes(() => {
|
|
442
|
-
if (references.changed)
|
|
443
|
-
references.changed.length = 0;
|
|
444
|
-
});
|
|
445
|
-
return { changed, present };
|
|
446
|
-
}
|
|
447
|
-
async function attributeRemovedTransient() {
|
|
448
|
-
fs.rmSync(path.join(residentRoot, "resident"), { recursive: true, force: true });
|
|
449
|
-
await measureResidentBoundary(7, true, {
|
|
450
|
-
forceFull: false,
|
|
451
|
-
listJournalsImpl: () => [],
|
|
452
|
-
expectedFilesWalked: 0,
|
|
453
|
-
});
|
|
454
|
-
const references = residentReferencesForAttribution;
|
|
455
|
-
if (!references?.removed)
|
|
456
|
-
throw new Error("resident benchmark did not retain removed paths");
|
|
457
|
-
return releasedBytes(() => {
|
|
458
|
-
if (references.removed)
|
|
459
|
-
references.removed.length = 0;
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
it(`drops whole-scope walk records at the ${RESIDENT_FILE_COUNT}-file resident boundary`, async () => {
|
|
463
|
-
const seeded = await measureResidentBoundary(1);
|
|
464
|
-
// Rebuilding the same scope with distinct ledger metadata three times is
|
|
465
|
-
// the post-sync churn this result sees in production. Keep only the final
|
|
466
|
-
// result alive at each boundary; a prior pass must not leak into the next.
|
|
467
|
-
let churned = seeded;
|
|
468
|
-
for (let generation = 2; generation <= 4; generation += 1) {
|
|
469
|
-
churned = await measureResidentBoundary(generation, generation === 4);
|
|
470
|
-
}
|
|
471
|
-
const fullAttribution = attributeFullBoundary();
|
|
472
|
-
const deltaAttribution = await attributeDeltaTransients();
|
|
473
|
-
const removed = await attributeRemovedTransient();
|
|
474
|
-
process.stdout.write(`manifest resident boundary: ${RESIDENT_FILE_COUNT} files; ` +
|
|
475
|
-
`seeded ${(seeded.growth / (1024 * 1024)).toFixed(1)}MiB ` +
|
|
476
|
-
`(${bytesPerFile(seeded.growth).toFixed(1)}B/file); ` +
|
|
477
|
-
`churned ${(churned.growth / (1024 * 1024)).toFixed(1)}MiB ` +
|
|
478
|
-
`(${bytesPerFile(churned.growth).toFixed(1)}B/file); ` +
|
|
479
|
-
`seeded maps walk=${seeded.walkRecords} ledger=${seeded.ledgerEntries} ` +
|
|
480
|
-
`entries=${seeded.entries} snapshot=${seeded.snapshotEntries}; ` +
|
|
481
|
-
`churned maps walk=${churned.walkRecords} ledger=${churned.ledgerEntries} ` +
|
|
482
|
-
`entries=${churned.entries} snapshot=${churned.snapshotEntries}\n`);
|
|
483
|
-
for (const [name, bytes] of [
|
|
484
|
-
["walk.records", fullAttribution.walkRecords],
|
|
485
|
-
["ledger.entries", fullAttribution.ledgerEntries],
|
|
486
|
-
["entries", fullAttribution.entries],
|
|
487
|
-
["snapshotEntries", fullAttribution.snapshotEntries],
|
|
488
|
-
["changed", deltaAttribution.changed],
|
|
489
|
-
["present", deltaAttribution.present],
|
|
490
|
-
["removed", removed],
|
|
491
|
-
]) {
|
|
492
|
-
process.stdout.write(`manifest resident attribution: ${name} ${(bytes / (1024 * 1024)).toFixed(1)}MiB ` +
|
|
493
|
-
`(${bytesPerFile(bytes).toFixed(1)}B/file)\n`);
|
|
494
|
-
}
|
|
495
|
-
// The only consumer after the disk/ledger union needs membership, not the
|
|
496
|
-
// full record values. This assertion is intentionally red before the
|
|
497
|
-
// resident reduction: a non-empty map at this boundary is the retained
|
|
498
|
-
// whole-scope graph the test is here to eliminate.
|
|
499
|
-
expect(seeded.walkRecords).toBe(0);
|
|
500
|
-
expect(churned.walkRecords).toBe(0);
|
|
501
|
-
expect(seeded.growth).toBeLessThan(MAX_RESIDENT_BOUNDARY_BYTES);
|
|
502
|
-
expect(churned.growth).toBeLessThan(MAX_RESIDENT_BOUNDARY_BYTES);
|
|
503
|
-
}, 600_000);
|
|
504
|
-
});
|
|
505
|
-
/**
|
|
506
|
-
* The cost of a COLD ledger, and the guarantee that the default never pays it.
|
|
507
|
-
*
|
|
508
|
-
* Separate fixture from the stat-walk bench above: that one uses empty files
|
|
509
|
-
* (so it measures traversal), while this one needs real bytes to measure
|
|
510
|
-
* open + read + sha256.
|
|
511
|
-
*/
|
|
512
|
-
describe("buildSyncManifest cold-ledger hash cost", () => {
|
|
513
|
-
let hashBase;
|
|
514
|
-
let hashRoot;
|
|
515
|
-
let hashStateDir;
|
|
516
|
-
beforeAll(() => {
|
|
517
|
-
hashBase = fs.mkdtempSync(path.join(os.tmpdir(), "hq-manifest-hash-bench-"));
|
|
518
|
-
hashRoot = path.join(hashBase, "hq");
|
|
519
|
-
hashStateDir = path.join(hashBase, "state");
|
|
520
|
-
fs.mkdirSync(hashStateDir, { recursive: true });
|
|
521
|
-
const body = "x".repeat(HASH_FILE_BYTES);
|
|
522
|
-
const perDirectory = 100;
|
|
523
|
-
for (let index = 0; index < HASH_FILE_COUNT; index += 1) {
|
|
524
|
-
const dir = path.join(hashRoot, "bench", `d${Math.floor(index / perDirectory)}`);
|
|
525
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
526
|
-
fs.writeFileSync(path.join(dir, `f${index}.md`), body);
|
|
527
|
-
}
|
|
528
|
-
}, 300_000);
|
|
529
|
-
afterAll(() => {
|
|
530
|
-
fs.rmSync(hashBase, { recursive: true, force: true });
|
|
531
|
-
});
|
|
532
|
-
function optionsFor(overrides) {
|
|
533
|
-
return {
|
|
534
|
-
scope: { kind: "personal" },
|
|
535
|
-
hqRoot: hashRoot,
|
|
536
|
-
stateDir: hashStateDir,
|
|
537
|
-
installationId: "install-bench",
|
|
538
|
-
machineId: "machine-bench",
|
|
539
|
-
source: "cli",
|
|
540
|
-
sequence: 1,
|
|
541
|
-
listJournalsImpl: () => [],
|
|
542
|
-
maxWallMs: 600_000,
|
|
543
|
-
persistSnapshot: false,
|
|
544
|
-
...overrides,
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
it(`measures the unbounded first-pass hash cost for ${HASH_FILE_COUNT} cold files`, async () => {
|
|
548
|
-
const forceGc = acquireGc();
|
|
549
|
-
forceGc?.();
|
|
550
|
-
const rssBefore = process.memoryUsage().rss;
|
|
551
|
-
const startedAt = Date.now();
|
|
552
|
-
const result = await buildSyncManifest(optionsFor({ hashPolicy: "full" }));
|
|
553
|
-
const elapsedMs = Date.now() - startedAt;
|
|
554
|
-
forceGc?.();
|
|
555
|
-
const rssGrowthMb = (process.memoryUsage().rss - rssBefore) / (1024 * 1024);
|
|
556
|
-
// Recorded, not asserted as a budget: this measures the path the default
|
|
557
|
-
// deliberately avoids, and its absolute cost varies wildly by disk. The
|
|
558
|
-
// README quotes these numbers.
|
|
559
|
-
process.stdout.write(`manifest cold-ledger hash (hashPolicy="full"): ${HASH_FILE_COUNT} files: ` +
|
|
560
|
-
`${elapsedMs}ms / ${rssGrowthMb.toFixed(1)}MB RSS ` +
|
|
561
|
-
`(${((HASH_FILE_COUNT * HASH_FILE_BYTES) / (1024 * 1024)).toFixed(1)}MB read)\n`);
|
|
562
|
-
expect(result.walkStats.hashedFiles).toBe(HASH_FILE_COUNT);
|
|
563
|
-
expect(result.walkStats.unhashedFiles).toBe(0);
|
|
564
|
-
}, 600_000);
|
|
565
|
-
it("the DEFAULT policy reads nothing at all on the same cold fixture", async () => {
|
|
566
|
-
// The guarantee the fix rests on. Every file is still REPORTED — the
|
|
567
|
-
// manifest is complete — it is just stat-only, so the first pass after an
|
|
568
|
-
// upgrade costs a walk instead of a full read of the vault.
|
|
569
|
-
const startedAt = Date.now();
|
|
570
|
-
const result = await buildSyncManifest(optionsFor({}));
|
|
571
|
-
const elapsedMs = Date.now() - startedAt;
|
|
572
|
-
process.stdout.write(`manifest cold-ledger stat-only (default): ${HASH_FILE_COUNT} files: ${elapsedMs}ms\n`);
|
|
573
|
-
expect(result.walkStats.hashedFiles).toBe(0);
|
|
574
|
-
expect(result.walkStats.unhashedFiles).toBe(HASH_FILE_COUNT);
|
|
575
|
-
expect(result.walkStats.filesWalked).toBe(HASH_FILE_COUNT);
|
|
576
|
-
expect(result.chunks.flatMap((chunk) => chunk.entries)).toHaveLength(HASH_FILE_COUNT);
|
|
577
|
-
}, 300_000);
|
|
578
|
-
it("`auto` spreads the cost across passes instead of paying it all at once", async () => {
|
|
579
|
-
const result = await buildSyncManifest(optionsFor({ hashPolicy: "auto", maxHashedFiles: 500, maxHashMs: 60_000 }));
|
|
580
|
-
expect(result.walkStats.hashedFiles).toBe(500);
|
|
581
|
-
expect(result.walkStats.unhashedFiles).toBe(HASH_FILE_COUNT - 500);
|
|
582
|
-
// Bounded, but never lossy: the scope is still fully described.
|
|
583
|
-
expect(result.chunks.flatMap((chunk) => chunk.entries)).toHaveLength(HASH_FILE_COUNT);
|
|
584
|
-
}, 300_000);
|
|
585
|
-
});
|
|
586
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
587
|
-
// Ledger read cost (memory)
|
|
588
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
589
|
-
/**
|
|
590
|
-
* The manifest tail step's memory footprint, measured on the shape that
|
|
591
|
-
* actually hurt: a vault whose JOURNAL is large.
|
|
592
|
-
*
|
|
593
|
-
* WHY THIS IS A GATE, NOT A REPORT
|
|
594
|
-
* --------------------------------
|
|
595
|
-
* On a real operator vault this step peaked at 1,112 MB of resident memory for
|
|
596
|
-
* a 199k-entry personal scope. It is a background audit that runs after every
|
|
597
|
-
* sync pass on a laptop that is also running the user's editor, so a gigabyte
|
|
598
|
-
* is not a slow audit — it is the reason a user switches the feature off.
|
|
599
|
-
*
|
|
600
|
-
* FOUR CAUSES, ALL IN THE LEDGER READ, NONE IN THE WALK
|
|
601
|
-
* -----------------------------------------------------
|
|
602
|
-
* Measured on a 200,000-file synthetic tree, the walk itself costs ~220 MB and
|
|
603
|
-
* the build's chunking and snapshot add ~10 MB. Everything else was spent
|
|
604
|
-
* before the walk statted its first file:
|
|
605
|
-
*
|
|
606
|
-
* 1. `listJournals()` read and parsed EVERY journal shard on the machine to
|
|
607
|
-
* keep the one that describes this scope, and did it again for every
|
|
608
|
-
* scope in a fanout. `readLedger` now reads one shard, and
|
|
609
|
-
* `ledger-shard-isolation.test.ts` counts the journal files opened so
|
|
610
|
-
* that cannot quietly become "all of them" again.
|
|
611
|
-
* 2. `readJournal()` deep-clones every journal it returns into the writer
|
|
612
|
-
* baseline WeakMap. A read-only caller pays double for a baseline it will
|
|
613
|
-
* never diff against. The read-only path skips it.
|
|
614
|
-
* 3. Reading that one shard still cost its file size TWICE — once as a UTF-8
|
|
615
|
-
* string, once as a parsed object graph — before a single row was looked
|
|
616
|
-
* at. `streamJournalLedgerRows` scans the document in 256 KB chunks and
|
|
617
|
-
* parses each row on its own instead, so the transient set is bounded by
|
|
618
|
-
* a chunk rather than by the vault.
|
|
619
|
-
* 4. The derived map retained the parsed `JournalEntry` objects, which pinned
|
|
620
|
-
* the whole parse result behind the index built FROM it. The index now
|
|
621
|
-
* holds a six-field projection with the repeated strings shared, so the
|
|
622
|
-
* parse is collectable the moment the read returns.
|
|
623
|
-
*
|
|
624
|
-
* (1) and (2) took a 200,000-FILE measurement from 1,113 MB to 599 MB. (3) and
|
|
625
|
-
* (4) took the ledger read on this fixture from 113.6 MB to 24 MB of resident
|
|
626
|
-
* growth, and the same 200,000-file measurement to ~437 MB peak — under the
|
|
627
|
-
* 500 MB bar this step has to clear to be worth leaving switched on.
|
|
628
|
-
*
|
|
629
|
-
* IN-PROCESS, NOT A CHILD WITH `--max-old-space-size`
|
|
630
|
-
* --------------------------------------------------
|
|
631
|
-
* A heap ceiling would fail the run with an OOM abort, which reports "the
|
|
632
|
-
* child died" rather than a number, and it bounds only V8's heap — while most
|
|
633
|
-
* of the regression showed up as resident growth outside it. This file already
|
|
634
|
-
* runs alone, in a single fork, on its own CI runner (see
|
|
635
|
-
* `vitest.bench.config.ts`), which is the isolation a memory measurement needs;
|
|
636
|
-
* sampling RSS there measures the thing the budget is actually about.
|
|
637
|
-
*/
|
|
638
|
-
const LEDGER_ENTRY_COUNT = 200_000;
|
|
639
|
-
const LEDGER_COMPANY_COUNT = 4;
|
|
640
|
-
const LEDGER_COMPANY_ENTRY_COUNT = 50_000;
|
|
641
|
-
const LEDGER_DISK_FILE_COUNT = 2_000;
|
|
642
|
-
/**
|
|
643
|
-
* 30 MB of resident growth for this fixture — the measurement plus 20%.
|
|
644
|
-
*
|
|
645
|
-
* Measured: 24.1, 24.2 and 24.1 MB across three isolated runs, which is the
|
|
646
|
-
* spread this file's single-fork, own-CI-runner isolation buys. The previous
|
|
647
|
-
* budget was 260 MB against a 113.6 MB measurement, and headroom that wide
|
|
648
|
-
* stops being headroom: it would have absorbed every regression this gate
|
|
649
|
-
* names without anyone noticing. Re-reading every shard (`listJournals()`)
|
|
650
|
-
* puts this fixture back near 356 MB, materialising the shard whole puts it
|
|
651
|
-
* near 114 MB, and both are now loudly out of budget rather than comfortably
|
|
652
|
-
* inside it.
|
|
653
|
-
*
|
|
654
|
-
* If this trips on a slower or differently-sized CI runner, the honest fix is
|
|
655
|
-
* to re-measure and move the number WITH a note saying what it measured — not
|
|
656
|
-
* to widen it until it stops complaining.
|
|
657
|
-
*
|
|
658
|
-
* This fixture understates the whole-vault picture on purpose: it pairs a
|
|
659
|
-
* 200k-entry ledger with a 2,000-file tree, because the walk's own cost is
|
|
660
|
-
* already gated by the stat-walk bench above and does not need paying for
|
|
661
|
-
* twice. On a real 200k-FILE vault the same code measures ~437 MB peak.
|
|
662
|
-
*/
|
|
663
|
-
const MAX_LEDGER_RSS_GROWTH_BYTES = 30 * 1024 * 1024;
|
|
664
|
-
describe("buildSyncManifest ledger read cost", () => {
|
|
665
|
-
let ledgerBase;
|
|
666
|
-
let ledgerRoot;
|
|
667
|
-
let ledgerStateDir;
|
|
668
|
-
let previousStateDir;
|
|
669
|
-
function writeLegacyJournal(stateDir, slug, entryCount) {
|
|
670
|
-
const files = {};
|
|
671
|
-
for (let index = 0; index < entryCount; index += 1) {
|
|
672
|
-
files[`ledger/d${Math.floor(index / 100)}/f${index}.md`] = {
|
|
673
|
-
hash: `sha256:${index.toString(16).padStart(64, "0")}`,
|
|
674
|
-
size: 1024 + index,
|
|
675
|
-
syncedAt: "2026-01-01T00:00:00.000Z",
|
|
676
|
-
direction: "up",
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
fs.writeFileSync(path.join(stateDir, `sync-journal.${slug}.json`), JSON.stringify({ version: "2", files, pulls: [] }), "utf8");
|
|
680
|
-
}
|
|
681
|
-
beforeAll(() => {
|
|
682
|
-
ledgerBase = fs.mkdtempSync(path.join(os.tmpdir(), "hq-manifest-ledger-bench-"));
|
|
683
|
-
ledgerRoot = path.join(ledgerBase, "hq");
|
|
684
|
-
ledgerStateDir = path.join(ledgerBase, "state");
|
|
685
|
-
fs.mkdirSync(ledgerStateDir, { recursive: true });
|
|
686
|
-
// The journal reader resolves its own state dir from the environment, so
|
|
687
|
-
// the fixture has to own it for the duration of this suite. Without this
|
|
688
|
-
// the bench would read the DEVELOPER'S real journals — which is how the
|
|
689
|
-
// original 1.1 GB measurement was first reproduced, and is not something a
|
|
690
|
-
// CI budget can be built on.
|
|
691
|
-
previousStateDir = process.env.HQ_STATE_DIR;
|
|
692
|
-
process.env.HQ_STATE_DIR = ledgerStateDir;
|
|
693
|
-
writeLegacyJournal(ledgerStateDir, PERSONAL_VAULT_JOURNAL_SLUG, LEDGER_ENTRY_COUNT);
|
|
694
|
-
// The other shards exist only to be NOT read. Before the fix they were
|
|
695
|
-
// parsed on every build, for every scope.
|
|
696
|
-
for (let index = 0; index < LEDGER_COMPANY_COUNT; index += 1) {
|
|
697
|
-
writeLegacyJournal(ledgerStateDir, `company-${index}`, LEDGER_COMPANY_ENTRY_COUNT);
|
|
698
|
-
}
|
|
699
|
-
const perDirectory = 100;
|
|
700
|
-
for (let index = 0; index < LEDGER_DISK_FILE_COUNT; index += 1) {
|
|
701
|
-
const dir = path.join(ledgerRoot, "ledger", `d${Math.floor(index / perDirectory)}`);
|
|
702
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
703
|
-
fs.writeFileSync(path.join(dir, `f${index}.md`), "");
|
|
704
|
-
}
|
|
705
|
-
}, 600_000);
|
|
706
|
-
afterAll(() => {
|
|
707
|
-
if (previousStateDir === undefined)
|
|
708
|
-
delete process.env.HQ_STATE_DIR;
|
|
709
|
-
else
|
|
710
|
-
process.env.HQ_STATE_DIR = previousStateDir;
|
|
711
|
-
fs.rmSync(ledgerBase, { recursive: true, force: true });
|
|
712
|
-
});
|
|
713
|
-
it(`builds a ${LEDGER_ENTRY_COUNT}-entry ledger scope within the memory budget`, async () => {
|
|
714
|
-
const forceGc = acquireGc();
|
|
715
|
-
forceGc?.();
|
|
716
|
-
const rssBefore = process.memoryUsage().rss;
|
|
717
|
-
let peakRss = rssBefore;
|
|
718
|
-
const sampler = setInterval(() => {
|
|
719
|
-
peakRss = Math.max(peakRss, process.memoryUsage().rss);
|
|
720
|
-
}, 20);
|
|
721
|
-
let result;
|
|
722
|
-
try {
|
|
723
|
-
result = await buildSyncManifest({
|
|
724
|
-
scope: { kind: "personal" },
|
|
725
|
-
hqRoot: ledgerRoot,
|
|
726
|
-
stateDir: ledgerStateDir,
|
|
727
|
-
installationId: "install-bench",
|
|
728
|
-
machineId: "machine-bench",
|
|
729
|
-
source: "cli",
|
|
730
|
-
sequence: 1,
|
|
731
|
-
hashPolicy: "never",
|
|
732
|
-
// Deliberately NOT stubbed: reading the ledger off disk is the thing
|
|
733
|
-
// being measured.
|
|
734
|
-
maxWallMs: 600_000,
|
|
735
|
-
persistSnapshot: false,
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
finally {
|
|
739
|
-
clearInterval(sampler);
|
|
740
|
-
}
|
|
741
|
-
const peakGrowth = peakRss - rssBefore;
|
|
742
|
-
process.stdout.write(`manifest ledger read: ${LEDGER_ENTRY_COUNT} ledger entries + ` +
|
|
743
|
-
`${LEDGER_COMPANY_COUNT * LEDGER_COMPANY_ENTRY_COUNT} entries in other shards, ` +
|
|
744
|
-
`${LEDGER_DISK_FILE_COUNT} files on disk: ` +
|
|
745
|
-
`${(peakGrowth / (1024 * 1024)).toFixed(1)}MB peak RSS growth\n`);
|
|
746
|
-
// The scope is fully described — the budget is never met by reporting less.
|
|
747
|
-
expect(result.walkStats.truncated).toBe(false);
|
|
748
|
-
expect(result.walkStats.filesWalked).toBe(LEDGER_DISK_FILE_COUNT);
|
|
749
|
-
const reported = result.chunks.flatMap((chunk) => chunk.entries);
|
|
750
|
-
expect(reported.length).toBe(LEDGER_ENTRY_COUNT);
|
|
751
|
-
expect(reported.filter((entry) => entry.source === "ledger").length).toBe(LEDGER_ENTRY_COUNT - LEDGER_DISK_FILE_COUNT);
|
|
752
|
-
expect(peakGrowth).toBeLessThan(MAX_LEDGER_RSS_GROWTH_BYTES);
|
|
753
|
-
}, 600_000);
|
|
754
|
-
});
|
|
755
|
-
/**
|
|
756
|
-
* Upload-pass memory benchmark: 200,000 entries, streamed.
|
|
757
|
-
*
|
|
758
|
-
* WHAT THIS GATES
|
|
759
|
-
* ---------------
|
|
760
|
-
* The upload half of the pass must stay inside the same 500 MB bar the build
|
|
761
|
-
* half does — below it the audit is worth leaving switched on beside a user's
|
|
762
|
-
* editor, above it the honest answer is to switch it off. The pass now mints
|
|
763
|
-
* one `SyncManifestUpload` at a time from a `ManifestChunkPlan` instead of
|
|
764
|
-
* materialising the whole chunk set before the first POST, and serialises the
|
|
765
|
-
* local snapshot incrementally instead of through one `JSON.stringify` of
|
|
766
|
-
* every entry. `peakLiveChunks` is asserted alongside the budget because it is
|
|
767
|
-
* the STRUCTURAL property the budget rests on: a future edit that collects the
|
|
768
|
-
* chunks again would still fit this fixture long before it fits a real vault.
|
|
769
|
-
*
|
|
770
|
-
* WHAT THIS DOES NOT CLAIM
|
|
771
|
-
* ------------------------
|
|
772
|
-
* Measured honestly, on this fixture and on a 200,000-FILE variant of it, the
|
|
773
|
-
* streaming change does not move peak RSS: ~348 MB before and after. It should
|
|
774
|
-
* not be quoted as the fix for the 642 MB seen on the operator's real 199k
|
|
775
|
-
* scope. A chunk's `entries` is a `slice` — 200,000 POINTERS, ~1.6 MB — not a
|
|
776
|
-
* copy of the entries, so the chunk set was never the term that dominates.
|
|
777
|
-
* What does dominate is inherent to a single-pass build: the walk's records,
|
|
778
|
-
* the entry objects, and the snapshot map, each O(entries) and each live at
|
|
779
|
-
* once because the delta decision needs the whole set before the first chunk
|
|
780
|
-
* can be sized. Cutting THAT needs a two-pass build, which is a separate
|
|
781
|
-
* change; this gate exists so the upload half cannot quietly re-add a copy on
|
|
782
|
-
* top of it.
|
|
783
|
-
*
|
|
784
|
-
* WHY IT MEASURES THE UPLOAD PASS AND NOT THE BUILDER
|
|
785
|
-
* --------------------------------------------------
|
|
786
|
-
* The builder alone never sees the chunk set — that is the point of the plan
|
|
787
|
-
* being lazy — so benchmarking `buildSyncManifest` would report a number this
|
|
788
|
-
* regression cannot move.
|
|
789
|
-
*/
|
|
790
|
-
const STREAM_ENTRY_COUNT = 200_000;
|
|
791
|
-
const STREAM_DISK_FILE_COUNT = 2_000;
|
|
792
|
-
/**
|
|
793
|
-
* 500 MB of peak HEAP growth for a 200,000-entry upload pass.
|
|
794
|
-
*
|
|
795
|
-
* The product bar, not a measurement plus headroom. Measured at ~90 MB on this
|
|
796
|
-
* fixture across runs, so the gate is loose today — deliberately: it is the
|
|
797
|
-
* BUDGET this step has to live inside, and tightening it to the current
|
|
798
|
-
* measurement would fail the next legitimate entry-shape change rather than
|
|
799
|
-
* the next regression. `peakLiveChunks` is the tight assertion here.
|
|
800
|
-
*/
|
|
801
|
-
const MAX_STREAM_HEAP_GROWTH_BYTES = 500 * 1024 * 1024;
|
|
802
|
-
describe("runManifestUploadPass streaming cost", () => {
|
|
803
|
-
let streamBase;
|
|
804
|
-
let streamRoot;
|
|
805
|
-
let streamStateDir;
|
|
806
|
-
let previousStateDir;
|
|
807
|
-
beforeAll(() => {
|
|
808
|
-
streamBase = fs.mkdtempSync(path.join(os.tmpdir(), "hq-manifest-stream-bench-"));
|
|
809
|
-
streamRoot = path.join(streamBase, "hq");
|
|
810
|
-
streamStateDir = path.join(streamBase, "state");
|
|
811
|
-
fs.mkdirSync(streamStateDir, { recursive: true });
|
|
812
|
-
previousStateDir = process.env.HQ_STATE_DIR;
|
|
813
|
-
process.env.HQ_STATE_DIR = streamStateDir;
|
|
814
|
-
const files = {};
|
|
815
|
-
for (let index = 0; index < STREAM_ENTRY_COUNT; index += 1) {
|
|
816
|
-
files[`ledger/d${Math.floor(index / 100)}/f${index}.md`] = {
|
|
817
|
-
hash: `sha256:${index.toString(16).padStart(64, "0")}`,
|
|
818
|
-
size: 1024 + index,
|
|
819
|
-
mtimeMs: 1_700_000_000_000 + index,
|
|
820
|
-
syncedAt: "2026-01-01T00:00:00.000Z",
|
|
821
|
-
direction: "up",
|
|
822
|
-
};
|
|
823
|
-
}
|
|
824
|
-
fs.writeFileSync(path.join(streamStateDir, `sync-journal.${PERSONAL_VAULT_JOURNAL_SLUG}.json`), JSON.stringify({ version: "2", lastSync: "", files, pulls: [] }), "utf8");
|
|
825
|
-
for (let index = 0; index < STREAM_DISK_FILE_COUNT; index += 1) {
|
|
826
|
-
const dir = path.join(streamRoot, "ledger", `d${Math.floor(index / 100)}`);
|
|
827
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
828
|
-
fs.writeFileSync(path.join(dir, `f${index}.md`), "");
|
|
829
|
-
}
|
|
830
|
-
}, 600_000);
|
|
831
|
-
afterAll(() => {
|
|
832
|
-
if (previousStateDir === undefined)
|
|
833
|
-
delete process.env.HQ_STATE_DIR;
|
|
834
|
-
else
|
|
835
|
-
process.env.HQ_STATE_DIR = previousStateDir;
|
|
836
|
-
fs.rmSync(streamBase, { recursive: true, force: true });
|
|
837
|
-
});
|
|
838
|
-
it(`streams a ${STREAM_ENTRY_COUNT}-entry pass within the memory budget`, async () => {
|
|
839
|
-
const forceGc = acquireGc();
|
|
840
|
-
forceGc?.();
|
|
841
|
-
// HEAP, not RSS, for this one. The other benches in this file run first
|
|
842
|
-
// and leave the process holding hundreds of megabytes of resident pages
|
|
843
|
-
// that the allocator happily REUSES, so resident *growth* reads near zero
|
|
844
|
-
// whether the chunk set is streamed or materialised — it measures the page
|
|
845
|
-
// cache, not the code. `heapUsed` is what the duplicate chunk set actually
|
|
846
|
-
// consumed, and it is what a forced GC can honestly re-baseline.
|
|
847
|
-
const heapBefore = process.memoryUsage().heapUsed;
|
|
848
|
-
const rssBefore = process.memoryUsage().rss;
|
|
849
|
-
let peakHeap = heapBefore;
|
|
850
|
-
let peakRss = rssBefore;
|
|
851
|
-
const sampler = setInterval(() => {
|
|
852
|
-
const usage = process.memoryUsage();
|
|
853
|
-
peakHeap = Math.max(peakHeap, usage.heapUsed);
|
|
854
|
-
peakRss = Math.max(peakRss, usage.rss);
|
|
855
|
-
}, 20);
|
|
856
|
-
let liveChunks = 0;
|
|
857
|
-
let peakLiveChunks = 0;
|
|
858
|
-
let sentChunks = 0;
|
|
859
|
-
let sentEntries = 0;
|
|
860
|
-
// The canary metric. 6.16.21 put 15.9-17.9 MiB bodies on the wire here and
|
|
861
|
-
// nothing in this bench noticed, because the bench only ever asserted
|
|
862
|
-
// memory. Peak body size is now measured on the same run.
|
|
863
|
-
let maxBodyBytes = 0;
|
|
864
|
-
let result;
|
|
865
|
-
try {
|
|
866
|
-
result = await runManifestUploadPass({
|
|
867
|
-
scope: { kind: "personal" },
|
|
868
|
-
hqRoot: streamRoot,
|
|
869
|
-
stateDir: streamStateDir,
|
|
870
|
-
installationId: "install-bench",
|
|
871
|
-
machineId: "machine-bench",
|
|
872
|
-
source: "cli",
|
|
873
|
-
hashPolicy: "never",
|
|
874
|
-
maxWallMs: 600_000,
|
|
875
|
-
uploadWallMs: 600_000,
|
|
876
|
-
env: {},
|
|
877
|
-
transport: async (chunk) => {
|
|
878
|
-
// Serialise exactly as a real transport would: the JSON of the chunk
|
|
879
|
-
// in flight is part of the peak this budget covers.
|
|
880
|
-
liveChunks += 1;
|
|
881
|
-
peakLiveChunks = Math.max(peakLiveChunks, liveChunks);
|
|
882
|
-
sentEntries += chunk.entries.length;
|
|
883
|
-
sentChunks += 1;
|
|
884
|
-
const body = JSON.stringify(chunk);
|
|
885
|
-
if (body.length === 0)
|
|
886
|
-
throw new Error("empty chunk body");
|
|
887
|
-
maxBodyBytes = Math.max(maxBodyBytes, Buffer.byteLength(body, "utf8"));
|
|
888
|
-
liveChunks -= 1;
|
|
889
|
-
return {
|
|
890
|
-
status: 200,
|
|
891
|
-
body: {
|
|
892
|
-
status: "accepted",
|
|
893
|
-
snapshotId: "0123456789abcdef0123456789abcdef",
|
|
894
|
-
completed: sentChunks === chunk.chunkCount,
|
|
895
|
-
materialised: sentChunks === chunk.chunkCount,
|
|
896
|
-
},
|
|
897
|
-
};
|
|
898
|
-
},
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
finally {
|
|
902
|
-
clearInterval(sampler);
|
|
903
|
-
}
|
|
904
|
-
const peakHeapGrowth = peakHeap - heapBefore;
|
|
905
|
-
process.stdout.write(`manifest upload stream: ${STREAM_ENTRY_COUNT} entries in ${sentChunks} chunk(s): ` +
|
|
906
|
-
`${(peakHeapGrowth / (1024 * 1024)).toFixed(1)}MB peak heap growth, ` +
|
|
907
|
-
`${((peakRss - rssBefore) / (1024 * 1024)).toFixed(1)}MB peak RSS growth, ` +
|
|
908
|
-
`${(peakRss / (1024 * 1024)).toFixed(1)}MB absolute peak RSS, ` +
|
|
909
|
-
`${(maxBodyBytes / (1024 * 1024)).toFixed(2)}MiB largest chunk body\n`);
|
|
910
|
-
// The budget is never met by reporting less: the whole scope went out.
|
|
911
|
-
expect(result.status).toBe("uploaded");
|
|
912
|
-
expect(sentEntries).toBe(STREAM_ENTRY_COUNT);
|
|
913
|
-
expect(sentChunks).toBeGreaterThan(1);
|
|
914
|
-
// One chunk alive at a time — the property the budget actually rests on.
|
|
915
|
-
expect(peakLiveChunks).toBe(1);
|
|
916
|
-
expect(peakHeapGrowth).toBeLessThan(MAX_STREAM_HEAP_GROWTH_BYTES);
|
|
917
|
-
// THE 6.16.21 GATE. Every body the transport saw fits the client budget,
|
|
918
|
-
// which sits a full MiB under the server's `SYNC_MANIFEST_MAX_CHUNK_BYTES`
|
|
919
|
-
// and 6 MiB under API Gateway's own ceiling. Asserted on bodies rather
|
|
920
|
-
// than on the plan's self-report, because the plan's arithmetic is exactly
|
|
921
|
-
// what was wrong before.
|
|
922
|
-
expect(maxBodyBytes).toBeLessThanOrEqual(SYNC_MANIFEST_DEFAULT_CHUNK_BYTE_BUDGET);
|
|
923
|
-
expect(SYNC_MANIFEST_DEFAULT_CHUNK_BYTE_BUDGET).toBeLessThan(SYNC_MANIFEST_MAX_CHUNK_BYTES);
|
|
924
|
-
// A byte budget necessarily means MORE, smaller chunks than the count
|
|
925
|
-
// bound alone would have planned. Pinned so a regression that silently
|
|
926
|
-
// stops splitting on bytes fails here too.
|
|
927
|
-
expect(sentChunks).toBeGreaterThan(Math.ceil(STREAM_ENTRY_COUNT / 50_000));
|
|
928
|
-
}, 600_000);
|
|
929
|
-
});
|
|
930
|
-
//# sourceMappingURL=build-manifest.bench.test.js.map
|