@kitman-sh/cli 0.13.11 → 0.13.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.
@@ -197,6 +197,7 @@ import {
197
197
  canonicalSha256,
198
198
  tokensSpent,
199
199
  isTestReportName,
200
+ failedTestOfLine,
200
201
  checkTests,
201
202
  MeasureSample,
202
203
  catchUpPathLimit,
@@ -247,7 +248,7 @@ import {
247
248
  installCommand,
248
249
  checkServicesFile,
249
250
  checkServices
250
- } from "./chunk-dtkejy3r.js";
251
+ } from "./chunk-pvza175a.js";
251
252
  import {
252
253
  join,
253
254
  interrupt,
@@ -261,10 +262,12 @@ import {
261
262
  fromPubSub,
262
263
  map2,
263
264
  filter,
265
+ take2,
264
266
  decodeText,
265
267
  encodeText,
266
268
  splitLines,
267
269
  run,
270
+ runCollect,
268
271
  runHead,
269
272
  runForEach,
270
273
  FileSystem,
@@ -288,7 +291,7 @@ import {
288
291
  writeSrtSettings2,
289
292
  srtStepArgv2,
290
293
  srtArgv2
291
- } from "./chunk-0h49y8gf.js";
294
+ } from "./chunk-nf9gdnsf.js";
292
295
  import {
293
296
  writeAgentEnvironmentConfigFile2,
294
297
  readManifestSkillPaths2,
@@ -304,8 +307,8 @@ import {
304
307
  applyAgentEnvironmentMaterialization2,
305
308
  isPathWithin2,
306
309
  skillIdentity2
307
- } from "./chunk-krqb80g6.js";
308
- import"./chunk-p8fhxfa0.js";
310
+ } from "./chunk-wh6eeetn.js";
311
+ import"./chunk-nve4pjqm.js";
309
312
  import {
310
313
  egressAllowed,
311
314
  writeSecretRegistry,
@@ -323,23 +326,23 @@ import {
323
326
  decodedOption2,
324
327
  decoded2,
325
328
  readOpencode2
326
- } from "./chunk-cbpb2rww.js";
329
+ } from "./chunk-ga76znz9.js";
327
330
  import {
328
331
  uploadRunFile,
329
332
  programLease,
330
333
  rpcRunFiles,
331
334
  programHostsEnv,
332
335
  undeclaredHostsEnv
333
- } from "./chunk-xzfj61cp.js";
334
- import"./chunk-h7mnz0w3.js";
336
+ } from "./chunk-4yzdyte6.js";
337
+ import"./chunk-s364dren.js";
335
338
  import {
336
339
  nextInt
337
340
  } from "./chunk-gq7y5v3e.js";
338
341
  import {
339
342
  ChildProcessSpawner,
340
343
  make3
341
- } from "./chunk-mtkstrh3.js";
342
- import"./chunk-5an78wy8.js";
344
+ } from "./chunk-82w8rmkc.js";
345
+ import"./chunk-7jege23c.js";
343
346
 
344
347
  // packages/core/src/sync-kit.ts
345
348
  import { createHash } from "crypto";
@@ -7640,13 +7643,13 @@ var checkFileKeeper = (work, runFiles, storage) => {
7640
7643
  return kept.flat();
7641
7644
  }).pipe(catch_((error) => as(logWarning("check_run_files_not_kept", `${input.check}: ${error.message}`), [])));
7642
7645
  };
7643
- var reportedTests = (filesDir) => gen(function* () {
7646
+ var checkedTests = (filesDir, printed) => gen(function* () {
7644
7647
  const fs = yield* FileSystem;
7645
7648
  const path = yield* Path;
7646
7649
  const names = (yield* regularFiles(filesDir)).filter(isTestReportName);
7647
7650
  const reports = yield* forEach(names, (name) => fs.readFileString(path.join(filesDir, name)).pipe(map8((text) => [text]), orElseSucceed(() => [])));
7648
- return checkTests(reports.flat());
7649
- }).pipe(orElseSucceed(() => checkTests([])));
7651
+ return checkTests(reports.flat(), printed);
7652
+ }).pipe(orElseSucceed(() => checkTests([], printed)));
7650
7653
 
