@indigoai-us/hq-cloud 6.16.78-alpha.0 → 6.16.80-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.
@@ -16,7 +16,7 @@ import { monitorEventLoopDelay } from "node:perf_hooks";
16
16
  import { runRunner, runRunnerWithLoop, resolveDeletePolicy, resolveSkipPersonal, resolveSkipCompanies, selectObjectIOFactory, routeChangeToTarget, buildTargetedPushArgv, resolvePullScope, readPinnedPrefixes, SESSIONS_SCOPE_PREFIX, defaultCollectTelemetry, AUTH_REQUIRED_PASS_EXIT, } from "./sync-runner.js";
17
17
  import { SESSION_LOGS_PUSH_ONLY_PREFIX } from "../sync/pull-scope.js";
18
18
  import { AUTH_WAIT_INITIAL_RECHECK_MS, AUTH_WAIT_RESUME_MESSAGE, AUTH_WAIT_START_MESSAGE, AUTH_WAIT_STEADY_RECHECK_MS, } from "./sync-runner-auth-wait.js";
19
- import { ObjectLockChecksumRequiredError, PresignObjectIO, S3SdkObjectIO, } from "../object-io.js";
19
+ import { PresignObjectIO, S3SdkObjectIO } from "../object-io.js";
20
20
  import { setBandwidthGovernorForTesting } from "../bandwidth.js";
21
21
  import { POST_SYNC_FLAG_KEYS, } from "./sync-runner-post-sync-flags.js";
22
22
  import { FakeClock, TreeWatcher, } from "../watcher.js";
@@ -565,79 +565,6 @@ describe("mid-pass identity refusal", () => {
565
565
  expect(deps.stderr.events().some((e) => e.type === "auth-error")).toBe(false);
566
566
  });
567
567
  });
568
- describe("remote failure contract", () => {
569
- const person = {
570
- uid: "ent_person_remote_failure_contract",
571
- type: "person",
572
- bucketName: "hq-vault-personal-contract",
573
- status: "active",
574
- };
575
- it.each([
576
- [
577
- "terminal 403 refusal",
578
- () => new CognitoRefreshError("session reauth required (403)", true, 403),
579
- 0,
580
- "auth-error",
581
- "quick refresh",
582
- ],
583
- [
584
- "404 route",
585
- () => new VaultNotFoundError("remote route no longer exists (404)"),
586
- PARTIAL_SYNC_EXIT,
587
- "error",
588
- "404",
589
- ],
590
- [
591
- "429 throttle",
592
- () => Object.assign(new Error("remote throttled (429)"), { statusCode: 429 }),
593
- TRANSIENT_NETWORK_EXIT,
594
- "transient-network",
595
- "429",
596
- ],
597
- [
598
- "503 throttle",
599
- () => Object.assign(new Error("remote unavailable (503)"), { statusCode: 503 }),
600
- TRANSIENT_NETWORK_EXIT,
601
- "transient-network",
602
- "503",
603
- ],
604
- [
605
- "Object Lock checksum refusal",
606
- () => new ObjectLockChecksumRequiredError("remote.md", "checksum required"),
607
- PARTIAL_SYNC_EXIT,
608
- "error",
609
- "ObjectLockChecksumRequired",
610
- ],
611
- [
612
- "timeout",
613
- () => Object.assign(new Error("remote timed out"), { name: "TimeoutError" }),
614
- TRANSIENT_NETWORK_EXIT,
615
- "transient-network",
616
- "timed out",
617
- ],
618
- [
619
- "abort",
620
- () => Object.assign(new Error("remote aborted"), { name: "AbortError" }),
621
- TRANSIENT_NETWORK_EXIT,
622
- "transient-network",
623
- "aborted",
624
- ],
625
- ])("keeps the journal stable and records the runner outcome for %s", async (_description, makeFailure, expectedExit, telemetryType, telemetryReason) => {
626
- const before = readJournal(PERSONAL_VAULT_JOURNAL_SLUG);
627
- const deps = makeDeps({
628
- sync: vi.fn().mockRejectedValue(makeFailure()),
629
- createVaultClient: () => makeVaultStub({ listPersons: () => Promise.resolve([person]) }),
630
- });
631
- expect(await runRunner(["--personal"], deps)).toBe(expectedExit);
632
- expect(readJournal(PERSONAL_VAULT_JOURNAL_SLUG).files).toEqual(before.files);
633
- const events = [...deps.stdout.events(), ...deps.stderr.events()];
634
- expect(events.some((event) => event.type === telemetryType)).toBe(true);
635
- expect(`${deps.stdout.raw()}${deps.stderr.raw()}`).toContain(telemetryReason);
636
- if (telemetryType === "transient-network") {
637
- expect(events.some((event) => event.type === "error")).toBe(false);
638
- }
639
- });
640
- });
641
568
  // ---------------------------------------------------------------------------
642
569
  // memberships retry (3x with backoff, then abort)
643
570
  // ---------------------------------------------------------------------------