@mark1russell7/rigor-mutation 0.2.17 → 0.2.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/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as runCli } from "./run-BEUhSals.js";
2
+ import { n as runCli } from "./run-BuyXK1nO.js";
3
3
  // src/cli.ts
4
4
  try {
5
5
  process.exitCode = runCli(process.argv.slice(2), {
package/build/collect.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import { readFileSync, realpathSync, writeFileSync } from "node:fs";
2
3
  import { createRequire } from "node:module";
3
4
  import { join, relative, resolve } from "node:path";
4
- import { readFileSync, realpathSync, writeFileSync } from "node:fs";
5
5
  import { pathToFileURL } from "node:url";
6
6
  // src/collect.ts
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"collect.js","names":[],"sources":["../src/collect.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * The collect of `load-check --collect`. The CLI starts this file in a new process for each package:\n * `node collect.ts <request> <out>`. The request is a `CollectRequest` as JSON. The script loads the Vitest that the\n * folder resolves. That Vitest collects each test file, and the script writes a `Collected` as JSON to `<out>`.\n *\n * The option `staticParse: false` makes Vitest start each file. Under Vitest 5 the default form only parses a file, so\n * it does not find a missing package. Then for each selection, the script sets `related` to its mutated files. It reads\n * the test files that the related mode starts, as the runner of Stryker does.\n */\nimport { readFileSync, realpathSync, writeFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { join, relative, resolve } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { Collected, CollectRequest } from \"./load.ts\";\n\nconst [requestFile, out] = process.argv.slice(2);\nif (requestFile === undefined || out === undefined) throw new Error(\"collect.ts takes <request> <out>\");\nconst request = JSON.parse(readFileSync(requestFile, \"utf8\")) as CollectRequest;\nconst root = resolve(request.dir);\nconst fromRoot = (file: string): string => relative(root, file).replaceAll(\"\\\\\", \"/\");\n// Each package reads the Vitest of its own folder, as the runner of Stryker does.\nconst entry = createRequire(join(root, \"package.json\")).resolve(\"vitest/node\");\nconst vitestNode = (await import(pathToFileURL(entry).href)) as typeof import(\"vitest/node\");\nprocess.chdir(root);\nconst config = request.config === undefined ? {} : { config: resolve(root, request.config) };\nconst vitest = await vitestNode.createVitest(\"test\", { root, watch: false, ...config });\ntry {\n const { testModules, unhandledErrors } = await vitest.collect(undefined, { staticParse: false });\n const message = (e: unknown): string => (e instanceof Error ? e.message : String(e));\n const unhandled = unhandledErrors.map(message);\n const selections: Record<string, string[]> = {};\n for (const [name, files] of Object.entries(request.selections)) {\n selections[name] = [];\n // An empty list of related files makes Vitest start each test file, so a selection with no file starts none.\n if (files.length === 0) continue;\n (vitest.config as { related?: string[] }).related = files.map((f) => resolve(root, f));\n try {\n const specifications = await vitest.getRelevantTestSpecifications();\n selections[name] = [...new Set(specifications.map((s) => fromRoot(s.moduleId)))].toSorted();\n } catch (e) {\n unhandled.push(`the related mode of Vitest failed for the selection ${name}: ${message(e)}`);\n }\n }\n const collected: Collected = {\n version: vitestNode.version,\n path: realpathSync(entry).replaceAll(\"\\\\\", \"/\"),\n files: testModules.map((m) => ({ file: fromRoot(m.moduleId), errors: m.errors().map((e) => e.message), children: m.children.size })),\n unhandled,\n selections,\n };\n writeFileSync(out, `${JSON.stringify(collected)}\\n`);\n // Vitest sets the exit code 1 for a file that does not load. The file of the collect gives that fault.\n process.exitCode = 0;\n} finally {\n await vitest.close();\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAM,CAAC,aAAa,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC/C,IAAI,gBAAgB,KAAA,KAAa,QAAQ,KAAA,GAAW,MAAM,IAAI,MAAM,kCAAkC;AACtG,MAAM,UAAU,KAAK,MAAM,aAAa,aAAa,MAAM,CAAC;AAC5D,MAAM,OAAO,QAAQ,QAAQ,GAAG;AAChC,MAAM,YAAY,SAAyB,SAAS,MA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EAAE,OAAO,CAAC,CAAC,KAAK,MAAM,EAAE,OAAO;GAAG,UAAU,EAAE,SAAS;EAAK,EAAE;EACnI;EACA;CACF;CACA,cAAc,KAAK,GAAG,KAAK,UAAU,SAAS,EAAE,GAAG;CAEnD,QAAQ,WAAW;AACrB,UAAU;CACR,MAAM,OAAO,MAAM;AACrB"}
1
+ {"version":3,"file":"collect.js","names":[],"sources":["../src/collect.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * The collect of `load-check --collect`. The CLI starts this file in a new process for each package:\n * `node collect.ts <request> <out>`. The request is a `CollectRequest` as JSON. The script loads the Vitest that the\n * folder resolves. That Vitest collects each test file, and the script writes a `Collected` as JSON to `<out>`.\n *\n * The option `staticParse: false` makes Vitest start each file. Under Vitest 5 the default form only parses a file, so\n * it does not find a missing package. Then for each selection, the script sets `related` to its mutated files. It reads\n * the test files that the related mode starts, as the runner of Stryker does.\n */\nimport { readFileSync, realpathSync, writeFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { join, relative, resolve } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { Collected, CollectRequest } from \"./load.ts\";\n\nconst [requestFile, out] = process.argv.slice(2);\nif (requestFile === undefined || out === undefined) throw new Error(\"collect.ts takes <request> <out>\");\nconst request = JSON.parse(readFileSync(requestFile, \"utf8\")) as CollectRequest;\nconst root = resolve(request.dir);\nconst fromRoot = (file: string): string => relative(root, file).replaceAll(\"\\\\\", \"/\");\n// Each package reads the Vitest of its own folder, as the runner of Stryker does.\nconst entry = createRequire(join(root, \"package.json\")).resolve(\"vitest/node\");\nconst vitestNode = (await import(pathToFileURL(entry).href)) as typeof import(\"vitest/node\");\nprocess.chdir(root);\nconst config = request.config === undefined ? {} : { config: resolve(root, request.config) };\nconst vitest = await vitestNode.createVitest(\"test\", { root, watch: false, ...config });\ntry {\n const { testModules, unhandledErrors } = await vitest.collect(undefined, { staticParse: false });\n const message = (e: unknown): string => (e instanceof Error ? e.message : String(e));\n const unhandled = unhandledErrors.map(message);\n const selections: Record<string, string[]> = {};\n for (const [name, files] of Object.entries(request.selections)) {\n selections[name] = [];\n // An empty list of related files makes Vitest start each test file, so a selection with no file starts none.\n if (files.length === 0) continue;\n (vitest.config as { related?: string[] }).related = files.map((f) => resolve(root, f));\n try {\n const specifications = await vitest.getRelevantTestSpecifications();\n selections[name] = [...new Set(specifications.map((s) => fromRoot(s.moduleId)))].toSorted();\n } catch (e) {\n unhandled.push(`the related mode of Vitest failed for the selection ${name}: ${message(e)}`);\n }\n }\n const collected: Collected = {\n version: vitestNode.version,\n path: realpathSync(entry).replaceAll(\"\\\\\", \"/\"),\n files: testModules.map((m) => ({ file: fromRoot(m.moduleId), errors: m.errors().map((e) => e.message), children: m.children.size })),\n unhandled,\n selections,\n };\n writeFileSync(out, `${JSON.stringify(collected)}\\n`);\n // Vitest sets the exit code 1 for a file that does not load. The file of the collect gives that fault.\n process.exitCode = 0;\n} finally {\n await vitest.close();\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAM,CAAC,aAAa,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC/C,IAAI,gBAAgB,KAAA,KAAa,QAAQ,KAAA,GAAW,MAAM,IAAI,MAAM,kCAAkC;AACtG,MAAM,UAAU,KAAK,MAAM,aAAa,aAAa,MAAM,CAAC;AAC5D,MAAM,OAAO,QAAQ,QAAQ,GAAG;AAChC,MAAM,YAAY,SAAyB,SAAS,MAAM,IAAI,CAAC,CAAC,WAAW,MAAM,GAAG;AAEpF,MAAM,QAAQ,cAAc,KAAK,MAAM,cAAc,CAAC,CAAC,CAAC,QAAQ,aAAa;AAC7E,MAAM,aAAc,MAAM,OAAO,cAAc,KAAK,CAAC,CAAC;AACtD,QAAQ,MAAM,IAAI;AAClB,MAAM,SAAS,QAAQ,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,QAAQ,MAAM,QAAQ,MAAM,EAAE;AAC3F,MAAM,SAAS,MAAM,WAAW,aAAa,QA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TestOfDryRun, c as FilePlan, d as PLAN_PER_CLOCK, f as PlanLimits, g as SPEED_MIN_MS, h as RunnerPlan, i as ReporterOptions, k as testPlans, l as LinePlan, m as PlanRead, n as PartialLine, p as PlanOfMutant, r as PartialReporter, s as DryRun, t as PARTIAL_FILE, u as PLAN_FILE, v as SelectionPlan, w as filePlans, x as TestPlan, y as TARGET_MINUTES } from "./reporter-unJLMWXg.js";
1
+ import { C as dryRunOf, D as speedFactors, E as readPlan, O as staticFaults, S as clockMinutes, T as parsePlan, _ as STOP_MINUTES, b as TestOfDryRun, c as FilePlan, d as PLAN_PER_CLOCK, f as PlanLimits, g as SPEED_MIN_MS, h as RunnerPlan, i as ReporterOptions, k as testPlans, l as LinePlan, m as PlanRead, n as PartialLine, p as PlanOfMutant, r as PartialReporter, s as DryRun, t as PARTIAL_FILE, u as PLAN_FILE, v as SelectionPlan, w as filePlans, x as TestPlan, y as TARGET_MINUTES } from "./reporter-Cyp2mDOV.js";
2
2
  /**
3
3
  * The lane file of a repository (`mutation.json`) names the packages that the mutation tests mutate. A package has
4
4
  * its folder, its globs and an optional gate. A big package has parts, so that each part has its own runner.
package/build/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as segmentsOf, C as rewritesTsconfig, D as lineWeights, E as cutByCost, F as parseLane, I as partErrors, L as runSelections, M as STRYKER_OWNED, N as changedFiles, O as parseCostMaps, P as packageRuns, R as select, S as TIMEOUT_MS, T as costMapOf, _ as summaryMarkdown, a as isConfigFile, b as PARTIAL_PLUGIN, c as compareDisables, d as isHitLimit, f as packageScore, g as scoreReport, h as partialScore, i as computedImports, j as weightedFiles, k as plannedMs, l as findDisables, m as parseReport, n as runCli, o as leavingPaths, p as parsePartial, r as collectFaults, s as relatedTestFiles, t as HELP, u as formatScore, v as DRY_RUN_TIMEOUT_MINUTES, w as strykerConfig, x as REPORT_DIR, y as NO_TSCONFIG, z as selectionNames } from "./run-BEUhSals.js";
2
- import { _ as testPlans, a as PLAN_FILE, c as STOP_MINUTES, d as dryRunOf, f as filePlans, g as staticFaults, h as speedFactors, l as TARGET_MINUTES, m as readPlan, n as PartialReporter, o as PLAN_PER_CLOCK, p as parsePlan, s as SPEED_MIN_MS, t as PARTIAL_FILE, u as clockMinutes } from "./reporter-D8cUJUhN.js";
1
+ import { A as segmentsOf, C as rewritesTsconfig, D as lineWeights, E as cutByCost, F as parseLane, I as partErrors, L as runSelections, M as STRYKER_OWNED, N as changedFiles, O as parseCostMaps, P as packageRuns, R as select, S as TIMEOUT_MS, T as costMapOf, _ as summaryMarkdown, a as isConfigFile, b as PARTIAL_PLUGIN, c as compareDisables, d as isHitLimit, f as packageScore, g as scoreReport, h as partialScore, i as computedImports, j as weightedFiles, k as plannedMs, l as findDisables, m as parseReport, n as runCli, o as leavingPaths, p as parsePartial, r as collectFaults, s as relatedTestFiles, t as HELP, u as formatScore, v as DRY_RUN_TIMEOUT_MINUTES, w as strykerConfig, x as REPORT_DIR, y as NO_TSCONFIG, z as selectionNames } from "./run-BuyXK1nO.js";
2
+ import { _ as testPlans, a as PLAN_FILE, c as STOP_MINUTES, d as dryRunOf, f as filePlans, g as staticFaults, h as speedFactors, l as TARGET_MINUTES, m as readPlan, n as PartialReporter, o as PLAN_PER_CLOCK, p as parsePlan, s as SPEED_MIN_MS, t as PARTIAL_FILE, u as clockMinutes } from "./reporter-DYpp-Jz3.js";
3
3
  export { DRY_RUN_TIMEOUT_MINUTES, HELP, NO_TSCONFIG, PARTIAL_FILE, PARTIAL_PLUGIN, PLAN_FILE, PLAN_PER_CLOCK, PartialReporter, REPORT_DIR, SPEED_MIN_MS, STOP_MINUTES, STRYKER_OWNED, TARGET_MINUTES, TIMEOUT_MS, changedFiles, clockMinutes, collectFaults, compareDisables, computedImports, costMapOf, cutByCost, dryRunOf, filePlans, findDisables, formatScore, isConfigFile, isHitLimit, leavingPaths, lineWeights, packageRuns, packageScore, parseCostMaps, parseLane, parsePartial, parsePlan, parseReport, partErrors, partialScore, plannedMs, readPlan, relatedTestFiles, rewritesTsconfig, runCli, runSelections, scoreReport, segmentsOf, select, selectionNames, speedFactors, staticFaults, strykerConfig, summaryMarkdown, testPlans, weightedFiles };
@@ -239,4 +239,4 @@ declare const strykerPlugins: readonly {
239
239
  readonly injectableClass: typeof PartialReporter;
240
240
  }[];
241
241
  export { dryRunOf as C, speedFactors as D, readPlan as E, staticFaults as O, clockMinutes as S, parsePlan as T, STOP_MINUTES as _, strykerPlugins as a, TestOfDryRun as b, FilePlan as c, PLAN_PER_CLOCK as d, PlanLimits as f, SPEED_MIN_MS as g, RunnerPlan as h, ReporterOptions as i, testPlans as k, LinePlan as l, PlanRead as m, PartialLine as n, strykerValidationSchema as o, PlanOfMutant as p, PartialReporter as r, DryRun as s, PARTIAL_FILE as t, PLAN_FILE as u, SelectionPlan as v, filePlans as w, TestPlan as x, TARGET_MINUTES as y };
242
- //# sourceMappingURL=reporter-unJLMWXg.d.ts.map
242
+ //# sourceMappingURL=reporter-Cyp2mDOV.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reporter-unJLMWXg.d.ts","names":[],"sources":["../src/plan.ts","../src/reporter.ts"],"mappings":";cAUa;;;;;cAMA;;cAGA;;;;;cAMA;;UAMI;WACN;WACA;aACE;aACA;aACA;;aAEA;eAAsB;iBAAkB;;;;WAE1C;;WAEA;aAAwB;aAA2B;;;;UAI7C;WACN;WACA;WACA;WACA;;;KAcC,qBAAqB,cAAc,cAAc,oBAAoB;;UAGhE;;WAEN;WACA;WACA;WACA;WACA;;WAEA,gBAAgB;;;KAIf,qBAAqB,cAAc,cAAc,YAAY,cAAc;;UAGtE;WACN;WACA;;;UAIM;WACN,OAAO,SAAS,eAAe;WAC/B,gBAAgB;;WAEhB,SAAS;;;iBAIJ,SAAS,gBAAgB,iBAAiB;;cAK7C;;UAGI;WACN;;WAEA;WACA,MAAM;;;;;;;;;;;;;iBAcD,aAAa,gBAAgB,eAAe;;iBAsC5C,UAAU,gBAAgB,gBAAgB,QAAO,8BAAyC,eAAe;;;;;iBA6BzG,UAAU,gBAAgB,gBAAgB,gBAAgB,gBAAgB,QAAO,6BAAwC,eAA0B;;iBAgBnJ,aAAa,eAAe;;UAK3B;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;WACN;WACA;WACA;;WAEA,eAAe,SAAS;;;;;;iBAOnB,aAAa,OAAO,SAAS,eAAe,YAAY,SAAQ,SAAS;;iBASzE,SAAS,cAAc,MAAM,eAAe,SAAQ,aAAkB;;;;;;iBAmBtE,UAAU,gBAAgB;;cC/P7B;;KAGD;WACG;WAAyB;;WACzB;WAAwB;WAAqB;WAA0B;;WAEvE;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;;WAEA;WAAwB;;;UAG7B;WACC;WACA;WACA;WACA;WACA;WACA;aAAqB;eAAkB;;;;;UAIjC;WACN;aAA0B;;;WAE1B;aAA0B;;;;cAIxB;kBACK;WACP;;WAEA;mBACQ;mBACA;mBACA;mBACA;UACT;UACA;EAER,YAAY,SAAS,iBAAiB,oBAA8B,cAA6B,QAAO;EAaxG,kBAAkB;aAAkB;eAAmB,gBAAgB;;;EAIvE,2BAA2B;aAAkB,sBAAsB;;EASnE,eAAe,QAAQ;EAOvB;;mBAKiB;UAGT;;;cAMG;WACX;WACA;WACA;aACE;eACE;eACA;eACA;iBAAc;mBAAiB;mBAAiE;mBAAiB;;;eACjH;eACA;;;;;cAMO;WAAoC;WAA2B;WAAuB,wBAAwB"}
1
+ {"version":3,"file":"reporter-Cyp2mDOV.d.ts","names":[],"sources":["../src/plan.ts","../src/reporter.ts"],"mappings":";cAUa;;;;;cAMA;;cAGA;;;;;cAMA;;UAMI;WACN;WACA;aACE;aACA;aACA;;aAEA;eAAsB;iBAAkB;;;;WAE1C;;WAEA;aAAwB;aAA2B;;;;UAI7C;WACN;WACA;WACA;WACA;;;KAcC,qBAAqB,cAAc,cAAc,oBAAoB;;UAGhE;;WAEN;WACA;WACA;WACA;WACA;;WAEA,gBAAgB;;;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dirSync, writeFileSync } from "node:fs";
1
2
  import { dirname, join, relative, sep } from "node:path";
2
3
  import { median } from "@mark1russell7/rigor-statistics";
3
- import { appendFileSync, mkdirSync, writeFileSync } from "node:fs";
4
4
  // src/plan.ts
5
5
  /**
6
6
  * The cost plan of a selection. Stryker makes a plan of the mutants after the run of the tests without mutants. The
@@ -303,4 +303,4 @@ const strykerPlugins = [{
303
303
  }];
304
304
  export { testPlans as _, PLAN_FILE as a, STOP_MINUTES as c, dryRunOf as d, filePlans as f, staticFaults as g, speedFactors as h, strykerValidationSchema as i, TARGET_MINUTES as l, readPlan as m, PartialReporter as n, PLAN_PER_CLOCK as o, parsePlan as p, strykerPlugins as r, SPEED_MIN_MS as s, PARTIAL_FILE as t, clockMinutes as u };
305
305
 
306
- //# sourceMappingURL=reporter-D8cUJUhN.js.map
306
+ //# sourceMappingURL=reporter-DYpp-Jz3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reporter-D8cUJUhN.js","names":[],"sources":["../src/plan.ts","../src/reporter.ts"],"sourcesContent":["/**\n * The cost plan of a selection. Stryker makes a plan of the mutants after the run of the tests without mutants. The\n * reporter `rigor-partial` writes the plan of each file and each line into `plan.json`. `plan-check` reads the file and\n * gives the estimate of the clock of the selection. It warns of a selection over its target. It fails a selection over\n * its stop, and a file over its limit of static runs. The cut of the parts can then follow the cost of the lines, and\n * not the size of the files.\n */\nimport { median } from \"@mark1russell7/rigor-statistics\";\n\n/** The name of the file of the plan, in the folder of the JSON report. */\nexport const PLAN_FILE = \"plan.json\";\n\n/**\n * The default planned net time of one minute of the clock. In a nightly run of Vex (GitHub Actions, 2 test processes),\n * the mutants that ended had 9.8 to 11.7 times the planned time of their clock. The lower value gives the longer estimate.\n */\nexport const PLAN_PER_CLOCK = 9.8;\n\n/** The default target of the estimate of a selection, in minutes. A slow runner then ends a job of 150 minutes. */\nexport const TARGET_MINUTES = 100;\n\n/**\n * The default stop of the estimate of a selection, in minutes. A selection over it does not end before the limit of the\n * job, so it cannot give a full score. The estimate has an error of 28 minutes in the mean, so the target only warns.\n */\nexport const STOP_MINUTES = 140;\n\n/** The count of the tests of the largest cost that the plan keeps. */\nexport const TOP_TESTS = 40;\n\n/** The parts of a plan of Stryker for one mutant that the reporter reads. */\nexport interface PlanOfMutant {\n readonly plan: string;\n readonly mutant: {\n readonly id: string;\n readonly fileName: string;\n readonly static?: boolean;\n /** The start of the mutant. In a plan, Stryker counts the lines from 0. */\n readonly location?: { readonly start: { readonly line: number } };\n };\n readonly netTime?: number;\n /** The tests that Stryker starts for the mutant. With no filter, Stryker starts all tests, as for a static mutant. */\n readonly runOptions?: { readonly timeout?: number; readonly testFilter?: readonly string[] };\n}\n\n/** The parts of a test of the run without mutants that the reporter reads. */\nexport interface TestOfDryRun {\n readonly id: string;\n readonly name: string;\n readonly fileName?: string;\n readonly timeSpentMs: number;\n}\n\n/** The planned times of one mutant that Stryker starts. */\nexport interface PlannedRun {\n readonly file: string;\n /** The line of the start of the mutant, counted from 1. The value 0 is a mutant with no location. */\n readonly line: number;\n readonly static: boolean;\n readonly netMs: number;\n readonly limitMs: number;\n}\n\n/** The plan of one line: the line from 1, the runs that start on it, the static runs of them, and their planned net time. */\nexport type LinePlan = readonly [line: number, runs: number, staticRuns: number, netMs: number];\n\n/** The plan of one file of a selection. */\nexport interface FilePlan {\n /** The mutants of the file, with the mutants that have an early result. */\n readonly mutants: number;\n readonly runs: number;\n readonly static: number;\n readonly netMs: number;\n readonly limitMs: number;\n /** The plan of each line with a run, in the order of the lines. */\n readonly lines: readonly LinePlan[];\n}\n\n/** The plan of one test: its name, its file, its time without mutants, the runs that start it, and their product. */\nexport type TestPlan = readonly [name: string, file: string, ms: number, runs: number, costMs: number];\n\n/** The run of the tests without mutants: the count of its tests and the sum of their times in milliseconds. */\nexport interface DryRun {\n readonly tests: number;\n readonly netMs: number;\n}\n\n/** The content of `plan.json`. The paths of the files are from the folder where Stryker starts. */\nexport interface SelectionPlan {\n readonly files: Readonly<Record<string, FilePlan>>;\n readonly tests: readonly TestPlan[];\n /** The run of the tests without mutants. A plan of a version before 0.2.6 has no `dryRun`. */\n readonly dryRun?: DryRun;\n}\n\n/** This function gives the run of the tests without mutants: the count of the tests and the sum of their times. */\nexport function dryRunOf(tests: readonly TestOfDryRun[]): DryRun {\n return { tests: tests.length, netMs: Math.round(tests.reduce((sum, test) => sum + test.timeSpentMs, 0)) };\n}\n\n/** A test of a plan counts for the speed of a runner only from this time in milliseconds. A short time is mostly noise. */\nexport const SPEED_MIN_MS = 200;\n\n/** The plan of one selection for the speed of its runner. */\nexport interface RunnerPlan {\n readonly name: string;\n /** The selections of one group run the same tests. A selection that is not a part of a group is a group of its own. */\n readonly group: string;\n readonly plan: SelectionPlan;\n}\n\n/**\n * This function gives the speed of the runner of each selection, relative to the other selections of its group. Each part\n * runs on its own runner, and in Vex the same tests took from 83 s to 149 s on the runners of one group.\n *\n * - When each plan of a group has a `dryRun` with the same count of tests, the factor uses the dry runs. It is the\n * net time of the dry run over the median of the group.\n * - Otherwise the factor is the median of the ratios of the shared tests. The ratio of a test is its time over its\n * median time in the group. A shared test takes `SPEED_MIN_MS` or more. At least half of the plans of the group\n * name it, and at least 2 plans.\n * - A selection with no shared test, or alone in its group, has the factor 1. A factor over 1 is a slow runner.\n */\nexport function speedFactors(plans: readonly RunnerPlan[]): Map<string, number> {\n const out = new Map<string, number>();\n for (const group of new Set(plans.map((p) => p.group))) {\n const members = plans.filter((p) => p.group === group);\n const runs = members.map((p) => p.plan.dryRun);\n const counts = new Set(runs.map((r) => r?.tests));\n if (members.length > 1 && counts.size === 1 && runs.every((r) => r !== undefined && r.tests > 0 && r.netMs > 0)) {\n const middle = median(runs.map((r) => r?.netMs ?? 0));\n for (const p of members) out.set(p.name, (p.plan.dryRun?.netMs ?? middle) / middle);\n continue;\n }\n const times = members.map((p) => new Map(p.plan.tests.filter((t) => t[2] >= SPEED_MIN_MS).map((t) => [`${t[1]}|${t[0]}`, t[2]])));\n const need = Math.max(2, Math.ceil(members.length / 2));\n const shared = [...new Set(times.flatMap((m) => [...m.keys()]))].filter((key) => times.filter((m) => m.has(key)).length >= need);\n const middles = new Map(shared.map((key) => [key, median(times.flatMap((m) => m.get(key) ?? []))]));\n members.forEach((p, i) => {\n const ratios = shared.flatMap((key) => {\n const ms = times[i]?.get(key);\n return ms === undefined ? [] : [ms / (middles.get(key) ?? ms)];\n });\n out.set(p.name, ratios.length === 0 ? 1 : median(ratios));\n });\n }\n return out;\n}\n\n/** This function gives the planned times of each mutant that Stryker starts, by the id of the mutant. */\nexport function plannedRuns(plans: readonly PlanOfMutant[], path: (fileName: string) => string = (f) => f): Map<string, PlannedRun> {\n const runs = new Map<string, PlannedRun>();\n for (const { plan, mutant, netTime, runOptions } of plans) {\n if (plan !== \"Run\") continue;\n const line = mutant.location === undefined ? 0 : mutant.location.start.line + 1;\n runs.set(mutant.id, { file: path(mutant.fileName), line, static: mutant.static === true, netMs: Math.round(netTime ?? 0), limitMs: Math.round(runOptions?.timeout ?? 0) });\n }\n return runs;\n}\n\n/** This function gives the plan of each file: its mutants, the mutants that Stryker starts, and their planned times. */\nexport function filePlans(plans: readonly PlanOfMutant[], path: (fileName: string) => string = (f) => f): Record<string, FilePlan> {\n const runs = plannedRuns(plans, path);\n type Row = { mutants: number; runs: number; static: number; netMs: number; limitMs: number; byLine: Map<number, [number, number, number, number]> };\n const files = new Map<string, Row>();\n for (const { mutant } of plans) {\n const file = path(mutant.fileName);\n const row = files.get(file) ?? { mutants: 0, runs: 0, static: 0, netMs: 0, limitMs: 0, byLine: new Map() };\n files.set(file, row);\n row.mutants += 1;\n const run = runs.get(mutant.id);\n if (run === undefined) continue;\n row.runs += 1;\n row.static += run.static ? 1 : 0;\n row.netMs += run.netMs;\n row.limitMs += run.limitMs;\n const line = row.byLine.get(run.line) ?? [run.line, 0, 0, 0];\n line[1] += 1;\n line[2] += run.static ? 1 : 0;\n line[3] += run.netMs;\n row.byLine.set(run.line, line);\n }\n const plan = ({ byLine, ...row }: Row): FilePlan => ({ ...row, lines: [...byLine.values()].toSorted((a, b) => a[0] - b[0]) });\n return Object.fromEntries([...files].toSorted(([a], [b]) => a.localeCompare(b)).map(([file, row]) => [file, plan(row)]));\n}\n\n/**\n * This function gives the tests of the largest planned cost, the largest first. The cost of a test is its time without\n * mutants, times the runs that start it. A test with a large cost is the first place to make the selection faster.\n */\nexport function testPlans(plans: readonly PlanOfMutant[], tests: readonly TestOfDryRun[], path: (fileName: string) => string = (f) => f, top: number = TOP_TESTS): TestPlan[] {\n const runs = new Map<string, number>(tests.map((test) => [test.id, 0]));\n let all = 0;\n for (const { plan, runOptions } of plans) {\n if (plan !== \"Run\") continue;\n if (runOptions?.testFilter === undefined) all += 1;\n else for (const id of runOptions.testFilter) runs.set(id, (runs.get(id) ?? 0) + 1);\n }\n const rows = tests.map((test): TestPlan => {\n const count = (runs.get(test.id) ?? 0) + all;\n return [test.name, test.fileName === undefined ? \"\" : path(test.fileName), Math.round(test.timeSpentMs), count, Math.round(count * test.timeSpentMs)];\n });\n return rows.toSorted((a, b) => b[4] - a[4] || a[0].localeCompare(b[0])).slice(0, top);\n}\n\n/** This function gives the estimate of the minutes of the clock of a planned net time. */\nexport function clockMinutes(netMs: number, planPerClock: number = PLAN_PER_CLOCK): number {\n return netMs / planPerClock / 60_000;\n}\n\n/** The read of the plan of a selection. */\nexport interface PlanRead {\n readonly runs: number;\n readonly static: number;\n readonly netMs: number;\n /** The estimate of the clock of the selection, in minutes. */\n readonly minutes: number;\n /** One line for a selection over its stop, and one for each file over its limit of static runs. */\n readonly faults: readonly string[];\n /** One line for a selection over its target and under its stop. */\n readonly warnings: readonly string[];\n /** The line of the plan of the selection, with its estimate. */\n readonly line: string;\n}\n\n/** The limits of the read of a plan. */\nexport interface PlanLimits {\n readonly planPerClock?: number;\n readonly targetMinutes?: number;\n readonly stopMinutes?: number;\n /** The most static runs of each file. The key `*` gives the limit of each file that the field does not name. */\n readonly staticLimits?: Readonly<Record<string, number>>;\n}\n\n/**\n * This function gives the faults of the static runs of a plan. A static run starts each test, so it costs the time of\n * all tests. Code outside a function gives a static mutant.\n */\nexport function staticFaults(files: Readonly<Record<string, FilePlan>>, limits: Readonly<Record<string, number>> = {}): string[] {\n return Object.entries(files).flatMap(([file, plan]) => {\n const limit = limits[file] ?? limits[\"*\"];\n if (limit === undefined || plan.static <= limit) return [];\n return [`${file}: the plan has ${String(plan.static)} static runs, and the limit is ${String(limit)}. Each static run starts each test. Move the code outside a function into a function.`];\n });\n}\n\n/** This function reads the plan of a selection: its estimate of the clock, against the target and the stop, and its static runs. */\nexport function readPlan(name: string, plan: SelectionPlan, limits: PlanLimits = {}): PlanRead {\n const rows = Object.values(plan.files);\n const sum = (key: \"runs\" | \"static\" | \"netMs\"): number => rows.reduce((n, row) => n + row[key], 0);\n const minutes = clockMinutes(sum(\"netMs\"), limits.planPerClock);\n const target = limits.targetMinutes ?? TARGET_MINUTES;\n const stop = limits.stopMinutes ?? STOP_MINUTES;\n const estimate = `${name}: the estimate of ${minutes.toFixed(0)} minutes`;\n const head = `${name}: ${String(sum(\"runs\"))} runs, ${String(sum(\"static\"))} of them static, with a planned net time of ${(sum(\"netMs\") / 3_600_000).toFixed(1)} h.`;\n const line = `${head} The estimate is ${minutes.toFixed(0)} minutes of the clock, the target is ${String(target)} and the stop is ${String(stop)}.`;\n const overStop = minutes > stop ? [`${estimate} is over the stop of ${String(stop)}. The run cannot end before the stop, so it cannot give a full score. Cut the selection into more parts.`] : [];\n const warnings = minutes > target && minutes <= stop ? [`${estimate} is over the target of ${String(target)}. Cut the selection into more parts.`] : [];\n return { runs: sum(\"runs\"), static: sum(\"static\"), netMs: sum(\"netMs\"), minutes, faults: [...overStop, ...staticFaults(plan.files, limits.staticLimits)], warnings, line };\n}\n\n/**\n * This function reads the JSON of `plan.json`.\n *\n * @throws Error when the JSON has no object `files` or no list `tests`, or a `dryRun` with no numbers\n */\nexport function parsePlan(json: unknown): SelectionPlan {\n const plan = json as Partial<SelectionPlan> | null;\n if (typeof plan !== \"object\" || plan === null || typeof plan.files !== \"object\" || plan.files === null || !Array.isArray(plan.tests)) {\n throw new Error(`the plan has no object \"files\" or no list \"tests\"`);\n }\n const run = plan.dryRun as Partial<DryRun> | null | undefined;\n if (run !== undefined && (typeof run !== \"object\" || run === null || !Number.isFinite(run.tests) || !Number.isFinite(run.netMs))) {\n throw new Error(`the field \"dryRun\" of the plan has no numbers \"tests\" and \"netMs\"`);\n }\n return plan as SelectionPlan;\n}\n","/**\n * The Stryker reporter `rigor-partial`. It appends the plan and each tested mutant to `partial.jsonl`, next to the JSON\n * report, at the time of each event. When a time limit stops Stryker, `scores` reads this file for a partial score. It\n * also writes the cost plan into `plan.json`, and with `rigorPartial.stopAfterPlan` it stops Stryker after the plan.\n */\nimport { appendFileSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, relative, sep } from \"node:path\";\nimport { dryRunOf, filePlans, PLAN_FILE, plannedRuns, testPlans, type PlannedRun, type PlanOfMutant, type TestOfDryRun } from \"./plan.ts\";\n\n/** The name of the file of the reporter, in the folder of the JSON report. */\nexport const PARTIAL_FILE = \"partial.jsonl\";\n\n/** A line of `partial.jsonl`. The field `at` gives the time in milliseconds since 1970. */\nexport type PartialLine =\n | { readonly event: \"start\"; readonly at: number }\n | { readonly event: \"plan\"; readonly at: number; readonly mutants: number; readonly run: number }\n | {\n readonly event: \"mutant\";\n readonly at: number;\n readonly file: string;\n readonly status: string;\n readonly statusReason?: string;\n readonly mutatorName: string;\n readonly line: number;\n /** The planned net time of the mutant in milliseconds. A mutant with an early result has none. */\n readonly netMs?: number;\n /** The time limit of the mutant in milliseconds. A mutant that the clock stops costs this time. */\n readonly limitMs?: number;\n readonly static?: boolean;\n }\n | { readonly event: \"done\"; readonly at: number };\n\n/** The parts of a Stryker mutant result that the reporter reads. */\ninterface TestedMutant {\n readonly id?: string;\n readonly fileName: string;\n readonly status: string;\n readonly statusReason?: string;\n readonly mutatorName: string;\n readonly location: { readonly start: { readonly line: number } };\n}\n\n/** The options of Stryker that the reporter reads. */\nexport interface ReporterOptions {\n readonly jsonReporter?: { readonly fileName?: string };\n /** With `stopAfterPlan` at true, the reporter stops Stryker after it writes the plan, before the first mutant. */\n readonly rigorPartial?: { readonly stopAfterPlan?: boolean };\n}\n\n/** The reporter. Stryker gives it its options, and `now`, `cwd` and `exit` are for the tests. */\nexport class PartialReporter {\n static readonly inject = [\"options\"] as const;\n readonly file: string;\n /** The file of the cost plan, in the folder of the JSON report. */\n readonly planFile: string;\n private readonly now: () => number;\n private readonly cwd: string;\n private readonly exit: (code: number) => void;\n private readonly stopAfterPlan: boolean;\n private tests: readonly TestOfDryRun[] = [];\n private runs = new Map<string, PlannedRun>();\n\n constructor(options: ReporterOptions, now: () => number = Date.now, cwd: string = process.cwd(), exit: (code: number) => void = (code) => process.exit(code)) {\n this.now = now;\n this.cwd = cwd;\n this.exit = exit;\n this.stopAfterPlan = options.rigorPartial?.stopAfterPlan === true;\n const dir = join(cwd, dirname(options.jsonReporter?.fileName ?? \"reports/mutation/mutation.json\"));\n this.file = join(dir, PARTIAL_FILE);\n this.planFile = join(dir, PLAN_FILE);\n mkdirSync(dir, { recursive: true });\n writeFileSync(this.file, \"\");\n this.write({ event: \"start\", at: this.now() });\n }\n\n onDryRunCompleted(event: { readonly result: { readonly tests: readonly TestOfDryRun[] } }): void {\n this.tests = event.result.tests;\n }\n\n onMutationTestingPlanReady(event: { readonly mutantPlans: readonly PlanOfMutant[] }): void {\n const plans = event.mutantPlans;\n this.write({ event: \"plan\", at: this.now(), mutants: plans.length, run: plans.filter((p) => p.plan === \"Run\").length });\n this.runs = plannedRuns(plans, this.path);\n writeFileSync(this.planFile, `${JSON.stringify({ files: filePlans(plans, this.path), tests: testPlans(plans, this.tests, this.path), dryRun: dryRunOf(this.tests) }, null, 2)}\\n`);\n // The test processes of Stryker stop with this process.\n if (this.stopAfterPlan) this.exit(0);\n }\n\n onMutantTested(result: TestedMutant): void {\n const reason = result.statusReason === undefined ? {} : { statusReason: result.statusReason };\n const run = result.id === undefined ? undefined : this.runs.get(result.id);\n const planned = run === undefined ? {} : { netMs: run.netMs, limitMs: run.limitMs, static: run.static };\n this.write({ event: \"mutant\", at: this.now(), file: this.path(result.fileName), status: result.status, ...reason, mutatorName: result.mutatorName, line: result.location.start.line, ...planned });\n }\n\n onMutationTestReportReady(): void {\n this.write({ event: \"done\", at: this.now() });\n }\n\n /** This function gives the path of a file from the folder where Stryker starts, with `/`. */\n private readonly path = (fileName: string): string => relative(this.cwd, fileName).split(sep).join(\"/\");\n\n // A synchronous append: a stop of the process loses no line of a mutant that was tested.\n private write(line: PartialLine): void {\n appendFileSync(this.file, `${JSON.stringify(line)}\\n`);\n }\n}\n\n/** The schema of the option of the reporter. Stryker adds it to its own schema, so the option gives no warning. */\nexport const strykerValidationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n type: \"object\",\n properties: {\n rigorPartial: {\n description: \"The options of the reporter rigor-partial.\",\n type: \"object\",\n properties: { stopAfterPlan: { description: \"Stop Stryker after the reporter writes the plan.\", type: \"boolean\", default: false } },\n additionalProperties: false,\n default: {},\n },\n },\n} as const;\n\n/** The plugins of this module, in the form of `declareClassPlugin` of `@stryker-mutator/api/plugin`. */\nexport const strykerPlugins: readonly { readonly kind: \"Reporter\"; readonly name: string; readonly injectableClass: typeof PartialReporter }[] = [\n { kind: \"Reporter\", name: \"rigor-partial\", injectableClass: PartialReporter },\n];\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,YAAY;;;;;AAMzB,MAAa,iBAAiB;;AAG9B,MAAa,iBAAiB;;;;;AAM9B,MAAa,eAAe;;AAuE5B,SAAgB,SAAS,OAAwC;CAC/D,OAAO;EAAE,OAAO,MAAM;EAAQ,OAAO,KAAK,MAAM,MAAM,QAAQ,KAAK,SAAS,MAAM,KAAK,aAAa,CAAC,CAAC;CAAE;AAC1G;;AAGA,MAAa,eAAe;;;;;;;;;;;;AAqB5B,SAAgB,aAAa,OAAmD;CAC9E,MAA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kC;EAChC,KAAK,MAAM;GAAE,OAAO;GAAQ,IAAI,KAAK,IAAI;EAAE,CAAC;CAC9C;;CAGA,QAAyB,aAA6B,SAAS,KAAK,KAAK,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG;CAGtG,MAAc,MAAyB;EACrC,eAAe,KAAK,MAAM,GAAG,KAAK,UAAU,IAAI,EAAE,GAAG;CACvD;AACF;;AAGA,MAAa,0BAA0B;CACrC,SAAS;CACT,MAAM;CACN,YAAY,EACV,cAAc;EACZ,aAAa;EACb,MAAM;EACN,YAAY,EAAE,eAAe;GAAE,aAAa;GAAoD,MAAM;GAAW,SAAS;EAAM,EAAE;EAClI,sBAAsB;EACtB,SAAS,CAAC;CACZ,EACF;AACF;;AAGA,MAAa,iBAAoI,CAC/I;CAAE,MAAM;CAAY,MAAM;CAAiB,iBAAiB;AAAgB,CAC9E"}
1
+ {"version":3,"file":"reporter-DYpp-Jz3.js","names":[],"sources":["../src/plan.ts","../src/reporter.ts"],"sourcesContent":["/**\n * The cost plan of a selection. Stryker makes a plan of the mutants after the run of the tests without mutants. The\n * reporter `rigor-partial` writes the plan of each file and each line into `plan.json`. `plan-check` reads the file and\n * gives the estimate of the clock of the selection. It warns of a selection over its target. It fails a selection over\n * its stop, and a file over its limit of static runs. The cut of the parts can then follow the cost of the lines, and\n * not the size of the files.\n */\nimport { median } from \"@mark1russell7/rigor-statistics\";\n\n/** The name of the file of the plan, in the folder of the JSON report. */\nexport const PLAN_FILE = \"plan.json\";\n\n/**\n * The default planned net time of one minute of the clock. In a nightly run of Vex (GitHub Actions, 2 test processes),\n * the mutants that ended had 9.8 to 11.7 times the planned time of their clock. The lower value gives the longer estimate.\n */\nexport const PLAN_PER_CLOCK = 9.8;\n\n/** The default target of the estimate of a selection, in minutes. A slow runner then ends a job of 150 minutes. */\nexport const TARGET_MINUTES = 100;\n\n/**\n * The default stop of the estimate of a selection, in minutes. A selection over it does not end before the limit of the\n * job, so it cannot give a full score. The estimate has an error of 28 minutes in the mean, so the target only warns.\n */\nexport const STOP_MINUTES = 140;\n\n/** The count of the tests of the largest cost that the plan keeps. */\nexport const TOP_TESTS = 40;\n\n/** The parts of a plan of Stryker for one mutant that the reporter reads. */\nexport interface PlanOfMutant {\n readonly plan: string;\n readonly mutant: {\n readonly id: string;\n readonly fileName: string;\n readonly static?: boolean;\n /** The start of the mutant. In a plan, Stryker counts the lines from 0. */\n readonly location?: { readonly start: { readonly line: number } };\n };\n readonly netTime?: number;\n /** The tests that Stryker starts for the mutant. With no filter, Stryker starts all tests, as for a static mutant. */\n readonly runOptions?: { readonly timeout?: number; readonly testFilter?: readonly string[] };\n}\n\n/** The parts of a test of the run without mutants that the reporter reads. */\nexport interface TestOfDryRun {\n readonly id: string;\n readonly name: string;\n readonly fileName?: string;\n readonly timeSpentMs: number;\n}\n\n/** The planned times of one mutant that Stryker starts. */\nexport interface PlannedRun {\n readonly file: string;\n /** The line of the start of the mutant, counted from 1. The value 0 is a mutant with no location. */\n readonly line: number;\n readonly static: boolean;\n readonly netMs: number;\n readonly limitMs: number;\n}\n\n/** The plan of one line: the line from 1, the runs that start on it, the static runs of them, and their planned net time. */\nexport type LinePlan = readonly [line: number, runs: number, staticRuns: number, netMs: number];\n\n/** The plan of one file of a selection. */\nexport interface FilePlan {\n /** The mutants of the file, with the mutants that have an early result. */\n readonly mutants: number;\n readonly runs: number;\n readonly static: number;\n readonly netMs: number;\n readonly limitMs: number;\n /** The plan of each line with a run, in the order of the lines. */\n readonly lines: readonly LinePlan[];\n}\n\n/** The plan of one test: its name, its file, its time without mutants, the runs that start it, and their product. */\nexport type TestPlan = readonly [name: string, file: string, ms: number, runs: number, costMs: number];\n\n/** The run of the tests without mutants: the count of its tests and the sum of their times in milliseconds. */\nexport interface DryRun {\n readonly tests: number;\n readonly netMs: number;\n}\n\n/** The content of `plan.json`. The paths of the files are from the folder where Stryker starts. */\nexport interface SelectionPlan {\n readonly files: Readonly<Record<string, FilePlan>>;\n readonly tests: readonly TestPlan[];\n /** The run of the tests without mutants. A plan of a version before 0.2.6 has no `dryRun`. */\n readonly dryRun?: DryRun;\n}\n\n/** This function gives the run of the tests without mutants: the count of the tests and the sum of their times. */\nexport function dryRunOf(tests: readonly TestOfDryRun[]): DryRun {\n return { tests: tests.length, netMs: Math.round(tests.reduce((sum, test) => sum + test.timeSpentMs, 0)) };\n}\n\n/** A test of a plan counts for the speed of a runner only from this time in milliseconds. A short time is mostly noise. */\nexport const SPEED_MIN_MS = 200;\n\n/** The plan of one selection for the speed of its runner. */\nexport interface RunnerPlan {\n readonly name: string;\n /** The selections of one group run the same tests. A selection that is not a part of a group is a group of its own. */\n readonly group: string;\n readonly plan: SelectionPlan;\n}\n\n/**\n * This function gives the speed of the runner of each selection, relative to the other selections of its group. Each part\n * runs on its own runner, and in Vex the same tests took from 83 s to 149 s on the runners of one group.\n *\n * - When each plan of a group has a `dryRun` with the same count of tests, the factor uses the dry runs. It is the\n * net time of the dry run over the median of the group.\n * - Otherwise the factor is the median of the ratios of the shared tests. The ratio of a test is its time over its\n * median time in the group. A shared test takes `SPEED_MIN_MS` or more. At least half of the plans of the group\n * name it, and at least 2 plans.\n * - A selection with no shared test, or alone in its group, has the factor 1. A factor over 1 is a slow runner.\n */\nexport function speedFactors(plans: readonly RunnerPlan[]): Map<string, number> {\n const out = new Map<string, number>();\n for (const group of new Set(plans.map((p) => p.group))) {\n const members = plans.filter((p) => p.group === group);\n const runs = members.map((p) => p.plan.dryRun);\n const counts = new Set(runs.map((r) => r?.tests));\n if (members.length > 1 && counts.size === 1 && runs.every((r) => r !== undefined && r.tests > 0 && r.netMs > 0)) {\n const middle = median(runs.map((r) => r?.netMs ?? 0));\n for (const p of members) out.set(p.name, (p.plan.dryRun?.netMs ?? middle) / middle);\n continue;\n }\n const times = members.map((p) => new Map(p.plan.tests.filter((t) => t[2] >= SPEED_MIN_MS).map((t) => [`${t[1]}|${t[0]}`, t[2]])));\n const need = Math.max(2, Math.ceil(members.length / 2));\n const shared = [...new Set(times.flatMap((m) => [...m.keys()]))].filter((key) => times.filter((m) => m.has(key)).length >= need);\n const middles = new Map(shared.map((key) => [key, median(times.flatMap((m) => m.get(key) ?? []))]));\n members.forEach((p, i) => {\n const ratios = shared.flatMap((key) => {\n const ms = times[i]?.get(key);\n return ms === undefined ? [] : [ms / (middles.get(key) ?? ms)];\n });\n out.set(p.name, ratios.length === 0 ? 1 : median(ratios));\n });\n }\n return out;\n}\n\n/** This function gives the planned times of each mutant that Stryker starts, by the id of the mutant. */\nexport function plannedRuns(plans: readonly PlanOfMutant[], path: (fileName: string) => string = (f) => f): Map<string, PlannedRun> {\n const runs = new Map<string, PlannedRun>();\n for (const { plan, mutant, netTime, runOptions } of plans) {\n if (plan !== \"Run\") continue;\n const line = mutant.location === undefined ? 0 : mutant.location.start.line + 1;\n runs.set(mutant.id, { file: path(mutant.fileName), line, static: mutant.static === true, netMs: Math.round(netTime ?? 0), limitMs: Math.round(runOptions?.timeout ?? 0) });\n }\n return runs;\n}\n\n/** This function gives the plan of each file: its mutants, the mutants that Stryker starts, and their planned times. */\nexport function filePlans(plans: readonly PlanOfMutant[], path: (fileName: string) => string = (f) => f): Record<string, FilePlan> {\n const runs = plannedRuns(plans, path);\n type Row = { mutants: number; runs: number; static: number; netMs: number; limitMs: number; byLine: Map<number, [number, number, number, number]> };\n const files = new Map<string, Row>();\n for (const { mutant } of plans) {\n const file = path(mutant.fileName);\n const row = files.get(file) ?? { mutants: 0, runs: 0, static: 0, netMs: 0, limitMs: 0, byLine: new Map() };\n files.set(file, row);\n row.mutants += 1;\n const run = runs.get(mutant.id);\n if (run === undefined) continue;\n row.runs += 1;\n row.static += run.static ? 1 : 0;\n row.netMs += run.netMs;\n row.limitMs += run.limitMs;\n const line = row.byLine.get(run.line) ?? [run.line, 0, 0, 0];\n line[1] += 1;\n line[2] += run.static ? 1 : 0;\n line[3] += run.netMs;\n row.byLine.set(run.line, line);\n }\n const plan = ({ byLine, ...row }: Row): FilePlan => ({ ...row, lines: [...byLine.values()].toSorted((a, b) => a[0] - b[0]) });\n return Object.fromEntries([...files].toSorted(([a], [b]) => a.localeCompare(b)).map(([file, row]) => [file, plan(row)]));\n}\n\n/**\n * This function gives the tests of the largest planned cost, the largest first. The cost of a test is its time without\n * mutants, times the runs that start it. A test with a large cost is the first place to make the selection faster.\n */\nexport function testPlans(plans: readonly PlanOfMutant[], tests: readonly TestOfDryRun[], path: (fileName: string) => string = (f) => f, top: number = TOP_TESTS): TestPlan[] {\n const runs = new Map<string, number>(tests.map((test) => [test.id, 0]));\n let all = 0;\n for (const { plan, runOptions } of plans) {\n if (plan !== \"Run\") continue;\n if (runOptions?.testFilter === undefined) all += 1;\n else for (const id of runOptions.testFilter) runs.set(id, (runs.get(id) ?? 0) + 1);\n }\n const rows = tests.map((test): TestPlan => {\n const count = (runs.get(test.id) ?? 0) + all;\n return [test.name, test.fileName === undefined ? \"\" : path(test.fileName), Math.round(test.timeSpentMs), count, Math.round(count * test.timeSpentMs)];\n });\n return rows.toSorted((a, b) => b[4] - a[4] || a[0].localeCompare(b[0])).slice(0, top);\n}\n\n/** This function gives the estimate of the minutes of the clock of a planned net time. */\nexport function clockMinutes(netMs: number, planPerClock: number = PLAN_PER_CLOCK): number {\n return netMs / planPerClock / 60_000;\n}\n\n/** The read of the plan of a selection. */\nexport interface PlanRead {\n readonly runs: number;\n readonly static: number;\n readonly netMs: number;\n /** The estimate of the clock of the selection, in minutes. */\n readonly minutes: number;\n /** One line for a selection over its stop, and one for each file over its limit of static runs. */\n readonly faults: readonly string[];\n /** One line for a selection over its target and under its stop. */\n readonly warnings: readonly string[];\n /** The line of the plan of the selection, with its estimate. */\n readonly line: string;\n}\n\n/** The limits of the read of a plan. */\nexport interface PlanLimits {\n readonly planPerClock?: number;\n readonly targetMinutes?: number;\n readonly stopMinutes?: number;\n /** The most static runs of each file. The key `*` gives the limit of each file that the field does not name. */\n readonly staticLimits?: Readonly<Record<string, number>>;\n}\n\n/**\n * This function gives the faults of the static runs of a plan. A static run starts each test, so it costs the time of\n * all tests. Code outside a function gives a static mutant.\n */\nexport function staticFaults(files: Readonly<Record<string, FilePlan>>, limits: Readonly<Record<string, number>> = {}): string[] {\n return Object.entries(files).flatMap(([file, plan]) => {\n const limit = limits[file] ?? limits[\"*\"];\n if (limit === undefined || plan.static <= limit) return [];\n return [`${file}: the plan has ${String(plan.static)} static runs, and the limit is ${String(limit)}. Each static run starts each test. Move the code outside a function into a function.`];\n });\n}\n\n/** This function reads the plan of a selection: its estimate of the clock, against the target and the stop, and its static runs. */\nexport function readPlan(name: string, plan: SelectionPlan, limits: PlanLimits = {}): PlanRead {\n const rows = Object.values(plan.files);\n const sum = (key: \"runs\" | \"static\" | \"netMs\"): number => rows.reduce((n, row) => n + row[key], 0);\n const minutes = clockMinutes(sum(\"netMs\"), limits.planPerClock);\n const target = limits.targetMinutes ?? TARGET_MINUTES;\n const stop = limits.stopMinutes ?? STOP_MINUTES;\n const estimate = `${name}: the estimate of ${minutes.toFixed(0)} minutes`;\n const head = `${name}: ${String(sum(\"runs\"))} runs, ${String(sum(\"static\"))} of them static, with a planned net time of ${(sum(\"netMs\") / 3_600_000).toFixed(1)} h.`;\n const line = `${head} The estimate is ${minutes.toFixed(0)} minutes of the clock, the target is ${String(target)} and the stop is ${String(stop)}.`;\n const overStop = minutes > stop ? [`${estimate} is over the stop of ${String(stop)}. The run cannot end before the stop, so it cannot give a full score. Cut the selection into more parts.`] : [];\n const warnings = minutes > target && minutes <= stop ? [`${estimate} is over the target of ${String(target)}. Cut the selection into more parts.`] : [];\n return { runs: sum(\"runs\"), static: sum(\"static\"), netMs: sum(\"netMs\"), minutes, faults: [...overStop, ...staticFaults(plan.files, limits.staticLimits)], warnings, line };\n}\n\n/**\n * This function reads the JSON of `plan.json`.\n *\n * @throws Error when the JSON has no object `files` or no list `tests`, or a `dryRun` with no numbers\n */\nexport function parsePlan(json: unknown): SelectionPlan {\n const plan = json as Partial<SelectionPlan> | null;\n if (typeof plan !== \"object\" || plan === null || typeof plan.files !== \"object\" || plan.files === null || !Array.isArray(plan.tests)) {\n throw new Error(`the plan has no object \"files\" or no list \"tests\"`);\n }\n const run = plan.dryRun as Partial<DryRun> | null | undefined;\n if (run !== undefined && (typeof run !== \"object\" || run === null || !Number.isFinite(run.tests) || !Number.isFinite(run.netMs))) {\n throw new Error(`the field \"dryRun\" of the plan has no numbers \"tests\" and \"netMs\"`);\n }\n return plan as SelectionPlan;\n}\n","/**\n * The Stryker reporter `rigor-partial`. It appends the plan and each tested mutant to `partial.jsonl`, next to the JSON\n * report, at the time of each event. When a time limit stops Stryker, `scores` reads this file for a partial score. It\n * also writes the cost plan into `plan.json`, and with `rigorPartial.stopAfterPlan` it stops Stryker after the plan.\n */\nimport { appendFileSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, relative, sep } from \"node:path\";\nimport { dryRunOf, filePlans, PLAN_FILE, plannedRuns, testPlans, type PlannedRun, type PlanOfMutant, type TestOfDryRun } from \"./plan.ts\";\n\n/** The name of the file of the reporter, in the folder of the JSON report. */\nexport const PARTIAL_FILE = \"partial.jsonl\";\n\n/** A line of `partial.jsonl`. The field `at` gives the time in milliseconds since 1970. */\nexport type PartialLine =\n | { readonly event: \"start\"; readonly at: number }\n | { readonly event: \"plan\"; readonly at: number; readonly mutants: number; readonly run: number }\n | {\n readonly event: \"mutant\";\n readonly at: number;\n readonly file: string;\n readonly status: string;\n readonly statusReason?: string;\n readonly mutatorName: string;\n readonly line: number;\n /** The planned net time of the mutant in milliseconds. A mutant with an early result has none. */\n readonly netMs?: number;\n /** The time limit of the mutant in milliseconds. A mutant that the clock stops costs this time. */\n readonly limitMs?: number;\n readonly static?: boolean;\n }\n | { readonly event: \"done\"; readonly at: number };\n\n/** The parts of a Stryker mutant result that the reporter reads. */\ninterface TestedMutant {\n readonly id?: string;\n readonly fileName: string;\n readonly status: string;\n readonly statusReason?: string;\n readonly mutatorName: string;\n readonly location: { readonly start: { readonly line: number } };\n}\n\n/** The options of Stryker that the reporter reads. */\nexport interface ReporterOptions {\n readonly jsonReporter?: { readonly fileName?: string };\n /** With `stopAfterPlan` at true, the reporter stops Stryker after it writes the plan, before the first mutant. */\n readonly rigorPartial?: { readonly stopAfterPlan?: boolean };\n}\n\n/** The reporter. Stryker gives it its options, and `now`, `cwd` and `exit` are for the tests. */\nexport class PartialReporter {\n static readonly inject = [\"options\"] as const;\n readonly file: string;\n /** The file of the cost plan, in the folder of the JSON report. */\n readonly planFile: string;\n private readonly now: () => number;\n private readonly cwd: string;\n private readonly exit: (code: number) => void;\n private readonly stopAfterPlan: boolean;\n private tests: readonly TestOfDryRun[] = [];\n private runs = new Map<string, PlannedRun>();\n\n constructor(options: ReporterOptions, now: () => number = Date.now, cwd: string = process.cwd(), exit: (code: number) => void = (code) => process.exit(code)) {\n this.now = now;\n this.cwd = cwd;\n this.exit = exit;\n this.stopAfterPlan = options.rigorPartial?.stopAfterPlan === true;\n const dir = join(cwd, dirname(options.jsonReporter?.fileName ?? \"reports/mutation/mutation.json\"));\n this.file = join(dir, PARTIAL_FILE);\n this.planFile = join(dir, PLAN_FILE);\n mkdirSync(dir, { recursive: true });\n writeFileSync(this.file, \"\");\n this.write({ event: \"start\", at: this.now() });\n }\n\n onDryRunCompleted(event: { readonly result: { readonly tests: readonly TestOfDryRun[] } }): void {\n this.tests = event.result.tests;\n }\n\n onMutationTestingPlanReady(event: { readonly mutantPlans: readonly PlanOfMutant[] }): void {\n const plans = event.mutantPlans;\n this.write({ event: \"plan\", at: this.now(), mutants: plans.length, run: plans.filter((p) => p.plan === \"Run\").length });\n this.runs = plannedRuns(plans, this.path);\n writeFileSync(this.planFile, `${JSON.stringify({ files: filePlans(plans, this.path), tests: testPlans(plans, this.tests, this.path), dryRun: dryRunOf(this.tests) }, null, 2)}\\n`);\n // The test processes of Stryker stop with this process.\n if (this.stopAfterPlan) this.exit(0);\n }\n\n onMutantTested(result: TestedMutant): void {\n const reason = result.statusReason === undefined ? {} : { statusReason: result.statusReason };\n const run = result.id === undefined ? undefined : this.runs.get(result.id);\n const planned = run === undefined ? {} : { netMs: run.netMs, limitMs: run.limitMs, static: run.static };\n this.write({ event: \"mutant\", at: this.now(), file: this.path(result.fileName), status: result.status, ...reason, mutatorName: result.mutatorName, line: result.location.start.line, ...planned });\n }\n\n onMutationTestReportReady(): void {\n this.write({ event: \"done\", at: this.now() });\n }\n\n /** This function gives the path of a file from the folder where Stryker starts, with `/`. */\n private readonly path = (fileName: string): string => relative(this.cwd, fileName).split(sep).join(\"/\");\n\n // A synchronous append: a stop of the process loses no line of a mutant that was tested.\n private write(line: PartialLine): void {\n appendFileSync(this.file, `${JSON.stringify(line)}\\n`);\n }\n}\n\n/** The schema of the option of the reporter. Stryker adds it to its own schema, so the option gives no warning. */\nexport const strykerValidationSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n type: \"object\",\n properties: {\n rigorPartial: {\n description: \"The options of the reporter rigor-partial.\",\n type: \"object\",\n properties: { stopAfterPlan: { description: \"Stop Stryker after the reporter writes the plan.\", type: \"boolean\", default: false } },\n additionalProperties: false,\n default: {},\n },\n },\n} as const;\n\n/** The plugins of this module, in the form of `declareClassPlugin` of `@stryker-mutator/api/plugin`. */\nexport const strykerPlugins: readonly { readonly kind: \"Reporter\"; readonly name: string; readonly injectableClass: typeof PartialReporter }[] = [\n { kind: \"Reporter\", name: \"rigor-partial\", injectableClass: PartialReporter },\n];\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,YAAY;;;;;AAMzB,MAAa,iBAAiB;;AAG9B,MAAa,iBAAiB;;;;;AAM9B,MAAa,eAAe;;AAuE5B,SAAgB,SAAS,OAAwC;CAC/D,OAAO;EAAE,OAAO,MAAM;EAAQ,OAAO,KAAK,MAAM,MAAM,QAAQ,KAAK,SAAS,MAAM,KAAK,aAAa,CAAC,CAAC;CAAE;AAC1G;;AAGA,MAAa,eAAe;;;;;;;;;;;;AAqB5B,SAAgB,aAAa,OAAmD;CAC9E,MAAM,sBAA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ChC,KAAK,MAAM;GAAE,OAAO;GAAQ,IAAI,KAAK,IAAI;EAAE,CAAC;CAC9C;;CAGiB,QAAQ,aAA6B,SAAS,KAAK,KAAK,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG;CAG9F,MAAM,MAAyB;EACrC,eAAe,KAAK,MAAM,GAAG,KAAK,UAAU,IAAI,EAAE,GAAG;CACvD;AACF;;AAGA,MAAa,0BAA0B;CACrC,SAAS;CACT,MAAM;CACN,YAAY,EACV,cAAc;EACZ,aAAa;EACb,MAAM;EACN,YAAY,EAAE,eAAe;GAAE,aAAa;GAAoD,MAAM;GAAW,SAAS;EAAM,EAAE;EAClI,sBAAsB;EACtB,SAAS,CAAC;CACZ,EACF;AACF;;AAGA,MAAa,iBAAoI,CAC/I;CAAE,MAAM;CAAY,MAAM;CAAiB,iBAAiB;AAAgB,CAC9E"}
@@ -1,2 +1,2 @@
1
- import { a as strykerPlugins, i as ReporterOptions, n as PartialLine, o as strykerValidationSchema, r as PartialReporter, t as PARTIAL_FILE } from "./reporter-unJLMWXg.js";
1
+ import { a as strykerPlugins, i as ReporterOptions, n as PartialLine, o as strykerValidationSchema, r as PartialReporter, t as PARTIAL_FILE } from "./reporter-Cyp2mDOV.js";
2
2
  export { PARTIAL_FILE, PartialLine, PartialReporter, ReporterOptions, strykerPlugins, strykerValidationSchema };
package/build/reporter.js CHANGED
@@ -1 +1 @@
1
- export { t as PARTIAL_FILE, n as PartialReporter, r as strykerPlugins, i as strykerValidationSchema } from "./reporter-D8cUJUhN.js";
1
+ export { t as PARTIAL_FILE, n as PartialReporter, r as strykerPlugins, i as strykerValidationSchema } from "./reporter-DYpp-Jz3.js";
@@ -1,12 +1,12 @@
1
- import { a as PLAN_FILE, h as speedFactors, m as readPlan, p as parsePlan, t as PARTIAL_FILE, u as clockMinutes } from "./reporter-D8cUJUhN.js";
2
- import { createRequire } from "node:module";
3
- import { dirname, join, matchesGlob, posix, relative, resolve } from "node:path";
4
- import { appendFileSync, copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
5
1
  import { spawnSync } from "node:child_process";
2
+ import { appendFileSync, copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
3
+ import { createRequire } from "node:module";
6
4
  import { tmpdir } from "node:os";
5
+ import { dirname, join, matchesGlob, posix, relative, resolve } from "node:path";
7
6
  import { fileURLToPath } from "node:url";
8
7
  import { parseArgs } from "node:util";
9
8
  import { escapeWorkflowData, escapeWorkflowProperty } from "@mark1russell7/text";
9
+ import { a as PLAN_FILE, h as speedFactors, m as readPlan, p as parsePlan, t as PARTIAL_FILE, u as clockMinutes } from "./reporter-DYpp-Jz3.js";
10
10
  // src/lane.ts
11
11
  /** The keys of the Stryker config that the lane owns. The field `stryker` of a package cannot have them. */
12
12
  const STRYKER_OWNED = [
@@ -1909,4 +1909,4 @@ function runCli(argv, io) {
1909
1909
  }
1910
1910
  export { segmentsOf as A, rewritesTsconfig as C, lineWeights as D, cutByCost as E, parseLane as F, partErrors as I, runSelections as L, STRYKER_OWNED as M, changedFiles as N, parseCostMaps as O, packageRuns as P, select as R, TIMEOUT_MS as S, costMapOf as T, summaryMarkdown as _, isConfigFile as a, PARTIAL_PLUGIN as b, compareDisables as c, isHitLimit as d, packageScore as f, scoreReport as g, partialScore as h, computedImports as i, weightedFiles as j, plannedMs as k, findDisables as l, parseReport as m, runCli as n, leavingPaths as o, parsePartial as p, collectFaults as r, relatedTestFiles as s, HELP as t, formatScore as u, DRY_RUN_TIMEOUT_MINUTES as v, strykerConfig as w, REPORT_DIR as x, NO_TSCONFIG as y, selectionNames as z };
1911
1911
 
1912
- //# sourceMappingURL=run-BEUhSals.js.map
1912
+ //# sourceMappingURL=run-BuyXK1nO.js.map