@indigoai-us/hq-cloud 6.15.43 → 6.15.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-company.d.ts +3 -0
- package/dist/bin/sync-runner-company.d.ts.map +1 -1
- package/dist/bin/sync-runner-company.js +2 -2
- package/dist/bin/sync-runner-company.js.map +1 -1
- package/dist/bin/sync-runner-watch-loop.d.ts.map +1 -1
- package/dist/bin/sync-runner-watch-loop.js +33 -1
- package/dist/bin/sync-runner-watch-loop.js.map +1 -1
- package/dist/bin/sync-runner.d.ts +5 -0
- package/dist/bin/sync-runner.d.ts.map +1 -1
- package/dist/bin/sync-runner.js +3 -0
- package/dist/bin/sync-runner.js.map +1 -1
- package/dist/bin/sync-runner.test.js +89 -0
- package/dist/bin/sync-runner.test.js.map +1 -1
- package/dist/cli/share.test.js +3 -0
- package/dist/cli/share.test.js.map +1 -1
- package/dist/cli/sync.test.js +12 -5
- package/dist/cli/sync.test.js.map +1 -1
- package/dist/cli/tombstones.d.ts +23 -8
- package/dist/cli/tombstones.d.ts.map +1 -1
- package/dist/cli/tombstones.js +63 -33
- package/dist/cli/tombstones.js.map +1 -1
- package/dist/cli/tombstones.test.d.ts +2 -0
- package/dist/cli/tombstones.test.d.ts.map +1 -0
- package/dist/cli/tombstones.test.js +27 -0
- package/dist/cli/tombstones.test.js.map +1 -0
- package/dist/cli/watch-event-push-conflict.test.js +7 -0
- package/dist/cli/watch-event-push-conflict.test.js.map +1 -1
- package/dist/watcher.d.ts +23 -3
- package/dist/watcher.d.ts.map +1 -1
- package/dist/watcher.js +98 -12
- package/dist/watcher.js.map +1 -1
- package/dist/watcher.test.js +71 -8
- package/dist/watcher.test.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/sync.test.js
CHANGED
|
@@ -1809,13 +1809,13 @@ describe("sync", () => {
|
|
|
1809
1809
|
const sweptJournal = journalAt(journalPath);
|
|
1810
1810
|
expect(sweptJournal.files[ignoredKey]).toBeDefined();
|
|
1811
1811
|
});
|
|
1812
|
-
it("tombstone lookup failure
|
|
1812
|
+
it("tombstone lookup failure fails closed before a current intent-backed delete can resurrect", async () => {
|
|
1813
1813
|
const key = "docs/watcher-deleted.md";
|
|
1814
1814
|
const localPath = path.join(tmpDir, "companies", "acme", key);
|
|
1815
1815
|
vi.mocked(s3Module.listRemoteFiles).mockResolvedValueOnce([
|
|
1816
1816
|
{ key, size: 42, lastModified: new Date(), etag: '"cur123"' },
|
|
1817
1817
|
]);
|
|
1818
|
-
setupFetchMock({ tombstoneFailure: true });
|
|
1818
|
+
const fetchMock = setupFetchMock({ tombstoneFailure: true });
|
|
1819
1819
|
fs.writeFileSync(journalPath, JSON.stringify({
|
|
1820
1820
|
version: "2",
|
|
1821
1821
|
lastSync: new Date().toISOString(),
|
|
@@ -1837,11 +1837,18 @@ describe("sync", () => {
|
|
|
1837
1837
|
},
|
|
1838
1838
|
pulls: [],
|
|
1839
1839
|
}));
|
|
1840
|
-
|
|
1840
|
+
const log = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
1841
|
+
try {
|
|
1842
|
+
await expect(sync({ company: "acme", vaultConfig: mockConfig, hqRoot: tmpDir })).rejects.toThrow("refusing to sync without delete suppression");
|
|
1843
|
+
expect(log).toHaveBeenCalledWith(expect.stringContaining("WARN tombstone fetch attempt 3/3 failed"));
|
|
1844
|
+
expect(fetchMock.mock.calls.filter((call) => String(call[0]).includes("/v1/files/tombstones"))).toHaveLength(3);
|
|
1845
|
+
}
|
|
1846
|
+
finally {
|
|
1847
|
+
log.mockRestore();
|
|
1848
|
+
}
|
|
1841
1849
|
expect(s3Module.downloadFile).not.toHaveBeenCalledWith(expect.anything(), key, expect.anything(), expect.anything());
|
|
1842
1850
|
expect(fs.existsSync(localPath)).toBe(false);
|
|
1843
|
-
expect(journalAt(journalPath).files[key]
|
|
1844
|
-
?.removedReason).toBe("local-delete");
|
|
1851
|
+
expect(journalAt(journalPath).files[key]?.localDeleteIntent).toBeDefined();
|
|
1845
1852
|
});
|
|
1846
1853
|
it("pull producer: a BULK disappearance is drift-restored, NOT tombstoned (ridge-incident guard in the pull leg)", async () => {
|
|
1847
1854
|
// 12 clean files vanish at once (corrupt mirror / bulk rm / checkout). The
|