@indigoai-us/hq-cloud 6.18.14-alpha.1 → 6.18.14

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 (33) hide show
  1. package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts +2 -0
  2. package/dist/bin/sync-runner-receiver-unresolved-company.test.d.ts.map +1 -0
  3. package/dist/bin/sync-runner-receiver-unresolved-company.test.js +379 -0
  4. package/dist/bin/sync-runner-receiver-unresolved-company.test.js.map +1 -0
  5. package/dist/bin/sync-runner-watch-loop.d.ts +1 -0
  6. package/dist/bin/sync-runner-watch-loop.d.ts.map +1 -1
  7. package/dist/bin/sync-runner-watch-loop.js +55 -27
  8. package/dist/bin/sync-runner-watch-loop.js.map +1 -1
  9. package/dist/cli/sync.d.ts.map +1 -1
  10. package/dist/cli/sync.js +20 -1
  11. package/dist/cli/sync.js.map +1 -1
  12. package/dist/cli/sync.test.js +31 -0
  13. package/dist/cli/sync.test.js.map +1 -1
  14. package/dist/object-io.d.ts.map +1 -1
  15. package/dist/object-io.js +10 -0
  16. package/dist/object-io.js.map +1 -1
  17. package/dist/object-io.test.js +28 -1
  18. package/dist/object-io.test.js.map +1 -1
  19. package/dist/sync/event-sync.d.ts +0 -2
  20. package/dist/sync/event-sync.d.ts.map +1 -1
  21. package/dist/sync/event-sync.js +0 -11
  22. package/dist/sync/event-sync.js.map +1 -1
  23. package/dist/sync/event-sync.test.js +0 -103
  24. package/dist/sync/event-sync.test.js.map +1 -1
  25. package/dist/sync/push-receiver.d.ts +5 -0
  26. package/dist/sync/push-receiver.d.ts.map +1 -1
  27. package/dist/sync/push-receiver.js +25 -10
  28. package/dist/sync/push-receiver.js.map +1 -1
  29. package/dist/sync-core.d.ts +7 -0
  30. package/dist/sync-core.d.ts.map +1 -1
  31. package/dist/sync-core.js +12 -0
  32. package/dist/sync-core.js.map +1 -1
  33. package/package.json +1 -1
@@ -2082,6 +2082,37 @@ describe("sync", () => {
2082
2082
  expect(result.filesDownloaded).toBe(0);
2083
2083
  expect(getEntry(readJournal("acme"), vanishedKey)).toBeUndefined();
2084
2084
  });
2085
+ it("a listed object gone at GET (NotFound / FILES_PRESIGN_NOT_FOUND) is a deliberate skip (never type:error) and is left unjournaled", async () => {
2086
+ // Short-lived runner/smoke files are listed then deleted before the GET
2087
+ // presign. object-io throws name:"NotFound" (not a generic "presign get
2088
+ // denied" Error). downloadOne must skip it — NOT a non-diagnostic
2089
+ // type:"error" — so the run settles complete and the key stays
2090
+ // unjournaled for a later pass.
2091
+ const vanishedKey = "projects/hq-onboarding-experience/runner/state/mac/mac-google-check-marketer-2.json";
2092
+ vi.mocked(s3Module.listRemoteFiles).mockResolvedValueOnce([
2093
+ { key: vanishedKey, size: 128, lastModified: new Date(), etag: '"pending"' },
2094
+ ]);
2095
+ vi.mocked(s3Module.downloadFile).mockRejectedValueOnce(Object.assign(new Error(`Not found: ${vanishedKey}`), { name: "NotFound" }));
2096
+ const events = [];
2097
+ const result = await sync({
2098
+ company: "acme",
2099
+ vaultConfig: mockConfig,
2100
+ hqRoot: tmpDir,
2101
+ skipReindex: true,
2102
+ onEvent: (e) => events.push(e),
2103
+ });
2104
+ const skip = events.find((e) => e.type === "skip-vanished-remote");
2105
+ expect(skip).toMatchObject({
2106
+ type: "skip-vanished-remote",
2107
+ path: vanishedKey,
2108
+ });
2109
+ expect(skip.message).toMatch(/listed object not found \(skipped; will reconcile next pass\)/);
2110
+ expect(events.some((e) => e.type === "error" && e.diagnostic !== true)).toBe(false);
2111
+ expect(events.some((e) => e.type === "error")).toBe(false);
2112
+ expect(result.filesSkipped).toBeGreaterThanOrEqual(1);
2113
+ expect(result.filesDownloaded).toBe(0);
2114
+ expect(getEntry(readJournal("acme"), vanishedKey)).toBeUndefined();
2115
+ });
2085
2116
  it("a 403 GET error still surfaces as type:error — only a vanished remote is downgraded", async () => {
2086
2117
  vi.mocked(s3Module.listRemoteFiles).mockResolvedValueOnce([
2087
2118
  { key: "docs/secret.md", size: 10, lastModified: new Date(), etag: '"x"' },