@indigoai-us/hq-cloud 6.18.44-alpha.24 → 6.18.44-alpha.26
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.test.js +14 -6
- package/dist/bin/sync-runner.test.js.map +1 -1
- package/dist/cli/reindex.test.js +43 -38
- package/dist/cli/reindex.test.js.map +1 -1
- package/dist/cli/rescue-classify-ordering.test.js +5 -4
- package/dist/cli/rescue-classify-ordering.test.js.map +1 -1
- package/dist/cli/rescue-clone-diagnostics.test.js +3 -2
- package/dist/cli/rescue-clone-diagnostics.test.js.map +1 -1
- package/dist/cli/rescue-clone-network-retry.test.js +8 -9
- package/dist/cli/rescue-clone-network-retry.test.js.map +1 -1
- package/dist/cli/rescue-drift-reconcile.test.js +5 -4
- package/dist/cli/rescue-drift-reconcile.test.js.map +1 -1
- package/dist/cli/rescue-hq-root-guard.test.js +5 -4
- package/dist/cli/rescue-hq-root-guard.test.js.map +1 -1
- package/dist/cli/rescue-journal-reconcile.test.js +6 -5
- package/dist/cli/rescue-journal-reconcile.test.js.map +1 -1
- package/dist/cli/rescue-rsync-preflight.test.js +6 -9
- package/dist/cli/rescue-rsync-preflight.test.js.map +1 -1
- package/dist/cli/rescue-snapshot-copy.test.js +16 -7
- package/dist/cli/rescue-snapshot-copy.test.js.map +1 -1
- package/dist/cli/rescue-snapshot-recovery.test.js +6 -5
- package/dist/cli/rescue-snapshot-recovery.test.js.map +1 -1
- package/dist/cli/rescue-unchanged-delete.test.js +33 -27
- package/dist/cli/rescue-unchanged-delete.test.js.map +1 -1
- package/dist/cli/rescue-windows-test-harness.d.ts +8 -0
- package/dist/cli/rescue-windows-test-harness.d.ts.map +1 -0
- package/dist/cli/rescue-windows-test-harness.js +216 -0
- package/dist/cli/rescue-windows-test-harness.js.map +1 -0
- package/dist/cli/rescue-windows-test-harness.test.d.ts +2 -0
- package/dist/cli/rescue-windows-test-harness.test.d.ts.map +1 -0
- package/dist/cli/rescue-windows-test-harness.test.js +58 -0
- package/dist/cli/rescue-windows-test-harness.test.js.map +1 -0
- package/dist/cli/share.test.js +2 -1
- package/dist/cli/share.test.js.map +1 -1
- package/dist/cli/sync.test.js +1 -1
- package/dist/cli/sync.test.js.map +1 -1
- package/dist/manifest/bench-gate.d.ts +30 -0
- package/dist/manifest/bench-gate.d.ts.map +1 -0
- package/dist/manifest/bench-gate.js +47 -0
- package/dist/manifest/bench-gate.js.map +1 -0
- package/dist/manifest/bench-gate.test.d.ts +2 -0
- package/dist/manifest/bench-gate.test.d.ts.map +1 -0
- package/dist/manifest/bench-gate.test.js +67 -0
- package/dist/manifest/bench-gate.test.js.map +1 -0
- package/dist/manifest/build-manifest.bench.test.js +19 -18
- package/dist/manifest/build-manifest.bench.test.js.map +1 -1
- package/dist/skill-telemetry.test.js +1 -1
- package/dist/skill-telemetry.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -14749,11 +14749,13 @@ describe("readPinnedPrefixes", () => {
|
|
|
14749
14749
|
// ---------------------------------------------------------------------------
|
|
14750
14750
|
describe("runRunnerWithLoop — operation lock", () => {
|
|
14751
14751
|
const HQ = "/tmp/hq-oplock";
|
|
14752
|
-
/** Write a live-holder lock
|
|
14752
|
+
/** Write a live-holder lock for the HQ root into the test state dir.
|
|
14753
|
+
* process.pid stays alive for the test on Linux, macOS and Windows.
|
|
14754
|
+
* pid 1 does not exist on Windows, so the probe treats that lock as stale. */
|
|
14753
14755
|
function writeLiveHolder(command) {
|
|
14754
14756
|
const p = lockPathFor(HQ);
|
|
14755
14757
|
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
14756
|
-
fs.writeFileSync(p, JSON.stringify({ pid:
|
|
14758
|
+
fs.writeFileSync(p, JSON.stringify({ pid: process.pid, command, startedAt: new Date(0).toISOString(), hqRoot: HQ }));
|
|
14757
14759
|
return p;
|
|
14758
14760
|
}
|
|
14759
14761
|
it("one-shot sync refuses immediately (exit 17) with --lock-timeout 0 when another op holds the root", async () => {
|
|
@@ -14782,7 +14784,9 @@ describe("runRunnerWithLoop — operation lock", () => {
|
|
|
14782
14784
|
expect(errs.join("")).toContain("rescue"); // names the holder
|
|
14783
14785
|
// The holder's lock is left intact — we refused, we didn't take it over.
|
|
14784
14786
|
const held = JSON.parse(fs.readFileSync(lp, "utf8"));
|
|
14785
|
-
expect(held.pid).toBe(
|
|
14787
|
+
expect(held.pid).toBe(process.pid);
|
|
14788
|
+
// The test pid is also the runner pid, so the epoch startedAt proves the holder record was not rewritten.
|
|
14789
|
+
expect(held.startedAt).toBe(new Date(0).toISOString());
|
|
14786
14790
|
expect(held.command).toBe("rescue");
|
|
14787
14791
|
});
|
|
14788
14792
|
it("one-shot sync WAITS for a live holder (default), bounded by --lock-timeout, then refuses with exit 17", async () => {
|
|
@@ -14814,14 +14818,16 @@ describe("runRunnerWithLoop — operation lock", () => {
|
|
|
14814
14818
|
expect(errs.join("")).toContain("Waiting for"); // status line emitted once
|
|
14815
14819
|
expect(errs.join("")).toContain("rescue"); // names the holder
|
|
14816
14820
|
const held = JSON.parse(fs.readFileSync(lp, "utf8"));
|
|
14817
|
-
expect(held.pid).toBe(
|
|
14821
|
+
expect(held.pid).toBe(process.pid); // holder untouched
|
|
14822
|
+
// The test pid is also the runner pid, so the epoch startedAt proves the holder record was not rewritten.
|
|
14823
|
+
expect(held.startedAt).toBe(new Date(0).toISOString());
|
|
14818
14824
|
}, 20_000);
|
|
14819
14825
|
it("DEV-1772: one-shot waits out a SHORT-LIVED holder (reindex) then PROCEEDS to sync", async () => {
|
|
14820
14826
|
// The exact reported scenario (feedback_28a1833f / DEV-1772): a frequent
|
|
14821
14827
|
// ~1-min `reindex` briefly holds the lock; the instant-sync one-shot used
|
|
14822
14828
|
// to exit 17 and silently die. Now it WAITS (default) and proceeds the
|
|
14823
14829
|
// moment the short holder releases. We model the short holder with a
|
|
14824
|
-
// foreign live pid (
|
|
14830
|
+
// foreign live pid (this process) whose lock file is removed shortly after, and inject
|
|
14825
14831
|
// runPass so "proceeds → syncs" is observable without the network.
|
|
14826
14832
|
writeLiveHolder("reindex");
|
|
14827
14833
|
const errs = [];
|
|
@@ -14888,7 +14894,9 @@ describe("runRunnerWithLoop — operation lock", () => {
|
|
|
14888
14894
|
expect(errs.join("")).toContain("sync");
|
|
14889
14895
|
// The pre-existing holder lock is untouched.
|
|
14890
14896
|
const held = JSON.parse(fs.readFileSync(lp, "utf8"));
|
|
14891
|
-
expect(held.pid).toBe(
|
|
14897
|
+
expect(held.pid).toBe(process.pid);
|
|
14898
|
+
// The test pid is also the runner pid, so the epoch startedAt proves the holder record was not rewritten.
|
|
14899
|
+
expect(held.startedAt).toBe(new Date(0).toISOString());
|
|
14892
14900
|
expect(held.command).toBe("sync");
|
|
14893
14901
|
});
|
|
14894
14902
|
});
|