@indigoai-us/hq-cloud 6.16.68 → 6.16.70-alpha.0
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-company.d.ts.map +1 -1
- package/dist/bin/sync-runner-company.js +24 -0
- package/dist/bin/sync-runner-company.js.map +1 -1
- package/dist/bin/sync-runner-company.test.js +64 -0
- package/dist/bin/sync-runner-company.test.js.map +1 -1
- package/dist/bin/sync-runner-events.test.js +19 -0
- package/dist/bin/sync-runner-events.test.js.map +1 -1
- package/dist/bin/sync-runner-watch-loop.d.ts +25 -2
- package/dist/bin/sync-runner-watch-loop.d.ts.map +1 -1
- package/dist/bin/sync-runner-watch-loop.js +171 -21
- package/dist/bin/sync-runner-watch-loop.js.map +1 -1
- package/dist/bin/sync-runner.d.ts +9 -0
- package/dist/bin/sync-runner.d.ts.map +1 -1
- package/dist/bin/sync-runner.js.map +1 -1
- package/dist/bin/sync-runner.test.js +193 -1
- package/dist/bin/sync-runner.test.js.map +1 -1
- package/dist/cli/share.d.ts +18 -1
- package/dist/cli/share.d.ts.map +1 -1
- package/dist/cli/share.js +143 -127
- package/dist/cli/share.js.map +1 -1
- package/dist/cli/sync.d.ts +181 -1
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +98 -49
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/sync.test.js +105 -0
- package/dist/cli/sync.test.js.map +1 -1
- package/dist/journal-decode-window.d.ts +45 -0
- package/dist/journal-decode-window.d.ts.map +1 -0
- package/dist/journal-decode-window.js +70 -0
- package/dist/journal-decode-window.js.map +1 -0
- package/dist/journal-decode-window.test.d.ts +2 -0
- package/dist/journal-decode-window.test.d.ts.map +1 -0
- package/dist/journal-decode-window.test.js +99 -0
- package/dist/journal-decode-window.test.js.map +1 -0
- package/dist/journal-row-store.d.ts +4 -0
- package/dist/journal-row-store.d.ts.map +1 -1
- package/dist/journal-row-store.js +67 -2
- package/dist/journal-row-store.js.map +1 -1
- package/dist/journal-streaming.heap.test.d.ts +2 -0
- package/dist/journal-streaming.heap.test.d.ts.map +1 -0
- package/dist/journal-streaming.heap.test.js +190 -0
- package/dist/journal-streaming.heap.test.js.map +1 -0
- package/dist/journal.d.ts +1 -11
- package/dist/journal.d.ts.map +1 -1
- package/dist/journal.js +4 -53
- package/dist/journal.js.map +1 -1
- package/dist/journal.test.js +13 -7
- package/dist/journal.test.js.map +1 -1
- package/dist/lib/net-errors.d.ts +12 -0
- package/dist/lib/net-errors.d.ts.map +1 -1
- package/dist/lib/net-errors.js +22 -0
- package/dist/lib/net-errors.js.map +1 -1
- package/dist/lib/net-errors.test.js +35 -1
- package/dist/lib/net-errors.test.js.map +1 -1
- package/dist/lib/s3-content-checksum.d.ts +16 -0
- package/dist/lib/s3-content-checksum.d.ts.map +1 -0
- package/dist/lib/s3-content-checksum.js +91 -0
- package/dist/lib/s3-content-checksum.js.map +1 -0
- package/dist/lib/s3-content-checksum.test.d.ts +2 -0
- package/dist/lib/s3-content-checksum.test.d.ts.map +1 -0
- package/dist/lib/s3-content-checksum.test.js +26 -0
- package/dist/lib/s3-content-checksum.test.js.map +1 -0
- package/dist/object-io.d.ts +2 -0
- package/dist/object-io.d.ts.map +1 -1
- package/dist/object-io.js +37 -19
- package/dist/object-io.js.map +1 -1
- package/dist/object-io.test.js +89 -2
- package/dist/object-io.test.js.map +1 -1
- package/dist/sync/candidate-uploader.d.ts.map +1 -1
- package/dist/sync/candidate-uploader.js +6 -1
- package/dist/sync/candidate-uploader.js.map +1 -1
- package/dist/sync/full-pass-caps.d.ts +113 -0
- package/dist/sync/full-pass-caps.d.ts.map +1 -0
- package/dist/sync/full-pass-caps.js +383 -0
- package/dist/sync/full-pass-caps.js.map +1 -0
- package/dist/sync/full-pass-caps.test.d.ts +2 -0
- package/dist/sync/full-pass-caps.test.d.ts.map +1 -0
- package/dist/sync/full-pass-caps.test.js +126 -0
- package/dist/sync/full-pass-caps.test.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/realtime-telemetry.d.ts +5 -1
- package/dist/sync/realtime-telemetry.d.ts.map +1 -1
- package/dist/sync/realtime-telemetry.js +14 -2
- package/dist/sync/realtime-telemetry.js.map +1 -1
- package/dist/sync/realtime-telemetry.test.js +10 -0
- package/dist/sync/realtime-telemetry.test.js.map +1 -1
- package/package.json +2 -1
- package/dist/journal-row-cache.d.ts +0 -102
- package/dist/journal-row-cache.d.ts.map +0 -1
- package/dist/journal-row-cache.heap.test.d.ts +0 -2
- package/dist/journal-row-cache.heap.test.d.ts.map +0 -1
- package/dist/journal-row-cache.heap.test.js +0 -102
- package/dist/journal-row-cache.heap.test.js.map +0 -1
- package/dist/journal-row-cache.js +0 -549
- package/dist/journal-row-cache.js.map +0 -1
- package/dist/journal-row-cache.test.d.ts +0 -2
- package/dist/journal-row-cache.test.d.ts.map +0 -1
- package/dist/journal-row-cache.test.js +0 -155
- package/dist/journal-row-cache.test.js.map +0 -1
package/dist/cli/sync.d.ts
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* Pulls all files the caller's STS session policy permits.
|
|
5
5
|
* Never auto-overwrites local changes — prompts on conflict.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
7
|
+
import { type SpooledRemoteFiles } from "../sync/remote-file-spool.js";
|
|
8
|
+
import type { VaultServiceConfig, SyncJournal } from "../types.js";
|
|
8
9
|
import { type SyncMode } from "../vault-client.js";
|
|
9
10
|
import { type TelemetryClaims } from "../telemetry-events.js";
|
|
11
|
+
import type { RemoteFile } from "../s3.js";
|
|
10
12
|
import { type ScopePrefixInput } from "../prefix-coalesce.js";
|
|
11
13
|
import { type TransferSemaphore } from "../sync-core.js";
|
|
12
14
|
import type { ConflictDecision, ConflictStrategy, ConflictResolution } from "./conflict.js";
|
|
@@ -541,6 +543,24 @@ export type SyncProgressEvent = {
|
|
|
541
543
|
path: string;
|
|
542
544
|
/** Fixed remediation text (a program is holding the file open). */
|
|
543
545
|
remedy: string;
|
|
546
|
+
} | {
|
|
547
|
+
/**
|
|
548
|
+
* Emitted by the PULL leg (download install OR conflict-convergence
|
|
549
|
+
* probe) once per vault key that was in the LIST and gone by the GET —
|
|
550
|
+
* the LIST→GET race on short-lived inbox files such as
|
|
551
|
+
* `inbox/pending/jobrun-*.json`. Like `skip-symlink-privilege` this is
|
|
552
|
+
* deliberately NOT `type: "error"` (policy
|
|
553
|
+
* hq-sync-deliberate-skip-not-fatal-error-exit2): treating a vanished
|
|
554
|
+
* object as an error lands the company in the runner's `errors[]`,
|
|
555
|
+
* forces PARTIAL_SYNC_EXIT (2), and the fleet monitor pages
|
|
556
|
+
* `component-sync: degraded` even though the next pass simply no longer
|
|
557
|
+
* lists the key. The object is left UNJOURNALED so a later pass that
|
|
558
|
+
* still lists it retries with no manual reset. `message` is the
|
|
559
|
+
* describeError surface of the NoSuchKey/404.
|
|
560
|
+
*/
|
|
561
|
+
type: "skip-vanished-remote";
|
|
562
|
+
path: string;
|
|
563
|
+
message: string;
|
|
544
564
|
} | {
|
|
545
565
|
/**
|
|
546
566
|
* Push-side twin of the pull planner's `skip-archived-session-log`: the
|
|
@@ -876,6 +896,7 @@ export declare const _testing: {
|
|
|
876
896
|
disableCooperativeRowVisits: typeof disableCooperativeRowVisits;
|
|
877
897
|
cooperativeRowVisits: typeof snapshotCooperativeRowVisits;
|
|
878
898
|
cooperativePhase: () => "list" | "plan" | "download" | null;
|
|
899
|
+
computePullPlan: typeof computePullPlan;
|
|
879
900
|
};
|
|
880
901
|
/**
|
|
881
902
|
* Best-effort report of the files that were new to this drive during the sync,
|
|
@@ -902,6 +923,164 @@ export declare function reportNewFilesToNotify(vaultConfig: VaultServiceConfig,
|
|
|
902
923
|
* Sync (pull) all allowed files from the entity vault.
|
|
903
924
|
*/
|
|
904
925
|
export declare function sync(options: SyncOptions): Promise<SyncResult>;
|
|
926
|
+
/**
|
|
927
|
+
* List the remote objects the current pull can actually materialize.
|
|
928
|
+
*
|
|
929
|
+
* Historically this was ALWAYS a full-bucket `listRemoteFiles(ctx)` — even for
|
|
930
|
+
* a `shared`/`custom` membership whose effective scope is a handful of
|
|
931
|
+
* prefixes — so every pull materialized the entire remote listing (tens of
|
|
932
|
+
* thousands of RemoteFile objects on large vaults) only for `computePullPlan`
|
|
933
|
+
* to discard most of it as `skip-out-of-scope`. Scoped pulls now list ONLY the
|
|
934
|
+
* in-scope prefixes via `listRemoteForScope` (per-prefix ListObjectsV2 calls,
|
|
935
|
+
* bounded parallel, deduped), which bounds the listing's memory to the scope's
|
|
936
|
+
* actual footprint.
|
|
937
|
+
*
|
|
938
|
+
* `all` mode spools one paged LIST to private temporary storage and collects
|
|
939
|
+
* directory-overlay ancestors. Classification replays that snapshot only after
|
|
940
|
+
* the journal refresh above. This preserves freshness even for a row listed
|
|
941
|
+
* early whose watcher delete commits during a later page.
|
|
942
|
+
*
|
|
943
|
+
* An empty `listedPrefixSet` in a scoped mode means "nothing in scope" —
|
|
944
|
+
* issue zero LIST calls. Consumers already treat an empty listing correctly:
|
|
945
|
+
* the deletion sweep in `computePullPlan` only considers journal keys covered
|
|
946
|
+
* by the LISTED scope, so keys absent because they were never listed can never
|
|
947
|
+
* be mistaken for remote deletes.
|
|
948
|
+
*/
|
|
949
|
+
type RemoteFileSource = RemoteFile[] | SpooledRemoteFiles;
|
|
950
|
+
/**
|
|
951
|
+
* Stage-1 classification for a single remote object. Each remote file falls
|
|
952
|
+
* into exactly one bucket; the executor in `sync()` switches on `action` to
|
|
953
|
+
* decide what to do. `localHash` is carried on `conflict` items so the
|
|
954
|
+
* executor can hand it to `resolveConflict` without re-hashing.
|
|
955
|
+
*/
|
|
956
|
+
type LocalSnapshot = {
|
|
957
|
+
kind: "absent" | "directory" | "other";
|
|
958
|
+
} | {
|
|
959
|
+
kind: "file" | "symlink";
|
|
960
|
+
hash: string;
|
|
961
|
+
};
|
|
962
|
+
/**
|
|
963
|
+
* Why a remote key was classified `skip-out-of-scope`. The two causes look
|
|
964
|
+
* identical in the count but have OPPOSITE remedies, so they must never be
|
|
965
|
+
* reported as one: `membership-scope` is fixed by raising the membership's
|
|
966
|
+
* access level to `all`; `push-only` is not fixed by that at all.
|
|
967
|
+
*/
|
|
968
|
+
type OutOfScopeReason = "membership-scope" | "push-only";
|
|
969
|
+
type PullPlanItem = {
|
|
970
|
+
action: "download";
|
|
971
|
+
remoteFile: RemoteFile;
|
|
972
|
+
localPath: string;
|
|
973
|
+
isNew: boolean;
|
|
974
|
+
localSnapshot: LocalSnapshot;
|
|
975
|
+
} | {
|
|
976
|
+
action: "skip-ignored";
|
|
977
|
+
remoteFile: RemoteFile;
|
|
978
|
+
localPath: string;
|
|
979
|
+
} | {
|
|
980
|
+
action: "skip-archived-session-log";
|
|
981
|
+
remoteFile: RemoteFile;
|
|
982
|
+
localPath: string;
|
|
983
|
+
} | {
|
|
984
|
+
action: "skip-personal-mode";
|
|
985
|
+
remoteFile: RemoteFile;
|
|
986
|
+
localPath: string;
|
|
987
|
+
} | {
|
|
988
|
+
action: "skip-unchanged";
|
|
989
|
+
remoteFile: RemoteFile;
|
|
990
|
+
localPath: string;
|
|
991
|
+
} | {
|
|
992
|
+
action: "skip-local-only";
|
|
993
|
+
remoteFile: RemoteFile;
|
|
994
|
+
localPath: string;
|
|
995
|
+
} | {
|
|
996
|
+
action: "skip-unreadable-link";
|
|
997
|
+
remoteFile: RemoteFile;
|
|
998
|
+
localPath: string;
|
|
999
|
+
} | {
|
|
1000
|
+
action: "skip-stale-overlay-marker";
|
|
1001
|
+
remoteFile: RemoteFile;
|
|
1002
|
+
localPath: string;
|
|
1003
|
+
} | {
|
|
1004
|
+
action: "skip-overlay-marker-with-children";
|
|
1005
|
+
remoteFile: RemoteFile;
|
|
1006
|
+
localPath: string;
|
|
1007
|
+
} | {
|
|
1008
|
+
action: "skip-excluded-policy";
|
|
1009
|
+
remoteFile: RemoteFile;
|
|
1010
|
+
localPath: string;
|
|
1011
|
+
} | {
|
|
1012
|
+
action: "skip-out-of-scope";
|
|
1013
|
+
remoteFile: RemoteFile;
|
|
1014
|
+
localPath: string;
|
|
1015
|
+
reason: OutOfScopeReason;
|
|
1016
|
+
} | {
|
|
1017
|
+
action: "skip-junk-key-spelling";
|
|
1018
|
+
remoteFile: RemoteFile;
|
|
1019
|
+
localPath: string;
|
|
1020
|
+
journaledKey: string;
|
|
1021
|
+
} | {
|
|
1022
|
+
action: "tombstone-delete";
|
|
1023
|
+
remoteFile: RemoteFile;
|
|
1024
|
+
localPath: string;
|
|
1025
|
+
localSnapshot: LocalSnapshot;
|
|
1026
|
+
} | {
|
|
1027
|
+
action: "conflict";
|
|
1028
|
+
remoteFile: RemoteFile;
|
|
1029
|
+
localPath: string;
|
|
1030
|
+
localHash: string;
|
|
1031
|
+
localMtime: Date;
|
|
1032
|
+
localSize: number;
|
|
1033
|
+
localSnapshot: LocalSnapshot;
|
|
1034
|
+
};
|
|
1035
|
+
interface PullPlan {
|
|
1036
|
+
items: PullPlanItem[];
|
|
1037
|
+
/** Ordinary streamed skips omitted from `items`; seed executor counters. */
|
|
1038
|
+
preplannedFilesSkipped: number;
|
|
1039
|
+
/** Streamed out-of-scope skips omitted from `items`; seed executor counters. */
|
|
1040
|
+
preplannedFilesOutOfScope: number;
|
|
1041
|
+
filesToDownload: number;
|
|
1042
|
+
bytesToDownload: number;
|
|
1043
|
+
filesToSkip: number;
|
|
1044
|
+
filesToConflict: number;
|
|
1045
|
+
/** Files classified as new (no local counterpart at classification time). */
|
|
1046
|
+
newFiles: Array<{
|
|
1047
|
+
path: string;
|
|
1048
|
+
bytes: number;
|
|
1049
|
+
}>;
|
|
1050
|
+
newFilesCount: number;
|
|
1051
|
+
/** Count of remote keys refused by ephemeral-mirror policy. */
|
|
1052
|
+
filesExcludedByPolicy: number;
|
|
1053
|
+
/** Count of remote keys skipped because they fall outside the sync scope. */
|
|
1054
|
+
filesOutOfScope: number;
|
|
1055
|
+
/**
|
|
1056
|
+
* Journal-known keys missing from the remote LIST. The executor will
|
|
1057
|
+
* apply each as a local delete (file or symlink) + journal removal,
|
|
1058
|
+
* propagating the peer's push-side delete cross-machine (Bug #9).
|
|
1059
|
+
* Carried on the plan so the executor can iterate without re-walking.
|
|
1060
|
+
*/
|
|
1061
|
+
tombstones: Array<{
|
|
1062
|
+
key: string;
|
|
1063
|
+
localPath: string;
|
|
1064
|
+
localSnapshot: LocalSnapshot;
|
|
1065
|
+
}>;
|
|
1066
|
+
/**
|
|
1067
|
+
* Count of `tombstone-delete` items — remote keys present in the LIST but
|
|
1068
|
+
* suppressed by a FILE_TOMBSTONE (delete-resync). Surfaced on the plan event's
|
|
1069
|
+
* `filesToDelete` axis; the per-item executor applies the local delete.
|
|
1070
|
+
*/
|
|
1071
|
+
filesToTombstoneDelete: number;
|
|
1072
|
+
/**
|
|
1073
|
+
* Remote keys skipped because the server will never presign them. Counted in
|
|
1074
|
+
* `filesExcludedByPolicy`; carried with the server-compatible error code so
|
|
1075
|
+
* the caller can log one warning per key and emit telemetry. Healthy
|
|
1076
|
+
* baseline is an empty array (policy
|
|
1077
|
+
* hq-alert-baseline-calibration: zero expected, any occurrence is signal).
|
|
1078
|
+
*/
|
|
1079
|
+
invalidRemoteKeys: Array<{
|
|
1080
|
+
path: string;
|
|
1081
|
+
errorCode: string;
|
|
1082
|
+
}>;
|
|
1083
|
+
}
|
|
905
1084
|
/**
|
|
906
1085
|
* win32 only: true when an existing local symlink's TARGET exists but the
|
|
907
1086
|
* link cannot be traversed as that target's type — the file-flavor-link-at-
|
|
@@ -911,5 +1090,6 @@ export declare function sync(options: SyncOptions): Promise<SyncResult>;
|
|
|
911
1090
|
* false off win32.
|
|
912
1091
|
*/
|
|
913
1092
|
export declare function win32SymlinkFlavorBroken(localPath: string, win32?: boolean): boolean;
|
|
1093
|
+
declare function computePullPlan(remoteFiles: RemoteFileSource, journal: SyncJournal, companyRoot: string, shouldSync: (filePath: string, isDir?: boolean) => boolean, personalMode: boolean, teamSyncedSlugs: ReadonlySet<string> | null, prefixSet: readonly ScopePrefixInput[], fileTombstones?: ReadonlyMap<string, CompanyTombstone>, excludePrefixes?: readonly ScopePrefixInput[], propagateDeletePolicy?: "currency-gated" | "owned-only" | "all", onHeartbeat?: () => void, journalRowCount?: number, cooperativeCheckpoint?: () => Promise<void | boolean>, onCooperativeHandoff?: () => void, deleteDenominatorKeys?: ReadonlySet<string>): Promise<PullPlan>;
|
|
914
1094
|
export {};
|
|
915
1095
|
//# sourceMappingURL=sync.d.ts.map
|
package/dist/cli/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/cli/sync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAUhF,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAiEhC,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAML,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAW5F,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,cAAc,EACd,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,EAClB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAA4B,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEtG,iFAAiF;AACjF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AIG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,iBAAiB,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/D;AAuBD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,OAAsC,GAC5C,OAAO,CAoBT;AAED,iBAAe,eAAe,CAC5B,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,EAC1D,YAAY,EAAE,OAAO,EACrB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,EAI3C,SAAS,EAAE,SAAS,gBAAgB,EAAE,EAOtC,cAAc,GAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAa,EAOjE,eAAe,GAAE,SAAS,gBAAgB,EAAO,EAGjD,qBAAqB,GAAE,gBAAgB,GAAG,YAAY,GAAG,KAAoB,EAC7E,WAAW,CAAC,EAAE,MAAM,IAAI,EACxB,eAAe,GAAE,MAAkC,EACnD,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,EACrD,oBAAoB,CAAC,EAAE,MAAM,IAAI,EACjC,qBAAqB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC1C,OAAO,CAAC,QAAQ,CAAC,CAsgCnB"}
|
package/dist/cli/sync.js
CHANGED
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
import * as fs from "fs";
|
|
8
8
|
import * as path from "path";
|
|
9
9
|
import { spoolRemoteFiles, collectRemoteAncestors } from "../sync/remote-file-spool.js";
|
|
10
|
+
import { getActiveFullPassDecodeWindow, getActiveFullPassUnitSize, } from "../sync/full-pass-caps.js";
|
|
10
11
|
import { VaultAuthError, VaultClient } from "../vault-client.js";
|
|
11
12
|
import { readlinkOrNull } from "../lib/readlink-safe.js";
|
|
12
13
|
import { describeError } from "../lib/describe-error.js";
|
|
13
14
|
import { isRetryableIdentityRefusal, isTerminalIdentityRefusal, } from "../cognito-auth.js";
|
|
14
15
|
import { RateLimitedError } from "../object-io.js";
|
|
15
16
|
import { recoverHqRootLocalState } from "../hq-root-recovery.js";
|
|
16
|
-
import { isTransientHttpStatusError } from "../lib/net-errors.js";
|
|
17
|
+
import { isRemoteObjectGoneError, isTransientHttpStatusError } from "../lib/net-errors.js";
|
|
17
18
|
import { emitCloudTelemetry, } from "../telemetry-events.js";
|
|
18
19
|
import { resolveEntityContext, isExpiringSoon, refreshEntityContext } from "../context.js";
|
|
19
20
|
import { ensureCompanyVaultTransport } from "../company-vault-transport.js";
|
|
@@ -21,7 +22,7 @@ import { createSyncProgressRecorder } from "../sync-progress.js";
|
|
|
21
22
|
import { canonicalVaultKeySpelling, localPathForVaultKey, vaultKeyForLocalPath, } from "../local-path-codec.js";
|
|
22
23
|
import { SKILLS_KEY_PREFIX } from "./doctor.js";
|
|
23
24
|
import { downloadFile, streamRemoteFiles, streamRemoteFilePages, headRemoteFile, primeObjectTransport, toPosixKey, classifyVaultKey, DanglingSymlinkParentError, WindowsSymlinkPrivilegeError, WINDOWS_SYMLINK_PRIVILEGE_REMEDY, WindowsRenameBlockedError, WINDOWS_RENAME_BLOCKED_REMEDY, renameOrRaiseWindowsBlocked, } from "../s3.js";
|
|
24
|
-
import { readJournalForPass, writeJournal, getStateDir, openJournalStoreSession, buildJournalBaseline, journalDeltaFromBaseline, hashFile, hashSymlinkTarget, journalRows, journalEntryMatchesStat, updateEntry, removeEntry, getEntry, normalizeEtag, migrateToV2, gcTombstones, isTombstone, tombstoneEntry, lastPullRecord, appendPullRecord, generatePullId, PERSONAL_VAULT_JOURNAL_SLUG, migratePersonalVaultJournal, } from "../journal.js";
|
|
25
|
+
import { readJournalForPass, writeJournal, getStateDir, openJournalStoreSession, buildJournalBaseline, journalDeltaFromBaseline, hashFile, hashSymlinkTarget, journalRows, journalEntryMatchesStat, dropJournalDecodeWindow, updateEntry, removeEntry, getEntry, normalizeEtag, migrateToV2, gcTombstones, isTombstone, tombstoneEntry, lastPullRecord, appendPullRecord, generatePullId, PERSONAL_VAULT_JOURNAL_SLUG, migratePersonalVaultJournal, } from "../journal.js";
|
|
25
26
|
import { isGeneratedCoreMirrorKey, PERSONAL_VAULT_MANIFEST_KEY, } from "../personal-vault.js";
|
|
26
27
|
import { isPersonalVaultExcluded } from "../personal-vault-exclusions.js";
|
|
27
28
|
import { buildScopeShrinkPlan, applyScopeShrink, ScopeShrinkBlockedError, ScopeShrinkLargePruneError, } from "../scope-shrink.js";
|
|
@@ -131,7 +132,7 @@ export async function applyRealtimeDeltaPage(engine, page, fetchContent) {
|
|
|
131
132
|
*/
|
|
132
133
|
async function yieldToCooperativeCheckpoint(work, cooperativeCheckpoint, force, resumedAt) {
|
|
133
134
|
work.rowsSinceYield += 1;
|
|
134
|
-
if (!force && work.rowsSinceYield <
|
|
135
|
+
if (!force && work.rowsSinceYield < cooperativeUnitSize()) {
|
|
135
136
|
return false;
|
|
136
137
|
}
|
|
137
138
|
work.rowsSinceYield = 0;
|
|
@@ -244,6 +245,12 @@ const DOWNLOAD_JOURNAL_CHECKPOINT_BATCH_SIZE = 10_000;
|
|
|
244
245
|
* resulting journal delta is durable before realtime can acquire the writer.
|
|
245
246
|
*/
|
|
246
247
|
export const FULL_PULL_COOPERATIVE_CHECKPOINT_BATCH_SIZE = 500;
|
|
248
|
+
function cooperativeUnitSize() {
|
|
249
|
+
return getActiveFullPassUnitSize();
|
|
250
|
+
}
|
|
251
|
+
function decodeWindowSize() {
|
|
252
|
+
return getActiveFullPassDecodeWindow();
|
|
253
|
+
}
|
|
247
254
|
/**
|
|
248
255
|
* ListObjectsV2 page size (AWS MaxKeys default). Full-pull LIST yields the
|
|
249
256
|
* root lock at each page boundary so queued realtime work is not stuck behind
|
|
@@ -281,7 +288,7 @@ async function awaitListPageWithCooperativeYield(work, cooperativeCheckpoint, re
|
|
|
281
288
|
return raced.value;
|
|
282
289
|
if (raced.kind === "error")
|
|
283
290
|
throw raced.error;
|
|
284
|
-
await yieldToCooperativeCheckpoint({ rowsSinceYield:
|
|
291
|
+
await yieldToCooperativeCheckpoint({ rowsSinceYield: cooperativeUnitSize() }, cooperativeCheckpoint, true, resumedAt);
|
|
285
292
|
}
|
|
286
293
|
}
|
|
287
294
|
const cooperativeRowVisits = {
|
|
@@ -323,6 +330,7 @@ export const _testing = {
|
|
|
323
330
|
disableCooperativeRowVisits,
|
|
324
331
|
cooperativeRowVisits: snapshotCooperativeRowVisits,
|
|
325
332
|
cooperativePhase: () => cooperativePhaseForTest,
|
|
333
|
+
computePullPlan,
|
|
326
334
|
};
|
|
327
335
|
/**
|
|
328
336
|
* Server cap on files per `/v1/notify/file-added` report. The endpoint rejects
|
|
@@ -1183,6 +1191,20 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
|
|
|
1183
1191
|
});
|
|
1184
1192
|
return null;
|
|
1185
1193
|
}
|
|
1194
|
+
if (isRemoteObjectGoneError(probeErr)) {
|
|
1195
|
+
// Same LIST→GET race as downloadOne: a short-lived inbox file was
|
|
1196
|
+
// listed (or planned as a conflict) and deleted before this probe GET.
|
|
1197
|
+
// Skip (never type:"error") so the company stays complete and the
|
|
1198
|
+
// runner exits 0; leave unjournaled so a later pass converges if the
|
|
1199
|
+
// key is still listed (policy hq-sync-deliberate-skip-not-fatal-error-exit2).
|
|
1200
|
+
counters.filesSkipped++;
|
|
1201
|
+
run.emit({
|
|
1202
|
+
type: "skip-vanished-remote",
|
|
1203
|
+
path: remoteFile.key,
|
|
1204
|
+
message: describeError(probeErr),
|
|
1205
|
+
});
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1186
1208
|
run.emit({
|
|
1187
1209
|
type: "error",
|
|
1188
1210
|
path: remoteFile.key,
|
|
@@ -1423,7 +1445,7 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
|
|
|
1423
1445
|
discardProbe();
|
|
1424
1446
|
}
|
|
1425
1447
|
}
|
|
1426
|
-
async function executeDownloadQueue(run, downloadItems, transferConcurrency, counters, deferJournalCheckpoint) {
|
|
1448
|
+
async function executeDownloadQueue(run, downloadItems, transferConcurrency, counters, deferJournalCheckpoint, yieldAfterMs) {
|
|
1427
1449
|
const queue = [...downloadItems];
|
|
1428
1450
|
const inFlight = new Set();
|
|
1429
1451
|
const workerErrors = [];
|
|
@@ -1433,10 +1455,13 @@ async function executeDownloadQueue(run, downloadItems, transferConcurrency, cou
|
|
|
1433
1455
|
// re-contend on the dead session (HQ-DESKTOP-5S). In-flight legs still drain,
|
|
1434
1456
|
// and the first worker error — the refusal — is rethrown below.
|
|
1435
1457
|
let sessionAuthAborted = false;
|
|
1458
|
+
const startedAt = Date.now();
|
|
1459
|
+
const budgetExceeded = () => yieldAfterMs !== undefined && Date.now() - startedAt >= yieldAfterMs;
|
|
1436
1460
|
while (queue.length > 0 || inFlight.size > 0) {
|
|
1437
1461
|
while (!sessionAuthAborted &&
|
|
1438
1462
|
inFlight.size < transferConcurrency &&
|
|
1439
|
-
queue.length > 0
|
|
1463
|
+
queue.length > 0 &&
|
|
1464
|
+
(inFlight.size === 0 || !budgetExceeded())) {
|
|
1440
1465
|
const downloadItem = queue.shift();
|
|
1441
1466
|
const download = () => downloadOne(run, downloadItem, counters, deferJournalCheckpoint);
|
|
1442
1467
|
const p = (run.options.transferSemaphore
|
|
@@ -1462,7 +1487,7 @@ async function executeDownloadQueue(run, downloadItems, transferConcurrency, cou
|
|
|
1462
1487
|
break;
|
|
1463
1488
|
}
|
|
1464
1489
|
}
|
|
1465
|
-
return workerErrors;
|
|
1490
|
+
return { errors: workerErrors, remaining: queue };
|
|
1466
1491
|
}
|
|
1467
1492
|
function throwDownloadWorkerErrors(run, workerErrors) {
|
|
1468
1493
|
persistPullJournal(run);
|
|
@@ -1480,24 +1505,27 @@ async function executeDownloadExecutor(run, downloadItems, transferConcurrency,
|
|
|
1480
1505
|
// Only a watch chore that supplied the cooperative seam pays for drained
|
|
1481
1506
|
// units and can return its root lock to queued realtime work.
|
|
1482
1507
|
if (!run.options.cooperativeCheckpoint) {
|
|
1483
|
-
const
|
|
1484
|
-
if (
|
|
1485
|
-
throwDownloadWorkerErrors(run,
|
|
1508
|
+
const { errors } = await executeDownloadQueue(run, downloadItems, transferConcurrency, counters, false);
|
|
1509
|
+
if (errors.length > 0)
|
|
1510
|
+
throwDownloadWorkerErrors(run, errors);
|
|
1486
1511
|
return;
|
|
1487
1512
|
}
|
|
1488
1513
|
cooperativePhaseForTest = "download";
|
|
1489
1514
|
const work = { rowsSinceYield: 0 };
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1515
|
+
const yieldMs = listCooperativeYieldMs();
|
|
1516
|
+
for (let start = 0; start < downloadItems.length; start += cooperativeUnitSize()) {
|
|
1517
|
+
let remaining = downloadItems.slice(start, start + cooperativeUnitSize());
|
|
1518
|
+
while (remaining.length > 0) {
|
|
1519
|
+
const { errors, remaining: leftover } = await executeDownloadQueue(run, remaining, transferConcurrency, counters, true, yieldMs);
|
|
1520
|
+
remaining = leftover;
|
|
1521
|
+
// Persist before the callback so the suspended chore owns no mutable
|
|
1522
|
+
// pass state while realtime uses the root lock.
|
|
1523
|
+
flushDownloadedJournalTail(run);
|
|
1524
|
+
if (errors.length > 0)
|
|
1525
|
+
throwDownloadWorkerErrors(run, errors);
|
|
1526
|
+
if (await yieldToCooperativeCheckpoint(work, run.options.cooperativeCheckpoint, true, start + cooperativeUnitSize() - remaining.length)) {
|
|
1527
|
+
overlayPullJournalDelta(run);
|
|
1528
|
+
}
|
|
1501
1529
|
}
|
|
1502
1530
|
}
|
|
1503
1531
|
}
|
|
@@ -1651,6 +1679,22 @@ async function downloadOne(run, downloadItem, counters, deferJournalCheckpoint =
|
|
|
1651
1679
|
message: err.message,
|
|
1652
1680
|
});
|
|
1653
1681
|
}
|
|
1682
|
+
else if (isRemoteObjectGoneError(err)) {
|
|
1683
|
+
// LIST→GET race: a short-lived inbox file (e.g. inbox/pending/jobrun-*.json)
|
|
1684
|
+
// was present in the vault LIST and gone by the time the GET ran. The
|
|
1685
|
+
// next pass simply no longer lists the key. Per-object, not a transfer
|
|
1686
|
+
// failure. Downgrade to a deliberate skip (never type:"error") so the
|
|
1687
|
+
// company settles `complete` and the one-shot runner exits 0 instead of
|
|
1688
|
+
// PARTIAL_SYNC_EXIT (policy hq-sync-deliberate-skip-not-fatal-error-exit2).
|
|
1689
|
+
// Deliberately does NOT journal the key: the success path below
|
|
1690
|
+
// (updateEntry) never runs, so a later pass that still lists it retries.
|
|
1691
|
+
counters.filesSkipped++;
|
|
1692
|
+
run.emit({
|
|
1693
|
+
type: "skip-vanished-remote",
|
|
1694
|
+
path: remoteFile.key,
|
|
1695
|
+
message: describeError(err),
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1654
1698
|
else {
|
|
1655
1699
|
// A vault 100/hr throttle (or 429/502/503/504) is a deferral the
|
|
1656
1700
|
// next sync will retry. Emitting a hard `type: "error"` here used
|
|
@@ -2212,36 +2256,33 @@ excludePrefixes = [],
|
|
|
2212
2256
|
// callers preserve the pre-policy, watcher-intent-only behavior.
|
|
2213
2257
|
propagateDeletePolicy = "owned-only", onHeartbeat, journalRowCount = journalRows(journal).size, cooperativeCheckpoint, onCooperativeHandoff, deleteDenominatorKeys) {
|
|
2214
2258
|
const items = [];
|
|
2215
|
-
const streaming = isStreamingRemoteFileSource(remoteFiles);
|
|
2216
2259
|
const listedFiles = isStreamingRemoteFileSource(remoteFiles) ? remoteFiles.files : remoteFiles;
|
|
2217
2260
|
let preplannedFilesSkipped = 0;
|
|
2218
2261
|
let preplannedFilesOutOfScope = 0;
|
|
2219
2262
|
let preplannedFilesExcludedByPolicy = 0;
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
for
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
retain(item);
|
|
2231
|
-
}
|
|
2232
|
-
else if (item.action === "skip-out-of-scope") {
|
|
2233
|
-
preplannedFilesOutOfScope++;
|
|
2234
|
-
}
|
|
2235
|
-
else if (item.action === "skip-excluded-policy") {
|
|
2236
|
-
preplannedFilesExcludedByPolicy++;
|
|
2237
|
-
}
|
|
2238
|
-
else {
|
|
2239
|
-
preplannedFilesSkipped++;
|
|
2240
|
-
}
|
|
2263
|
+
const retain = items.push.bind(items);
|
|
2264
|
+
items.push = (...next) => {
|
|
2265
|
+
for (const item of next) {
|
|
2266
|
+
// These actions still need the executor for an event or a state change.
|
|
2267
|
+
if (item.action === "download" ||
|
|
2268
|
+
item.action === "conflict" ||
|
|
2269
|
+
item.action === "tombstone-delete" ||
|
|
2270
|
+
item.action === "skip-junk-key-spelling" ||
|
|
2271
|
+
item.action === "skip-unreadable-link") {
|
|
2272
|
+
retain(item);
|
|
2241
2273
|
}
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2274
|
+
else if (item.action === "skip-out-of-scope") {
|
|
2275
|
+
preplannedFilesOutOfScope++;
|
|
2276
|
+
}
|
|
2277
|
+
else if (item.action === "skip-excluded-policy") {
|
|
2278
|
+
preplannedFilesExcludedByPolicy++;
|
|
2279
|
+
}
|
|
2280
|
+
else {
|
|
2281
|
+
preplannedFilesSkipped++;
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
return items.length;
|
|
2285
|
+
};
|
|
2245
2286
|
// Remote keys the server will never presign — collected so the caller can
|
|
2246
2287
|
// warn + emit telemetry without allowing one poison object to fail a pull.
|
|
2247
2288
|
const invalidRemoteKeys = [];
|
|
@@ -2331,11 +2372,15 @@ propagateDeletePolicy = "owned-only", onHeartbeat, journalRowCount = journalRows
|
|
|
2331
2372
|
noteCooperativeRowVisit("plan", remoteFile.key);
|
|
2332
2373
|
plannedRows++;
|
|
2333
2374
|
if (cooperativeCheckpoint &&
|
|
2334
|
-
plannedRows %
|
|
2375
|
+
plannedRows % cooperativeUnitSize() === 0) {
|
|
2376
|
+
dropJournalDecodeWindow();
|
|
2335
2377
|
if (await yieldToCooperativeCheckpoint(cooperativeWork, cooperativeCheckpoint, true, plannedRows)) {
|
|
2336
2378
|
onCooperativeHandoff?.();
|
|
2337
2379
|
}
|
|
2338
2380
|
}
|
|
2381
|
+
else if (plannedRows % decodeWindowSize() === 0) {
|
|
2382
|
+
dropJournalDecodeWindow();
|
|
2383
|
+
}
|
|
2339
2384
|
const posixRemoteKey = toPosixKey(remoteFile.key);
|
|
2340
2385
|
// S3 object keys are POSIX. Match the old delete-sweep membership check:
|
|
2341
2386
|
// a legacy backslash journal entry counts as present only when its POSIX
|
|
@@ -2946,9 +2991,10 @@ propagateDeletePolicy = "owned-only", onHeartbeat, journalRowCount = journalRows
|
|
|
2946
2991
|
localSnapshot: plannedLocalSnapshot,
|
|
2947
2992
|
});
|
|
2948
2993
|
}
|
|
2994
|
+
dropJournalDecodeWindow();
|
|
2949
2995
|
if (cooperativeCheckpoint &&
|
|
2950
|
-
plannedRows >
|
|
2951
|
-
plannedRows %
|
|
2996
|
+
plannedRows > cooperativeUnitSize() &&
|
|
2997
|
+
plannedRows % cooperativeUnitSize() !== 0) {
|
|
2952
2998
|
if (await yieldToCooperativeCheckpoint(cooperativeWork, cooperativeCheckpoint, true, plannedRows)) {
|
|
2953
2999
|
onCooperativeHandoff?.();
|
|
2954
3000
|
}
|
|
@@ -3301,6 +3347,9 @@ function defaultConsoleLogger(event) {
|
|
|
3301
3347
|
else if (event.type === "skip-rename-blocked") {
|
|
3302
3348
|
console.warn(` ! ${event.path} skipped — another program on this PC is holding the file open, so HQ could not replace it yet. ${event.remedy}`);
|
|
3303
3349
|
}
|
|
3350
|
+
else if (event.type === "skip-vanished-remote") {
|
|
3351
|
+
console.warn(` ! ${event.path} skipped — the vault object disappeared before it could be downloaded (${event.message})`);
|
|
3352
|
+
}
|
|
3304
3353
|
else if (event.type === "not-shipped") {
|
|
3305
3354
|
if (event.reason === "unreachable-path") {
|
|
3306
3355
|
console.warn(` ! ${event.count} named path${event.count === 1 ? "" : "s"} could NOT be pushed — the file exists but is not reachable under the company folder (nothing was uploaded for ${event.count === 1 ? "it" : "them"}):`);
|