@indigoai-us/hq-cloud 6.18.106 → 6.18.107

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/cli/sync.js CHANGED
@@ -3019,9 +3019,6 @@ async function executeDownloadExecutor(run, downloadItems, transferConcurrency,
3019
3019
  if (downloadItems.length === 0)
3020
3020
  return;
3021
3021
  await primeObjectTransport(run.ctx, "get", downloadItems.map((d) => d.remoteFile.key));
3022
- // Ordinary and targeted pulls retain the existing 10k crash-recovery cadence.
3023
- // Only a watch chore that supplied the cooperative seam pays for drained
3024
- // units and can return its root lock to queued realtime work.
3025
3022
  if (!run.options.cooperativeCheckpoint) {
3026
3023
  const { errors } = await executeDownloadQueue(run, downloadItems, transferConcurrency, counters, false);
3027
3024
  if (errors.length > 0)
@@ -3220,6 +3217,7 @@ async function downloadOne(run, downloadItem, counters, deferJournalCheckpoint =
3220
3217
  hash = contentHash ?? hashFile(localPath);
3221
3218
  }
3222
3219
  const size = isLocalSymlink ? 0 : (contentSize ?? fs.statSync(localPath).size);
3220
+ const downloadedEtag = downloaded.etag ?? remoteFile.etag;
3223
3221
  const localHashBefore = downloadItem.decisionLog?.localHashBefore ??
3224
3222
  localSnapshotHash(downloadItem.localSnapshot);
3225
3223
  if (!downloadItem.isNew && localHashBefore !== null) {
@@ -3231,7 +3229,7 @@ async function downloadOne(run, downloadItem, counters, deferJournalCheckpoint =
3231
3229
  localHashBefore,
3232
3230
  journalBaseHash: downloadItem.decisionLog?.journalBaseHash ?? journalEntryBefore?.hash ?? null,
3233
3231
  journalBaseEtag: downloadItem.decisionLog?.journalBaseEtag ?? journalEntryBefore?.remoteEtag ?? null,
3234
- remoteEtag: normalizeEtag(remoteFile.etag) || null,
3232
+ remoteEtag: normalizeEtag(downloadedEtag) || null,
3235
3233
  remoteLastModified: remoteFile.lastModified?.toISOString() ?? null,
3236
3234
  localHashAfter: hash,
3237
3235
  backupPath: downloadItem.decisionLog?.backupPath ?? null,
@@ -3239,7 +3237,7 @@ async function downloadOne(run, downloadItem, counters, deferJournalCheckpoint =
3239
3237
  });
3240
3238
  }
3241
3239
  updateEntry(run.journal, remoteFile.key, hash, size, "down", localPath, {
3242
- remoteEtag: remoteFile.etag,
3240
+ remoteEtag: downloadedEtag,
3243
3241
  mtimeMs: localLstat.mtimeMs,
3244
3242
  // Stamped from the lstat already in hand so the next push can skip this
3245
3243
  // file on stat alone. The two conflict-resolution `updateEntry` calls
@@ -3253,6 +3251,8 @@ async function downloadOne(run, downloadItem, counters, deferJournalCheckpoint =
3253
3251
  ? { wireSymlinkTarget: downloaded.symlinkTarget }
3254
3252
  : {}),
3255
3253
  });
3254
+ if (journalEntryBefore !== undefined)
3255
+ persistPullJournal(run);
3256
3256
  const priorEntry = getEntry(run.journal, remoteFile.key);
3257
3257
  const remoteJournalMessage = priorEntry?.message;
3258
3258
  run.emit({