@indigoai-us/hq-cloud 6.18.52 → 6.18.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/bin/sync-runner-audit.d.ts +26 -0
  2. package/dist/bin/sync-runner-audit.d.ts.map +1 -0
  3. package/dist/bin/sync-runner-audit.js +51 -0
  4. package/dist/bin/sync-runner-audit.js.map +1 -0
  5. package/dist/bin/sync-runner-company.d.ts +18 -0
  6. package/dist/bin/sync-runner-company.d.ts.map +1 -1
  7. package/dist/bin/sync-runner-company.js +186 -9
  8. package/dist/bin/sync-runner-company.js.map +1 -1
  9. package/dist/bin/sync-runner-watch-loop.d.ts +107 -5
  10. package/dist/bin/sync-runner-watch-loop.d.ts.map +1 -1
  11. package/dist/bin/sync-runner-watch-loop.js +1382 -183
  12. package/dist/bin/sync-runner-watch-loop.js.map +1 -1
  13. package/dist/bin/sync-runner.d.ts +63 -11
  14. package/dist/bin/sync-runner.d.ts.map +1 -1
  15. package/dist/bin/sync-runner.js +350 -95
  16. package/dist/bin/sync-runner.js.map +1 -1
  17. package/dist/bin/watcher-catchup-skip-store.d.ts +60 -0
  18. package/dist/bin/watcher-catchup-skip-store.d.ts.map +1 -0
  19. package/dist/bin/watcher-catchup-skip-store.js +282 -0
  20. package/dist/bin/watcher-catchup-skip-store.js.map +1 -0
  21. package/dist/cli/conflict.d.ts +6 -0
  22. package/dist/cli/conflict.d.ts.map +1 -1
  23. package/dist/cli/conflict.js +3 -1
  24. package/dist/cli/conflict.js.map +1 -1
  25. package/dist/cli/reindex.d.ts.map +1 -1
  26. package/dist/cli/reindex.js +95 -5
  27. package/dist/cli/reindex.js.map +1 -1
  28. package/dist/cli/rescue-core.d.ts +25 -1
  29. package/dist/cli/rescue-core.d.ts.map +1 -1
  30. package/dist/cli/rescue-core.js +69 -4
  31. package/dist/cli/rescue-core.js.map +1 -1
  32. package/dist/cli/share.d.ts +27 -0
  33. package/dist/cli/share.d.ts.map +1 -1
  34. package/dist/cli/share.js +151 -30
  35. package/dist/cli/share.js.map +1 -1
  36. package/dist/cli/sync.d.ts +18 -2
  37. package/dist/cli/sync.d.ts.map +1 -1
  38. package/dist/cli/sync.js +90 -25
  39. package/dist/cli/sync.js.map +1 -1
  40. package/dist/ignore.d.ts +1 -1
  41. package/dist/ignore.d.ts.map +1 -1
  42. package/dist/ignore.js +2 -2
  43. package/dist/ignore.js.map +1 -1
  44. package/dist/journal-row-store.d.ts.map +1 -1
  45. package/dist/journal-row-store.js +6 -0
  46. package/dist/journal-row-store.js.map +1 -1
  47. package/dist/journal-snapshot-v4.d.ts +8 -0
  48. package/dist/journal-snapshot-v4.d.ts.map +1 -1
  49. package/dist/journal-snapshot-v4.js +208 -17
  50. package/dist/journal-snapshot-v4.js.map +1 -1
  51. package/dist/journal.d.ts +18 -2
  52. package/dist/journal.d.ts.map +1 -1
  53. package/dist/journal.js +248 -17
  54. package/dist/journal.js.map +1 -1
  55. package/dist/lib/cloud-authoritative.d.ts +9 -2
  56. package/dist/lib/cloud-authoritative.d.ts.map +1 -1
  57. package/dist/lib/cloud-authoritative.js +34 -2
  58. package/dist/lib/cloud-authoritative.js.map +1 -1
  59. package/dist/lib/exit-codes.d.ts +2 -0
  60. package/dist/lib/exit-codes.d.ts.map +1 -1
  61. package/dist/lib/exit-codes.js +2 -0
  62. package/dist/lib/exit-codes.js.map +1 -1
  63. package/dist/personal-vault-exclusions.d.ts +2 -2
  64. package/dist/personal-vault-exclusions.d.ts.map +1 -1
  65. package/dist/personal-vault-exclusions.js +5 -3
  66. package/dist/personal-vault-exclusions.js.map +1 -1
  67. package/dist/personal-vault.d.ts +7 -0
  68. package/dist/personal-vault.d.ts.map +1 -1
  69. package/dist/personal-vault.js +10 -0
  70. package/dist/personal-vault.js.map +1 -1
  71. package/dist/qmd-runner-admission.d.ts +22 -0
  72. package/dist/qmd-runner-admission.d.ts.map +1 -0
  73. package/dist/qmd-runner-admission.js +107 -0
  74. package/dist/qmd-runner-admission.js.map +1 -0
  75. package/dist/s3.d.ts +2 -0
  76. package/dist/s3.d.ts.map +1 -1
  77. package/dist/s3.js +2 -0
  78. package/dist/s3.js.map +1 -1
  79. package/dist/symlink-target-policy.d.ts +11 -0
  80. package/dist/symlink-target-policy.d.ts.map +1 -1
  81. package/dist/symlink-target-policy.js +110 -0
  82. package/dist/symlink-target-policy.js.map +1 -1
  83. package/dist/sync/area-ledger-migration.d.ts +3 -1
  84. package/dist/sync/area-ledger-migration.d.ts.map +1 -1
  85. package/dist/sync/area-ledger-migration.js +3 -0
  86. package/dist/sync/area-ledger-migration.js.map +1 -1
  87. package/dist/sync/area-ledger.d.ts +3 -0
  88. package/dist/sync/area-ledger.d.ts.map +1 -1
  89. package/dist/sync/area-ledger.js +29 -6
  90. package/dist/sync/area-ledger.js.map +1 -1
  91. package/dist/sync/mutation-session.d.ts.map +1 -1
  92. package/dist/sync/mutation-session.js +4 -0
  93. package/dist/sync/mutation-session.js.map +1 -1
  94. package/dist/sync/parallel-sync-coordinator.d.ts +29 -0
  95. package/dist/sync/parallel-sync-coordinator.d.ts.map +1 -1
  96. package/dist/sync/parallel-sync-coordinator.js +229 -16
  97. package/dist/sync/parallel-sync-coordinator.js.map +1 -1
  98. package/dist/sync/push-receiver.d.ts +5 -0
  99. package/dist/sync/push-receiver.d.ts.map +1 -1
  100. package/dist/sync/push-receiver.js +32 -10
  101. package/dist/sync/push-receiver.js.map +1 -1
  102. package/dist/sync/state-store.d.ts +7 -0
  103. package/dist/sync/state-store.d.ts.map +1 -1
  104. package/dist/sync/state-store.js +113 -6
  105. package/dist/sync/state-store.js.map +1 -1
  106. package/dist/watch-owner-lease.d.ts +4 -0
  107. package/dist/watch-owner-lease.d.ts.map +1 -1
  108. package/dist/watch-owner-lease.js +40 -6
  109. package/dist/watch-owner-lease.js.map +1 -1
  110. package/dist/watcher.d.ts +16 -3
  111. package/dist/watcher.d.ts.map +1 -1
  112. package/dist/watcher.js +114 -21
  113. package/dist/watcher.js.map +1 -1
  114. package/package.json +4 -3
