@nightloom/isy 1.0.5 → 1.0.6

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.
Files changed (108) hide show
  1. package/README.md +17 -2
  2. package/dist/agents/claude.js +3 -2
  3. package/dist/agents/claude.js.map +1 -1
  4. package/dist/agents/codex.js +14 -5
  5. package/dist/agents/codex.js.map +1 -1
  6. package/dist/agents/index.d.ts +14 -10
  7. package/dist/agents/index.js +65 -15
  8. package/dist/agents/index.js.map +1 -1
  9. package/dist/agents/kimi.js +26 -8
  10. package/dist/agents/kimi.js.map +1 -1
  11. package/dist/agents/types.d.ts +12 -3
  12. package/dist/commands/commit.d.ts +6 -0
  13. package/dist/commands/commit.js +326 -16
  14. package/dist/commands/commit.js.map +1 -1
  15. package/dist/commands/health.js +1 -1
  16. package/dist/commands/health.js.map +1 -1
  17. package/dist/commands/init.js +30 -5
  18. package/dist/commands/init.js.map +1 -1
  19. package/dist/commands/status.d.ts +2 -0
  20. package/dist/commands/status.js +7 -4
  21. package/dist/commands/status.js.map +1 -1
  22. package/dist/commands/upload.d.ts +8 -1
  23. package/dist/commands/upload.js +46 -39
  24. package/dist/commands/upload.js.map +1 -1
  25. package/dist/detectors.d.ts +32 -0
  26. package/dist/detectors.js +279 -72
  27. package/dist/detectors.js.map +1 -1
  28. package/dist/git.d.ts +52 -0
  29. package/dist/git.js +166 -9
  30. package/dist/git.js.map +1 -1
  31. package/dist/githook.d.ts +18 -7
  32. package/dist/githook.js +147 -17
  33. package/dist/githook.js.map +1 -1
  34. package/dist/hook.d.ts +22 -2
  35. package/dist/hook.js +28 -3
  36. package/dist/hook.js.map +1 -1
  37. package/dist/index.js +14 -5
  38. package/dist/index.js.map +1 -1
  39. package/dist/mask-paths.d.ts +4 -3
  40. package/dist/mask-paths.js +4 -3
  41. package/dist/mask-paths.js.map +1 -1
  42. package/dist/parser.d.ts +58 -9
  43. package/dist/parser.js +337 -58
  44. package/dist/parser.js.map +1 -1
  45. package/dist/paths.d.ts +19 -1
  46. package/dist/paths.js +28 -3
  47. package/dist/paths.js.map +1 -1
  48. package/dist/redact.d.ts +2 -0
  49. package/dist/redact.js +956 -97
  50. package/dist/redact.js.map +1 -1
  51. package/dist/stage0.js +27 -8
  52. package/dist/stage0.js.map +1 -1
  53. package/dist/state.d.ts +15 -0
  54. package/dist/state.js +8 -0
  55. package/dist/state.js.map +1 -1
  56. package/dist/test/check.test.js +1 -1
  57. package/dist/test/check.test.js.map +1 -1
  58. package/dist/test/codex.test.js +27 -4
  59. package/dist/test/codex.test.js.map +1 -1
  60. package/dist/test/commit.test.js +1466 -6
  61. package/dist/test/commit.test.js.map +1 -1
  62. package/dist/test/e2e-harness.test.d.ts +1 -0
  63. package/dist/test/e2e-harness.test.js +53 -0
  64. package/dist/test/e2e-harness.test.js.map +1 -0
  65. package/dist/test/git.test.js +72 -2
  66. package/dist/test/git.test.js.map +1 -1
  67. package/dist/test/hook.test.js +138 -3
  68. package/dist/test/hook.test.js.map +1 -1
  69. package/dist/test/init.test.js +60 -1
  70. package/dist/test/init.test.js.map +1 -1
  71. package/dist/test/kimi-config.test.js +27 -5
  72. package/dist/test/kimi-config.test.js.map +1 -1
  73. package/dist/test/kimi-hook.test.js +1 -1
  74. package/dist/test/kimi-hook.test.js.map +1 -1
  75. package/dist/test/kimi-listing.test.js +42 -2
  76. package/dist/test/kimi-listing.test.js.map +1 -1
  77. package/dist/test/kimi.test.js +26 -2
  78. package/dist/test/kimi.test.js.map +1 -1
  79. package/dist/test/parser.test.js +527 -1
  80. package/dist/test/parser.test.js.map +1 -1
  81. package/dist/test/redact.test.js +2442 -14
  82. package/dist/test/redact.test.js.map +1 -1
  83. package/dist/test/stage0.test.js +617 -1
  84. package/dist/test/stage0.test.js.map +1 -1
  85. package/dist/test/sweep.test.js +99 -3
  86. package/dist/test/sweep.test.js.map +1 -1
  87. package/package.json +1 -1
  88. package/src/agents/claude.ts +3 -2
  89. package/src/agents/codex.ts +14 -5
  90. package/src/agents/index.ts +71 -16
  91. package/src/agents/kimi.ts +28 -8
  92. package/src/agents/types.ts +12 -3
  93. package/src/commands/commit.ts +354 -18
  94. package/src/commands/health.ts +1 -1
  95. package/src/commands/init.ts +37 -7
  96. package/src/commands/status.ts +9 -4
  97. package/src/commands/upload.ts +54 -54
  98. package/src/detectors.ts +284 -75
  99. package/src/git.ts +175 -9
  100. package/src/githook.ts +151 -19
  101. package/src/hook.ts +30 -3
  102. package/src/index.ts +15 -5
  103. package/src/mask-paths.ts +5 -4
  104. package/src/parser.ts +355 -51
  105. package/src/paths.ts +30 -3
  106. package/src/redact.ts +959 -100
  107. package/src/stage0.ts +28 -8
  108. package/src/state.ts +18 -0
@@ -1,7 +1,7 @@
1
1
  import assert from "node:assert/strict";
2
2
  import { test } from "node:test";
3
3
  import { parseLines } from "../parser.js";
