@kitman-sh/cli 0.13.17 → 0.13.19
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/{chunk-80f0p6s7.js → chunk-0n46rkk9.js} +307 -276
- package/dist/{chunk-g7ysb6ca.js → chunk-12afnp8q.js} +18 -18
- package/dist/{chunk-8nzsyz74.js → chunk-2bds7yc8.js} +1 -1
- package/dist/{chunk-b5edh1jq.js → chunk-40ee20qs.js} +28 -28
- package/dist/{chunk-efyrm6bv.js → chunk-4yg6da62.js} +1 -1
- package/dist/{chunk-67xn3yer.js → chunk-590h6emd.js} +7 -7
- package/dist/{chunk-pbmadbfm.js → chunk-5f80t96q.js} +11 -5
- package/dist/{chunk-cbf0q15q.js → chunk-82w8rmkc.js} +60 -14
- package/dist/{chunk-0vv8cbye.js → chunk-9964wmp9.js} +21 -21
- package/dist/{chunk-q4ra17vf.js → chunk-9krvh1na.js} +3 -3
- package/dist/{chunk-4yca7e7x.js → chunk-d917m1ak.js} +198 -59
- package/dist/{chunk-1cr225aq.js → chunk-f86q3a6s.js} +5 -5
- package/dist/{chunk-ahvpwkyk.js → chunk-fc2bhh5v.js} +2 -2
- package/dist/{chunk-24h0y27w.js → chunk-gq7y5v3e.js} +1 -1
- package/dist/{chunk-mmd7mjv0.js → chunk-gy9rf14f.js} +3 -3
- package/dist/{chunk-x20t7xy8.js → chunk-nf9gdnsf.js} +17 -17
- package/dist/{chunk-pxvd8w2v.js → chunk-q5w3v4k1.js} +1 -1
- package/dist/{chunk-gasqek3p.js → chunk-s4pejxc8.js} +6 -6
- package/dist/{chunk-zcpnmgwb.js → chunk-xjmfnqh9.js} +7 -7
- package/dist/{chunk-syhs23yk.js → chunk-xt6db7sf.js} +7 -7
- package/dist/{chunk-ggmwpwhf.js → chunk-y1krmnbv.js} +2 -2
- package/dist/{chunk-pvsg1ppc.js → chunk-yh7twvn9.js} +4 -4
- package/dist/{chunk-pjq9bf3w.js → chunk-ysz1v2cq.js} +4 -4
- package/dist/{chunk-643pxp2k.js → chunk-zfqn6dc1.js} +4 -4
- package/dist/{chunk-zgraq2y3.js → chunk-zw3gf6r5.js} +28 -70
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
isFailure2,
|
|
42
42
|
hasInterrupts,
|
|
43
43
|
makeUnsafe5,
|
|
44
|
-
|
|
44
|
+
make16,
|
|
45
45
|
_await,
|
|
46
46
|
fail5,
|
|
47
47
|
isDoneUnsafe,
|
|
@@ -168,12 +168,12 @@ import {
|
|
|
168
168
|
decodeJsonStringSync,
|
|
169
169
|
encodeUnknownJsonStringSync,
|
|
170
170
|
storable
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-zw3gf6r5.js";
|
|
172
172
|
import {
|
|
173
173
|
Id,
|
|
174
174
|
secretReference,
|
|
175
175
|
secretPlaceholder
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-q5w3v4k1.js";
|
|
177
177
|
import {
|
|
178
178
|
currentTimeMillis,
|
|
179
179
|
SecureRandom,
|
|
@@ -196,10 +196,14 @@ import {
|
|
|
196
196
|
programNetworkHosts,
|
|
197
197
|
canonicalSha256,
|
|
198
198
|
tokensSpent,
|
|
199
|
-
reportedModelName,
|
|
200
199
|
isTestReportName,
|
|
200
|
+
testDigest,
|
|
201
201
|
failedTestOfLine,
|
|
202
|
+
printedNotReported,
|
|
203
|
+
failedTestsOf,
|
|
204
|
+
testOutcomes,
|
|
202
205
|
checkTests,
|
|
206
|
+
reportedModelName,
|
|
203
207
|
MeasureSample,
|
|
204
208
|
catchUpPathLimit,
|
|
205
209
|
createId,
|
|
@@ -248,8 +252,9 @@ import {
|
|
|
248
252
|
assertHerdrRunnerCapability2,
|
|
249
253
|
installCommand,
|
|
250
254
|
checkServicesFile,
|
|
251
|
-
checkServices
|
|
252
|
-
|
|
255
|
+
checkServices,
|
|
256
|
+
serviceChecks
|
|
257
|
+
} from "./chunk-0n46rkk9.js";
|
|
253
258
|
import {
|
|
254
259
|
join,
|
|
255
260
|
interrupt,
|
|
@@ -258,7 +263,7 @@ import {
|
|
|
258
263
|
unbounded2,
|
|
259
264
|
offer,
|
|
260
265
|
makeUnsafe3,
|
|
261
|
-
|
|
266
|
+
make11,
|
|
262
267
|
fromQueue,
|
|
263
268
|
fromPubSub,
|
|
264
269
|
map2,
|
|
@@ -292,7 +297,7 @@ import {
|
|
|
292
297
|
writeSrtSettings2,
|
|
293
298
|
srtStepArgv2,
|
|
294
299
|
srtArgv2
|
|
295
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-nf9gdnsf.js";
|
|
296
301
|
import {
|
|
297
302
|
writeAgentEnvironmentConfigFile2,
|
|
298
303
|
readManifestSkillPaths2,
|
|
@@ -308,8 +313,8 @@ import {
|
|
|
308
313
|
applyAgentEnvironmentMaterialization2,
|
|
309
314
|
isPathWithin2,
|
|
310
315
|
skillIdentity2
|
|
311
|
-
} from "./chunk-
|
|
312
|
-
import"./chunk-
|
|
316
|
+
} from "./chunk-yh7twvn9.js";
|
|
317
|
+
import"./chunk-9krvh1na.js";
|
|
313
318
|
import {
|
|
314
319
|
egressAllowed,
|
|
315
320
|
writeSecretRegistry,
|
|
@@ -319,7 +324,7 @@ import {
|
|
|
319
324
|
secretFilter2,
|
|
320
325
|
opaqueTunnelRefusal2,
|
|
321
326
|
isOpaqueConnectReason2
|
|
322
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-y1krmnbv.js";
|
|
323
328
|
import {
|
|
324
329
|
sliceBytes2,
|
|
325
330
|
maxLineBytes2,
|
|
@@ -327,23 +332,23 @@ import {
|
|
|
327
332
|
decodedOption2,
|
|
328
333
|
decoded2,
|
|
329
334
|
readOpencode2
|
|
330
|
-
} from "./chunk-
|
|
335
|
+
} from "./chunk-590h6emd.js";
|
|
331
336
|
import {
|
|
332
337
|
uploadRunFile,
|
|
333
338
|
programLease,
|
|
334
339
|
rpcRunFiles,
|
|
335
340
|
programHostsEnv,
|
|
336
341
|
undeclaredHostsEnv
|
|
337
|
-
} from "./chunk-
|
|
338
|
-
import"./chunk-
|
|
342
|
+
} from "./chunk-5f80t96q.js";
|
|
343
|
+
import"./chunk-xjmfnqh9.js";
|
|
339
344
|
import {
|
|
340
345
|
nextInt
|
|
341
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-gq7y5v3e.js";
|
|
342
347
|
import {
|
|
343
348
|
ChildProcessSpawner,
|
|
344
|
-
|
|
345
|
-
} from "./chunk-
|
|
346
|
-
import"./chunk-
|
|
349
|
+
make3
|
|
350
|
+
} from "./chunk-82w8rmkc.js";
|
|
351
|
+
import"./chunk-f86q3a6s.js";
|
|
347
352
|
|
|
348
353
|
// packages/core/src/sync-kit.ts
|
|
349
354
|
import { createHash } from "crypto";
|
|
@@ -7085,7 +7090,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
|
|
|
7085
7090
|
const input = yield* unbounded2();
|
|
7086
7091
|
const pending = new Map;
|
|
7087
7092
|
let lastId = 0;
|
|
7088
|
-
const handle = yield* spawner.spawn(
|
|
7093
|
+
const handle = yield* spawner.spawn(make3(binary, ["app-server"], {
|
|
7089
7094
|
cwd: env.home,
|
|
7090
7095
|
extendEnv: true,
|
|
7091
7096
|
env: { HOME: env.home, CODEX_HOME: env.codexHome },
|
|
@@ -7108,7 +7113,7 @@ var codexAppServer = (binary = "codex") => (env) => gen(function* () {
|
|
|
7108
7113
|
return {
|
|
7109
7114
|
request: (method, params) => gen(function* () {
|
|
7110
7115
|
const id = ++lastId;
|
|
7111
|
-
const deferred = yield*
|
|
7116
|
+
const deferred = yield* make16();
|
|
7112
7117
|
pending.set(id, deferred);
|
|
7113
7118
|
yield* send({ id, method, params });
|
|
7114
7119
|
return yield* _await(deferred).pipe(mapError2((error) => new CodexAppServerFailed({ reason: `${method}: ${error.message}` })));
|
|
@@ -7248,10 +7253,10 @@ var handshake = [
|
|
|
7248
7253
|
`).join("");
|
|
7249
7254
|
var kitmanMcpPreflight = (mcp) => gen(function* () {
|
|
7250
7255
|
const spawner = yield* ChildProcessSpawner;
|
|
7251
|
-
const server = yield* spawner.spawn(
|
|
7256
|
+
const server = yield* spawner.spawn(make3(mcp.command, [...mcp.args], {
|
|
7252
7257
|
extendEnv: true,
|
|
7253
7258
|
env: mcp.env,
|
|
7254
|
-
stdin: { stream:
|
|
7259
|
+
stdin: { stream: make11(new TextEncoder().encode(handshake)), endOnDone: false },
|
|
7255
7260
|
stderr: "ignore"
|
|
7256
7261
|
}));
|
|
7257
7262
|
const reply = yield* server.stdout.pipe(decodeText, splitLines, map2((line) => getOrUndefined(decodeJsonStringOption(line))), filter((message) => isJsonObject(message) && message.id === 2), runHead);
|
|
@@ -7324,8 +7329,8 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
|
|
|
7324
7329
|
};
|
|
7325
7330
|
const exitCode = sandbox === undefined ? yield* gen(function* () {
|
|
7326
7331
|
const spawner = yield* ChildProcessSpawner;
|
|
7327
|
-
const handle = yield* spawner.spawn(
|
|
7328
|
-
stdin:
|
|
7332
|
+
const handle = yield* spawner.spawn(make3(input.bun ?? process.execPath, [file], {
|
|
7333
|
+
stdin: make11(new TextEncoder().encode(stdin)),
|
|
7329
7334
|
stdout: "inherit",
|
|
7330
7335
|
stderr: "inherit",
|
|
7331
7336
|
extendEnv: false,
|
|
@@ -7693,8 +7698,8 @@ var checkedTests = (filesDir, printed) => gen(function* () {
|
|
|
7693
7698
|
const path = yield* Path;
|
|
7694
7699
|
const names = (yield* regularFiles(filesDir)).filter(isTestReportName);
|
|
7695
7700
|
const reports = yield* forEach(names, (name) => fs.readFileString(path.join(filesDir, name)).pipe(map8((text) => [text]), orElseSucceed(() => [])));
|
|
7696
|
-
return checkTests(reports.flat(), printed);
|
|
7697
|
-
}).pipe(orElseSucceed(() => checkTests([], printed)));
|
|
7701
|
+
return { tests: checkTests(reports.flat(), printed), statuses: testOutcomes(reports.flat()) };
|
|
7702
|
+
}).pipe(orElseSucceed(() => ({ tests: checkTests([], printed), statuses: testOutcomes([]) })));
|
|
7698
7703
|
|
|
7699
7704
|
class ServicesUnavailable extends TaggedError("ServicesUnavailable") {
|
|
7700
7705
|
get message() {
|
|
@@ -7890,34 +7895,39 @@ var printedFailures = (output) => gen(function* () {
|
|
|
7890
7895
|
const fs = yield* FileSystem;
|
|
7891
7896
|
return yield* fs.stream(output).pipe(decodeText, splitLines, map2(failedTestOfLine), filter((name) => name !== undefined), take2(failingLinesRead), runCollect);
|
|
7892
7897
|
}).pipe(orElseSucceed(() => []));
|
|
7893
|
-
var
|
|
7894
|
-
const path = yield* Path;
|
|
7895
|
-
const due = checks.filter((check) => !known.some((entry) => entry.tree === tree && entry.name === check.name && entry.command === check.command));
|
|
7896
|
-
if (due.length === 0)
|
|
7897
|
-
return [];
|
|
7898
|
-
yield* installIn(worktree, run);
|
|
7898
|
+
var startedCheckPostgres = (worktree, services, run) => gen(function* () {
|
|
7899
7899
|
const started = yield* checkoutPostgres(worktree, services);
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7900
|
+
return started === undefined ? undefined : yield* reachCheckPostgres(started, services, worktree, run);
|
|
7901
|
+
});
|
|
7902
|
+
var checksOnServices = (worktree) => gen(function* () {
|
|
7903
|
+
const fs = yield* FileSystem;
|
|
7904
|
+
const path = yield* Path;
|
|
7905
|
+
const file = path.join(worktree, checkServicesFile);
|
|
7906
|
+
return serviceChecks((yield* fs.exists(file)) ? yield* fs.readFileString(file) : undefined);
|
|
7907
|
+
}).pipe(orElseSucceed(() => []));
|
|
7908
|
+
var runCheck = (worktree, check, run, keeper, services, postgres) => gen(function* () {
|
|
7909
|
+
const fs = yield* FileSystem;
|
|
7910
|
+
const path = yield* Path;
|
|
7911
|
+
const startedAt = yield* currentTimeMillis;
|
|
7912
|
+
const filesDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-check-files-" });
|
|
7913
|
+
const output = path.join(yield* tempDirectoryScoped(fs, { prefix: "kitman-check-output-" }), "output");
|
|
7914
|
+
const sink = yield* fs.open(output, { flag: "w" });
|
|
7915
|
+
const docker = check.pipeline === true ? yield* pipelineDaemon(services, check.name) : undefined;
|
|
7916
|
+
const ran = yield* run({
|
|
7917
|
+
command: check.command,
|
|
7918
|
+
cwd: path.join(worktree, check.workingDirectory ?? "."),
|
|
7919
|
+
filesDir,
|
|
7920
|
+
...postgres === undefined ? undefined : { postgres },
|
|
7921
|
+
...docker === undefined ? undefined : { docker },
|
|
7922
|
+
onOutput: (chunk) => sink.writeAll(chunk)
|
|
7923
|
+
});
|
|
7924
|
+
const durationMs = (yield* currentTimeMillis) - startedAt;
|
|
7925
|
+
const printed = ran.exitCode === 0 ? [] : yield* printedFailures(output);
|
|
7926
|
+
const { tests: checked, statuses } = yield* checkedTests(filesDir, printed);
|
|
7927
|
+
const { failedTests, ...tests } = checked;
|
|
7928
|
+
const fileIds = keeper === undefined ? undefined : yield* keeper.keep({ check: check.name, prefix: keeper.prefix, output, filesDir });
|
|
7929
|
+
return {
|
|
7930
|
+
evidence: {
|
|
7921
7931
|
name: check.name,
|
|
7922
7932
|
command: check.command,
|
|
7923
7933
|
status: ran.exitCode === 0 ? "passed" : "failed",
|
|
@@ -7926,9 +7936,109 @@ var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(fu
|
|
|
7926
7936
|
outputTail: redactedOutputTail(ran.output),
|
|
7927
7937
|
...fileIds === undefined ? undefined : { fileIds },
|
|
7928
7938
|
tests: { ...tests, ...ran.exitCode === 0 || failedTests === undefined ? undefined : { failedTests } }
|
|
7929
|
-
}
|
|
7930
|
-
|
|
7931
|
-
|
|
7939
|
+
},
|
|
7940
|
+
statuses,
|
|
7941
|
+
printed,
|
|
7942
|
+
onPostgres: postgres !== undefined
|
|
7943
|
+
};
|
|
7944
|
+
}).pipe(scoped);
|
|
7945
|
+
var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(function* () {
|
|
7946
|
+
const due = checks.filter((check) => !known.some((entry) => entry.tree === tree && entry.name === check.name && entry.command === check.command));
|
|
7947
|
+
if (due.length === 0)
|
|
7948
|
+
return [];
|
|
7949
|
+
yield* installIn(worktree, run);
|
|
7950
|
+
const postgres = yield* startedCheckPostgres(worktree, services, run);
|
|
7951
|
+
return yield* forEach(due, (check) => runCheck(worktree, check, run, keeper, services, postgres));
|
|
7952
|
+
});
|
|
7953
|
+
var maxCheckFileIds = 51;
|
|
7954
|
+
var maxRanDigests = 1e5;
|
|
7955
|
+
var withStatus = (statuses, status) => [...statuses].flatMap(([id, is]) => is === status ? [id] : []);
|
|
7956
|
+
var failuresOf = (ran) => {
|
|
7957
|
+
const reported = withStatus(ran.statuses, "failed");
|
|
7958
|
+
return { reported, printed: printedNotReported(reported, ran.printed) };
|
|
7959
|
+
};
|
|
7960
|
+
var hasNone = (failures) => failures.reported.length === 0 && failures.printed.length === 0;
|
|
7961
|
+
var without = (failures, taken) => {
|
|
7962
|
+
const reported = new Set(taken.reported);
|
|
7963
|
+
const printed = new Set(taken.printed);
|
|
7964
|
+
return {
|
|
7965
|
+
reported: failures.reported.filter((id) => !reported.has(id)),
|
|
7966
|
+
printed: failures.printed.filter((name) => !printed.has(name))
|
|
7967
|
+
};
|
|
7968
|
+
};
|
|
7969
|
+
var passedIn = (ran, failures) => {
|
|
7970
|
+
const passed = withStatus(ran.statuses, "passed");
|
|
7971
|
+
const unmatched = new Set(printedNotReported(passed, failures.printed));
|
|
7972
|
+
const passedUnreported = ran.statuses.size === 0 && ran.evidence.status === "passed";
|
|
7973
|
+
return {
|
|
7974
|
+
reported: failures.reported.filter((id) => ran.statuses.get(id) === "passed"),
|
|
7975
|
+
printed: failures.printed.filter((name) => passedUnreported || !unmatched.has(name))
|
|
7976
|
+
};
|
|
7977
|
+
};
|
|
7978
|
+
var passedAtBaseline = (head, baseline) => {
|
|
7979
|
+
const failures = failuresOf(head);
|
|
7980
|
+
return hasNone(failures) ? baseline.evidence.status === "passed" : hasNone(without(failures, passedIn(baseline, failures)));
|
|
7981
|
+
};
|
|
7982
|
+
var failedOnlyIn = (again, first) => {
|
|
7983
|
+
const failed = failuresOf(again);
|
|
7984
|
+
const printedFirst = (id) => printedNotReported([id], first.printed).length < first.printed.length;
|
|
7985
|
+
return without({
|
|
7986
|
+
reported: failed.reported.filter((id) => !printedFirst(id)),
|
|
7987
|
+
printed: printedNotReported(first.reported, failed.printed)
|
|
7988
|
+
}, first);
|
|
7989
|
+
};
|
|
7990
|
+
var named = (failures) => failedTestsOf(failures.reported, failures.printed);
|
|
7991
|
+
var bothFileIds = (shown, other) => {
|
|
7992
|
+
const fileIds = [...shown.fileIds ?? [], ...other.fileIds ?? []].slice(0, maxCheckFileIds);
|
|
7993
|
+
return fileIds.length === 0 ? undefined : { fileIds };
|
|
7994
|
+
};
|
|
7995
|
+
var judged = (evidence) => ({
|
|
7996
|
+
...evidence,
|
|
7997
|
+
tests: { ...evidence.tests, environmentJudged: true }
|
|
7998
|
+
});
|
|
7999
|
+
var afterFreshService = (first, again) => {
|
|
8000
|
+
const failures = failuresOf(first);
|
|
8001
|
+
const cleared = passedIn(again, failures);
|
|
8002
|
+
const remaining = without(failures, cleared);
|
|
8003
|
+
const newlyFailed = failedOnlyIn(again, failures);
|
|
8004
|
+
const passedBefore = passedIn(first, newlyFailed);
|
|
8005
|
+
const charged = without(newlyFailed, passedBefore);
|
|
8006
|
+
const againPassed = again.evidence.status === "passed";
|
|
8007
|
+
const recovered = hasNone(remaining) && hasNone(charged) && (againPassed || !hasNone(failures) && !hasNone(newlyFailed));
|
|
8008
|
+
if (!recovered && hasNone(cleared))
|
|
8009
|
+
return { ...judged(first.evidence), ...bothFileIds(first.evidence, again.evidence) };
|
|
8010
|
+
const ranFirst = new Set(first.evidence.tests.ranDigests);
|
|
8011
|
+
const skippedTests = again.evidence.tests.skippedTests.filter((id) => !ranFirst.has(testDigest(id)));
|
|
8012
|
+
const { failedTests: _failedAgain, ...againTests } = again.evidence.tests;
|
|
8013
|
+
const failedTests = recovered ? [] : named({
|
|
8014
|
+
reported: [...remaining.reported, ...charged.reported],
|
|
8015
|
+
printed: [...remaining.printed, ...charged.printed]
|
|
8016
|
+
});
|
|
8017
|
+
const clearedNames = named(cleared);
|
|
8018
|
+
const retryFailedTests = named(passedBefore);
|
|
8019
|
+
const { exitCode: _exitCode, ...againEvidence } = again.evidence;
|
|
8020
|
+
return {
|
|
8021
|
+
...againEvidence,
|
|
8022
|
+
status: recovered ? "passed" : "failed",
|
|
8023
|
+
...again.evidence.exitCode === undefined || recovered && !againPassed ? undefined : { exitCode: again.evidence.exitCode },
|
|
8024
|
+
durationMs: first.evidence.durationMs + again.evidence.durationMs,
|
|
8025
|
+
...bothFileIds(again.evidence, first.evidence),
|
|
8026
|
+
tests: {
|
|
8027
|
+
...againTests,
|
|
8028
|
+
skipped: againTests.skipped - (againTests.skippedTests.length - skippedTests.length),
|
|
8029
|
+
skippedTests,
|
|
8030
|
+
ranDigests: [...new Set([...againTests.ranDigests, ...first.evidence.tests.ranDigests])].sort().slice(0, maxRanDigests),
|
|
8031
|
+
...failedTests.length === 0 ? undefined : { failedTests },
|
|
8032
|
+
environmentFailure: {
|
|
8033
|
+
...clearedNames.length === 0 ? undefined : { failedTests: clearedNames },
|
|
8034
|
+
...first.evidence.exitCode === undefined ? undefined : { exitCode: first.evidence.exitCode },
|
|
8035
|
+
outputTail: first.evidence.outputTail,
|
|
8036
|
+
...retryFailedTests.length === 0 ? undefined : { retryFailedTests }
|
|
8037
|
+
},
|
|
8038
|
+
environmentJudged: true
|
|
8039
|
+
}
|
|
8040
|
+
};
|
|
8041
|
+
};
|
|
7932
8042
|
var timesMarker = "__kitman_times__";
|
|
7933
8043
|
var rssMarker = "__kitman_peak_rss_kb__";
|
|
7934
8044
|
var quoted = (text) => `'${text.replaceAll("'", `'\\''`)}'`;
|
|
@@ -8121,12 +8231,40 @@ var verificationExecutor = (input) => (work) => gen(function* () {
|
|
|
8121
8231
|
docker: input.docker,
|
|
8122
8232
|
network: daemonNetwork
|
|
8123
8233
|
});
|
|
8124
|
-
const
|
|
8234
|
+
const onServices = yield* checksOnServices(head);
|
|
8235
|
+
const usesServices = (check) => work.checks.some((entry) => entry.name === check.name && entry.command === check.command && entry.pipeline !== true && onServices.includes(entry.name));
|
|
8236
|
+
const comparable = headTree !== baselineTree;
|
|
8237
|
+
const headKnown = known.filter((entry) => !(comparable && entry.tree === headTree && entry.unjudgedFailure === true && usesServices(entry)));
|
|
8238
|
+
const firstHead = yield* runChecks(head, work.checks, headTree, headKnown, runIn(head), keeper(""), services(work.id)).pipe(scoped);
|
|
8239
|
+
const failedOnPostgres = firstHead.filter((ran) => ran.evidence.status === "failed" && ran.onPostgres && usesServices(ran.evidence));
|
|
8240
|
+
const sameCheck = (a) => (b) => a.name === b.name && a.command === b.command;
|
|
8241
|
+
const rejudged = (entry) => entry.tree === baselineTree && failedOnPostgres.some((ran) => sameCheck(ran.evidence)(entry));
|
|
8242
|
+
const baselineRan = comparable ? yield* runChecks(baseline, work.checks.filter((check) => check.pipeline !== true), baselineTree, known.filter((entry) => !rejudged(entry)), runIn(baseline), keeper("baseline-"), services(`${work.id}-baseline`)).pipe(scoped) : [];
|
|
8243
|
+
const headRevision = (yield* runCommand2("git", ["-C", head, "rev-parse", "HEAD"])).trim();
|
|
8244
|
+
const onFreshService = (check, attempt) => gen(function* () {
|
|
8245
|
+
const worktree = yield* checkouts.checkout({ runId: work.runId, id: `${work.id}-rerun`, baseRevision: headRevision }, work.repoBinding);
|
|
8246
|
+
const run = runIn(worktree);
|
|
8247
|
+
const fresh = services(`${work.id}-rerun-${attempt}`);
|
|
8248
|
+
yield* installIn(worktree, run);
|
|
8249
|
+
const postgres = yield* startedCheckPostgres(worktree, fresh, run);
|
|
8250
|
+
return postgres === undefined ? undefined : yield* runCheck(worktree, check, run, keeper("rerun-"), fresh, postgres);
|
|
8251
|
+
}).pipe(scoped);
|
|
8252
|
+
const headChecks = yield* forEach(firstHead, (ran, index) => gen(function* () {
|
|
8253
|
+
const check = work.checks.find(sameCheck(ran.evidence));
|
|
8254
|
+
const atBaseline = baselineRan.find((other) => sameCheck(other.evidence)(ran.evidence));
|
|
8255
|
+
if (check === undefined || atBaseline === undefined || !failedOnPostgres.includes(ran))
|
|
8256
|
+
return ran.evidence;
|
|
8257
|
+
if (!passedAtBaseline(ran, atBaseline))
|
|
8258
|
+
return ran.evidence;
|
|
8259
|
+
const again = yield* onFreshService(check, index + 1);
|
|
8260
|
+
return again === undefined ? ran.evidence : afterFreshService(ran, again);
|
|
8261
|
+
}));
|
|
8262
|
+
const baselineChecks = baselineRan.filter((ran) => !known.some((entry) => entry.tree === baselineTree && sameCheck(ran.evidence)(entry))).map((ran) => ran.evidence);
|
|
8125
8263
|
return {
|
|
8126
8264
|
status: "completed",
|
|
8127
8265
|
evidence: {
|
|
8128
8266
|
head: {
|
|
8129
|
-
revision:
|
|
8267
|
+
revision: headRevision,
|
|
8130
8268
|
tree: headTree,
|
|
8131
8269
|
checks: headChecks
|
|
8132
8270
|
},
|
|
@@ -8134,7 +8272,7 @@ var verificationExecutor = (input) => (work) => gen(function* () {
|
|
|
8134
8272
|
baseline: {
|
|
8135
8273
|
revision: (yield* runCommand2("git", ["-C", baseline, "rev-parse", "HEAD"])).trim(),
|
|
8136
8274
|
tree: baselineTree,
|
|
8137
|
-
checks:
|
|
8275
|
+
checks: baselineChecks
|
|
8138
8276
|
}
|
|
8139
8277
|
}
|
|
8140
8278
|
}
|
|
@@ -8183,6 +8321,7 @@ export {
|
|
|
8183
8321
|
SkillMaterializationRefused2 as SkillMaterializationRefused,
|
|
8184
8322
|
StepAttemptLabel,
|
|
8185
8323
|
StepProcesses,
|
|
8324
|
+
afterFreshService,
|
|
8186
8325
|
agentStepExecutionLimit,
|
|
8187
8326
|
agentStepExecutor,
|
|
8188
8327
|
agentStepSandboxPolicy,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
Defect,
|
|
97
97
|
Exit,
|
|
98
98
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-zw3gf6r5.js";
|
|
100
100
|
import {
|
|
101
101
|
interrupt,
|
|
102
102
|
getCurrent,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
shutdownUnsafe,
|
|
109
109
|
fromQueue,
|
|
110
110
|
unwrap
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-nf9gdnsf.js";
|
|
112
112
|
import {
|
|
113
113
|
Clock,
|
|
114
114
|
empty,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ParseOptions,
|
|
124
124
|
RpcClientDefect,
|
|
125
125
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-0n46rkk9.js";
|
|
127
127
|
|
|
128
128
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
|
|
129
129
|
class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
|
|
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
483
483
|
};
|
|
484
484
|
});
|
|
485
485
|
var clientIdCounter = 0;
|
|
486
|
-
var
|
|
486
|
+
var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
487
487
|
const clientId = clientIdCounter++;
|
|
488
488
|
const {
|
|
489
489
|
codecFor,
|
|
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
|
|
|
829
829
|
class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
export { layerJson,
|
|
832
|
+
export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
writeSrtSettings2,
|
|
15
15
|
srtStepArgv2,
|
|
16
16
|
srtArgv2
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import"./chunk-
|
|
17
|
+
} from "./chunk-nf9gdnsf.js";
|
|
18
|
+
import"./chunk-zw3gf6r5.js";
|
|
19
19
|
export {
|
|
20
20
|
compiled2 as compiled,
|
|
21
21
|
harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
opaqueTunnelRefusal2,
|
|
5
5
|
isOpaqueConnectReason2,
|
|
6
6
|
runSrtStep2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-y1krmnbv.js";
|
|
8
|
+
import"./chunk-q5w3v4k1.js";
|
|
9
|
+
import"./chunk-zw3gf6r5.js";
|
|
10
10
|
export {
|
|
11
11
|
isOpaqueConnectReason2 as isOpaqueConnectReason,
|
|
12
12
|
opaqueTunnelRefusal2 as opaqueTunnelRefusal,
|
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
String4,
|
|
202
202
|
toCodecStringTree,
|
|
203
203
|
encodeUnknownJsonStringSync
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-zw3gf6r5.js";
|
|
205
205
|
|
|
206
206
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
207
207
|
var headUnsafe = (self) => {
|
|
@@ -1129,7 +1129,7 @@ var MutableRefProto = {
|
|
|
1129
1129
|
};
|
|
1130
1130
|
}
|
|
1131
1131
|
};
|
|
1132
|
-
var
|
|
1132
|
+
var make8 = (value) => {
|
|
1133
1133
|
const ref = Object.create(MutableRefProto);
|
|
1134
1134
|
ref.current = value;
|
|
1135
1135
|
return ref;
|
|
@@ -1290,7 +1290,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
|
|
|
1290
1290
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
|
|
1291
1291
|
var TypeId3 = "~effect/PubSub";
|
|
1292
1292
|
var SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
1293
|
-
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false),
|
|
1293
|
+
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
|
|
1294
1294
|
var unbounded = (options) => make5({
|
|
1295
1295
|
atomicPubSub: () => makeAtomicUnbounded(options),
|
|
1296
1296
|
strategy: () => new DroppingStrategy
|
|
@@ -1385,7 +1385,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
|
|
|
1385
1385
|
subscribers.delete(subscription);
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
-
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false),
|
|
1388
|
+
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make8(false), strategy, pubsub.replayWindow(), ended);
|
|
1389
1389
|
class UnboundedPubSub {
|
|
1390
1390
|
publisherHead = {
|
|
1391
1391
|
value: AbsentValue,
|
|
@@ -1802,7 +1802,7 @@ var QueueProto = {
|
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
};
|
|
1805
|
-
var
|
|
1805
|
+
var make9 = (options) => withFiber((fiber) => {
|
|
1806
1806
|
const self = Object.create(QueueProto);
|
|
1807
1807
|
self.dispatcher = fiber.currentDispatcher;
|
|
1808
1808
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
@@ -1817,14 +1817,14 @@ var make8 = (options) => withFiber((fiber) => {
|
|
|
1817
1817
|
};
|
|
1818
1818
|
return succeed2(self);
|
|
1819
1819
|
});
|
|
1820
|
-
var bounded = (capacity) =>
|
|
1820
|
+
var bounded = (capacity) => make9({
|
|
1821
1821
|
capacity
|
|
1822
1822
|
});
|
|
1823
|
-
var sliding = (capacity) =>
|
|
1823
|
+
var sliding = (capacity) => make9({
|
|
1824
1824
|
capacity,
|
|
1825
1825
|
strategy: "sliding"
|
|
1826
1826
|
});
|
|
1827
|
-
var unbounded2 = () =>
|
|
1827
|
+
var unbounded2 = () => make9();
|
|
1828
1828
|
var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
|
|
1829
1829
|
var offerUnsafe = (self, message) => {
|
|
1830
1830
|
if (self.state._tag !== "Open") {
|
|
@@ -2250,7 +2250,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
|
|
|
2250
2250
|
return onError(pull, onCause);
|
|
2251
2251
|
}));
|
|
2252
2252
|
var toTransform = (channel) => channel.transform;
|
|
2253
|
-
var asyncQueue = (scope, f, options) =>
|
|
2253
|
+
var asyncQueue = (scope, f, options) => make9({
|
|
2254
2254
|
capacity: options?.bufferSize,
|
|
2255
2255
|
strategy: options?.strategy
|
|
2256
2256
|
}).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
|
|
@@ -2291,7 +2291,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
|
|
|
2291
2291
|
}));
|
|
2292
2292
|
var readableStreamToPullUnsafe = (options) => {
|
|
2293
2293
|
const reader = options.readable.getReader();
|
|
2294
|
-
const exit = options.exit ??
|
|
2294
|
+
const exit = options.exit ?? make8(undefined);
|
|
2295
2295
|
const pull = suspend3(() => {
|
|
2296
2296
|
if (exit.current)
|
|
2297
2297
|
return exit.current;
|
|
@@ -2905,7 +2905,7 @@ var release = (self, state) => {
|
|
|
2905
2905
|
};
|
|
2906
2906
|
|
|
2907
2907
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
2908
|
-
var
|
|
2908
|
+
var make10 = make6;
|
|
2909
2909
|
var get3 = get2;
|
|
2910
2910
|
|
|
2911
2911
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
@@ -2917,7 +2917,7 @@ var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatM
|
|
|
2917
2917
|
var toChannel2 = (stream) => stream.channel;
|
|
2918
2918
|
var callback = (f, options) => fromChannel2(callbackArray(f, options));
|
|
2919
2919
|
var empty2 = /* @__PURE__ */ fromChannel2(empty);
|
|
2920
|
-
var
|
|
2920
|
+
var make11 = (...values) => fromArray2(values);
|
|
2921
2921
|
var suspend = (stream) => {
|
|
2922
2922
|
const suspended = fromChannel2(suspend4(() => stream().channel));
|
|
2923
2923
|
suspendedStreams.set(suspended, stream);
|
|
@@ -3100,7 +3100,7 @@ var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (
|
|
|
3100
3100
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
|
|
3101
3101
|
var TypeId10 = "~effect/FileSystem";
|
|
3102
3102
|
var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
3103
|
-
var
|
|
3103
|
+
var make12 = (impl) => FileSystem.of({
|
|
3104
3104
|
...impl,
|
|
3105
3105
|
[TypeId10]: TypeId10,
|
|
3106
3106
|
glob: make2(impl),
|
|
@@ -3160,7 +3160,7 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
|
|
|
3160
3160
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
|
|
3161
3161
|
var TypeId11 = "~effect/Path";
|
|
3162
3162
|
var Path = /* @__PURE__ */ Service2("effect/Path");
|
|
3163
|
-
var
|
|
3163
|
+
var make13 = (impl) => Path.of({
|
|
3164
3164
|
...impl,
|
|
3165
3165
|
[TypeId11]: TypeId11,
|
|
3166
3166
|
resolveWithin(root, input) {
|
|
@@ -3235,7 +3235,7 @@ function makeProvider(load, mapInput) {
|
|
|
3235
3235
|
function makeSource(get, transform) {
|
|
3236
3236
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3237
3237
|
}
|
|
3238
|
-
function
|
|
3238
|
+
function make7(get) {
|
|
3239
3239
|
return makeSource(get, identityPath);
|
|
3240
3240
|
}
|
|
3241
3241
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3244,7 +3244,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3244
3244
|
function fromEnvRecord(env, options) {
|
|
3245
3245
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3246
3246
|
const trie = buildEnvTrie(env);
|
|
3247
|
-
return
|
|
3247
|
+
return make7((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3248
3248
|
}
|
|
3249
3249
|
function fromEnv(options) {
|
|
3250
3250
|
const env = options?.env ?? {
|
|
@@ -3575,4 +3575,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3575
3575
|
...argv
|
|
3576
3576
|
];
|
|
3577
3577
|
|
|
3578
|
-
export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2,
|
|
3578
|
+
export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make10, get3, isStream, fromChannel2, callback, empty2, make11, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make12, FileTypeId, WatchBackend, Path, make13, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isMinLength,
|
|
19
19
|
isMaxLength,
|
|
20
20
|
FiniteFromString
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-zw3gf6r5.js";
|
|
22
22
|
|
|
23
23
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/JsonSchema.js
|
|
24
24
|
var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2,
|
|
6
6
|
makeProgramRpcClient2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-xjmfnqh9.js";
|
|
8
|
+
import"./chunk-f86q3a6s.js";
|
|
9
|
+
import"./chunk-0n46rkk9.js";
|
|
10
|
+
import"./chunk-q5w3v4k1.js";
|
|
11
|
+
import"./chunk-nf9gdnsf.js";
|
|
12
|
+
import"./chunk-zw3gf6r5.js";
|
|
13
13
|
export {
|
|
14
14
|
makeProgramRpcClient2 as makeProgramRpcClient,
|
|
15
15
|
makeRunnerRpcClient2 as makeRunnerRpcClient,
|