@@ -8,6 +8,7 @@ import type { EntityContext, VaultServiceConfig, SyncJournal } from "../types.js
8
8
  import type { UploadAuthor } from "../s3.js";
9
9
  import { journalFingerprintMatchesStat } from "../journal.js";
10
10
  import type { ConflictStrategy } from "./conflict.js";
11
+ import type { WatcherCatchupSkipReason } from "../bin/watcher-catchup-skip-store.js";
11
12
  import type { SyncProgressEvent } from "./sync.js";
12
13
  import { type CompanyTombstone } from "./tombstones.js";
13
14
  import { type ScopePrefixInput } from "../prefix-coalesce.js";
@@ -324,6 +325,16 @@ export interface ShareOptions {
324
325
  registerCompanySkill?: CompanySkillRegistrar;
325
326
  /** HQ root directory */
326
327
  hqRoot: string;
328
+ /** Internal runner-only planning pass. Builds plans and returns before any upload, delete, or journal apply. */
329
+ preflightOnly?: boolean;
330
+ /** Internal path-free audit projection for successful push/delete operations. */
331
+ onAuditPathEvent?: (event: {
332
+ path: string;
333
+ contentHash?: string;
334
+ etag?: string;
335
+ bytes: number;
336
+ deleted?: true;
337
+ }) => void;
327
338
  /** Test seam for exercising case-folding path behavior off APFS/NTFS. */
328
339
  caseFoldingVolume?: boolean;
329
340
  /**
@@ -586,6 +597,17 @@ export interface ShareOptions {
586
597
  * upload to the same vault clears it.
587
598
  */
588
599
  planLimitPause?: boolean;
600
+ /** Called for watch-runner push skips that warm-up can safely remember. */
601
+ catchupGrantVersion?: string;
602
+ onCatchupOntologyPush?: (company: string, enabled: boolean) => void;
603
+ onCatchupSkip?: (record: {
604
+ company: string;
605
+ path: string;
606
+ reason: WatcherCatchupSkipReason;
607
+ size: number;
608
+ mtimeMs: number;
609
+ grantVersion?: string;
610
+ }) => void;
589
611
  }