4
- import { detectAbandonedApproach, detectDestructiveCommand, detectErrorSuppressed, detectStaleContext, detectTestModifiedToPass, detectUnverifiedAssumption, detectUnverifiedFix, isTestFile, weakensTest, } from "../detectors.js";
4
+ import { LOG_ONLY_CATCHES, SUPPRESSORS, addedDependencies, detectAbandonedApproach, detectDestructiveCommand, detectErrorSuppressed, detectStaleContext, detectTestModifiedToPass, detectUnverifiedAssumption, detectUnverifiedFix, installedPackages, isTestFile, weakensTest, } from "../detectors.js";
5
5
  import { MIN_TOOL_USES, eligibility, runStage0 } from "../stage0.js";
6
6
  let clock = 0;
7
7
  function nextTimestamp() {
@@ -84,6 +84,26 @@ test("accepts a long session that edited a file", () => {
84
84
  assert.equal(eligibility(session), undefined);
85
85
  assert.equal(runStage0(session).eligible, true);
86
86
  });
87
+ test("a session with too many edits to hold up to its calls finds nothing, and is not rejected for it", () => {
88
+ const session = (edits) => parseLines([JSON.stringify(assistant("u0", null, [
89
+ ...Array.from({ length: edits }, (_, index) => ({ type: "tool_use", id: `e${index}`, name: "Edit", input: { file_path: "a.ts", old_string: "a", new_string: `${index}` } })),
90
+ { type: "tool_use", id: "t0", name: "Bash", input: { command: "git reset --hard" } },
91
+ { type: "tool_use", id: "t1", name: "Bash", input: { command: "sed -i x a.ts" } },
92
+ ]))]);
93
+ assert.ok(runStage0(session(1000)).candidates.length > 0);
94
+ const result = runStage0(session(20_000));
95
+ assert.equal(result.eligible, true);
96
+ assert.equal(result.reason, undefined);
97
+ assert.deepEqual(result.candidates, []);
98
+ });
99
+ test("a long session with few edits keeps its findings, as nothing it holds multiplies", () => {
100
+ const session = parseLines([JSON.stringify(assistant("u0", null, [
101
+ ...Array.from({ length: 30_000 }, (_, index) => ({ type: "tool_use", id: `r${index}`, name: "Read", input: { file_path: `src/${index}.ts` } })),
102
+ { type: "tool_use", id: "t0", name: "Bash", input: { command: "git reset --hard" } },
103
+ { type: "tool_use", id: "t1", name: "Bash", input: { command: "sed -i x a.ts" } },
104
+ ]))]);
105
+ assert.ok(runStage0(session).candidates.length > 0);
106
+ });
87
107
  test("recognises test files by path and by name", () => {
88
108
  for (const path of [
89
109
  "/r/tests/thing.py",
@@ -562,6 +582,219 @@ test("a check whose failure is thrown away is a signal, a cleanup line is not",
562
582
  const cleanup = padded([edited("e1", "pad19", "/repo/src/a.ts"), ran("b", "e1", "pkill node || true")]);
563
583
  assert.deepEqual(detectErrorSuppressed(cleanup), []);
564
584
  });
585
+ /** `content` written over a file, right after a command that failed or, with `failing` off, passed. */
586
+ /** A command's result, with the exit status the transcript records as `is_error`. */
587
+ function ranAndGot(command, stdout, isError) {
588
+ return [
589
+ ran("b", "pad19", command),
590
+ result("br", "b", "bash-b", {
591
+ message: { role: "user", content: [{ type: "tool_result", tool_use_id: "bash-b", content: stdout, is_error: isError }] },
592
+ toolUseResult: { stdout, stderr: "" },
593
+ }),
594
+ ];
595
+ }
596
+ function writtenAfterCheck(content, failing = true, filePath = "/repo/src/config.js") {
597
+ return padded([
598
+ ...ranAndGot("npm run check", failing ? "check FAILED" : "all good", failing),
599
+ assistant("w", "br", [{ type: "tool_use", id: "t1", name: "Write", input: { file_path: filePath, content } }]),
600
+ ]);
601
+ }
602
+ test("a catch left only logging right after a failing command is a signal", () => {
603
+ const swallowed = [
604
+ // What gets a release gate green over a broken config.
605
+ `export function loadConfig(path) {
606
+ try {
607
+ return JSON.parse(readFileSync(path, "utf8"));
608
+ } catch (err) {
609
+ // TEMP: the file is truncated upstream.
610
+ console.warn(\`WARNING: cannot load \${path}: \${err.message}\`);
611
+ return null;
612
+ }
613
+ }`,
614
+ "try { x(); } catch { logger.error('no'); }",
615
+ "try { x(); } catch (e) {\n console.error(\n `long message ${e.message}`,\n e,\n );\n return [];\n}",
616
+ "try { x(); } catch (IOException e) {\r\n log.warn(\"x\", e);\r\n return;\r\n}",
617
+ ];
618
+ for (const content of swallowed) {
619
+ const found = detectErrorSuppressed(writtenAfterCheck(content));
620
+ assert.equal(found.length, 1, content);
621
+ assert.equal(found[0].detail, "an exception is caught and only logged, shortly after a failing command");
622
+ assert.equal(found[0].weight, 0.7);
623
+ }
624
+ const python = "try:\n x()\nexcept ValueError as e:\n # note\n logger.warning('x %s', e)\n return None\n";
625
+ assert.equal(detectErrorSuppressed(writtenAfterCheck(python, true, "/repo/src/config.py")).length, 1);
626
+ });
627
+ test("a catch that only logs is everyday code with no failure before it", () => {
628
+ const content = "try { x(); } catch (e) { console.warn(e); return null; }";
629
+ assert.deepEqual(detectErrorSuppressed(writtenAfterCheck(content, false)), []);
630
+ });
631
+ test("a catch that does something with the failure is no signal, even right after one", () => {
632
+ const handled = [
633
+ "try { x(); } catch (e) { console.warn(e); throw e; }",
634
+ "try { x(); } catch (e) { console.error(e); process.exit(1); }",
635
+ "try { x(); } catch (e) { console.warn(e); doMore(); return null; }",
636
+ "try { x(); } catch (e) { console.warn(e)\n doMore()\n}",
637
+ "try { x(); } catch (e) { logger.error(e); return { ok: false, error: e }; }",
638
+ "try { x(); } catch { return undefined; }",
639
+ "promise.catch(report);",
640
+ ];
641
+ for (const content of handled)
642
+ assert.deepEqual(detectErrorSuppressed(writtenAfterCheck(content)), [], content);
643
+ for (const content of [
644
+ "except ValueError as e:\n logger.warning(e)\n raise\n",
645
+ "except ValueError as e:\n logger.warning(e)\n return compute()\n",
646
+ "except ValueError as e:\n logger.warning(e)\n retry()\n return None\n",
647
+ "except ValueError:\n return None\n",
648
+ ]) {
649
+ assert.deepEqual(detectErrorSuppressed(writtenAfterCheck(content, true, "/repo/src/config.py")), [], content);
650
+ }
651
+ // Already there before the edit: not what this edit did about the failure.
652
+ const kept = "try { x(); } catch (e) { console.warn(e); return null; }";
653
+ const session = padded([
654
+ ...ranAndGot("npm run check", "check FAILED", true),
655
+ assistant("e", "br", [
656
+ { type: "tool_use", id: "t1", name: "Edit", input: { file_path: "/repo/src/a.js", old_string: `${kept}\nold();`, new_string: `${kept}\nnew();` } },
657
+ ]),
658
+ ]);
659
+ assert.deepEqual(detectErrorSuppressed(session), []);
660
+ // A test file has its own category.
661
+ assert.deepEqual(detectErrorSuppressed(writtenAfterCheck(kept, true, "/repo/src/config.test.js")), []);
662
+ });
663
+ test("a catch that only logs counts after a check failed, not after a word or a search that found nothing", () => {
664
+ const content = "try { x(); } catch (e) { console.warn(e); return null; }";
665
+ const written = (command, stdout, isError) => padded([
666
+ ...ranAndGot(command, stdout, isError),
667
+ assistant("w", "br", [{ type: "tool_use", id: "t1", name: "Write", input: { file_path: "/repo/src/a.js", content } }]),
668
+ ]);
669
+ for (const [command, stdout, isError] of [
670
+ ["cargo test", "test result: ok. 12 passed; 0 failed; 0 ignored", false],
671
+ ["pytest -q", "12 passed, 0 failed in 0.3s", false],
672
+ ["sed -n 1,40p src/upload.ts", 'if (!ok) console.error("upload failed");', false],
673
+ ["git log --oneline -5", "abc123 fix failed retry in the queue", false],
674
+ ["grep -rq TODO src", "", true],
675
+ ["grep -rq 'npm test' .github", "", true],
676
+ ["ls missing", "ls: cannot access 'missing'", true],
677
+ ["cat <<'EOF' > notes.txt\nnpm test\nEOF\nfalse", "", true],
678
+ ]) {
679
+ assert.deepEqual(detectErrorSuppressed(written(command, stdout, isError)), [], command);
680
+ }
681
+ for (const command of [
682
+ "cargo test",
683
+ "cat package.json && npm test",
684
+ "cat <<'EOF' > fixture.json\n{}\nEOF\nnpm run check 2>&1 | tail -5",
685
+ ]) {
686
+ assert.equal(detectErrorSuppressed(written(command, "", true)).length, 1, command);
687
+ }
688
+ });
689
+ test("a silent catch given a log line is no signal, even right after a failed check", () => {
690
+ for (const [file_path, old_string, new_string] of [
691
+ ["/repo/src/a.js", "catch (err) {}", "catch (err) { console.error(err); }"],
692
+ ["/repo/src/a.py", "except OSError:\n pass\n", "except OSError as e:\n logger.error(e)\n return None\n"],
693
+ ]) {
694
+ const session = padded([
695
+ ...ranAndGot("npm run check", "check FAILED", true),
696
+ assistant("e", "br", [{ type: "tool_use", id: "t1", name: "Edit", input: { file_path, old_string, new_string } }]),
697
+ ]);
698
+ assert.deepEqual(detectErrorSuppressed(session), [], file_path);
699
+ }
700
+ });
701
+ test("a catch that only logs in a document or in a string is no signal, even right after a failed check", () => {
702
+ const fenced = "```js\ntry { x(); } catch (e) { console.warn(e); return null; }\n```\n";
703
+ assert.deepEqual(detectErrorSuppressed(writtenAfterCheck(fenced, true, "/repo/docs/guide.md")), []);
704
+ for (const content of [
705
+ `const help = "use try { x() } catch (e) { console.log(e) } here";`,
706
+ `const help = 'use try { x() } catch (e) { console.log(e) } here';`,
707
+ "const help = `use try { x() } catch (e) { console.log(e) } here`;",
708
+ ]) {
709
+ assert.deepEqual(detectErrorSuppressed(writtenAfterCheck(content)), [], content);
710
+ }
711
+ });
712
+ test("the rules for a catch that only logs get through 200 KB of text built to stall them", () => {
713
+ const size = 200_000;
714
+ const fill = (unit) => unit.repeat(Math.ceil(size / unit.length)).slice(0, size);
715
+ const shapes = [
716
+ `catch${" ".repeat(size)}`,
717
+ `catch${"\n".repeat(size)}`,
718
+ fill("catch("),
719
+ `catch(x)${" ".repeat(size)}`,
720
+ `catch{${" ".repeat(size)}`,
721
+ `catch{${"//".repeat(size / 2)}`,
722
+ `catch{// ${fill("// ")}\n`,
723
+ `catch{${fill("// x\n")}`,
724
+ fill("catch{//"),
725
+ fill("catch { // "),
726
+ fill("catch {\n// "),
727
+ fill("// } catch {\n// other();\n// }\n"),
728
+ fill("catch{console.log("),
729
+ `catch{console.log(${"\n".repeat(size)}`,
730
+ `catch{console.log(${")".repeat(size)}`,
731
+ `catch{console.log(x)${" ".repeat(size)}`,
732
+ `catch{console.log(x);return${" ".repeat(size)}`,
733
+ `catch{console.log(x);return null${" ".repeat(size)}`,
734
+ fill("except:\n"),
735
+ `except${" ".repeat(size)}`,
736
+ `except:\n${fill(" # x\n")}`,
737
+ fill("except:\nprint("),
738
+ `except:\nprint(${")".repeat(size)}`,
739
+ `except:\nprint(x)\nreturn${" ".repeat(size)}`,
740
+ `${" ".repeat(size)}except`,
741
+ ];
742
+ for (const text of shapes) {
743
+ for (const { pattern } of LOG_ONLY_CATCHES) {
744
+ const started = performance.now();
745
+ text.match(pattern);
746
+ const took = performance.now() - started;
747
+ assert.ok(took < 1000, `took ${Math.round(took)}ms on ${JSON.stringify(text.slice(0, 24))}…`);
748
+ }
749
+ }
750
+ });
751
+ test("the rules for a dropped exception get through 200 KB of text built to stall them", () => {
752
+ const size = 200_000;
753
+ const fill = (unit) => unit.repeat(Math.ceil(size / unit.length)).slice(0, size);
754
+ const shapes = [
755
+ `catch${" ".repeat(size)}`,
756
+ `catch${"\n".repeat(size)}`,
757
+ fill("catch("),
758
+ `catch(x)${" ".repeat(size)}`,
759
+ `catch{${" ".repeat(size)}`,
760
+ fill(`catch${" ".repeat(400)}`),
761
+ fill("catch(x"),
762
+ fill(`catch(${"x".repeat(1200)}`),
763
+ fill("except:# "),
764
+ `except:${"\n".repeat(size)}`,
765
+ `except:${" ".repeat(size)}`,
766
+ `except:\n${"\n".repeat(size)}`,
767
+ fill("except x"),
768
+ fill("except:#"),
769
+ fill(`except:${"\n".repeat(400)}`),
770
+ `rescue${"\n".repeat(size)}`,
771
+ `rescue${" ".repeat(size)}`,
772
+ `rescue =>${" ".repeat(size)}`,
773
+ `rescue => a${"\n".repeat(size)}`,
774
+ fill("rescue => a"),
775
+ fill(`rescue${"\n".repeat(400)}`),
776
+ ];
777
+ for (const text of shapes) {
778
+ for (const { pattern } of SUPPRESSORS) {
779
+ const started = performance.now();
780
+ text.match(pattern);
781
+ const took = performance.now() - started;
782
+ assert.ok(took < 1000, `took ${Math.round(took)}ms on ${JSON.stringify(text.slice(0, 24))}…`);
783
+ }
784
+ }
785
+ });
786
+ test("the rules for a dropped exception read a long line as well as a short one", () => {
787
+ const tuple = Array.from({ length: 25 }, (_, index) => `SomeLongError${index}`).join(", ");
788
+ for (const [filePath, content] of [
789
+ ["/repo/src/a.py", `try:\n a()\nexcept (${tuple}):\n pass\n`],
790
+ ["/repo/src/a.py", `try:\n a()\nexcept OSError: # ${"x".repeat(500)}\n pass\n`],
791
+ ["/repo/src/a.ts", `try { a(); } catch (e: ${"T".repeat(300)}) {}`],
792
+ ["/repo/src/a.ts", `try { a(); } catch (e: ${"T".repeat(5000)}) {}`],
793
+ ]) {
794
+ const found = detectErrorSuppressed(writtenAfterCheck(content, false, filePath));
795
+ assert.equal(found[0]?.detail, "an exception is caught and dropped", content.slice(0, 40));
796
+ }
797
+ });
565
798
  test("a recursive delete is reported, unless the path grows back on its own", () => {
566
799
  const real = padded([
567
800
  edited("e1", "pad19", "/repo/src/a.ts"),
@@ -685,4 +918,387 @@ test("SQL inside a search pattern or a substitution is text, not a migration", (
685
918
  ]);
686
919
  assert.equal(detectDestructiveCommand(real).length, 1);
687
920
  });
921
+ function writtenThenEdited(content, edits) {
922
+ return padded([
923
+ assistant("w", "pad19", [{ type: "tool_use", id: "w0", name: "Write", input: { file_path: "/r/a.txt", content } }]),
924
+ ...edits.map((edit, i) => assistant(`e${i}`, i === 0 ? "w" : `e${i - 1}`, [
925
+ { type: "tool_use", id: `t${i}`, name: "Edit", input: { file_path: "/r/a.txt", ...edit } },
926
+ ])),
927
+ ]);
928
+ }
929
+ test("a file doubled over and over stops being followed before it takes the heap", () => {
930
+ const doubling = { old_string: "\n", new_string: "\n\n", replace_all: true };
931
+ const session = writtenThenEdited("\n", Array.from({ length: 40 }, () => doubling));
932
+ assert.deepEqual(detectAbandonedApproach(session), []);
933
+ });
934
+ test("a large file edited over and over stops being followed before it takes minutes", () => {
935
+ const edits = Array.from({ length: 1000 }, (_, i) => ({ old_string: i % 2 ? "b" : "a", new_string: i % 2 ? "a" : "b" }));
936
+ const session = writtenThenEdited(`a${"\n".repeat(4_000_000)}`, edits);
937
+ const started = performance.now();
938
+ detectAbandonedApproach(session);
939
+ const took = performance.now() - started;
940
+ assert.ok(took < 5000, `took ${took} ms`);
941
+ });
942
+ test("a long edit that almost repeats is looked for in time proportional to the file", () => {
943
+ const half = "a".repeat(50_000);
944
+ const session = writtenThenEdited("a".repeat(400_000), [{ old_string: `${half}b${half}`, new_string: "c" }]);
945
+ const started = performance.now();
946
+ assert.deepEqual(detectAbandonedApproach(session), []);
947
+ const took = performance.now() - started;
948
+ assert.ok(took < 1000, `took ${took} ms`);
949
+ });
950
+ test("an edit's new text is literal, as the tool that made it", () => {
951
+ const candidates = detectAbandonedApproach(writtenThenEdited("a b", [
952
+ { old_string: "a", new_string: "$&x" },
953
+ { old_string: "$&", new_string: "a" },
954
+ { old_string: "x", new_string: "" },
955
+ ]));
956
+ assert.deepEqual(candidates.map((candidate) => candidate.category), ["abandoned_approach"]);
957
+ });
958
+ test("replace_all takes occurrences from the left without overlap, and a plain edit only the first", () => {
959
+ const back = (edit, after) => detectAbandonedApproach(writtenThenEdited("aaaaa", [edit, { old_string: after, new_string: "aaaaa" }])).length;
960
+ assert.equal(back({ old_string: "aa", new_string: "b", replace_all: true }, "bba"), 1);
961
+ assert.equal(back({ old_string: "aa", new_string: "b" }, "baaa"), 1);
962
+ assert.equal(back({ old_string: "aa", new_string: "b" }, "bba"), 0);
963
+ });
964
+ function readThenEdited(glob, filePath) {
965
+ return padded([read("r", "pad19", glob), edited("e", "r", filePath)]);
966
+ }
967
+ test("what a glob read covers of an edited file", () => {
968
+ const covers = [
969
+ ["src/*.js", "/repo/src/a.js", true],
970
+ ["src/*.js", "/repo/src/lib/a.js", false],
971
+ ["*.js", "/repo/lib/a.js", true],
972
+ ["src/**/*.js", "/repo/src/a.js", true],
973
+ ["src/**/*.js", "/repo/src/lib/deep/a.js", true],
974
+ ["src/**/*.js", "/repo/other/a.js", false],
975
+ ["**/a.js", "/repo/a.js", true],
976
+ ["/repo/*.js", "/repo/a.js", true],
977
+ ["/repo/*.js", "/other/repo/a.js", false],
978
+ ["/repo/**", "/repo/x/y.js", true],
979
+ ["a?.js", "/repo/ab.js", true],
980
+ ["a?.js", "/repo/a/.js", false],
981
+ ["src/a*b*c.js", "/repo/src/axbyc.js", true],
982
+ ["src/a*b*c.js", "/repo/src/axbyd.js", false],
983
+ ["s*c/*.js", "/repo/src/a.js", true],
984
+ ["s*/**/z.js", "/repo/src/a/b/z.js", true],
985
+ ["re.o/*.js", "/repo/re.o/a.js", true],
986
+ ["re.o/*.js", "/repo/rexo/a.js", false],
987
+ ["a**/b.js", "/repo/ax/y/b.js", true],
988
+ ["a*a*b.js", "/repo/aaab.js", true],
989
+ ["src/*/a.js", "/repo/src/x/y/a.js", false],
990
+ ];
991
+ for (const [glob, filePath, covered] of covers) {
992
+ const found = detectUnverifiedAssumption(readThenEdited(glob, filePath));
993
+ assert.equal(found.length === 0, covered, `${glob} over ${filePath}`);
994
+ }
995
+ });
996
+ test("a read of many stars is held up to an edit in time proportional to it", () => {
997
+ const started = performance.now();
998
+ const found = detectUnverifiedAssumption(readThenEdited(`${"*a".repeat(6)}*b`, `/${"a".repeat(60)}`));
999
+ const took = performance.now() - started;
1000
+ assert.equal(found.length, 1);
1001
+ assert.ok(took < 1000, `took ${took} ms`);
1002
+ });
1003
+ test("a read of more stars than a pattern can hold is a read like any other", () => {
1004
+ assert.equal(detectUnverifiedAssumption(readThenEdited(`${"*".repeat(128000)}a.js`, "/repo/a.js")).length, 0);
1005
+ assert.equal(detectUnverifiedAssumption(readThenEdited(`${"*?".repeat(64000)}b`, "/repo/a.js")).length, 1);
1006
+ });
1007
+ test("many long globs against many long paths give up rather than take hours", () => {
1008
+ const records = [];
1009
+ const stretch = "a".repeat(2000);
1010
+ for (let i = 0; i < 40; i += 1)
1011
+ records.push(read(`r${i}`, i === 0 ? "pad19" : `r${i - 1}`, `/**${stretch}${i}b`));
1012
+ for (let i = 0; i < 40; i += 1)
1013
+ records.push(edited(`e${i}`, i === 0 ? "r39" : `e${i - 1}`, `/${stretch}${stretch}${i}`));
1014
+ const session = padded(records);
1015
+ const started = performance.now();
1016
+ detectUnverifiedAssumption(session);
1017
+ detectStaleContext(session);
1018
+ const took = performance.now() - started;
1019
+ assert.ok(took < 5000, `took ${took} ms`);
1020
+ });
1021
+ test("a failed check is read once, not again for each edit after it", () => {
1022
+ const command = `npm test ${"a ".repeat(150_000)}`;
1023
+ const edits = Array.from({ length: 300 }, (_, i) => ({ type: "tool_use", id: `e${i}`, name: "Edit", input: { file_path: "/repo/src/a.ts", old_string: "a", new_string: "b" } }));
1024
+ const session = padded([
1025
+ assistant("c", "pad19", [{ type: "tool_use", id: "bash", name: "Bash", input: { command } }]),
1026
+ result("cr", "c", "bash", { message: { role: "user", content: [{ type: "tool_result", tool_use_id: "bash", content: "failed", is_error: true }] } }),
1027
+ assistant("e", "cr", edits),
1028
+ ]);
1029
+ const started = performance.now();
1030
+ detectErrorSuppressed(session);
1031
+ const took = performance.now() - started;
1032
+ assert.ok(took < 3000, `took ${took} ms`);
1033
+ });
1034
+ /** A session around the record of one edit: `before` holds what stands so many records back, and the rest is filler. */
1035
+ function aroundAnEdit(editRecord, before, after = []) {
1036
+ const contents = [];
1037
+ for (let back = Math.max(0, ...before.keys()); back >= 1; back -= 1)
1038
+ contents.push(before.get(back) ?? [{ type: "text", text: "x" }]);
1039
+ contents.push(editRecord);
1040
+ if (after.length > 0)
1041
+ contents.push(after);
1042
+ return padded(contents.map((content, i) => assistant(`r${i}`, i === 0 ? "pad19" : `r${i - 1}`, content)));
1043
+ }
1044
+ const bashCall = (id) => ({ type: "tool_use", id, name: "Bash", input: { command: "npm test" } });
1045
+ /** The call and its result in one record, so that the result takes no place among those counted back. */
1046
+ const failedCall = (id) => [bashCall(id), { type: "tool_result", tool_use_id: id, content: "1 test FAILED" }];
1047
+ test("a failing call counts for ten records before an edit, on each of the three ways to ask", () => {
1048
+ const weakening = { type: "tool_use", id: "edit", name: "Edit", input: { file_path: "/r/t/a.test.ts", old_string: "expect(a).toBe(1);\nexpect(b).toBe(2);", new_string: "expect(a).toBe(1);" } };
1049
+ const sed = { type: "tool_use", id: "edit", name: "Bash", input: { command: "sed -i x t/a.test.ts" } };
1050
+ const suppression = { type: "tool_use", id: "edit", name: "Edit", input: { file_path: "/r/src/a.ts", old_string: "const x = f();", new_string: "// @ts-ignore\nconst x = f();" } };
1051
+ const asks = [
1052
+ ["a weakened test", weakening, (session) => detectTestModifiedToPass(session)[0].weight === 0.9],
1053
+ ["a sed on a test", sed, (session) => detectTestModifiedToPass(session).length === 1],
1054
+ ["a suppression", suppression, (session) => detectErrorSuppressed(session)[0].weight === 0.7],
1055
+ ];
1056
+ const failedRead = [{ type: "tool_use", id: "f", name: "Read", input: { file_path: "/r/a" } }, { type: "tool_result", tool_use_id: "f", content: "FAILED", is_error: true }];
1057
+ for (const [label, edit, seesFailure] of asks) {
1058
+ for (const [back, counted] of [[1, true], [10, true], [11, false]]) {
1059
+ assert.equal(seesFailure(aroundAnEdit([edit], new Map([[back, failedCall("f")]]))), counted, `${label}, ${back} back`);
1060
+ }
1061
+ assert.equal(seesFailure(aroundAnEdit([...failedCall("f"), edit], new Map())), false, `${label}, in its own record`);
1062
+ assert.equal(seesFailure(aroundAnEdit([edit], new Map(), failedCall("f"))), false, `${label}, after it`);
1063
+ assert.equal(seesFailure(aroundAnEdit([edit], new Map([[1, [bashCall("f")]]]))), false, `${label}, a call with no result`);
1064
+ assert.equal(seesFailure(aroundAnEdit([edit], new Map([[1, failedRead]]))), false, `${label}, a failure of no shell call`);
1065
+ }
1066
+ });
1067
+ test("a finding starts from the earliest failing call in reach of its edit", () => {
1068
+ const sed = { type: "tool_use", id: "edit", name: "Bash", input: { command: "sed -i x t/a.test.ts" } };
1069
+ const session = aroundAnEdit([sed], new Map([[12, failedCall("out")], [9, failedCall("first")], [3, failedCall("second")]]));
1070
+ const startedAt = (id) => session.toolUses.find((use) => use.id === id)?.timestamp;
1071
+ const [found] = detectTestModifiedToPass(session);
1072
+ assert.equal(found?.startedAt, startedAt("first"));
1073
+ assert.notEqual(startedAt("first"), startedAt("second"));
1074
+ assert.notEqual(startedAt("first"), startedAt("out"));
1075
+ });
1076
+ test("what edits ask of a session's calls comes to one look at each, however many edits ask", () => {
1077
+ // Counted and not timed: a look at each call for each edit is seconds at this size, which a
1078
+ // loaded machine can match, and a million looks here against the few thousand of one round.
1079
+ const calls = 2000;
1080
+ const edits = 500;
1081
+ const bash = Array.from({ length: calls }, (_, i) => bashCall(`b${i}`));
1082
+ const failures = bash.map((_, i) => ({ type: "tool_result", tool_use_id: `b${i}`, content: "no", is_error: true }));
1083
+ const seds = Array.from({ length: edits }, (_, i) => ({ type: "tool_use", id: `s${i}`, name: "Bash", input: { command: "sed -i x t/a.test.ts" } }));
1084
+ const suppressions = Array.from({ length: edits }, (_, i) => ({ type: "tool_use", id: `e${i}`, name: "Edit", input: { file_path: "/r/src/a.ts", old_string: "const x = f();", new_string: "// @ts-ignore\nconst x = f();" } }));
1085
+ const asked = [...seds, ...suppressions];
1086
+ const gap = Array.from({ length: 12 }, () => [{ type: "text", text: "x" }]);
1087
+ const forms = [
1088
+ ["no results", [bash, asked]],
1089
+ ["all failed right before", [bash, failures, asked]],
1090
+ ["all failed out of reach", [bash, failures, ...gap, asked]],
1091
+ ["all failed after", [asked, bash, failures]],
1092
+ ];
1093
+ for (const [label, contents] of forms) {
1094
+ const session = padded(contents.map((content, i) => assistant(`f${i}`, i === 0 ? "pad19" : `f${i - 1}`, content)));
1095
+ let looks = 0;
1096
+ session.toolUses = session.toolUses.map((use) => new Proxy(use, {
1097
+ get(target, key, receiver) {
1098
+ looks += 1;
1099
+ return Reflect.get(target, key, receiver);
1100
+ },
1101
+ }));
1102
+ detectTestModifiedToPass(session);
1103
+ detectErrorSuppressed(session);
1104
+ const perCall = looks / session.toolUses.length;
1105
+ assert.ok(perCall < 20, `${label}: ${Math.round(perCall)} looks at each of ${session.toolUses.length} calls`);
1106
+ }
1107
+ });
1108
+ test("the output of a call no edit reaches is never read", () => {
1109
+ // Counted and not timed: a record's many blocks can each carry its one output of megabytes, so
1110
+ // a read of it per call is half a minute from an upload of a few kilobytes.
1111
+ const sed = { type: "tool_use", id: "edit", name: "Bash", input: { command: "sed -i x t/a.test.ts" } };
1112
+ const calls = [bashCall("b0"), bashCall("b1")];
1113
+ const results = calls.map((_, i) => ({ type: "tool_result", tool_use_id: `b${i}`, content: "1 test FAILED" }));
1114
+ const gap = Array.from({ length: 12 }, () => [{ type: "text", text: "x" }]);
1115
+ const forms = [
1116
+ ["before its reach", [calls, results, ...gap, [sed]]],
1117
+ ["after the edit", [[sed], calls, results]],
1118
+ ];
1119
+ for (const [label, contents] of forms) {
1120
+ const session = padded(contents.map((content, i) => assistant(`g${i}`, i === 0 ? "pad19" : `g${i - 1}`, content)));
1121
+ let reads = 0;
1122
+ for (const use of session.toolUses) {
1123
+ if (use.result === undefined)
1124
+ continue;
1125
+ use.result = new Proxy(use.result, {
1126
+ get(target, key, receiver) {
1127
+ if (key === "stdout" || key === "stderr" || key === "text")
1128
+ reads += 1;
1129
+ return Reflect.get(target, key, receiver);
1130
+ },
1131
+ });
1132
+ }
1133
+ assert.deepEqual(detectTestModifiedToPass(session), [], label);
1134
+ assert.deepEqual(detectErrorSuppressed(session), [], label);
1135
+ assert.equal(reads, 0, label);
1136
+ }
1137
+ });
1138
+ function assertQuick(label, run, limit = 2000) {
1139
+ const started = performance.now();
1140
+ run();
1141
+ const took = performance.now() - started;
1142
+ assert.ok(took < limit, `${label} took ${Math.round(took)} ms`);
1143
+ }
1144
+ test("a manifest of blank lines or of an open table is read in time proportional to it", () => {
1145
+ for (const [file, text] of [
1146
+ ["requirements.txt", "\n".repeat(40_000)],
1147
+ ["requirements.txt", " \n".repeat(40_000)],
1148
+ ["pyproject.toml", "\n".repeat(40_000)],
1149
+ ["pyproject.toml", ` ${"\n ".repeat(40_000)}`],
1150
+ ["pyproject.toml", `[${" ".repeat(3_000)}`],
1151
+ ]) {
1152
+ assertQuick(`${file} of ${JSON.stringify(text.slice(0, 2))}`, () => addedDependencies(`/r/${file}`, "", text));
1153
+ }
1154
+ });
1155
+ test("a dependency is found behind blank lines and indentation, and a table however it is spaced", () => {
1156
+ assert.deepEqual(addedDependencies("/r/requirements.txt", "", "\n\n \n\trequests==2.31.0\r\n\r\n\u00a0flask>=2\n\ufeffclick~=8\n"), ["click", "flask", "requests"]);
1157
+ assert.deepEqual(addedDependencies("/r/Gemfile", "", "\n \n gem 'rails'\n"), ["rails"]);
1158
+ assert.deepEqual(addedDependencies("/r/go.mod", "", "\n \n require github.com/a/b v1.0.0\n"), ["github.com/a/b"]);
1159
+ assert.deepEqual(addedDependencies("/r/Cargo.toml", "", '\n\n[ dependencies ] # pinned\n\n serde = "1.0"\n\n[[ bin ]]\nclap = "4"\n'), ["serde"]);
1160
+ assert.deepEqual(addedDependencies("/r/Cargo.toml", "", '\n \n "serde" = "1.0"\n'), ["serde"]);
1161
+ assert.deepEqual(addedDependencies("/r/pyproject.toml", "", '\n\n[ project ]\n\n dependencies = ["click"]\n'), ["click"]);
1162
+ });
1163
+ test("a command that says one thing over and over is read in time proportional to it", () => {
1164
+ const destructive = (command) => detectDestructiveCommand(padded([ran("b", "pad19", command)]));
1165
+ assertQuick("a run of dots", () => installedPackages(`npm install ${".".repeat(100_000)}a`));
1166
+ assertQuick("a run of spaces after a delete", () => destructive(`DELETE FROM a${" ".repeat(100_000)}x`));
1167
+ assertQuick("many pushes", () => destructive("git push ".repeat(20_000)));
1168
+ assertQuick("a run of spaces after a push", () => destructive(`git push${" ".repeat(40_000)}${"x".repeat(40_000)}`));
1169
+ });
1170
+ test("a package, a delete and a force push are found however they are spaced", () => {
1171
+ assert.deepEqual(installedPackages("npm install left-pad, and more")?.packages, ["left-pad"]);
1172
+ assert.deepEqual(installedPackages("npm install left-pad...")?.packages, ["left-pad"]);
1173
+ assert.equal(installedPackages("npm install ...a"), undefined);
1174
+ for (const [command, fires, detail] of [
1175
+ ["DELETE FROM a", true, "no WHERE clause"],
1176
+ ["delete from a ;", true, "no WHERE clause"],
1177
+ ['psql -c "DELETE FROM a " ', true, "no WHERE clause"],
1178
+ ["psql -c 'DELETE FROM a'", true, "no WHERE clause"],
1179
+ ["DELETE FROM a WHERE b", false, "no WHERE clause"],
1180
+ ["git push origin main --force", true, "force-pushed"],
1181
+ ["git push \t origin --force", true, "force-pushed"],
1182
+ ["git push origin -f", true, "force-pushed"],
1183
+ ["git push -f", true, "force-pushed"],
1184
+ ["git push a git push b --force", true, "force-pushed"],
1185
+ ["git push --force-with-lease git push --force", true, "force-pushed"],
1186
+ ["git push a git push -f", true, "force-pushed"],
1187
+ ["git push git push git push -f", true, "force-pushed"],
1188
+ ["git push origin --force-with-lease", false, "force-pushed"],
1189
+ ["git push origin main", false, "force-pushed"],
1190
+ ]) {
1191
+ const found = detectDestructiveCommand(padded([ran("b", "pad19", command)]));
1192
+ assert.equal(found.some((candidate) => candidate.detail.includes(detail)), fires, command);
1193
+ }
1194
+ });
1195
+ test("a discard is held up to a session's files once, however many paths it names", () => {
1196
+ const files = Array.from({ length: 200 }, (_, index) => edited(`e${index}`, "pad19", `/r/f${index}.ts`));
1197
+ const discards = Array.from({ length: 8 }, (_, index) => ran(`g${index}`, "e199", `git checkout ${"z ".repeat(20_000)}`));
1198
+ const session = padded([...files, ...discards]);
1199
+ assertQuick("many paths", () => detectAbandonedApproach(session));
1200
+ });
1201
+ test("a discard goes by the last part of a path, in or out of quotes", () => {
1202
+ for (const [command, fires] of [
1203
+ ["git checkout -- src/app.ts", true],
1204
+ ["git checkout -- ./src/app.ts", true],
1205
+ ["git checkout -- app.ts", true],
1206
+ ["git checkout -- other/app.ts", true],
1207
+ ['git restore "src/app.ts"', true],
1208
+ ["git restore 'app.ts' b.ts", true],
1209
+ ["git restore b.ts app.ts", true],
1210
+ ["git checkout -- .", true],
1211
+ ["git restore '*'", true],
1212
+ ["git checkout -- src/app.tsx", false],
1213
+ ["git restore pp.ts", false],
1214
+ ["git restore src/", false],
1215
+ ]) {
1216
+ const session = padded([edited("e", "pad19", "/r/src/app.ts"), ran("g", "e", command)]);
1217
+ const found = detectAbandonedApproach(session).filter((candidate) => candidate.detail.includes("git command"));
1218
+ assert.equal(found.length, fires ? 1 : 0, command);
1219
+ }
1220
+ });
1221
+ test("the rule for a dropped exception looks from one except as far as the next", () => {
1222
+ const rule = SUPPRESSORS.find(({ pattern }) => pattern.source.startsWith("except"));
1223
+ assertQuick("many excepts", () => "except ".repeat(1_000_000).match(rule.pattern));
1224
+ for (const [text, count] of [
1225
+ ["except except:\n pass\n", 1],
1226
+ ["except (exceptions.A, exceptions.B):\n pass\n", 1],
1227
+ ["except A: # except this\n pass\n", 1],
1228
+ ["except A: x\nexcept B:\n pass\nexcept C:\n pass\n", 2],
1229
+ ]) {
1230
+ assert.equal(text.match(rule.pattern)?.length, count, text);
1231
+ }
1232
+ });
1233
+ test("what a command printed is looked through once, not again for each edit after it", () => {
1234
+ const printed = "x".repeat(16_000_000);
1235
+ const session = padded([
1236
+ ran("c", "pad19", "true"),
1237
+ result("cr", "c", "bash-c", { toolUseResult: { stdout: printed, stderr: printed } }),
1238
+ ran("s", "cr", `sed -i x ${"tests/a.ts ".repeat(1000)}`),
1239
+ ]);
1240
+ assertQuick("many edits", () => assert.deepEqual(detectTestModifiedToPass(session), []));
1241
+ });
1242
+ test("a long edit is held up to the ones before it in time proportional to them", () => {
1243
+ const stretch = "q".repeat(1400);
1244
+ const steps = Array.from({ length: 8000 }, () => ({ old_string: `${stretch}1`, new_string: `${stretch}2` }));
1245
+ const session = padded([assistant("m", "pad19", [{ type: "tool_use", id: "t1", name: "MultiEdit", input: { file_path: "/r/a.ts", edits: steps } }])]);
1246
+ assertQuick("many steps", () => assert.deepEqual(detectAbandonedApproach(session), []));
1247
+ });
1248
+ test("an edit undoes one before it only if each one's two sides are the other's", () => {
1249
+ const editing = (uuid, parent, old_string, new_string) => assistant(uuid, parent, [{ type: "tool_use", id: `t-${uuid}`, name: "Edit", input: { file_path: "/r/a.ts", old_string, new_string } }]);
1250
+ const undone = (first, second) => detectAbandonedApproach(padded([editing("e1", "pad19", ...first), editing("e2", "e1", ...second)])).length;
1251
+ assert.equal(undone(["ab", "c"], ["c", "ab"]), 1);
1252
+ assert.equal(undone(["ab", "c"], ["bc", "a"]), 0);
1253
+ assert.equal(undone(["ab", "c"], ["ab", "c"]), 0);
1254
+ });
1255
+ test("a discard takes the last part of each file's path once, however many discards there are", () => {
1256
+ const stretch = "p".repeat(5000);
1257
+ const files = Array.from({ length: 500 }, (_, index) => edited(`e${index}`, "pad19", `/${stretch}${index}`));
1258
+ const discards = Array.from({ length: 2000 }, (_, index) => ran(`g${index}`, "e499", "git checkout z"));
1259
+ const session = padded([...files, ...discards]);
1260
+ assertQuick("many long paths", () => detectAbandonedApproach(session));
1261
+ });
1262
+ test("a discard names the first edit of each file it took back, not one made after it", () => {
1263
+ const session = padded([ran("g", "pad19", "git checkout a.ts"), edited("e1", "g", "/r/a.ts")]);
1264
+ assert.deepEqual(detectAbandonedApproach(session).filter((c) => c.detail.includes("discarded")), []);
1265
+ const taken = padded([edited("e1", "pad19", "/r/a.ts"), ran("g", "e1", "git checkout a.ts"), edited("e2", "g", "/r/a.ts")]);
1266
+ assert.deepEqual(detectAbandonedApproach(taken).filter((c) => c.detail.includes("discarded")).map((c) => c.filePath), ["/r/a.ts"]);
1267
+ });
1268
+ test("a side chain is walked once, however many edits stand on it", () => {
1269
+ const records = [];
1270
+ const parentOf = (index) => (index === 0 ? "pad19" : `c${index - 1}`);
1271
+ for (let index = 0; index < 60_000; index += 1)
1272
+ records.push(assistant(`c${index}`, parentOf(index), [{ type: "text", text: "x" }]));
1273
+ for (let index = 0; index < 2000; index += 1)
1274
+ records.push(edited(`e${index}`, index === 0 ? "c59999" : `e${index - 1}`, "/r/a.ts"));
1275
+ records.push(assistant("live", "pad19", [{ type: "text", text: "different approach" }]));
1276
+ records.push(assistant("tip", "live", [{ type: "text", text: "done" }]));
1277
+ const session = padded(records);
1278
+ let found = 0;
1279
+ assertQuick("a long chain", () => {
1280
+ found = detectAbandonedApproach(session).filter((c) => c.detail.includes("branch")).length;
1281
+ });
1282
+ assert.equal(found, 1);
1283
+ });
1284
+ test("many long reads against many edited files give up rather than take minutes, but for the path itself", () => {
1285
+ const stretch = "r".repeat(1000);
1286
+ const reads = Array.from({ length: 20_000 }, (_, index) => read(`r${index}`, index === 0 ? "pad19" : `r${index - 1}`, `${stretch}${index}`));
1287
+ const files = Array.from({ length: 1000 }, (_, index) => edited(`e${index}`, index === 0 ? "last" : `e${index - 1}`, `/r/f${index}.ts`));
1288
+ const session = padded([...reads, read("last", "r19999", "/r/f999.ts"), ...files]);
1289
+ let found = [];
1290
+ // What the budget still lets through is seconds on a busy machine, and all of it minutes.
1291
+ assertQuick("long reads", () => {
1292
+ found = detectUnverifiedAssumption(session);
1293
+ }, 8000);
1294
+ assert.equal(found.length, 999);
1295
+ });
1296
+ test("many reads that share a long start with many edited files give up rather than take minutes", () => {
1297
+ const stretch = "/".concat("r".repeat(2000));
1298
+ const reads = Array.from({ length: 5000 }, (_, index) => read(`r${index}`, index === 0 ? "pad19" : `r${index - 1}`, `${stretch}${index}`));
1299
+ const files = Array.from({ length: 1000 }, (_, index) => edited(`e${index}`, index === 0 ? "r4999" : `e${index - 1}`, `${stretch}/f${index}.ts`));
1300
+ const session = padded([...reads, ...files]);
1301
+ // What the budget still lets through is seconds on a busy machine, and all of it minutes.
1302
+ assertQuick("shared starts", () => detectUnverifiedAssumption(session), 20_000);
1303
+ });
688
1304
  //# sourceMappingURL=stage0.test.js.map