7651
7654
  class ServicesUnavailable extends TaggedError("ServicesUnavailable") {
7652
7655
  get message() {
@@ -7837,6 +7840,11 @@ var installIn = (worktree, run) => gen(function* () {
7837
7840
  if (unresolved.length > 0)
7838
7841
  return yield* new InstallFailed({ command: forced, output: unresolved.join("; ") });
7839
7842
  });
7843
+ var failingLinesRead = 1000;
7844
+ var printedFailures = (output) => gen(function* () {
7845
+ const fs = yield* FileSystem;
7846
+ return yield* fs.stream(output).pipe(decodeText, splitLines, map2(failedTestOfLine), filter((name) => name !== undefined), take2(failingLinesRead), runCollect);
7847
+ }).pipe(orElseSucceed(() => []));
7840
7848
  var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(function* () {
7841
7849
  const path = yield* Path;
7842
7850
  const due = checks.filter((check) => !known.some((entry) => entry.tree === tree && entry.name === check.name && entry.command === check.command));
@@ -7850,7 +7858,7 @@ var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(fu
7850
7858
  const startedAt = yield* currentTimeMillis;
7851
7859
  const filesDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-check-files-" });
7852
7860
  const output = path.join(yield* tempDirectoryScoped(fs, { prefix: "kitman-check-output-" }), "output");
7853
- const sink = keeper === undefined ? undefined : yield* fs.open(output, { flag: "w" });
7861
+ const sink = yield* fs.open(output, { flag: "w" });
7854
7862
  const docker = check.pipeline === true ? yield* pipelineDaemon(services, check.name) : undefined;
7855
7863
  const ran = yield* run({
7856
7864
  command: check.command,
@@ -7858,10 +7866,11 @@ var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(fu
7858
7866
  filesDir,
7859
7867
  ...postgres === undefined ? undefined : { postgres },
7860
7868
  ...docker === undefined ? undefined : { docker },
7861
- ...sink === undefined ? undefined : { onOutput: (chunk) => sink.writeAll(chunk) }
7869
+ onOutput: (chunk) => sink.writeAll(chunk)
7862
7870
  });
7863
7871
  const durationMs = (yield* currentTimeMillis) - startedAt;
7864
- const tests = yield* reportedTests(filesDir);
7872
+ const printed = ran.exitCode === 0 ? [] : yield* printedFailures(output);
7873
+ const { failedTests, ...tests } = yield* checkedTests(filesDir, printed);
7865
7874
  const fileIds = keeper === undefined ? undefined : yield* keeper.keep({ check: check.name, prefix: keeper.prefix, output, filesDir });
7866
7875
  return {
7867
7876
  name: check.name,
@@ -7871,7 +7880,7 @@ var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(fu
7871
7880
  durationMs,
7872
7881
  outputTail: redactedOutputTail(ran.output),
7873
7882
  ...fileIds === undefined ? undefined : { fileIds },
7874
- tests
7883
+ tests: { ...tests, ...ran.exitCode === 0 || failedTests === undefined ? undefined : { failedTests } }
7875
7884
  };
7876
7885
  }).pipe(scoped));
7877
7886
  });
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-dtkejy3r.js";
108
+ } from "./chunk-pvza175a.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-0h49y8gf.js";
112
+ } from "./chunk-nf9gdnsf.js";
113
113
 
114
114
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
115
115
  var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");
@@ -497,6 +497,7 @@ var EvidenceCheck = Struct({
497
497
  durationMs: Finite,
498
498
  evidenceId: String4,
499
499
  outputTail: optionalKey(String4),
500
+ failedTests: optionalKey(ArraySchema(String4)),
500
501
  suggested: optionalKey(Boolean2),
501
502
  skippedSinceBaseline: optionalKey(ArraySchema(String4)),
502
503
  newNotRun: optionalKey(ArraySchema(String4))
@@ -7,9 +7,9 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-cbpb2rww.js";
11
- import"./chunk-mtkstrh3.js";
12
- import"./chunk-0h49y8gf.js";
10
+ } from "./chunk-ga76znz9.js";
11
+ import"./chunk-82w8rmkc.js";
12
+ import"./chunk-nf9gdnsf.js";
13
13
  import"./chunk-zw3gf6r5.js";
14
14
  export {
15
15
  decoded2 as decoded,
@@ -45,7 +45,7 @@ import {
45
45
  layer4,
46
46
  kitmanMcpServer,
47
47
  RunnerRpcProtocolVersion
48
- } from "./chunk-dtkejy3r.js";
48
+ } from "./chunk-pvza175a.js";
49
49
  import {
50
50
  decodeText,
51
51
  mkString,
@@ -53,23 +53,23 @@ import {
53
53
  Path,
54
54
  withDefault,
55
55
  String2
56
- } from "./chunk-0h49y8gf.js";
56
+ } from "./chunk-nf9gdnsf.js";
57
57
  import {
58
58
  Packument,
59
59
  tarballMatches
60
- } from "./chunk-p8fhxfa0.js";
61
- import"./chunk-h7mnz0w3.js";
60
+ } from "./chunk-nve4pjqm.js";
61
+ import"./chunk-s364dren.js";
62
62
  import {
63
63
  AgentDeclaration,
64
64
  KitDeclarations,
65
65
  describeFlag,
66
66
  Described
67
- } from "./chunk-xzfj61cp.js";
67
+ } from "./chunk-4yzdyte6.js";
68
68
  import {
69
69
  ChildProcessSpawner,
70
70
  make3
71
- } from "./chunk-mtkstrh3.js";
72
- import"./chunk-5an78wy8.js";
71
+ } from "./chunk-82w8rmkc.js";
72
+ import"./chunk-7jege23c.js";
73
73
 
74
74
  // packages/sdk/src/build/index.ts
75
75
  class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-0h49y8gf.js";
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-dtkejy3r.js";
126
+ } from "./chunk-pvza175a.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")) {
@@ -31,7 +31,7 @@ import {
31
31
  runCollect,
32
32
  runDrain,
33
33
  mkString
34
- } from "./chunk-0h49y8gf.js";
34
+ } from "./chunk-nf9gdnsf.js";
35
35
 
36
36
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
37
37
  var redactedRegistry = /* @__PURE__ */ new WeakMap;
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-p0vqjc0n.js";
7
+ } from "./chunk-jwr0rr2p.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,