@bitfab/sdk 0.64.11 → 0.64.13

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/index.d.cts CHANGED
@@ -1486,6 +1486,7 @@ type ExperimentTotals = {
1486
1486
  errored: number;
1487
1487
  withErrors: number;
1488
1488
  ungradable: number;
1489
+ judging: number;
1489
1490
  skipped: number;
1490
1491
  };
1491
1492
  type ExperimentCategoryTally = {
@@ -3995,7 +3996,7 @@ interface CommitRef {
3995
3996
  /**
3996
3997
  * SDK version from package.json (injected at build time)
3997
3998
  */
3998
- declare const __version__ = "0.64.11";
3999
+ declare const __version__ = "0.64.13";
3999
4000
 
4000
4001
  /**
4001
4002
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -1486,6 +1486,7 @@ type ExperimentTotals = {
1486
1486
  errored: number;
1487
1487
  withErrors: number;
1488
1488
  ungradable: number;
1489
+ judging: number;
1489
1490
  skipped: number;
1490
1491
  };
1491
1492
  type ExperimentCategoryTally = {
@@ -3995,7 +3996,7 @@ interface CommitRef {
3995
3996
  /**
3996
3997
  * SDK version from package.json (injected at build time)
3997
3998
  */
3998
- declare const __version__ = "0.64.11";
3999
+ declare const __version__ = "0.64.13";
3999
4000
 
4000
4001
  /**
4001
4002
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  getCurrentTrace,
28
28
  reseedFromRegistry,
29
29
  seedFromRegistry
30
- } from "./chunk-DOKCUGYF.js";
30
+ } from "./chunk-42RXX24H.js";
31
31
  import "./chunk-YWXQM6J3.js";
32
32
  import {
33
33
  BITFAB_PROGRESS_PREFIX,
@@ -36,7 +36,7 @@ import {
36
36
  ReplayError,
37
37
  reportReplayProgress,
38
38
  serializeReplayResult
39
- } from "./chunk-ZCT6YKKG.js";
39
+ } from "./chunk-QCPTN2U6.js";
40
40
  import {
41
41
  BitfabError,
42
42
  DEFAULT_SERVICE_URL,
@@ -44,7 +44,7 @@ import {
44
44
  MixedTracingError,
45
45
  __version__,
46
46
  flushTraces
47
- } from "./chunk-A6RYFTIX.js";
47
+ } from "./chunk-YOM2DADY.js";
48
48
  import "./chunk-MT36GJMW.js";
49
49
  export {
50
50
  AssertionCategoriesClient,
package/dist/node.cjs CHANGED
@@ -88,7 +88,7 @@ var __version__, __packageName__;
88
88
  var init_version_generated = __esm({
89
89
  "src/version.generated.ts"() {
90
90
  "use strict";
91
- __version__ = "0.64.11";
91
+ __version__ = "0.64.13";
92
92
  __packageName__ = "@bitfab/sdk";
93
93
  }
94
94
  });
@@ -4648,7 +4648,7 @@ async function processItem(httpClient, serverItem, fn, experimentId, mockStrateg
4648
4648
  dbBranchTimings: dbBranchTimings ?? null
4649
4649
  };
4650
4650
  }
4651
- async function waitForReplayPersistence(httpClient, experimentId, replayedTraceIds) {
4651
+ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceIds, replayLabels = {}, warn2 = console.warn) {
4652
4652
  const deferredSettled = await httpClient.settleDeferredWork(
4653
4653
  REPLAY_PERSISTENCE_TIMEOUT_MS
4654
4654
  );
@@ -4681,7 +4681,7 @@ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceI
4681
4681
  return readBackTraceIds;
4682
4682
  }
4683
4683
  const deadline = Date.now() + REPLAY_PERSISTENCE_TIMEOUT_MS;
4684
- let missing = Object.keys(expectedSpanCounts).length;
4684
+ let missing = Object.keys(expectedSpanCounts);
4685
4685
  while (true) {
4686
4686
  const status = await httpClient.getReplayStatus(
4687
4687
  experimentId,
@@ -4691,8 +4691,8 @@ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceI
4691
4691
  Object.assign(readBackTraceIds, ready);
4692
4692
  missing = Object.keys(expectedSpanCounts).filter(
4693
4693
  (traceId) => ready[traceId] === void 0
4694
- ).length;
4695
- if (missing === 0) {
4694
+ );
4695
+ if (missing.length === 0) {
4696
4696
  return readBackTraceIds;
4697
4697
  }
4698
4698
  if (Date.now() >= deadline) {
@@ -4702,10 +4702,19 @@ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceI
4702
4702
  Math.min(100, Math.max(0, deadline - Date.now()))
4703
4703
  );
4704
4704
  }
4705
- const cause = flushed ? "" : " Delivery was also not confirmed before the flush deadline, so the spans likely never reached the server.";
4706
- throw new BitfabError(
4707
- `Replay traces were not fully persisted before the delivery deadline (experiment ${experimentId}, missing ${missing} of ${Object.keys(expectedSpanCounts).length} trace(s)).${cause}`
4708
- );
4705
+ for (const traceId of missing) {
4706
+ warn2(
4707
+ unconfirmedReplayWarning(
4708
+ replayLabels[traceId] ?? traceId,
4709
+ REPLAY_PERSISTENCE_TIMEOUT_MS / 1e3,
4710
+ flushed
4711
+ )
4712
+ );
4713
+ }
4714
+ return readBackTraceIds;
4715
+ }
4716
+ function unconfirmedReplayWarning(label, seconds, flushed) {
4717
+ return `[bitfab] replay ${label} could not confirm all spans reached Bitfab within ${seconds}s. The run continues; Bitfab will show this replay as capture incomplete.${flushed ? "" : " Some spans likely never left this process."}`;
4709
4718
  }
4710
4719
  function sleepForReplayPersistence(ms) {
4711
4720
  return new Promise((resolve) => {
@@ -5108,7 +5117,17 @@ async function runReplaySession(httpClient, fn, session, fullExperimentUrl, maxC
5108
5117
  }
5109
5118
  throwIfInterrupted(interrupted, resultItems, experimentId, fullExperimentUrl);
5110
5119
  const deliveredTraceIds = await preserveReplayFailure(
5111
- () => waitForReplayPersistence(httpClient, experimentId, replayedTraceIds),
5120
+ () => waitForReplayPersistence(
5121
+ httpClient,
5122
+ experimentId,
5123
+ replayedTraceIds,
5124
+ Object.fromEntries(
5125
+ workItems.map(({ serverItem, attempt }, index) => [
5126
+ replayedTraceIds[index],
5127
+ `${serverItem.originalTraceId ?? serverItem.sourceTraceId}#${attempt}`
5128
+ ])
5129
+ )
5130
+ ),
5112
5131
  resultItems,
5113
5132
  experimentId,
5114
5133
  fullExperimentUrl