bitfab 0.62.7 → 0.63.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.
- package/dist/autoTrace.cjs.map +1 -1
- package/dist/autoTrace.js +2 -2
- package/dist/{chunk-DAHOCXKQ.js → chunk-GNDDPHTZ.js} +24 -7
- package/dist/chunk-GNDDPHTZ.js.map +1 -0
- package/dist/{chunk-S2YDBMPJ.js → chunk-KI2TAU36.js} +8 -8
- package/dist/{chunk-S2YDBMPJ.js.map → chunk-KI2TAU36.js.map} +1 -1
- package/dist/{chunk-BAOIRE5T.js → chunk-MT36GJMW.js} +13 -2
- package/dist/{chunk-BAOIRE5T.js.map → chunk-MT36GJMW.js.map} +1 -1
- package/dist/{chunk-ACULRSMF.js → chunk-NUMYG5MD.js} +5 -5
- package/dist/{chunk-ACULRSMF.js.map → chunk-NUMYG5MD.js.map} +1 -1
- package/dist/{chunk-U6S5C7WE.js → chunk-TTWRFQPU.js} +22 -25
- package/dist/chunk-TTWRFQPU.js.map +1 -0
- package/dist/{chunk-ALEQLDHW.js → chunk-VLBEFEIP.js} +15 -4
- package/dist/chunk-VLBEFEIP.js.map +1 -0
- package/dist/{chunk-K4XCWQBC.js → chunk-YWXQM6J3.js} +2 -2
- package/dist/{http-M63AQ3XH.js → http-EVUZHBV4.js} +2 -2
- package/dist/{http-7Z2B7R4F.js → http-N3TK6ASX.js} +3 -3
- package/dist/index.cjs +34 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -7
- package/dist/index.d.ts +3 -7
- package/dist/index.js +5 -5
- package/dist/node.cjs +34 -27
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +5 -5
- package/dist/{replay-E4YOU476.js → replay-ZH6CNI22.js} +10 -6
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ALEQLDHW.js.map +0 -1
- package/dist/chunk-DAHOCXKQ.js.map +0 -1
- package/dist/chunk-U6S5C7WE.js.map +0 -1
- /package/dist/{chunk-K4XCWQBC.js.map → chunk-YWXQM6J3.js.map} +0 -0
- /package/dist/{http-7Z2B7R4F.js.map → http-EVUZHBV4.js.map} +0 -0
- /package/dist/{http-M63AQ3XH.js.map → http-N3TK6ASX.js.map} +0 -0
- /package/dist/{replay-E4YOU476.js.map → replay-ZH6CNI22.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -697,7 +697,7 @@ declare class HttpClient {
|
|
|
697
697
|
* Start a replay session by fetching historical traces.
|
|
698
698
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
699
699
|
*/
|
|
700
|
-
startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean,
|
|
700
|
+
startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>): Promise<StartReplayResponse>;
|
|
701
701
|
resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
|
|
702
702
|
/**
|
|
703
703
|
* Fetch an external span by ID.
|
|
@@ -2223,11 +2223,7 @@ interface ReplayOptions {
|
|
|
2223
2223
|
* replays nothing.
|
|
2224
2224
|
*/
|
|
2225
2225
|
onlyWithAssertions?: boolean;
|
|
2226
|
-
|
|
2227
|
-
* Judge every approved assertion on each replay as it finishes and save the
|
|
2228
|
-
* verdict as that assertion's agent label. Off unless asked: each judgement
|
|
2229
|
-
* costs model calls.
|
|
2230
|
-
*/
|
|
2226
|
+
skipAssertionJudging?: boolean;
|
|
2231
2227
|
judgeAssertions?: boolean;
|
|
2232
2228
|
/**
|
|
2233
2229
|
* Reshape recorded inputs before they are spread into `fn`.
|
|
@@ -3977,7 +3973,7 @@ interface CommitRef {
|
|
|
3977
3973
|
/**
|
|
3978
3974
|
* SDK version from package.json (injected at build time)
|
|
3979
3975
|
*/
|
|
3980
|
-
declare const __version__ = "0.
|
|
3976
|
+
declare const __version__ = "0.63.0";
|
|
3981
3977
|
|
|
3982
3978
|
/**
|
|
3983
3979
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -697,7 +697,7 @@ declare class HttpClient {
|
|
|
697
697
|
* Start a replay session by fetching historical traces.
|
|
698
698
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
699
699
|
*/
|
|
700
|
-
startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean,
|
|
700
|
+
startReplay(traceFunctionKey: string, limit: number | undefined, traceIds?: string[], name?: string, codeChangeDescription?: string | null, codeChangeFiles?: CodeChangeFile[] | null, includeDbBranchLease?: boolean, experimentGroupId?: string, datasetIds?: string[], graderIds?: string[], dbBranchSettings?: DbBranchSettings, attempts?: number, includeOriginalMetadata?: boolean, onlyWithAssertions?: boolean, skipAssertionJudging?: boolean, experimentalSelectiveReplay?: SelectiveReplayOptions, notes?: string, metadata?: Record<string, string>): Promise<StartReplayResponse>;
|
|
701
701
|
resumeReplay(experimentId: string, traceFunctionKey: string, codeChangeFiles?: CodeChangeFile[] | null, force?: boolean): Promise<ResumeReplayResponse>;
|
|
702
702
|
/**
|
|
703
703
|
* Fetch an external span by ID.
|
|
@@ -2223,11 +2223,7 @@ interface ReplayOptions {
|
|
|
2223
2223
|
* replays nothing.
|
|
2224
2224
|
*/
|
|
2225
2225
|
onlyWithAssertions?: boolean;
|
|
2226
|
-
|
|
2227
|
-
* Judge every approved assertion on each replay as it finishes and save the
|
|
2228
|
-
* verdict as that assertion's agent label. Off unless asked: each judgement
|
|
2229
|
-
* costs model calls.
|
|
2230
|
-
*/
|
|
2226
|
+
skipAssertionJudging?: boolean;
|
|
2231
2227
|
judgeAssertions?: boolean;
|
|
2232
2228
|
/**
|
|
2233
2229
|
* Reshape recorded inputs before they are spread into `fn`.
|
|
@@ -3977,7 +3973,7 @@ interface CommitRef {
|
|
|
3977
3973
|
/**
|
|
3978
3974
|
* SDK version from package.json (injected at build time)
|
|
3979
3975
|
*/
|
|
3980
|
-
declare const __version__ = "0.
|
|
3976
|
+
declare const __version__ = "0.63.0";
|
|
3981
3977
|
|
|
3982
3978
|
/**
|
|
3983
3979
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -36,8 +36,8 @@ import {
|
|
|
36
36
|
getCurrentTrace,
|
|
37
37
|
reseedFromRegistry,
|
|
38
38
|
seedFromRegistry
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-KI2TAU36.js";
|
|
40
|
+
import "./chunk-YWXQM6J3.js";
|
|
41
41
|
import {
|
|
42
42
|
BITFAB_PROGRESS_PREFIX,
|
|
43
43
|
DbBranchReplayError,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
ReplayError,
|
|
46
46
|
reportReplayProgress,
|
|
47
47
|
serializeReplayResult
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-TTWRFQPU.js";
|
|
49
49
|
import {
|
|
50
50
|
BitfabError,
|
|
51
51
|
DEFAULT_SERVICE_URL,
|
|
@@ -53,8 +53,8 @@ import {
|
|
|
53
53
|
MixedTracingError,
|
|
54
54
|
__version__,
|
|
55
55
|
flushTraces
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-NUMYG5MD.js";
|
|
57
|
+
import "./chunk-MT36GJMW.js";
|
|
58
58
|
export {
|
|
59
59
|
AssertionCategoriesClient,
|
|
60
60
|
AssertionGenerationError,
|
package/dist/node.cjs
CHANGED
|
@@ -97,7 +97,7 @@ var __version__, __packageName__;
|
|
|
97
97
|
var init_version_generated = __esm({
|
|
98
98
|
"src/version.generated.ts"() {
|
|
99
99
|
"use strict";
|
|
100
|
-
__version__ = "0.
|
|
100
|
+
__version__ = "0.63.0";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -729,6 +729,16 @@ function warnOnce(key, message) {
|
|
|
729
729
|
warned.add(key);
|
|
730
730
|
warn(message);
|
|
731
731
|
}
|
|
732
|
+
function writeOnce(key, line, write = console.warn) {
|
|
733
|
+
if (warned.has(key)) {
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
warned.add(key);
|
|
737
|
+
try {
|
|
738
|
+
write(line);
|
|
739
|
+
} catch {
|
|
740
|
+
}
|
|
741
|
+
}
|
|
732
742
|
var warned;
|
|
733
743
|
var init_warnOnce = __esm({
|
|
734
744
|
"src/warnOnce.ts"() {
|
|
@@ -2901,7 +2911,7 @@ var init_http = __esm({
|
|
|
2901
2911
|
* Start a replay session by fetching historical traces.
|
|
2902
2912
|
* Blocking call - creates an experiment and returns lightweight item references.
|
|
2903
2913
|
*/
|
|
2904
|
-
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions,
|
|
2914
|
+
async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetIds, graderIds, dbBranchSettings, attempts, includeOriginalMetadata, onlyWithAssertions, skipAssertionJudging, experimentalSelectiveReplay, notes, metadata) {
|
|
2905
2915
|
const payload = { traceFunctionKey };
|
|
2906
2916
|
if (experimentalSelectiveReplay !== void 0) {
|
|
2907
2917
|
payload.experimentalSelectiveReplay = experimentalSelectiveReplay;
|
|
@@ -2956,7 +2966,7 @@ var init_http = __esm({
|
|
|
2956
2966
|
if (onlyWithAssertions) {
|
|
2957
2967
|
payload.onlyWithAssertions = true;
|
|
2958
2968
|
}
|
|
2959
|
-
if (
|
|
2969
|
+
if (skipAssertionJudging !== true) {
|
|
2960
2970
|
payload.judgeAssertions = true;
|
|
2961
2971
|
}
|
|
2962
2972
|
const git = await resolvedGitState();
|
|
@@ -3463,7 +3473,7 @@ async function captureCodeChangeFromGit(cwd, label) {
|
|
|
3463
3473
|
if (!resolved2) {
|
|
3464
3474
|
return null;
|
|
3465
3475
|
}
|
|
3466
|
-
const { base,
|
|
3476
|
+
const { base, against } = resolved2;
|
|
3467
3477
|
const blobBytes = async (ref2, path) => {
|
|
3468
3478
|
const out = await git(root, ["cat-file", "-s", `${ref2}:${path}`]);
|
|
3469
3479
|
const n = out ? Number.parseInt(out.trim(), 10) : Number.NaN;
|
|
@@ -3531,7 +3541,6 @@ async function captureCodeChangeFromGit(cwd, label) {
|
|
|
3531
3541
|
const subject = (await git(root, ["log", "-1", "--format=%s", "HEAD"]))?.trim();
|
|
3532
3542
|
const fileWord = files.length === 1 ? "file" : "files";
|
|
3533
3543
|
const head = label?.trim() || subject || "Working-tree change";
|
|
3534
|
-
const against = fromTrunk ? "vs trunk" : "uncommitted (vs HEAD)";
|
|
3535
3544
|
return {
|
|
3536
3545
|
description: `${head} (${files.length} ${fileWord} changed ${against})`,
|
|
3537
3546
|
files
|
|
@@ -3544,18 +3553,9 @@ async function resolveBase(git, root) {
|
|
|
3544
3553
|
const forced = process.env?.BITFAB_CODE_CHANGE_BASE;
|
|
3545
3554
|
if (forced && await refExists(git, root, forced)) {
|
|
3546
3555
|
const base = (await git(root, ["merge-base", "HEAD", forced]))?.trim() || (await git(root, ["rev-parse", "--verify", forced]))?.trim() || null;
|
|
3547
|
-
return base ? { base,
|
|
3556
|
+
return base ? { base, against: `vs ${forced}` } : null;
|
|
3548
3557
|
}
|
|
3549
|
-
|
|
3550
|
-
if (!await refExists(git, root, candidate)) {
|
|
3551
|
-
continue;
|
|
3552
|
-
}
|
|
3553
|
-
const mb = (await git(root, ["merge-base", "HEAD", candidate]))?.trim();
|
|
3554
|
-
if (mb) {
|
|
3555
|
-
return { base: mb, fromTrunk: true };
|
|
3556
|
-
}
|
|
3557
|
-
}
|
|
3558
|
-
return await refExists(git, root, "HEAD") ? { base: "HEAD", fromTrunk: false } : null;
|
|
3558
|
+
return await refExists(git, root, "HEAD") ? { base: "HEAD", against: "uncommitted (vs HEAD)" } : null;
|
|
3559
3559
|
}
|
|
3560
3560
|
async function refExists(git, root, ref2) {
|
|
3561
3561
|
return await git(root, ["rev-parse", "--verify", `${ref2}^{object}`]) !== null;
|
|
@@ -3589,7 +3589,7 @@ function parseNameStatusZ(raw) {
|
|
|
3589
3589
|
function looksBinary(s) {
|
|
3590
3590
|
return s.slice(0, 8e3).includes(NUL);
|
|
3591
3591
|
}
|
|
3592
|
-
var MAX_FILES, MAX_FILE_BYTES, MAX_TOTAL_BYTES,
|
|
3592
|
+
var MAX_FILES, MAX_FILE_BYTES, MAX_TOTAL_BYTES, NUL;
|
|
3593
3593
|
var init_codeChange = __esm({
|
|
3594
3594
|
"src/codeChange.ts"() {
|
|
3595
3595
|
"use strict";
|
|
@@ -3597,13 +3597,6 @@ var init_codeChange = __esm({
|
|
|
3597
3597
|
MAX_FILES = 60;
|
|
3598
3598
|
MAX_FILE_BYTES = 5e5;
|
|
3599
3599
|
MAX_TOTAL_BYTES = 2e6;
|
|
3600
|
-
TRUNK_CANDIDATES = [
|
|
3601
|
-
"origin/HEAD",
|
|
3602
|
-
"origin/main",
|
|
3603
|
-
"origin/master",
|
|
3604
|
-
"main",
|
|
3605
|
-
"master"
|
|
3606
|
-
];
|
|
3607
3600
|
NUL = String.fromCharCode(0);
|
|
3608
3601
|
}
|
|
3609
3602
|
});
|
|
@@ -4058,13 +4051,15 @@ var replay_exports = {};
|
|
|
4058
4051
|
__export(replay_exports, {
|
|
4059
4052
|
BITFAB_PROGRESS_PREFIX: () => BITFAB_PROGRESS_PREFIX,
|
|
4060
4053
|
DbBranchReplayError: () => DbBranchReplayError,
|
|
4054
|
+
JUDGE_ASSERTIONS_DEPRECATION_WARNING: () => JUDGE_ASSERTIONS_DEPRECATION_WARNING,
|
|
4061
4055
|
ReplayError: () => ReplayError,
|
|
4062
4056
|
deserializeInputs: () => deserializeInputs,
|
|
4063
4057
|
replay: () => replay,
|
|
4064
4058
|
reportReplayProgress: () => reportReplayProgress,
|
|
4065
4059
|
serializeReplayResult: () => serializeReplayResult,
|
|
4066
4060
|
sleepForReplayPersistence: () => sleepForReplayPersistence,
|
|
4067
|
-
waitForReplayPersistence: () => waitForReplayPersistence
|
|
4061
|
+
waitForReplayPersistence: () => waitForReplayPersistence,
|
|
4062
|
+
warnJudgeAssertionsDeprecated: () => warnJudgeAssertionsDeprecated
|
|
4068
4063
|
});
|
|
4069
4064
|
function expandReplayWork(serverItems, attempts) {
|
|
4070
4065
|
return Array.from(
|
|
@@ -4615,7 +4610,17 @@ async function mapWithConcurrency2(tasks, maxConcurrency, onSettled, onStarted,
|
|
|
4615
4610
|
await Promise.all(workers);
|
|
4616
4611
|
return results.slice(0, nextIndex);
|
|
4617
4612
|
}
|
|
4613
|
+
function warnJudgeAssertionsDeprecated(write = console.warn) {
|
|
4614
|
+
writeOnce(
|
|
4615
|
+
"judgeAssertions-deprecated",
|
|
4616
|
+
JUDGE_ASSERTIONS_DEPRECATION_WARNING,
|
|
4617
|
+
write
|
|
4618
|
+
);
|
|
4619
|
+
}
|
|
4618
4620
|
async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, registeredOverrides = []) {
|
|
4621
|
+
if (options?.judgeAssertions !== void 0) {
|
|
4622
|
+
warnJudgeAssertionsDeprecated();
|
|
4623
|
+
}
|
|
4619
4624
|
if (options?.resume !== void 0) {
|
|
4620
4625
|
validateResume(options.resume, options);
|
|
4621
4626
|
} else if (options?.force === true) {
|
|
@@ -4692,7 +4697,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
4692
4697
|
requestedAttempts,
|
|
4693
4698
|
options?.adaptInputs !== void 0,
|
|
4694
4699
|
options?.onlyWithAssertions,
|
|
4695
|
-
options?.judgeAssertions,
|
|
4700
|
+
options?.skipAssertionJudging === true || options?.judgeAssertions === false,
|
|
4696
4701
|
options?.experimentalSelectiveReplay,
|
|
4697
4702
|
options?.notes,
|
|
4698
4703
|
options?.metadata
|
|
@@ -5067,7 +5072,7 @@ async function writeReplayResultFile(result) {
|
|
|
5067
5072
|
}
|
|
5068
5073
|
}
|
|
5069
5074
|
}
|
|
5070
|
-
var REPLAY_PERSISTENCE_TIMEOUT_MS, MAX_REPLAY_ATTEMPTS, RESUME_CONFLICTING_OPTIONS, CARRIED_OVER_ERROR, BITFAB_PROGRESS_PREFIX, ReplayError, DbBranchReplayError;
|
|
5075
|
+
var REPLAY_PERSISTENCE_TIMEOUT_MS, MAX_REPLAY_ATTEMPTS, RESUME_CONFLICTING_OPTIONS, CARRIED_OVER_ERROR, BITFAB_PROGRESS_PREFIX, ReplayError, DbBranchReplayError, JUDGE_ASSERTIONS_DEPRECATION_WARNING;
|
|
5071
5076
|
var init_replay = __esm({
|
|
5072
5077
|
"src/replay.ts"() {
|
|
5073
5078
|
"use strict";
|
|
@@ -5082,6 +5087,7 @@ var init_replay = __esm({
|
|
|
5082
5087
|
init_replayInterrupt();
|
|
5083
5088
|
init_selectiveReplayRuntime();
|
|
5084
5089
|
init_serialize();
|
|
5090
|
+
init_warnOnce();
|
|
5085
5091
|
REPLAY_PERSISTENCE_TIMEOUT_MS = 3e4;
|
|
5086
5092
|
MAX_REPLAY_ATTEMPTS = 100;
|
|
5087
5093
|
RESUME_CONFLICTING_OPTIONS = [
|
|
@@ -5118,6 +5124,7 @@ var init_replay = __esm({
|
|
|
5118
5124
|
this.name = "DbBranchReplayError";
|
|
5119
5125
|
}
|
|
5120
5126
|
};
|
|
5127
|
+
JUDGE_ASSERTIONS_DEPRECATION_WARNING = "Bitfab: judgeAssertions is deprecated. Assertion judging is on by default; pass skipAssertionJudging: true (--skip-assertion-judging) to turn it off.";
|
|
5121
5128
|
}
|
|
5122
5129
|
});
|
|
5123
5130
|
|