@opengeni/worker-bundle 1.4.2 → 1.4.4

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.
@@ -246,6 +246,12 @@ export declare function collectErrorStrings(value: unknown, seen?: WeakSet<objec
246
246
  */
247
247
  export declare const STATUSLESS_UPSTREAM_CONNECTIVITY_MESSAGE = "unable to connect. is the computer able to access the url?";
248
248
  export declare function isExactStatuslessUpstreamConnectivityMessage(message: string): boolean;
249
+ /**
250
+ * A fetch-layer timeout: the runtime's DOMException `TimeoutError` (message
251
+ * "The operation timed out."), possibly wrapped by SDK/runner `cause` chains.
252
+ * Explicit cancellation (`AbortError`) is deliberately not matched.
253
+ */
254
+ export declare function isTransportTimeoutError(error: unknown): boolean;
249
255
  export declare function isTransientProviderError(error: unknown): boolean;
250
256
  /**
251
257
  * Recognize an exhausted API-key provider quota (a daily or monthly allowance,
@@ -209,6 +209,11 @@ export declare function probeRetainedProcessAtProvider(settings: ActivityService
209
209
  export declare function classifyRetainedProcessPollResult(result: unknown, providerSessionId: number, source?: object): RetainedProcessProbeResult;
210
210
  export declare function reconcileModalProviderCreates(db: ActivityServices["db"], settings: ActivityServices["settings"], observability: ActivityServices["observability"], discover?: typeof findModalProviderCreateReceipt): Promise<void>;
211
211
  export declare function modalOrphanTerminationStillEligible(latest: Awaited<ReturnType<typeof listLiveModalSandboxLeaseAttributions>>, candidate: ModalOrphanSweepTermination): boolean;
212
+ /** Live leases still WARM on an instance the complete listing did not show.
213
+ * A draining lease legitimately loses its box mid-drain (capture, terminate,
214
+ * then cold), and warming has not published a box yet, so only a warm lease
215
+ * whose exact box is gone is a zombie. */
216
+ export declare function countWarmModalLeasesMissingInstance(latest: Awaited<ReturnType<typeof listLiveModalSandboxLeaseAttributions>>, missingInstanceIds: string[]): number;
212
217
  /** Whether no live lease owns the candidate box by exact instance or by its
213
218
  * attribution tags. Unlike termination eligibility this ignores the pending
214
219
  * create postponement: a postponed orphan is still running without a lease. */
@@ -34,7 +34,7 @@ import {
34
34
  warnDrainSnapshotFailure,
35
35
  withFirstPartyTools,
36
36
  workflowIdForSession
37
- } from "./chunk-WVZQJBGD.js";
37
+ } from "./chunk-BICGFGO7.js";
38
38
  import {
39
39
  inspectOpenSandboxKubernetesInventory,
40
40
  recordActiveUserGauges,
@@ -64,7 +64,7 @@ import {
64
64
  recordVerifiedSignupTrialSwitchGauge,
65
65
  recordWorkerDeathRecoveryMetrics,
66
66
  runtimeMetricsHooksForObservability
67
- } from "./chunk-DCQ7XTXW.js";
67
+ } from "./chunk-HVNNCWEU.js";
68
68
  import "./chunk-PZ5AY32C.js";
69
69
 
70
70
  // src/activities/knowledge-indexing.ts
@@ -4767,6 +4767,11 @@ function modalOrphanTerminationStillEligible(latest, candidate) {
4767
4767
  }
4768
4768
  return modalOrphanCandidateStillUnowned(latest, candidate);
4769
4769
  }
4770
+ function countWarmModalLeasesMissingInstance(latest, missingInstanceIds) {
4771
+ return missingInstanceIds.filter(
4772
+ (instanceId) => latest.some((lease) => lease.liveness === "warm" && lease.instanceId === instanceId)
4773
+ ).length;
4774
+ }
4770
4775
  function modalOrphanCandidateStillUnowned(latest, candidate) {
4771
4776
  if (latest.some((lease) => lease.instanceId === candidate.sandboxId)) {
4772
4777
  return false;
@@ -4811,9 +4816,10 @@ async function sweepModalOrphansForConfiguredBackend(settings, db, observability
4811
4816
  unleased: result.inventory.unterminated.filter(
4812
4817
  (candidate) => modalOrphanCandidateStillUnowned(latest, candidate)
4813
4818
  ).length,
4814
- liveLeaseInstancesMissing: result.inventory.missingLiveLeaseInstanceIds.filter(
4815
- (instanceId) => latest.some((lease) => lease.instanceId === instanceId)
4816
- ).length
4819
+ liveLeaseInstancesMissing: countWarmModalLeasesMissingInstance(
4820
+ latest,
4821
+ result.inventory.missingLiveLeaseInstanceIds
4822
+ )
4817
4823
  });
4818
4824
  recordSandboxInventoryProjectionSuccess(observability, "modal_provider");
4819
4825
  } catch (error) {
@@ -8853,4 +8859,4 @@ export {
8853
8859
  createControlActivities,
8854
8860
  createControlActivitiesFromServices
8855
8861
  };
8856
- //# sourceMappingURL=activities-control-AKJZHDTY.js.map
8862
+ //# sourceMappingURL=activities-control-VRFS65FT.js.map