@indigoai-us/hq-cloud 6.16.80-alpha.0 → 6.16.82-alpha.0

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.
@@ -6135,7 +6135,7 @@ describe("runRunnerWithLoop — event-push wiring", () => {
6135
6135
  process.env.HQ_SYNC_PARALLEL_COORDINATOR = previousCoordinator;
6136
6136
  }
6137
6137
  });
6138
- it("acknowledges superseded receiver work and records refused telemetry", async () => {
6138
+ it("keeps all-refused receiver work retryable until its replacement pull is durable", async () => {
6139
6139
  const previousCoordinator = process.env.HQ_SYNC_PARALLEL_COORDINATOR;
6140
6140
  process.env.HQ_SYNC_PARALLEL_COORDINATOR = "1";
6141
6141
  const watcher = makeBatchWatcherStub();
@@ -6189,7 +6189,7 @@ describe("runRunnerWithLoop — event-push wiring", () => {
6189
6189
  events: [event("companies/indigo/superseded.md")],
6190
6190
  signal: new AbortController().signal,
6191
6191
  });
6192
- await expect(superseded).resolves.toBeUndefined();
6192
+ await expect(superseded).rejects.toThrow("targeted pull failed");
6193
6193
  expect(runPass.mock.calls.filter(([argv]) => argv.includes("superseded.md"))).toHaveLength(0);
6194
6194
  expect(stderr.mock.calls.map(([chunk]) => String(chunk)).join("")).toContain('"event":"sync.realtime.timing","schemaVersion":3,"source":"receiver","direction":"pull","outcome":"refused"');
6195
6195
  releaseHeld();
@@ -9912,7 +9912,7 @@ describe("CooperativePassScheduler", () => {
9912
9912
  });
9913
9913
  });
9914
9914
  describe("first-tick realtime yield", () => {
9915
- it("commits a watcher push at the first chore checkpoint within the admission deadline", async () => {
9915
+ it("commits a watcher push at the first chore checkpoint without a wall-clock wait", async () => {
9916
9916
  const previousCoordinator = process.env.HQ_SYNC_PARALLEL_COORDINATOR;
9917
9917
  const previousInterval = process.env.HQ_SYNC_FULL_RECONCILE_MS;
9918
9918
  process.env.HQ_SYNC_PARALLEL_COORDINATOR = "1";
@@ -9988,22 +9988,18 @@ describe("first-tick realtime yield", () => {
9988
9988
  ["/tmp/hq/companies/indigo/note.md", "companies/indigo/note.md"],
9989
9989
  ]),
9990
9990
  });
9991
- await flushLoopMicrotasks(20);
9992
- await new Promise((resolve) => setTimeout(resolve, 20));
9993
- await flushLoopMicrotasks(20);
9994
- const started = Date.now();
9991
+ await new Promise((resolve) => setImmediate(resolve));
9992
+ await flushLoopMicrotasks(40);
9995
9993
  releaseCheckpoint();
9996
- const deadline = started + 200;
9997
- while (Date.now() < deadline) {
9994
+ for (let turn = 0; turn < 200; turn += 1) {
9998
9995
  if (timings.some((record) => record.outcome === "durable") ||
9999
9996
  runPass.mock.calls.some((call) => Array.isArray(call[0]) && call[0].includes("--scope-path"))) {
10000
9997
  break;
10001
9998
  }
10002
- await new Promise((resolve) => setTimeout(resolve, 10));
9999
+ await new Promise((resolve) => setImmediate(resolve));
10003
10000
  await flushLoopMicrotasks(10);
10004
10001
  }
10005
10002
  expect(choreRunning).toBe(true);
10006
- expect(Date.now() - started).toBeLessThan(REALTIME_ADMISSION_DEADLINE_MS);
10007
10003
  expect(runPass.mock.calls.some((call) => Array.isArray(call[0]) && call[0].includes("--scope-path"))).toBe(true);
10008
10004
  expect(timings.some((record) => record.reason === "admission-timeout")).toBe(false);
10009
10005
  if (timings.length > 0) {