590
612
  export interface CompanySkillRegistrationRequest {
591
613
  companySlug: string;
@@ -622,6 +644,11 @@ export declare class ServerOwnedPushPathsError extends Error {
622
644
  /** Most uploaded paths a push reports back (the watcher announces these). */
623
645
  export declare const SHARE_UPLOADED_PATHS_CAP = 1000;
624
646
  export interface ShareResult {
647
+ /** Present only for the internal no-side-effect runner preflight. */
648
+ preflightCounts?: {
649
+ pushes: number;
650
+ remoteDeletes: number;
651
+ };
625
652
  /**
626
653
  * Relative paths this run uploaded, capped at SHARE_UPLOADED_PATHS_CAP.
627
654
  * The watch loop announces files under a directory entry only when they
@@ -1 +1 @@
1
- {"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../src/cli/share.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA8BlF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAY7C,OAAO,EAUL,6BAA6B,EAW9B,MAAM,eAAe,CAAC;AA2BvB,OAAO,KAAK,EAAwC,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAOL,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAczB,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAOL,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAahF,OAAO,EAA4B,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAkFtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,sBAAsB,QACmD,CAAC;AAEvF;;;;;;;;;GASG;AACH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,QAAqB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;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E,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;IACtD,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,gBAAgB,CACvB,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAsB,GAC1B,MAAM,CAuBR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,iBAAS,qBAAqB,CAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACvC,OAAO,CAwBT;AA8HD;;;;;;;;;;;GAWG;AACH,iBAAe,YAAY,CACzB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,EAC/C,KAAK,GAAE,YAAiB,GACvB,OAAO,CAAC,cAAc,EAAE,CAAC,CAsH3B"}
package/dist/cli/share.js CHANGED
@@ -8,7 +8,7 @@ import * as fs from "fs";
8
8
  import * as os from "os";
9
9
  import * as path from "path";
10
10
  import { resolveSymlinkTargetRefusalFlag } from "../sync/symlink-target-refusal-flag.js";
11
- import { inspectSymlinkTarget, materializedTargetMatchesWire, personalSymlinkTargetLinkPath, } from "../symlink-target-policy.js";
11
+ import { inspectLocalSymlinkScope, inspectSymlinkTarget, materializedTargetMatchesWire, personalSymlinkTargetLinkPath, } from "../symlink-target-policy.js";
12
12
  import { resolveEntityContext, isExpiringSoon, refreshEntityContext } from "../context.js";
13
13
  import { ensureCompanyVaultTransport } from "../company-vault-transport.js";
14
14
  import { createSyncProgressRecorder } from "../sync-progress.js";
@@ -17,7 +17,7 @@ import { uploadFile, uploadSymlink, toPosixKey, headRemoteFile, readVerifiedRemo
17
17
  import * as crypto from "crypto";
18
18
  import { bindObjectIOToContext, PresignObjectIO, RateLimitedError, resolveObjectIO, S3SdkObjectIO, } from "../object-io.js";
19
19
  import { primePrivateFolderUpload } from "../private-folder-transport.js";
20
- import { isUnderAnyRoot, readJournalForPass, readJournalScoped, writeJournal, setJournalSnapshotQuarantineListener, hashFile, hashSymlinkTarget, journalRows, journalEntryMatchesStat, journalFingerprintMatchesStat, dropJournalDecodeWindow, timestampsTooCoarseToTrust, updateEntry, PrematureJournalEntryError, removeEntry, isTombstone, normalizeEtag, PERSONAL_VAULT_JOURNAL_SLUG, migratePersonalVaultJournal, migrateToV2, } from "../journal.js";
20
+ import { isUnderAnyRoot, readJournalForPass, readJournalScoped, readQuarantinedJournalPaths, writeJournal, setJournalSnapshotQuarantineListener, hashFile, hashSymlinkTarget, journalRows, journalEntryMatchesStat, journalFingerprintMatchesStat, dropJournalDecodeWindow, timestampsTooCoarseToTrust, updateEntry, PrematureJournalEntryError, removeEntry, isTombstone, normalizeEtag, PERSONAL_VAULT_JOURNAL_SLUG, migratePersonalVaultJournal, migrateToV2, } from "../journal.js";
21
21
  import { createIgnoreFilter, hasControlCharacters, isExpectedIgnore, isSecretPatternIgnore, isWithinSizeLimit, } from "../ignore.js";
22
22
  import { wrapFilterWithPersonalVaultDefaults, } from "../personal-vault-exclusions.js";
23
23
  import { isSecretBearingVaultPath, isSkipSecretPathsEnabled, } from "../sync/secret-path-policy.js";
@@ -29,7 +29,7 @@ import { compileScopeMatcher, } from "../prefix-coalesce.js";
29
29
  import { hasRemoteChanged, isAccessDenied, resolveActiveCompany, resolveTransferConcurrency, resolveUploadByteBudget, readHostLoad, } from "../sync-core.js";
30
30
  import { buildConflictBackupPath, buildConflictId, buildConflictProbePath, readShortMachineId, } from "../lib/conflict-file.js";
31
31
  import { appendConflictEntry } from "../lib/conflict-index.js";
32
- import { isCloudAuthoritative } from "../lib/cloud-authoritative.js";
32
+ import { isLocallyIneligibleForPush } from "../lib/cloud-authoritative.js";
33
33
  import { isOntologyEntityKey, ONTOLOGY_MULTI_WRITER_FLAG, resolveOntologyEntityPush, } from "../lib/ontology-entity-push.js";
34
34
  import { entityIsFreshForCreate, outboxAllowsEntityPush, readOntologyOutbox, } from "../lib/ontology-outbox.js";
35
35
  import { resolveSkillRegisterLandedBytes } from "../lib/skill-register-landed-bytes.js";
@@ -447,7 +447,7 @@ function refusesServerOwnedPush(relativePath, ontologyEntityPush, absolutePath,
447
447
  return false;
448
448
  return !outboxAllowsEntityPush(ontologyEntityPush, relativePath, absolutePath, plannedHash);
449
449
  }
450
- return isCloudAuthoritative(relativePath);
450
+ return isLocallyIneligibleForPush(relativePath, { boardClientOwned: true });
451
451
  }
452
452
  function computePushPlan(filesToShare, journal, skipUnchanged, onHeartbeat, ontologyEntityPush = false, symlinkContext) {
453
453
  const items = [];
@@ -658,6 +658,22 @@ function portablePushSymlinkTarget(absolutePath, relativePath, localTarget, wire
658
658
  linkPath = `companies/${context.companySlug}/${relativePath}`;
659
659
  }
660
660
  }
661
+ if (scope && scopeRoot) {
662
+ const localInspection = inspectLocalSymlinkScope({
663
+ absoluteLinkPath: absolutePath,
664
+ linkPath,
665
+ scopeRoot,
666
+ scope,
667
+ });
668
+ if (localInspection.refused) {
669
+ const event = {
670
+ classification: localInspection.classification,
671
+ shape: localInspection.shape,
672
+ };
673
+ reportRefusal(event);
674
+ return { target: "", refused: true, ...event };
675
+ }
676
+ }
661
677
  const reuseMatchingWireTarget = () => {
662
678
  if (wireTarget === undefined || !scope || !materializedTargetMatchesWire(absolutePath, localTarget, wireTarget)) {
663
679
  return undefined;
@@ -988,6 +1004,17 @@ async function shareOnce(options) {
988
1004
  const conflictPaths = [];
989
1005
  const pathResults = [];
990
1006
  const plans = await buildSharePlans(run);
1007
+ if (options.preflightOnly === true) {
1008
+ const result = buildShareResult(run, counters, filesRefusedStalePaths, conflictPaths, pathResults, false);
1009
+ result.preflightCounts = {
1010
+ pushes: plans.pushPlan.filesToUpload,
1011
+ remoteDeletes: plans.deletePlan.toDelete.length + plans.decommissionPlan.length,
1012
+ };
1013
+ return result;
1014
+ }
1015
+ if (run.quarantinedPaths.size > 0) {
1016
+ run.emit({ type: "journal-quarantine-unresolved", count: run.quarantinedPaths.size });
1017
+ }
991
1018
  const serverOwnedRefusals = plans.pushPlan.items.filter((item) => item.action === "refuse-server-owned");
992
1019
  if (serverOwnedRefusals.length > 0 &&
993
1020
  serverOwnedRefusals.length === plans.pushPlan.items.length &&
@@ -1261,6 +1288,7 @@ async function createPushRunContext(options) {
1261
1288
  ? wrapFilterWithScope(transferFilter, syncRoot, options.prefixSet, onScopeExcluded)
1262
1289
  : transferFilter;
1263
1290
  const journalSlug = options.journalSlug ?? ctx.slug;
1291
+ const quarantinedPaths = readQuarantinedJournalPaths(journalSlug);
1264
1292
  const flagConfig = vaultConfig ?? privateFolderVaultConfig;
1265
1293
  const symlinkTargetRefusal = flagConfig
1266
1294
  ? await resolveSymlinkTargetRefusalFlag({
@@ -1275,7 +1303,7 @@ async function createPushRunContext(options) {
1275
1303
  // defer its keyed journal read until the exact K upload/delete keys are
1276
1304
  // known. Full/cadence callers retain the complete snapshot here.
1277
1305
  const scopedJournal = options.scopedJournal === true;
1278
- const journal = scopedJournal ? emptyJournalForScopedPass() : readJournalForPass(journalSlug);
1306
+ const journal = scopedJournal ? emptyJournalForScopedPass() : readJournalForPass(journalSlug, ctx.uid);
1279
1307
  return {
1280
1308
  options,
1281
1309
  ontologyEntityPush: false,
@@ -1303,6 +1331,7 @@ async function createPushRunContext(options) {
1303
1331
  durableShouldSync: baseFilter,
1304
1332
  skipSecretPaths,
1305
1333
  journalSlug,
1334
+ quarantinedPaths,
1306
1335
  journal,
1307
1336
  scopedJournal,
1308
1337
  excludedSet,
@@ -1967,7 +1996,7 @@ async function reconcileLandedCompanySkill(run, relativePath, content, absoluteP
1967
1996
  }
1968
1997
  }
1969
1998
  async function buildSharePlans(run) {
1970
- const collected = await collectFiles(run.paths, run.hqRoot, run.syncRoot, run.shouldSync, {
1999
+ const collectedAll = await collectFiles(run.paths, run.hqRoot, run.syncRoot, run.shouldSync, {
1971
2000
  onUnreachablePath: (namedPath, reason) => {
1972
2001
  // First reason wins: a path is named once, and re-adding would only
1973
2002
  // churn the map ordering the error message and event sample rely on.
@@ -1979,6 +2008,7 @@ async function buildSharePlans(run) {
1979
2008
  onHeartbeat: run.options.onHeartbeat,
1980
2009
  cooperativeCheckpoint: run.options.cooperativeCheckpoint,
1981
2010
  });
2011
+ const collected = collectedAll.filter((entry) => !run.quarantinedPaths.has(entry.relativePath));
1982
2012
  // Ask #2 of feedback_a51cb63d: "error, not warn-skip, when the named file
1983
2013
  // exists locally but is unreachable by the resolver". This is the throw that
1984
2014
  // makes it true end-to-end — the CLI's push handler already turns a thrown
@@ -1995,7 +2025,7 @@ async function buildSharePlans(run) {
1995
2025
  const deleteScopeRoots = run.propagateDeletes === true
1996
2026
  ? resolveDeleteScopeRoots(run.paths, run.hqRoot, run.syncRoot, run.options.deleteScopeRoots)
1997
2027
  : [];
1998
- await refreshPushJournalAfterWalk(run, collected.map((entry) => entry.relativePath), deleteScopeRoots);
2028
+ await refreshPushJournalAfterWalk(run, [...collected.map((entry) => entry.relativePath), ...run.quarantinedPaths], deleteScopeRoots);
1999
2029
  // Control-character key filter (macOS Finder Icon\r incident). A key
2000
2030
  // containing a control character can never be stored — validateVaultUploadKey
2001
2031
  // rejects it with INVALID_KEY_CONTROL_CHARS — so planning an upload for one
@@ -2070,6 +2100,9 @@ async function buildSharePlans(run) {
2070
2100
  // push, so ordinary passes make no flag request.
2071
2101
  if (pushEntries.some((entry) => isOntologyEntityKey(entry.relativePath))) {
2072
2102
  run.ontologyEntityPush = await resolveRunOntologyEntityPush(run);
2103
+ if (run.options.personalMode !== true) {
2104
+ run.options.onCatchupOntologyPush?.(run.ctx.slug, run.ontologyEntityPush !== false);
2105
+ }
2073
2106
  }
2074
2107
  const pushPlan = await computePushPlanCooperatively(pushEntries, run.journal, run.skipUnchanged === true, run.options.onHeartbeat, run.options.cooperativeCheckpoint, run.ontologyEntityPush, {
2075
2108
  hqRoot: run.hqRoot,
@@ -2079,11 +2112,15 @@ async function buildSharePlans(run) {
2079
2112
  reportedUnsafeSymlinkPaths: run.reportedUnsafeSymlinkPaths,
2080
2113
  });
2081
2114
  const deletePlan = run.propagateDeletes === true
2082
- ? await computeDeletePlan(run.journal, run.syncRoot, deleteScopeRoots, run.shouldSync, run.propagateDeletePolicy, run.ctx, run.options.personalMode !== true, run.skipSecretPaths)
2115
+ ? await computeDeletePlan(run.journal, run.syncRoot, deleteScopeRoots, run.shouldSync, run.propagateDeletePolicy, run.ctx, run.options.personalMode !== true, run.skipSecretPaths, run.quarantinedPaths)
2083
2116
  : { toDelete: [], toTombstone: [], refusedStale: [] };
2084
2117
  const decommissionPlan = !run.scopedJournal && (run.options.decommissionPrefixes ?? []).length > 0
2085
2118
  ? computeDecommissionPlan(run.journal, run.options.decommissionPrefixes ?? [], run.propagateDeletePolicy, new Set([...deletePlan.toDelete.map((item) => item.key), ...deletePlan.toTombstone]), run.skipSecretPaths)
2086
2119
  : [];
2120
+ for (let index = decommissionPlan.length - 1; index >= 0; index--) {
2121
+ if (run.quarantinedPaths.has(decommissionPlan[index]))
2122
+ decommissionPlan.splice(index, 1);
2123
+ }
2087
2124
  const remoteDeleteKeys = [
2088
2125
  ...deletePlan.toDelete.map((item) => item.key),
2089
2126
  ...decommissionPlan,
@@ -2179,7 +2216,7 @@ async function refreshPushJournalAfterWalk(run, collectedKeys = [], deleteScopeR
2179
2216
  }
2180
2217
  run.journal = migrateToV2(run.scopedJournal
2181
2218
  ? readJournalScoped(run.journalSlug, collectedKeys, deleteScopeRoots)
2182
- : readJournalForPass(run.journalSlug));
2219
+ : readJournalForPass(run.journalSlug, run.ctx.uid));
2183
2220
  run.checkpoint.baselineLastSync = run.journal.lastSync;
2184
2221
  run.checkpoint.threshold = checkpointThresholdFor(run.journal, run.options.durableFullPassProgress === true);
2185
2222
  // Purge classifies every journal row and decommission plans likewise scan
@@ -2334,13 +2371,17 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2334
2371
  hadUploadFailure: false,
2335
2372
  };
2336
2373
  }
2337
- await primeUploads(run.ctx, initiallyPlannedUploads.map((it) => ({
2338
- key: it.relativePath,
2339
- localPath: it.absolutePath,
2340
- isSymlink: it.kind === "symlink",
2341
- ...(it.kind === "file" ? { contentHash: it.localHash } : {}),
2342
- author: run.options.author,
2343
- })));
2374
+ await primeUploads(run.ctx, initiallyPlannedUploads.map((it) => {
2375
+ const baselineEtag = journalRows(run.journal).get(it.relativePath)?.remoteEtag;
2376
+ return {
2377
+ key: it.relativePath,
2378
+ localPath: it.absolutePath,
2379
+ isSymlink: it.kind === "symlink",
2380
+ ...(it.kind === "file" ? { contentHash: it.localHash } : {}),
2381
+ ...(baselineEtag ? { ifMatch: baselineEtag } : {}),
2382
+ author: run.options.author,
2383
+ };
2384
+ }));
2344
2385
  // Warm the GET presigns the per-item conflict HEAD (remoteMeta) reuses, so a
2345
2386
  // large upload set doesn't mint one presign per HEAD and burst/trip the
2346
2387
  // presign breaker. Mirrors the new-files + tombstone pre-primes on the pull.
@@ -2401,8 +2442,38 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2401
2442
  }
2402
2443
  planLimitPauses.save(now);
2403
2444
  };
2445
+ let catchupSkipStatWarningReported = false;
2446
+ const recordCatchupSkip = (relativePath, absolutePath, reason) => {
2447
+ const record = run.options.onCatchupSkip;
2448
+ if (!record)
2449
+ return;
2450
+ try {
2451
+ const stat = fs.lstatSync(absolutePath);
2452
+ if (!stat.isFile() && !stat.isSymbolicLink())
2453
+ return;
2454
+ record({
2455
+ company: run.options.personalMode === true ? "personal" : run.ctx.slug,
2456
+ path: relativePath,
2457
+ reason,
2458
+ size: stat.size,
2459
+ mtimeMs: stat.mtimeMs,
2460
+ ...(run.options.catchupGrantVersion
2461
+ ? { grantVersion: run.options.catchupGrantVersion }
2462
+ : {}),
2463
+ });
2464
+ }
2465
+ catch (error) {
2466
+ // A path that vanished or became unreadable cannot suppress a later warm-up candidate.
2467
+ if (!catchupSkipStatWarningReported) {
2468
+ catchupSkipStatWarningReported = true;
2469
+ process.stderr.write(`hq-cloud: catch-up skip metadata unavailable; leaving path eligible: ${error instanceof Error ? error.message : String(error)}\n`);
2470
+ }
2471
+ }
2472
+ };
2404
2473
  const settleFreshSkip = (item) => {
2405
2474
  if (item.action === "refuse-server-owned") {
2475
+ // Server-owned paths share the local cloud-authoritative predicate with
2476
+ // warm-up. They never enter the host-local remote-refusal skip store.
2406
2477
  if (run.options.serverOwnedPathPolicy !== "skip") {
2407
2478
  emitServerOwnedRefusal(run, item.relativePath);
2408
2479
  }
@@ -2496,8 +2567,10 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2496
2567
  // than for the `localDiverges` recovery. The two cases need different write
2497
2568
  // fences — see the precondition block below.
2498
2569
  let fenceOnObservedRemote = false;
2570
+ let remoteChangedSinceJournal = false;
2499
2571
  // Cloud-authoritative paths (server-regenerated: company-brief.md, board.json,
2500
- // ontology/ signals/ sources/) are PULL-WINS and server-owned. The push leg must
2572
+ // pipeline-owned ontology/, signals/, and sources/) are PULL-WINS and server-owned.
2573
+ // The push leg must
2501
2574
  // NEVER upload the local copy over them — not just on a two-sided conflict, but on
2502
2575
  // ANY divergence, including a one-sided local change. A stale local mirror (e.g. a
2503
2576
  // second HQ root that shares this machine's sync journal) would otherwise read as
@@ -2528,6 +2601,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2528
2601
  catch (headErr) {
2529
2602
  if (isAccessDenied(headErr)) {
2530
2603
  run.scopeExcludedSet.add(relativePath);
2604
+ recordCatchupSkip(relativePath, absolutePath, "access-denied");
2531
2605
  return;
2532
2606
  }
2533
2607
  throw headErr;
@@ -2539,6 +2613,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2539
2613
  if (remoteMeta &&
2540
2614
  !journalRows(run.journal).has(relativePath) &&
2541
2615
  isArchivedSessionLog(relativePath, remoteMeta)) {
2616
+ recordCatchupSkip(relativePath, absolutePath, "archived-session-log");
2542
2617
  run.emit({ type: "skip-archived-session-log", path: relativePath });
2543
2618
  counters.filesSkipped++;
2544
2619
  return;
@@ -2634,6 +2709,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2634
2709
  const remoteContentHash = item.kind === "file" ? publishedContentHash(remoteMeta.metadata) : undefined;
2635
2710
  const remoteChanged = !!journalEntry &&
2636
2711
  hasRemoteChanged({ ...remoteMeta, contentHash: remoteContentHash }, journalEntry);
2712
+ remoteChangedSinceJournal = remoteChanged;
2637
2713
  // A matching published digest is a content no-op even when SSE-KMS gave
2638
2714
  // this object a fresh ETag. Reconcile the journal to that version without
2639
2715
  // a needless PUT or a phantom two-sided conflict.
@@ -2677,6 +2753,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2677
2753
  // ordinary journaled edit whose remote is unchanged still uploads.
2678
2754
  const needsRemoteBody = !journalEntry || (localChanged && remoteChanged) || !!journalEntry.localDiverges;
2679
2755
  if (needsRemoteBody && isArchivedSessionLog(relativePath, remoteMeta)) {
2756
+ recordCatchupSkip(relativePath, absolutePath, "archived-session-log");
2680
2757
  run.emit({ type: "skip-archived-session-log", path: relativePath });
2681
2758
  counters.filesSkipped++;
2682
2759
  return;
@@ -2802,7 +2879,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2802
2879
  let winnerProbe;
2803
2880
  let resolution;
2804
2881
  if (versionAware) {
2805
- winnerProbe = await probeRemoteForWinner(run, item, remoteMeta.lastModified);
2882
+ winnerProbe = await probeRemoteForWinner(run, item, remoteMeta.lastModified, remoteChangedSinceJournal);
2806
2883
  resolution = "keep";
2807
2884
  }
2808
2885
  else {
@@ -2836,10 +2913,20 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
2836
2913
  // the meantime fails closed instead of being clobbered.
2837
2914
  const detectedAt = new Date().toISOString();
2838
2915
  const machineId = readShortMachineId(run.hqRoot);
2916
+ const conflictPath = winnerProbe?.park(detectedAt, machineId);
2917
+ if (!conflictPath) {
2918
+ // The local copy can only replace the remote after that remote
2919
+ // body is safely parked. The park helper already emitted an
2920
+ // error-level, content-free diagnostic; leave the journal alone
2921
+ // so the conflict is retried next pass.
2922
+ winnerProbe?.discard();
2923
+ counters.filesSkipped++;
2924
+ return;
2925
+ }
2839
2926
  recordPushConflict(run, item, {
2840
2927
  detectedAt,
2841
2928
  machineId,
2842
- conflictPath: winnerProbe?.park(detectedAt, machineId),
2929
+ conflictPath,
2843
2930
  remoteHash: normalizeEtag(remoteMeta.etag),
2844
2931
  preserved: "remote",
2845
2932
  decision,
@@ -3069,6 +3156,11 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
3069
3156
  settleLandedReconcile(run, relativePath, outcome);
3070
3157
  checkpointShareJournal(run);
3071
3158
  }
3159
+ run.options.onAuditPathEvent?.({
3160
+ path: relativePath,
3161
+ contentHash: localHash,
3162
+ bytes: size,
3163
+ });
3072
3164
  if (alreadyCurrent) {
3073
3165
  run.emit({ type: "reconciled", path: relativePath, direction: "push" });
3074
3166
  }
@@ -3127,7 +3219,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
3127
3219
  // pass starts over); remote winning adopts it exactly as the
3128
3220
  // pre-flight conflict path would have.
3129
3221
  const latest = await headRemoteFile(run.ctx, relativePath);
3130
- const probe = await probeRemoteForWinner(run, item, latest?.lastModified ?? null);
3222
+ const probe = await probeRemoteForWinner(run, item, latest?.lastModified ?? null, true);
3131
3223
  const decision = probe.decision;
3132
3224
  run.emit({
3133
3225
  type: "conflict",
@@ -3139,10 +3231,18 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
3139
3231
  if (decision?.winner === "local" && latest?.etag) {
3140
3232
  const detectedAt = new Date().toISOString();
3141
3233
  const machineId = readShortMachineId(run.hqRoot);
3234
+ const conflictPath = probe.park(detectedAt, machineId);
3235
+ if (!conflictPath) {
3236
+ // The first PUT was fenced and rejected. Do not retry against the
3237
+ // newer remote until its body has been safely parked.
3238
+ probe.discard();
3239
+ counters.filesSkipped++;
3240
+ return;
3241
+ }
3142
3242
  recordPushConflict(run, item, {
3143
3243
  detectedAt,
3144
3244
  machineId,
3145
- conflictPath: probe.park(detectedAt, machineId),
3245
+ conflictPath,
3146
3246
  remoteHash: normalizeEtag(latest.etag),
3147
3247
  preserved: "remote",
3148
3248
  decision,
@@ -3182,10 +3282,18 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
3182
3282
  // record the hold, and let the next pass start over.
3183
3283
  const detectedAt = new Date().toISOString();
3184
3284
  const machineId = readShortMachineId(run.hqRoot);
3285
+ const conflictPath = probe.park(detectedAt, machineId);
3286
+ if (!conflictPath) {
3287
+ // Without a fresh etag there is no safe conditional retry. Keep
3288
+ // both copies and the journal unchanged until the next pass.
3289
+ probe.discard();
3290
+ counters.filesSkipped++;
3291
+ return;
3292
+ }
3185
3293
  recordPushConflict(run, item, {
3186
3294
  detectedAt,
3187
3295
  machineId,
3188
- conflictPath: probe.park(detectedAt, machineId),
3296
+ conflictPath,
3189
3297
  remoteHash: remoteMeta ? normalizeEtag(remoteMeta.etag) : "",
3190
3298
  preserved: "remote",
3191
3299
  decision,
@@ -3511,7 +3619,7 @@ function isArchivedSessionLog(relativePath, remoteMeta) {
3511
3619
  * either side, probe failure); the caller then falls back to the historical
3512
3620
  * `keep` outcome (adopt the remote). Session-level auth refusals propagate.
3513
3621
  */
3514
- async function probeRemoteForWinner(run, item, remoteMtime) {
3622
+ async function probeRemoteForWinner(run, item, remoteMtime, remoteChangedSinceJournal = false) {
3515
3623
  const probeAbs = buildConflictProbePath(run.hqRoot);
3516
3624
  let parked = false;
3517
3625
  let fetched;
@@ -3565,6 +3673,7 @@ async function probeRemoteForWinner(run, item, remoteMtime) {
3565
3673
  remoteBytes: fs.readFileSync(probeAbs),
3566
3674
  localMtime: localStat.mtime,
3567
3675
  remoteMtime,
3676
+ remoteChangedSinceJournal,
3568
3677
  });
3569
3678
  }
3570
3679
  }
@@ -3762,11 +3871,9 @@ async function adoptRemoteOnPush(run, item, remoteHash, decision, probe) {
3762
3871
  if (adoptErr instanceof JournalCheckpointError)
3763
3872
  throw adoptErr;
3764
3873
  if (adoptErr instanceof WindowsRenameBlockedError) {
3765
- // The local move-aside could not complete because a program is holding
3766
- // the file open. Emit the deliberate skip (never type:"error") so the
3767
- // push stays complete and the one-shot runner exits 0; nothing was moved
3768
- // (localMovedAside is false when the preserve rename threw), so the
3769
- // conflict simply re-fires next pass (Sentry HQ-DESKTOP-54, second path).
3874
+ // The local backup could not be written, so do not adopt the remote body.
3875
+ // Keep the shipped held-open-file behavior: this is a deliberate skip,
3876
+ // not an error that makes the whole company pass fail.
3770
3877
  run.emit({
3771
3878
  type: "skip-rename-blocked",
3772
3879
  path: item.relativePath,
@@ -3871,6 +3978,12 @@ async function executeDeletes(run, deletePlan, decommissionPlan, counters, files
3871
3978
  await deleteRemoteFile(run.ctx, relativePath);
3872
3979
  removeEntry(run.journal, relativePath);
3873
3980
  counters.filesDeleted++;
3981
+ run.options.onAuditPathEvent?.({
3982
+ path: relativePath,
3983
+ ...(entry?.remoteEtag ? { etag: entry.remoteEtag } : {}),
3984
+ bytes: size,
3985
+ deleted: true,
3986
+ });
3874
3987
  run.emit({
3875
3988
  type: "progress",
3876
3989
  path: relativePath,
@@ -3941,9 +4054,9 @@ async function executeDeletes(run, deletePlan, decommissionPlan, counters, files
3941
4054
  }
3942
4055
  for (const relativePath of deletePlan.toTombstone) {
3943
4056
  const localPath = localPathForVaultKey(run.syncRoot, relativePath);
4057
+ const entry = journalRows(run.journal).get(relativePath);
3944
4058
  try {
3945
4059
  const lstat = fs.lstatSync(localPath);
3946
- const entry = journalRows(run.journal).get(relativePath);
3947
4060
  if (lstat.isFile()) {
3948
4061
  const localHash = hashFile(localPath);
3949
4062
  if (entry?.hash && entry.hash !== localHash) {
@@ -3994,6 +4107,12 @@ async function executeDeletes(run, deletePlan, decommissionPlan, counters, files
3994
4107
  }
3995
4108
  removeEntry(run.journal, relativePath);
3996
4109
  counters.filesTombstoned++;
4110
+ run.options.onAuditPathEvent?.({
4111
+ path: relativePath,
4112
+ ...(entry?.remoteEtag ? { etag: entry.remoteEtag } : {}),
4113
+ bytes: 0,
4114
+ deleted: true,
4115
+ });
3997
4116
  run.emit({
3998
4117
  type: "progress",
3999
4118
  path: relativePath,
@@ -5327,7 +5446,7 @@ async function computeDeletePlan(journal, syncRoot, scopeRoots, shouldSync, poli
5327
5446
  // True for a COMPANY-scoped push (personalMode !== true). This distinguishes
5328
5447
  // the canonical knowledge-marker layout from the personal-vault layout; it
5329
5448
  // does not reinterpret ordinary vault-relative path segments.
5330
- companyScoped = true, skipSecretPaths = false) {
5449
+ companyScoped = true, skipSecretPaths = false, excludedPaths = new Set()) {
5331
5450
  const plan = { toDelete: [], toTombstone: [], refusedStale: [] };
5332
5451
  if (scopeRoots.length === 0)
5333
5452
  return plan;
@@ -5369,6 +5488,8 @@ companyScoped = true, skipSecretPaths = false) {
5369
5488
  const scopeRootSet = new Set(scopeRoots);
5370
5489
  const everyRowInScope = scopeRootSet.has("");
5371
5490
  for (const [relativeKey, entry] of journalRows(journal).entries()) {
5491
+ if (excludedPaths.has(relativeKey))
5492
+ continue;
5372
5493
  const inScope = everyRowInScope || isUnderAnyRoot(relativeKey, scopeRootSet);
5373
5494
  if (!inScope)
5374
5495
  continue;