mutant-cafe 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +66 -2
- package/dist/bin.js +1272 -0
- package/dist/bin.js.map +7 -0
- package/package.json +35 -4
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../cli/src/bin.ts", "../../core/src/Config.ts", "../../core/src/Errors.ts", "../../core/src/Mutant.ts", "../../core/src/Services.ts", "../../engine/src/index.ts", "../../engine/src/Generate.ts", "../../engine/src/TypeScriptOracle.ts", "../../runner/src/Scratch.ts", "../../runner/src/TestRunner.ts", "../../runner/src/Run.ts", "../../cli/src/Command.ts", "../../cli/src/Diff.ts", "../../cli/src/ExitCode.ts", "../../cli/src/Reporter.ts"],
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env -S node --experimental-strip-types\nimport * as NodeRuntime from \"@effect/platform-node/NodeRuntime\";\nimport * as NodeServices from \"@effect/platform-node/NodeServices\";\nimport { MutantSourceLive } from \"@mutant-cafe/engine\";\nimport { runMutants, ScratchLive, TestRunnerLive } from \"@mutant-cafe/runner\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Stream from \"effect/Stream\";\n\nimport { runCli, type Run } from \"./Command.ts\";\n\nconst run: Run = (config, mutants) => runMutants(config, Stream.fromIterable(mutants));\n\nconst live = Layer.mergeAll(MutantSourceLive, ScratchLive, TestRunnerLive).pipe(\n Layer.provideMerge(NodeServices.layer)\n);\n\nconst main = Effect.gen(function* () {\n const code = yield* runCli({ root: process.cwd(), args: process.argv.slice(2), run });\n yield* Effect.sync(() => {\n process.exitCode = code;\n });\n}).pipe(Effect.provide(live));\n\nNodeRuntime.runMain(main);\n", "import * as Schema from \"effect/Schema\";\n\nexport const RunConfig = Schema.Struct({\n root: Schema.String,\n tsconfig: Schema.String,\n include: Schema.Array(Schema.String),\n exclude: Schema.Array(Schema.String),\n functionFilter: Schema.Array(Schema.String),\n inDiff: Schema.optional(Schema.String),\n jobs: Schema.Int,\n timeoutMs: Schema.optional(Schema.Int),\n timeoutMultiplier: Schema.Finite,\n minimumTimeoutMs: Schema.Int,\n neverTimeoutMs: Schema.Int,\n outDir: Schema.String,\n});\nexport type RunConfig = typeof RunConfig.Type;\n\nexport const ConfigFile = Schema.Struct({\n include: Schema.optional(Schema.Array(Schema.String)),\n exclude: Schema.optional(Schema.Array(Schema.String)),\n functionFilter: Schema.optional(Schema.Array(Schema.String)),\n jobs: Schema.optional(Schema.Int),\n timeoutMultiplier: Schema.optional(Schema.Finite),\n minimumTimeoutMs: Schema.optional(Schema.Int),\n});\nexport type ConfigFile = typeof ConfigFile.Type;\n", "import * as Schema from \"effect/Schema\";\n\nexport class ProgramLoadError extends Schema.TaggedError<ProgramLoadError>()(\"ProgramLoadError\", {\n tsconfig: Schema.String,\n diagnostics: Schema.Array(Schema.String),\n}) {}\n\nexport class BaselineFailed extends Schema.TaggedError<BaselineFailed>()(\"BaselineFailed\", {\n exitCode: Schema.Int,\n output: Schema.String,\n}) {}\n\nexport class ScratchError extends Schema.TaggedError<ScratchError>()(\"ScratchError\", {\n operation: Schema.String,\n path: Schema.String,\n message: Schema.String,\n}) {}\n\nexport class TestSpawnError extends Schema.TaggedError<TestSpawnError>()(\"TestSpawnError\", {\n command: Schema.Array(Schema.String),\n message: Schema.String,\n}) {}\n\nexport class DiffParseError extends Schema.TaggedError<DiffParseError>()(\"DiffParseError\", {\n path: Schema.String,\n message: Schema.String,\n}) {}\n\nexport class ReportWriteError extends Schema.TaggedError<ReportWriteError>()(\"ReportWriteError\", {\n path: Schema.String,\n message: Schema.String,\n}) {}\n", "import * as Schema from \"effect/Schema\";\n\nexport const Genre = Schema.Literals([\n \"EffectSucceed\",\n \"EffectFail\",\n \"SwallowTag\",\n \"EffectDie\",\n \"EffectNever\",\n \"OptionNone\",\n \"OptionSome\",\n \"StreamEmpty\",\n \"StreamOne\",\n \"StreamFail\",\n \"LayerFail\",\n \"SchemaAcceptAnything\",\n \"BooleanFlip\",\n \"LiteralCycle\",\n \"FnValue\",\n]);\nexport type Genre = typeof Genre.Type;\n\nexport const Span = Schema.Struct({\n start: Schema.Struct({ line: Schema.Int, column: Schema.Int }),\n end: Schema.Struct({ line: Schema.Int, column: Schema.Int }),\n});\nexport type Span = typeof Span.Type;\n\nexport const Replacement = Schema.Struct({\n startOffset: Schema.Int,\n endOffset: Schema.Int,\n text: Schema.String,\n});\nexport type Replacement = typeof Replacement.Type;\n\nexport const Mutant = Schema.Struct({\n id: Schema.String,\n file: Schema.String,\n functionName: Schema.String,\n returnType: Schema.String,\n genre: Genre,\n description: Schema.String,\n span: Span,\n replacement: Replacement,\n synthetic: Schema.Boolean,\n});\nexport type Mutant = typeof Mutant.Type;\n\nexport const Outcome = Schema.Literals([\"caught\", \"missed\", \"unviable\", \"timeout\"]);\nexport type Outcome = typeof Outcome.Type;\n\nexport const MutantResult = Schema.Struct({\n mutant: Mutant,\n outcome: Outcome,\n durationMs: Schema.Int,\n testCommand: Schema.Array(Schema.String),\n diagnostics: Schema.Array(Schema.String),\n output: Schema.optional(Schema.String),\n});\nexport type MutantResult = typeof MutantResult.Type;\n\nexport const Baseline = Schema.Struct({\n durationMs: Schema.Int,\n testCommand: Schema.Array(Schema.String),\n});\nexport type Baseline = typeof Baseline.Type;\n\nexport const RunReport = Schema.Struct({\n schemaVersion: Schema.Literal(1),\n tool: Schema.Literal(\"mutant.cafe\"),\n root: Schema.String,\n baseline: Baseline,\n timeoutMs: Schema.Int,\n results: Schema.Array(MutantResult),\n});\nexport type RunReport = typeof RunReport.Type;\n", "import * as Context from \"effect/Context\";\nimport type * as Effect from \"effect/Effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type * as Stream from \"effect/Stream\";\n\nimport type { RunConfig } from \"./Config.ts\";\nimport type {\n BaselineFailed,\n ProgramLoadError,\n ReportWriteError,\n ScratchError,\n TestSpawnError,\n} from \"./Errors.ts\";\nimport type { Baseline, Mutant, MutantResult, RunReport } from \"./Mutant.ts\";\n\nexport interface Viability {\n readonly viable: boolean;\n readonly diagnostics: ReadonlyArray<string>;\n}\n\nexport class MutantSource extends Context.Service<\n MutantSource,\n {\n readonly generate: (config: RunConfig) => Stream.Stream<Mutant, ProgramLoadError>;\n readonly checkViable: (mutant: Mutant) => Effect.Effect<Viability, ProgramLoadError>;\n }\n>()(\"mutant.cafe/MutantSource\") {}\n\nexport interface ScratchDir {\n readonly path: string;\n readonly apply: (mutant: Mutant) => Effect.Effect<void, ScratchError>;\n readonly revert: (mutant: Mutant) => Effect.Effect<void, ScratchError>;\n}\n\nexport class Scratch extends Context.Service<\n Scratch,\n {\n readonly acquire: (root: string) => Effect.Effect<ScratchDir, ScratchError, Scope.Scope>;\n }\n>()(\"mutant.cafe/Scratch\") {}\n\nexport type TestStatus = \"passed\" | \"failed\" | \"timedOut\";\n\nexport interface TestRun {\n readonly status: TestStatus;\n readonly durationMs: number;\n readonly command: ReadonlyArray<string>;\n readonly output: string;\n}\n\nexport class TestRunner extends Context.Service<\n TestRunner,\n {\n readonly baseline: (dir: ScratchDir) => Effect.Effect<Baseline, BaselineFailed | TestSpawnError>;\n readonly runRelated: (\n dir: ScratchDir,\n file: string,\n timeoutMs: number\n ) => Effect.Effect<TestRun, TestSpawnError>;\n }\n>()(\"mutant.cafe/TestRunner\") {}\n\nexport class Reporter extends Context.Service<\n Reporter,\n {\n readonly progress: (result: MutantResult) => Effect.Effect<void>;\n readonly write: (report: RunReport) => Effect.Effect<void, ReportWriteError>;\n }\n>()(\"mutant.cafe/Reporter\") {}\n", "import { MutantSource, ProgramLoadError } from \"@mutant-cafe/core\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Stream from \"effect/Stream\";\nimport * as Schema from \"effect/Schema\";\nimport { generateFunction } from \"./Generate.ts\";\nimport type { TypeOracle } from \"./TypeOracle.ts\";\nimport { makeTypeScriptOracle } from \"./TypeScriptOracle.ts\";\n\nexport { makeTypeScriptOracle } from \"./TypeScriptOracle.ts\";\nexport type { TypeOracle } from \"./TypeOracle.ts\";\n\n/** Each layer build owns its warm compiler and original-source cache. */\nexport const MutantSourceLive: Layer.Layer<MutantSource> = Layer.effect(\n MutantSource,\n Effect.sync(() => makeMutantSource(makeTypeScriptOracle())),\n);\n\nexport function makeMutantSource(oracle: TypeOracle): MutantSource[\"Service\"] {\n return {\n generate: (config) => Stream.unwrap(Effect.try({\n try: () => Stream.fromIterable({\n *[Symbol.iterator]() {\n for (const fn of oracle.discover(config)) yield* generateFunction(fn);\n },\n }),\n catch: (error) => loadError(config.tsconfig, error),\n })).pipe(\n // Iteration is synchronous compiler work; load it inside the typed error boundary.\n Stream.catchDefect((error) => Stream.fail(loadError(config.tsconfig, error))),\n ),\n checkViable: (mutant) => Effect.try({\n try: () => oracle.checkViable(mutant),\n catch: (error) => loadError(\"\", error),\n }),\n };\n}\n\nfunction loadError(tsconfig: string, error: unknown): ProgramLoadError {\n return Schema.is(ProgramLoadError)(error) ? error : new ProgramLoadError({\n tsconfig, diagnostics: [error instanceof Error ? error.message : String(error)],\n });\n}\n", "// A content digest is pure synchronous work; Effect 4.1.2 has no Crypto module.\n// @effect-diagnostics-next-line nodeBuiltinImport:off\nimport { createHash } from \"node:crypto\";\nimport type { Genre, Mutant } from \"@mutant-cafe/core\";\nimport type { MutableFunction, Value } from \"./TypeOracle.ts\";\n\n/** Pure generation over the oracle's compiler-independent description. */\nexport function* generateFunction(fn: MutableFunction): Generator<Mutant> {\n const api = fn.api;\n const candidate = (genre: Genre, expression: string, value: Value = { text: \"\", synthetic: false }, description = expression): Mutant => {\n const text = fn.block\n ? `{ return ${fn.generator ? \"yield* \" : \"\"}${expression}; }`\n : `(${expression})`;\n return makeMutant(fn, genre, text, value.synthetic, description);\n };\n const shape = fn.shape;\n switch (shape.kind) {\n case \"Effect\": {\n const succeed = api(\"Effect\", \"succeed\");\n if (succeed) {\n for (const value of shape.values) yield candidate(\"EffectSucceed\", `${succeed}(${value.text})`, value);\n }\n const fail = api(\"Effect\", \"fail\");\n const catchTag = api(\"Effect\", \"catchTag\");\n for (const error of shape.errors) {\n if (fail) yield candidate(\"EffectFail\", `${fail}(${error.text})`, error);\n const value = shape.values[0];\n const die = api(\"Effect\", \"die\");\n const recovery = value && succeed ? `${succeed}(${value.text})`\n : die ? `${die}(${JSON.stringify(`mutant.cafe: swallowed ${error.tag}`)})` : undefined;\n if (catchTag && recovery) {\n // Evaluate the original body, rather than replacing its error path with an unconditional failure.\n const gen = api(\"Effect\", \"gen\");\n const original = fn.generator\n ? gen && `((): ${fn.returnType} => ${gen}(function* () ${fn.original}))()`\n : fn.block ? `((): ${fn.returnType} => ${fn.original})()` : `((): ${fn.returnType} => (${fn.original}))()`;\n if (original) yield candidate(\"SwallowTag\", `${original}.pipe(${catchTag}(${JSON.stringify(error.tag)}, () => ${recovery}))`, value, `body.pipe(${catchTag}(${JSON.stringify(error.tag)}, () => ${recovery}))`);\n }\n }\n const die = api(\"Effect\", \"die\");\n if (die) yield candidate(\"EffectDie\", `${die}(\"mutant.cafe\")`);\n const never = api(\"Effect\", \"never\");\n if (never) yield candidate(\"EffectNever\", never);\n break;\n }\n case \"Option\": {\n const none = api(\"Option\", \"none\");\n const some = api(\"Option\", \"some\");\n if (none) yield candidate(\"OptionNone\", `${none}()`);\n if (some) for (const value of shape.values) yield candidate(\"OptionSome\", `${some}(${value.text})`, value);\n break;\n }\n case \"Stream\": {\n const empty = api(\"Stream\", \"empty\");\n const make = api(\"Stream\", \"make\");\n const fail = api(\"Stream\", \"fail\");\n if (empty) yield candidate(\"StreamEmpty\", empty);\n if (make) for (const value of shape.values) yield candidate(\"StreamOne\", `${make}(${value.text})`, value);\n if (fail) for (const error of shape.errors) yield candidate(\"StreamFail\", `${fail}(${error.text})`, error);\n break;\n }\n case \"Layer\": {\n const layer = api(\"Layer\", \"effect\");\n const fail = api(\"Effect\", \"fail\");\n if (layer && fail && shape.service) {\n for (const error of shape.errors) yield candidate(\"LayerFail\", `${layer}(${shape.service}, ${fail}(${error.text}))`, error);\n }\n break;\n }\n case \"Void\":\n yield makeMutant(fn, \"FnValue\", \"{}\", false, \"an empty body\");\n break;\n default: {\n const genre = shape.kind === \"Boolean\" ? \"BooleanFlip\" : shape.kind === \"Literal\" ? \"LiteralCycle\" : \"FnValue\";\n for (const value of shape.values) {\n if (shape.kind === \"Literal\" && value.text === fn.literal) continue;\n yield candidate(genre, value.text, value);\n }\n }\n }\n}\n\nfunction makeMutant(fn: MutableFunction, genre: Genre, text: string, synthetic: boolean, description: string): Mutant {\n const replacement = { startOffset: fn.startOffset, endOffset: fn.endOffset, text };\n const id = createHash(\"sha256\").update(JSON.stringify([fn.file, fn.span, genre, text])).digest(\"hex\").slice(0, 24);\n return {\n id, file: fn.file, functionName: fn.name, returnType: fn.returnType, genre,\n description: `replace ${fn.name} -> ${fn.returnType} with ${description}`,\n span: fn.span, replacement, synthetic,\n };\n}\n", "// Compiler-host boundary: TS requires synchronous native paths; matchesGlob has no Effect Path equivalent.\n// @effect-diagnostics-next-line nodeBuiltinImport:off\nimport { dirname, resolve, relative, matchesGlob } from \"node:path\";\nimport ts from \"typescript\";\nimport { ProgramLoadError, type Mutant, type RunConfig, type Viability } from \"@mutant-cafe/core\";\nimport type { MutableFunction, ReturnShape, TaggedValue, TypeOracle, Value } from \"./TypeOracle.ts\";\n\ntype FunctionNode = ts.FunctionDeclaration | ts.ArrowFunction | ts.FunctionExpression | ts.MethodDeclaration;\ntype Family = \"Effect\" | \"Option\" | \"Stream\" | \"Layer\";\n\nconst diagnosticsText = (items: ReadonlyArray<ts.Diagnostic>): string[] => items.map((d) => {\n const message = ts.flattenDiagnosticMessageText(d.messageText, \"\\n\");\n if (!d.file || d.start === undefined) return `TS${d.code}: ${message}`;\n const position = d.file.getLineAndCharacterOfPosition(d.start);\n return `${d.file.fileName}:${position.line + 1}:${position.character + 1} TS${d.code}: ${message}`;\n});\n\nclass ProgramSession {\n readonly host: ts.CompilerHost;\n readonly originals = new Map<string, ts.SourceFile>();\n program: ts.Program;\n overlay: { file: string; text: string } | undefined;\n\n readonly configPath: string;\n\n constructor(configPath: string) {\n this.configPath = configPath;\n const config = ts.readConfigFile(configPath, ts.sys.readFile);\n if (config.error) throw new ProgramLoadError({ tsconfig: configPath, diagnostics: diagnosticsText([config.error]) });\n const parsed = ts.parseJsonConfigFileContent(config.config, ts.sys, resolve(configPath, \"..\"));\n if (parsed.errors.length) throw new ProgramLoadError({ tsconfig: configPath, diagnostics: diagnosticsText(parsed.errors) });\n this.host = ts.createCompilerHost(parsed.options, true);\n const read = this.host.getSourceFile;\n this.host.getSourceFile = (file, languageVersion, onError, shouldCreateNewSourceFile) => {\n const absolute = resolve(file);\n if (this.overlay?.file === absolute) return ts.createSourceFile(file, this.overlay.text, languageVersion, true);\n const cached = this.originals.get(absolute);\n if (cached) return cached;\n const source = read(file, languageVersion, onError, shouldCreateNewSourceFile);\n if (source) this.originals.set(absolute, source);\n return source;\n };\n this.program = ts.createProgram(parsed.fileNames, parsed.options, this.host);\n const errors = [...this.program.getOptionsDiagnostics(), ...this.program.getSyntacticDiagnostics()];\n if (errors.length) throw new ProgramLoadError({ tsconfig: configPath, diagnostics: diagnosticsText(errors) });\n }\n\n check(mutant: Mutant): Viability {\n const file = resolve(mutant.file);\n const source = this.originals.get(file);\n if (!source) throw new ProgramLoadError({ tsconfig: this.configPath, diagnostics: [`File not loaded: ${mutant.file}`] });\n const { startOffset, endOffset, text } = mutant.replacement;\n if (startOffset < 0 || endOffset < startOffset || endOffset > source.text.length) {\n return { viable: false, diagnostics: [\"Replacement offsets are outside the original file\"] };\n }\n this.overlay = { file, text: source.text.slice(0, startOffset) + text + source.text.slice(endOffset) };\n try {\n const mutated = ts.createProgram({ rootNames: this.program.getRootFileNames(), options: this.program.getCompilerOptions(), host: this.host, oldProgram: this.program });\n const changed = mutated.getSourceFile(file);\n if (!changed) throw new Error(`Mutated source not found: ${file}`);\n const diagnostics = [...mutated.getSyntacticDiagnostics(changed), ...mutated.getSemanticDiagnostics(changed)];\n return { viable: diagnostics.length === 0, diagnostics: diagnosticsText(diagnostics) };\n } finally {\n this.overlay = undefined;\n }\n }\n}\n\n/** TS 6 is intentionally a runtime analysis dependency, not the workspace compiler. */\nexport function makeTypeScriptOracle(): TypeOracle {\n const sessions = new Map<string, ProgramSession>();\n const owners = new Map<string, ProgramSession>();\n return {\n *discover(config) {\n const configPath = resolve(config.root, config.tsconfig);\n let session = sessions.get(configPath);\n if (!session) {\n session = new ProgramSession(configPath);\n sessions.set(configPath, session);\n }\n const checker = session.program.getTypeChecker();\n for (const source of session.program.getSourceFiles()) {\n const file = resolve(source.fileName);\n const local = relative(config.root, file).replaceAll(\"\\\\\", \"/\");\n // Test support lives beside the project, so judge it relative to the tsconfig.\n const project = relative(dirname(configPath), file).replaceAll(\"\\\\\", \"/\");\n if (source.isDeclarationFile || local.startsWith(\"../\") || /(?:^|\\/)(?:node_modules|__tests__|__mocks__|tests?)\\//.test(project) || /\\.(?:test|spec)\\.[cm]?[jt]sx?$/.test(local)) continue;\n if (config.include.length && !config.include.some((glob) => matchesGlob(local, glob))) continue;\n if (config.exclude.some((glob) => matchesGlob(local, glob))) continue;\n owners.set(file, session);\n const api = imports(source);\n const visit = (node: ts.Node): void => {\n if (isFunction(node) && node.body && mutable(node, checker) && !skipped(node)) {\n const name = functionName(node);\n if (!config.functionFilter.length || config.functionFilter.some((filter) => matchesGlob(name, filter))) {\n const signature = checker.getSignatureFromDeclaration(node);\n if (signature) {\n const wrapped = wrappedEffect(node, checker);\n const type = wrapped ?? checker.getReturnTypeOfSignature(signature);\n const generator = wrapped && ts.isFunctionExpression(node) ? node : generatorBody(node, checker);\n const body = generator?.body ?? node.body;\n const start = body.getStart(source);\n const end = body.getEnd();\n const a = source.getLineAndCharacterOfPosition(start);\n const b = source.getLineAndCharacterOfPosition(end);\n found.push({\n file, name, returnType: checker.typeToString(type, node, ts.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope | ts.TypeFormatFlags.NoTruncation),\n span: { start: { line: a.line + 1, column: a.character + 1 }, end: { line: b.line + 1, column: b.character + 1 } },\n startOffset: start, endOffset: end, original: body.getText(source),\n literal: literalOfBody(body, checker),\n block: ts.isBlock(body), generator: generator !== undefined,\n shape: shapeOf(type, checker, node, body), api,\n });\n }\n }\n // Nested implementation callbacks are not separate exported functions.\n return;\n }\n ts.forEachChild(node, visit);\n };\n const found: MutableFunction[] = [];\n visit(source);\n yield* found;\n }\n },\n checkViable(mutant) {\n const session = owners.get(resolve(mutant.file));\n if (!session) throw new ProgramLoadError({ tsconfig: \"\", diagnostics: [\"Generate mutants before checking viability\"] });\n return session.check(mutant);\n },\n };\n}\n\nfunction isFunction(node: ts.Node): node is FunctionNode {\n return ts.isFunctionDeclaration(node) || ts.isArrowFunction(node) || ts.isFunctionExpression(node) || ts.isMethodDeclaration(node);\n}\n\nfunction exported(node: ts.Node): boolean {\n return ts.canHaveModifiers(node) && (ts.getModifiers(node)?.some((m) => m.kind === ts.SyntaxKind.ExportKeyword) ?? false);\n}\n\nfunction mutable(node: FunctionNode, checker: ts.TypeChecker): boolean {\n if (ts.isMethodDeclaration(node)) return true;\n if (ts.isFunctionDeclaration(node)) return exported(node);\n const wrapper = wrappedEffect(node, checker);\n let current: ts.Node = node;\n if (wrapper) current = node.parent;\n while (ts.isParenthesizedExpression(current.parent)) current = current.parent;\n if (!ts.isVariableDeclaration(current.parent) || current.parent.initializer !== current) return false;\n const statement = current.parent.parent.parent;\n return ts.isVariableStatement(statement) && exported(statement);\n}\n\nfunction skipped(node: FunctionNode): boolean {\n let current: ts.Node = node;\n while (!ts.isSourceFile(current)) {\n if (ts.getJSDocTags(current).some((tag) => tag.tagName.text === \"mutants-skip\")) return true;\n current = current.parent;\n }\n return false;\n}\n\nfunction functionName(node: FunctionNode): string {\n if (node.name) {\n if (ts.isMethodDeclaration(node) && ts.isClassLike(node.parent) && node.parent.name) return `${node.parent.name.text}.${node.name.getText()}`;\n return node.name.getText();\n }\n let current: ts.Node = node;\n while (!ts.isSourceFile(current)) {\n if (ts.isVariableDeclaration(current)) return current.name.getText();\n current = current.parent;\n }\n return \"default\";\n}\n\nfunction wrappedEffect(node: FunctionNode, checker: ts.TypeChecker): ts.Type | undefined {\n if (!ts.isFunctionExpression(node) || !node.asteriskToken || !ts.isCallExpression(node.parent)) return undefined;\n const result = checker.getTypeAtLocation(node.parent);\n if (family(result, checker)?.kind === \"Effect\") return result;\n const signature = result.getCallSignatures()[0];\n if (!signature) return undefined;\n const returned = checker.getReturnTypeOfSignature(signature);\n return family(returned, checker)?.kind === \"Effect\" ? returned : undefined;\n}\n\nfunction literalOfBody(body: ts.ConciseBody, checker: ts.TypeChecker): string | undefined {\n const first = ts.isBlock(body) && body.statements.length === 1 ? body.statements[0] : undefined;\n const expression = ts.isBlock(body) ? first && ts.isReturnStatement(first) ? first.expression : undefined : body;\n if (!expression) return undefined;\n const type = checker.getTypeAtLocation(expression);\n return type.isStringLiteral() ? JSON.stringify(type.value) : type.isNumberLiteral() ? String(type.value) : undefined;\n}\n\nfunction generatorBody(node: FunctionNode, checker: ts.TypeChecker): ts.FunctionExpression | undefined {\n if (!node.body) return undefined;\n const expression = ts.isBlock(node.body)\n ? node.body.statements.length === 1 && ts.isReturnStatement(node.body.statements[0]!) ? node.body.statements[0]!.expression : undefined\n : node.body;\n // The return type identifies Effect; only select a direct generator callback of the wrapper.\n const signature = checker.getSignatureFromDeclaration(node);\n if (!signature || family(checker.getReturnTypeOfSignature(signature), checker)?.kind !== \"Effect\") return undefined;\n if (expression && ts.isCallExpression(expression)) {\n return expression.arguments.find((arg): arg is ts.FunctionExpression => ts.isFunctionExpression(arg) && arg.asteriskToken !== undefined);\n }\n return undefined;\n}\n\nfunction imports(source: ts.SourceFile): MutableFunction[\"api\"] {\n const namespaces = new Map<string, string>();\n const named = new Map<string, string>();\n for (const statement of source.statements) {\n if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier) || statement.importClause?.isTypeOnly) continue;\n const path = statement.moduleSpecifier.text;\n const bindings = statement.importClause?.namedBindings;\n if (!bindings) continue;\n if (ts.isNamespaceImport(bindings)) {\n if (path.startsWith(\"effect/\")) namespaces.set(path.slice(7), bindings.name.text);\n if (path === \"effect\") for (const module of [\"Effect\", \"Option\", \"Stream\", \"Layer\"]) namespaces.set(module, `${bindings.name.text}.${module}`);\n }\n if (ts.isNamedImports(bindings)) for (const binding of bindings.elements) {\n if (binding.isTypeOnly) continue;\n const imported = (binding.propertyName ?? binding.name).text;\n if (path === \"effect\") namespaces.set(imported, binding.name.text);\n else if (path.startsWith(\"effect/\")) named.set(`${path.slice(7)}.${imported}`, binding.name.text);\n }\n }\n return (module, member) => {\n const namespace = namespaces.get(module);\n return namespace ? `${namespace}.${member}` : named.get(`${module}.${member}`);\n };\n}\n\nfunction family(type: ts.Type, checker: ts.TypeChecker): { kind: Family; args: ReadonlyArray<ts.Type> } | undefined {\n const symbol = type.aliasSymbol ?? type.getSymbol();\n const name = symbol?.getName();\n // Declaration provenance prevents a user-defined Effect-shaped name from being mistaken for Effect.\n const fromEffect = symbol?.declarations?.some((d) => /(?:^|\\/)effect\\/(?:.*\\/)?(?:Effect|Option|Stream|Layer)\\.(?:d\\.)?ts$/.test(d.getSourceFile().fileName));\n if (fromEffect && (name === \"Effect\" || name === \"Option\" || name === \"Stream\" || name === \"Layer\")) {\n const args = type.aliasTypeArguments ?? ((type.flags & ts.TypeFlags.Object) && (type as ts.ObjectType).objectFlags & ts.ObjectFlags.Reference ? checker.getTypeArguments(type as ts.TypeReference) : []);\n return { kind: name, args };\n }\n // Type aliases may hide a referenced interface; union aliases retain their own type arguments.\n const direct = type.getSymbol();\n if (direct && direct !== symbol) {\n const name = direct.getName();\n if ((name === \"Effect\" || name === \"Stream\" || name === \"Layer\") && direct.declarations?.some((d) => d.getSourceFile().fileName.includes(\"/effect/\"))) {\n return { kind: name, args: checker.getTypeArguments(type as ts.TypeReference) };\n }\n }\n if (type.isUnion()) {\n const members = type.types;\n const option = members.every((member) => {\n const symbol = member.getSymbol();\n return (symbol?.name === \"Some\" || symbol?.name === \"None\") && symbol.declarations?.some((d) => /\\/effect\\/.*Option\\.(?:d\\.)?ts$/.test(d.getSourceFile().fileName));\n });\n if (option && members[0]) {\n const first = members.find((m) => m.getSymbol()?.name === \"Some\") ?? members[0];\n return { kind: \"Option\", args: checker.getTypeArguments(first as ts.TypeReference) };\n }\n }\n if (type.flags & ts.TypeFlags.Object && (type as ts.ObjectType).objectFlags & (ts.ObjectFlags.Class | ts.ObjectFlags.Interface)) {\n for (const base of checker.getBaseTypes(type as ts.InterfaceType) ?? []) {\n const detected = family(base, checker);\n if (detected) return detected;\n }\n }\n return undefined;\n}\n\nfunction shapeOf(type: ts.Type, checker: ts.TypeChecker, node: FunctionNode, body: ts.ConciseBody): ReturnShape {\n const detected = family(type, checker);\n if (detected) {\n const [a, e] = detected.args;\n const values = a ? valuesOf(a, checker, node) : [];\n if (detected.kind === \"Option\") return { kind: \"Option\", values };\n const errors = e ? taggedValues(e, checker, node) : [];\n if (detected.kind === \"Layer\") {\n // A real service key, already present in the original body, is required by Layer.effect.\n let service: string | undefined;\n const find = (child: ts.Node): void => {\n if (!service && ts.isCallExpression(child) && child.arguments[0]) {\n const arg = child.arguments[0];\n const argType = checker.getTypeAtLocation(arg);\n if (argType.getProperty(\"Identifier\") && argType.getProperty(\"Service\")) service = arg.getText();\n }\n ts.forEachChild(child, find);\n };\n find(body);\n return { kind: \"Layer\", errors, service };\n }\n return { kind: detected.kind, values, errors };\n }\n if (type.flags & ts.TypeFlags.Void) return { kind: \"Void\", values: [] };\n const members = type.isUnion() ? type.types : [type];\n const boolean = members.every((t) => (t.flags & (ts.TypeFlags.Boolean | ts.TypeFlags.BooleanLiteral)) !== 0);\n const literal = members.every((t) => t.isLiteral());\n return { kind: boolean ? \"Boolean\" : literal ? \"Literal\" : \"Value\", values: valuesOf(type, checker, node) };\n}\n\nfunction taggedValues(type: ts.Type, checker: ts.TypeChecker, location: ts.Node): TaggedValue[] {\n return (type.isUnion() ? type.types : [type]).flatMap((member) => {\n const tag = member.getProperty(\"_tag\");\n if (!tag) return [];\n const tagType = checker.getTypeOfSymbolAtLocation(tag, location);\n if (!tagType.isStringLiteral()) return [];\n const value = constructError(member, checker, location, tagType.value);\n return [{ ...value, tag: tagType.value }];\n });\n}\n\nfunction constructError(type: ts.Type, checker: ts.TypeChecker, location: ts.Node, tag: string): Value {\n const symbol = type.getSymbol();\n if (symbol) {\n const visible = checker.getSymbolsInScope(location, ts.SymbolFlags.Value).find((candidate) => {\n const target = candidate.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(candidate) : candidate;\n return target === symbol;\n });\n if (visible) {\n const constructor = checker.getTypeOfSymbolAtLocation(visible, location).getConstructSignatures()[0];\n if (constructor) {\n const param = constructor.parameters[0];\n if (!param) return { text: `new ${visible.name}()`, synthetic: false };\n const fields = checker.getTypeOfSymbolAtLocation(param, location);\n const value = valuesOf(fields, checker, location)[0];\n if (value && !value.synthetic) return { text: `new ${visible.name}(${value.text})`, synthetic: false };\n }\n }\n }\n return { text: `({ _tag: ${JSON.stringify(tag)} } as unknown as ${checker.typeToString(type, location, ts.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope)})`, synthetic: true };\n}\n\n/** Bounded synthesis: cycles or unavailable required fields produce no fabricated value. */\nfunction valuesOf(type: ts.Type, checker: ts.TypeChecker, location: ts.Node, depth = 0): Value[] {\n if (depth > 4 || type.flags & ts.TypeFlags.Never) return [];\n const value = (text: string): Value => ({ text, synthetic: false });\n const detected = family(type, checker);\n if (detected && (detected.kind === \"Option\" || detected.kind === \"Effect\")) {\n const api = imports(location.getSourceFile());\n const inner = detected.args[0];\n const values = inner ? valuesOf(inner, checker, location, depth + 1) : [];\n const wrap = api(detected.kind, detected.kind === \"Option\" ? \"some\" : \"succeed\");\n const none = detected.kind === \"Option\" ? api(\"Option\", \"none\") : undefined;\n return [\n ...(none ? [value(`${none}()`)] : []),\n ...(wrap ? values.map((v) => ({ text: `${wrap}(${v.text})`, synthetic: v.synthetic })) : []),\n ];\n }\n if (type.isUnion()) return type.types.flatMap((member) => valuesOf(member, checker, location, depth + 1));\n if (type.isStringLiteral()) return [value(JSON.stringify(type.value))];\n if (type.isNumberLiteral()) return [value(String(type.value))];\n if (type.flags & ts.TypeFlags.BooleanLiteral) return [value(checker.typeToString(type))];\n if (type.flags & ts.TypeFlags.Boolean) return [value(\"true\"), value(\"false\")];\n if (type.flags & ts.TypeFlags.String) return [value('\"\"'), value('\"xyzzy\"')];\n if (type.flags & ts.TypeFlags.Number) return [value(\"0\"), value(\"1\"), value(\"-1\")];\n if (type.flags & ts.TypeFlags.BigInt) return [value(\"0n\"), value(\"1n\")];\n if (type.flags & ts.TypeFlags.Null) return [value(\"null\")];\n if (type.flags & (ts.TypeFlags.Unknown | ts.TypeFlags.Any)) return [value(\"undefined\")];\n if (type.flags & (ts.TypeFlags.Undefined | ts.TypeFlags.Void)) return [value(\"undefined\")];\n if (checker.isTupleType(type)) {\n const elements = checker.getTypeArguments(type as ts.TypeReference).map((t) => valuesOf(t, checker, location, depth + 1)[0]);\n return elements.every((v) => v !== undefined) ? [value(`[${elements.map((v) => v.text).join(\", \")}]`)] : [];\n }\n if (checker.isArrayType(type) || checker.isArrayLikeType(type)) {\n const element = checker.getIndexTypeOfType(type, ts.IndexKind.Number);\n const elements = element ? valuesOf(element, checker, location, depth + 1) : [];\n return [value(\"[]\"), ...elements.map((v) => ({ text: `[${v.text}]`, synthetic: v.synthetic }))];\n }\n if (type.flags & ts.TypeFlags.Object && !type.getCallSignatures().length && !type.getConstructSignatures().length) {\n const fields: string[] = [];\n for (const prop of type.getProperties()) {\n if (prop.flags & ts.SymbolFlags.Optional) continue;\n if (!/^[$\\w]+$/.test(prop.name)) return [];\n const first = valuesOf(checker.getTypeOfSymbolAtLocation(prop, location), checker, location, depth + 1)[0];\n if (!first) return [];\n fields.push(`${JSON.stringify(prop.name)}: ${first.text}`);\n }\n return [value(`{ ${fields.join(\", \")} }`)];\n }\n return [];\n}\n", "import { Scratch, ScratchError, type Mutant, type ScratchDir } from \"@mutant-cafe/core\";\nimport * as Effect from \"effect/Effect\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport * as Layer from \"effect/Layer\";\nimport * as Path from \"effect/Path\";\n\nexport const ScratchLive = Layer.effect(Scratch, Effect.gen(function* () {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const failure = (operation: string, location: string, error: { readonly message: string }) =>\n new ScratchError({ operation, path: location, message: error.message });\n\n return Scratch.of({\n acquire: Effect.fn(\"Scratch.acquire\")(function* (root: string) {\n const source = path.resolve(root);\n // Preserve workspace-relative tsconfig extends and local package imports.\n // Vitest still runs in the requested package, not at the workspace root.\n let copyRoot = source;\n let ancestor = source;\n while (true) {\n if ((yield* fs.exists(path.join(ancestor, \"pnpm-workspace.yaml\"))) || (yield* fs.exists(path.join(ancestor, \".git\")))) {\n copyRoot = ancestor;\n break;\n }\n const parent = path.dirname(ancestor);\n if (parent === ancestor) break;\n ancestor = parent;\n }\n const temp = yield* Effect.acquireRelease(\n fs.makeTempDirectory({ prefix: \"mutant-cafe-\" }).pipe(\n Effect.mapError((error) => failure(\"create\", source, error))),\n (dir) => fs.remove(dir, { recursive: true }).pipe(Effect.orDie)\n );\n // Materialize source symlinks, except dependencies. No editable file in\n // the scratch tree may point back into the original checkout.\n const copy = (from: string, to: string, ancestors: ReadonlyArray<string>): Effect.Effect<void, ScratchError> =>\n Effect.gen(function* () {\n const real = yield* fs.realPath(from);\n const info = yield* fs.stat(from);\n if (info.type === \"Directory\") {\n if (ancestors.includes(real)) {\n return yield* Effect.fail(new ScratchError({ operation: \"copy\", path: from, message: \"Cyclic directory symlink\" }));\n }\n yield* fs.makeDirectory(to, { recursive: true });\n const entries = yield* fs.readDirectory(from);\n for (const entry of entries) {\n if ([\".git\", \"mutants.out\", \".agent_sources\", \".agent-sources\", \".brain\", \".pi\", \".rift\"].includes(entry)) continue;\n const src = path.join(from, entry);\n const dest = path.join(to, entry);\n if (entry === \"node_modules\") {\n yield* fs.symlink(path.resolve(src), dest);\n } else {\n yield* copy(src, dest, [...ancestors, real]);\n }\n }\n } else if (info.type === \"File\") {\n yield* fs.copyFile(from, to);\n }\n }).pipe(Effect.mapError((error) => failure(\"copy\", from, error)));\n yield* copy(copyRoot, temp, []);\n const packageRoot = yield* fs.realPath(path.join(temp, path.relative(copyRoot, source))).pipe(\n Effect.mapError((error) => failure(\"resolve\", source, error)));\n\n const originals = new Map<string, Uint8Array>();\n const target = (mutant: Mutant) => Effect.gen(function* () {\n const relative = path.isAbsolute(mutant.file) ? path.relative(source, mutant.file) : mutant.file;\n const location = path.resolve(packageRoot, relative);\n const rel = path.relative(packageRoot, location);\n if (rel === \"\" || rel === \"..\" || rel.startsWith(`..${path.sep}`) || path.isAbsolute(rel) || rel.split(path.sep).includes(\"node_modules\")) {\n return yield* Effect.fail(new ScratchError({ operation: \"resolve\", path: mutant.file, message: \"Mutant file must be inside the copied source tree\" }));\n }\n const real = yield* fs.realPath(location).pipe(Effect.mapError((error) => failure(\"resolve\", location, error)));\n const realRelative = path.relative(packageRoot, real);\n if (realRelative === \"..\" || realRelative.startsWith(`..${path.sep}`) || path.isAbsolute(realRelative)) {\n return yield* Effect.fail(new ScratchError({ operation: \"resolve\", path: mutant.file, message: \"Mutant file resolves outside the scratch package\" }));\n }\n return location;\n });\n const dir: ScratchDir = {\n path: packageRoot,\n apply: Effect.fn(\"Scratch.apply\")(function* (mutant: Mutant) {\n const location = yield* target(mutant);\n const bytes = yield* fs.readFile(location);\n originals.set(location, bytes);\n const original = new TextDecoder(\"utf-8\", { ignoreBOM: true }).decode(bytes);\n const { startOffset, endOffset, text } = mutant.replacement;\n if (startOffset < 0 || endOffset < startOffset || endOffset > original.length) {\n return yield* Effect.fail(new ScratchError({ operation: \"apply\", path: location, message: \"Replacement offsets are outside the file\" }));\n }\n yield* fs.writeFileString(location, original.slice(0, startOffset) + text + original.slice(endOffset));\n }, (effect, mutant) => effect.pipe(Effect.mapError((error) => failure(\"apply\", mutant.file, error)))),\n revert: Effect.fn(\"Scratch.revert\")(function* (mutant: Mutant) {\n const location = yield* target(mutant);\n const bytes = originals.get(location);\n if (bytes !== undefined) {\n yield* fs.writeFile(location, bytes);\n originals.delete(location);\n }\n }, (effect, mutant) => effect.pipe(Effect.mapError((error) => failure(\"revert\", mutant.file, error))))\n };\n return dir;\n }, (effect, root) => effect.pipe(Effect.mapError((error) => error._tag === \"ScratchError\" ? error : failure(\"acquire\", root, error))))\n });\n}));\n", "import { BaselineFailed, TestRunner, TestSpawnError, type ScratchDir, type TestRun } from \"@mutant-cafe/core\";\nimport * as Clock from \"effect/Clock\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Stream from \"effect/Stream\";\nimport * as ChildProcess from \"effect/process/ChildProcess\";\nimport * as ChildProcessSpawner from \"effect/process/ChildProcessSpawner\";\n\nexport const TestRunnerLive = Layer.effect(TestRunner, Effect.gen(function* () {\n const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;\n const execute = Effect.fn(\"TestRunner.execute\")(function* (dir: ScratchDir, args: ReadonlyArray<string>, timeoutMs?: number) {\n // Dependency directories are linked to the source checkout. Disable both\n // result and transform caches so Vitest cannot write through those links.\n // npx resolves the project's own vitest without a package manager's\n // install-state checks, which fail in a scratch copy at a new path.\n const command = [\"npx\", \"--no\", \"vitest\", ...args, \"--no-cache\", \"--no-fsModuleCache\"];\n const started = yield* Clock.currentTimeMillis;\n const chunks: Array<string> = [];\n let exitCode = 1;\n const child = Effect.scoped(Effect.gen(function* () {\n const handle = yield* spawner.spawn(ChildProcess.make(command[0]!, command.slice(1), {\n cwd: dir.path,\n // Node's scoped spawner kills the detached process group, not just pnpm.\n detached: true,\n killSignal: \"SIGKILL\",\n forceKillAfter: \"100 millis\",\n stdin: \"ignore\"\n }));\n const collect = handle.all.pipe(Stream.decodeText(), Stream.runForEach((chunk) =>\n Effect.sync(() => { chunks.push(chunk); })));\n const [code] = yield* Effect.all([handle.exitCode, collect], { concurrency: \"unbounded\" });\n exitCode = code;\n return code === 0 ? \"passed\" as const : \"failed\" as const;\n }));\n const status = yield* (timeoutMs === undefined ? child : child.pipe(\n Effect.timeout(timeoutMs),\n Effect.catchTag(\"TimeoutError\", () => Effect.succeed(\"timedOut\" as const))\n )).pipe(Effect.mapError((error) => new TestSpawnError({ command, message: error.message })));\n const ended = yield* Clock.currentTimeMillis;\n const run: TestRun = { status, durationMs: ended - started, command, output: chunks.join(\"\") };\n return { ...run, exitCode };\n });\n return TestRunner.of({\n baseline: Effect.fn(\"TestRunner.baseline\")(function* (dir: ScratchDir) {\n const run = yield* execute(dir, [\"run\"]);\n if (run.status !== \"passed\") {\n return yield* Effect.fail(new BaselineFailed({ exitCode: run.exitCode, output: run.output }));\n }\n return { durationMs: run.durationMs, testCommand: run.command };\n }),\n runRelated: Effect.fn(\"TestRunner.runRelated\")((dir: ScratchDir, file: string, timeoutMs: number) =>\n execute(dir, [\"related\", file, \"--run\", \"--passWithNoTests\"], timeoutMs))\n });\n}));\n", "import {\n MutantSource, MutantResult, Reporter, Scratch, TestRunner,\n type Baseline, type BaselineFailed, type Mutant,\n type ProgramLoadError, type ReportWriteError, type RunConfig, type RunReport,\n type ScratchDir, type ScratchError, type TestSpawnError\n} from \"@mutant-cafe/core\";\nimport { createEffectActor, createEffectLogic, join, send, setupEffect } from \"@xstate/effect\";\nimport { types } from \"xstate\";\nimport * as Effect from \"effect/Effect\";\nimport * as Pool from \"effect/Pool\";\nimport * as Path from \"effect/Path\";\nimport * as Result from \"effect/Result\";\nimport * as Schema from \"effect/Schema\";\nimport * as Scope from \"effect/Scope\";\nimport * as Stream from \"effect/Stream\";\n\ntype RunError = BaselineFailed | ScratchError | TestSpawnError | ProgramLoadError | ReportWriteError;\n// XState freezes plain context objects in development. A pool is a live\n// resource, not immutable run data; keep its internals behind a class handle.\nclass ScratchPool {\n readonly value: Pool.Pool<ScratchDir, ScratchError>;\n constructor(value: Pool.Pool<ScratchDir, ScratchError>) { this.value = value; }\n}\ninterface RunState {\n readonly baseline: Baseline;\n readonly timeoutMs: number;\n readonly failure: RunError | undefined;\n readonly pool: ScratchPool | undefined;\n readonly pending: ReadonlyArray<Mutant>;\n readonly results: ReadonlyArray<MutantResult>;\n readonly reported: boolean;\n}\n\n/** A separate actor owns each run. Its resources outlive invoked phase tasks. */\nexport const runMutants = Effect.fn(\"Runner.runMutants\")(function* (\n config: RunConfig, mutants?: Stream.Stream<Mutant, ProgramLoadError>\n) {\n const scratch = yield* Scratch;\n const tests = yield* TestRunner;\n const source = yield* MutantSource;\n const reporter = yield* Reporter;\n const scope = yield* Scope.Scope;\n const path = yield* Path.Path;\n const jobs = Math.max(1, Math.floor(config.jobs));\n const report = (state: RunState): RunReport => ({\n schemaVersion: 1, tool: \"mutant.cafe\", root: config.root,\n baseline: state.baseline, timeoutMs: state.timeoutMs, results: state.results\n });\n const capture = <A, R>(effect: Effect.Effect<A, RunError, R>) => Effect.result(effect);\n const copying = createEffectLogic(() => capture(Effect.gen(function* () {\n const pool = yield* Pool.make({ acquire: scratch.acquire(config.root), size: jobs }).pipe(\n Effect.provideService(Scope.Scope, scope));\n // Force the first acquisition in the copying phase. The pool owns the\n // tree; this short lease does not reserve a worker during later tests.\n yield* Effect.scoped(Pool.get(pool));\n return new ScratchPool(pool);\n })));\n const baselining = createEffectLogic(({ input }: { input: ScratchPool | undefined }) => capture(Effect.gen(function* () {\n if (input === undefined) return yield* Effect.die(\"Missing scratch pool\");\n const baseline = yield* Effect.scoped(Effect.gen(function* () {\n const dir = yield* Pool.get(input.value);\n return yield* tests.baseline(dir);\n }));\n return { baseline, timeoutMs: config.timeoutMs ?? Math.max(config.minimumTimeoutMs, Math.ceil(config.timeoutMultiplier * baseline.durationMs)) };\n })));\n const generating = createEffectLogic(() => capture(Stream.runCollect(mutants ?? source.generate(config))));\n const testing = createEffectLogic(({ input }: { input: {\n readonly state: RunState;\n readonly record: (result: MutantResult) => Effect.Effect<void>;\n } }) => capture(Effect.gen(function* () {\n const dirs = input.state.pool?.value;\n if (dirs === undefined) return yield* Effect.die(\"Missing scratch pool\");\n yield* Stream.fromIterable(input.state.pending).pipe(\n Stream.mapEffect((mutant) => Effect.scoped(Effect.gen(function* () {\n const viability = yield* source.checkViable(mutant);\n if (!viability.viable) {\n const result: MutantResult = { mutant, outcome: \"unviable\", durationMs: 0, testCommand: [], diagnostics: viability.diagnostics };\n yield* input.record(result);\n yield* reporter.progress(result);\n return;\n }\n const dir = yield* Pool.get(dirs);\n const run = yield* Effect.acquireUseRelease(\n dir.apply(mutant),\n () => tests.runRelated(dir, path.isAbsolute(mutant.file) ? path.relative(config.root, mutant.file) : mutant.file, mutant.genre === \"EffectNever\" ? config.neverTimeoutMs : input.state.timeoutMs),\n // A dirty directory must never return to the pool, even on cancel.\n () => dir.revert(mutant).pipe(Effect.orDie)\n );\n const result: MutantResult = {\n mutant,\n // Effect.never is meant to hang: a test that waits on it and times out noticed the mutant.\n outcome: run.status === \"timedOut\" ? (mutant.genre === \"EffectNever\" ? \"caught\" : \"timeout\") : run.status === \"failed\" ? \"caught\" : \"missed\",\n durationMs: run.durationMs,\n testCommand: run.command,\n diagnostics: [],\n ...(run.output === \"\" ? {} : { output: run.output })\n };\n yield* input.record(result);\n yield* reporter.progress(result);\n })), { concurrency: jobs }),\n Stream.runDrain\n );\n })));\n const reporting = createEffectLogic(({ input }: { input: RunState }) => capture(\n input.reported ? Effect.void : reporter.write(report(input))\n ));\n // copying -> baseline -> generating -> testing -> reporting -> done.\n // Domain failures travel as actor outputs; completed results are events so\n // interruption can report the machine's current state, not a task-local array.\n const machine = setupEffect({\n schemas: {\n context: types<RunState>(),\n events: { CANCEL: Schema.Struct({}), RESULT: Schema.Struct({ result: MutantResult }) }\n },\n actors: { copying, baselining, generating, testing, reporting }\n }).createMachine({\n context: {\n baseline: { durationMs: 0, testCommand: [] },\n timeoutMs: config.timeoutMs ?? config.minimumTimeoutMs,\n failure: undefined, pool: undefined, pending: [], results: [], reported: false\n },\n output: ({ context }) => context,\n initial: \"copying\",\n on: {\n CANCEL: { target: \".interrupted\" },\n RESULT: ({ context, event }) => ({ context: { ...context, results: [...context.results, event.result] } })\n },\n states: {\n copying: { invoke: { src: \"copying\", onDone: ({ context, event }) => Result.isSuccess(event.output)\n ? { target: \"baseline\", context: { ...context, pool: event.output.success } }\n : { target: \"failed\", context: { ...context, failure: event.output.failure } } } },\n baseline: { invoke: {\n src: \"baselining\", input: ({ context }) => context.pool,\n onDone: ({ context, event }) => Result.isSuccess(event.output)\n ? { target: \"generating\", context: { ...context, ...event.output.success } }\n : { target: event.output.failure._tag === \"BaselineFailed\" ? \"baselineFailed\" : \"failed\", context: { ...context, failure: event.output.failure } }\n } },\n generating: { invoke: { src: \"generating\", onDone: ({ context, event }) => Result.isSuccess(event.output)\n ? { target: \"testing\", context: { ...context, pending: event.output.success } }\n : { target: \"reporting\", context: { ...context, failure: event.output.failure } } } },\n testing: { invoke: {\n src: \"testing\", input: ({ context, self }) => ({\n state: context,\n // Queue completion before progress can trigger CANCEL. The parent's\n // FIFO mailbox commits this result before handling that cancellation.\n record: (result) => send(self, { type: \"RESULT\", result })\n }),\n onDone: ({ context, event }) => ({ target: \"reporting\", context: {\n ...context, failure: Result.isFailure(event.output) ? event.output.failure : context.failure\n } })\n } },\n reporting: { invoke: {\n src: \"reporting\", input: ({ context }) => context,\n onDone: ({ context, event }) => ({ target: \"done\", context: {\n ...context, reported: Result.isSuccess(event.output), failure: Result.isFailure(event.output) ? event.output.failure : context.failure\n } })\n } },\n interrupted: { invoke: {\n src: \"reporting\", input: ({ context }) => context,\n onDone: ({ context, event }) => ({ target: \"done\", context: {\n ...context, reported: Result.isSuccess(event.output), failure: Result.isFailure(event.output) ? event.output.failure : context.failure\n } })\n } },\n baselineFailed: { type: \"final\" },\n failed: { type: \"final\" },\n done: { type: \"final\" }\n }\n });\n // Close the actor host before the outer pool scope. Stopping an invocation\n // requests interruption; host release waits for its process/revert finalizers.\n const state = yield* Effect.scoped(Effect.gen(function* () {\n const actor = yield* createEffectActor(machine);\n // Domain failures are task outputs; only unexpected actor defects reach join.\n // @effect-diagnostics-next-line anyUnknownInErrorContext:off -- Domain errors are captured above.\n return yield* join(actor).pipe(Effect.orDie, Effect.onInterrupt(() => Effect.gen(function* () {\n yield* send(actor, { type: \"CANCEL\" });\n // @effect-diagnostics-next-line anyUnknownInErrorContext:off -- Wait for the partial report before releasing the actor host.\n yield* join(actor).pipe(Effect.orDie);\n })));\n }));\n if (state.failure !== undefined) return yield* state.failure;\n return report(state);\n}, Effect.scoped);\n", "import { ConfigFile, MutantSource, Reporter, RunConfig, type BaselineFailed, type Mutant, type ProgramLoadError, type ReportWriteError, type RunReport, type Scratch, type ScratchError, type TestRunner, type TestSpawnError } from \"@mutant-cafe/core\";\nimport * as Console from \"effect/Console\";\nimport * as Effect from \"effect/Effect\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport * as Option from \"effect/Option\";\nimport * as Path from \"effect/Path\";\nimport * as Ref from \"effect/Ref\";\nimport * as Schema from \"effect/Schema\";\nimport * as Stream from \"effect/Stream\";\nimport * as Command from \"effect/cli/Command\";\nimport * as Flag from \"effect/cli/Flag\";\nimport { selectInDiff } from \"./Diff.ts\";\nimport { errorExitCode, reportExitCode } from \"./ExitCode.ts\";\nimport { makeReporter, mutantLine } from \"./Reporter.ts\";\n\nexport class UsageError extends Schema.TaggedError<UsageError>()(\"UsageError\", { message: Schema.String }) {}\n\nexport type Run = (config: RunConfig, mutants: ReadonlyArray<Mutant>) => Effect.Effect<RunReport,\n BaselineFailed | ScratchError | TestSpawnError | ProgramLoadError | ReportWriteError,\n MutantSource | Scratch | TestRunner | Reporter | Path.Path>;\n\nconst flags = {\n list: Flag.Boolean(\"list\").pipe(Flag.withDefault(false)),\n inDiff: Flag.String(\"in-diff\").pipe(Flag.optional),\n include: Flag.String(\"file\").pipe(Flag.atLeast(0)),\n exclude: Flag.String(\"exclude\").pipe(Flag.atLeast(0)),\n jobs: Flag.Int(\"jobs\").pipe(Flag.optional),\n timeout: Flag.Finite(\"timeout\").pipe(Flag.optional, Flag.withDescription(\"Absolute test timeout in seconds\")),\n timeoutMultiplier: Flag.Finite(\"timeout-multiplier\").pipe(Flag.optional),\n minimumTimeout: Flag.Finite(\"minimum-test-timeout\").pipe(Flag.optional, Flag.withDescription(\"Minimum test timeout in seconds\")),\n output: Flag.String(\"output\").pipe(Flag.withDefault(\"mutants.out\")),\n tsconfig: Flag.String(\"tsconfig\").pipe(Flag.withDefault(\"tsconfig.json\")),\n};\n\nexport const makeCommand = (options: {\n readonly root: string;\n readonly run: Run;\n readonly onExit?: (code: number) => Effect.Effect<void>;\n}) => Command.make(\"mutant-cafe\", flags, (input) => Effect.gen(function*() {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const root = path.resolve(options.root);\n const configPath = path.join(root, \"mutants.config.json\");\n const fileConfig = (yield* fs.exists(configPath))\n ? yield* fs.readFileString(configPath).pipe(\n Effect.flatMap(Schema.decodeEffect(Schema.fromJsonString(ConfigFile))),\n Effect.mapError((error) => new UsageError({ message: `Invalid mutants.config.json: ${String(error)}` })),\n ) : {};\n const timeoutMs = Option.map(input.timeout, (seconds) => Math.ceil(seconds * 1000));\n const inDiff = Option.getOrUndefined(input.inDiff);\n const config = yield* Schema.decodeEffect(RunConfig)({\n root,\n tsconfig: input.tsconfig,\n include: input.include.length > 0 ? input.include : fileConfig.include ?? [\"**/*.ts\", \"**/*.tsx\"],\n exclude: input.exclude.length > 0 ? input.exclude : fileConfig.exclude ?? [],\n functionFilter: fileConfig.functionFilter ?? [],\n ...(inDiff === undefined ? {} : { inDiff }),\n jobs: Option.getOrElse(input.jobs, () => fileConfig.jobs ?? 1),\n ...(Option.isSome(timeoutMs) ? { timeoutMs: timeoutMs.value } : {}),\n timeoutMultiplier: Option.getOrElse(input.timeoutMultiplier, () => fileConfig.timeoutMultiplier ?? 5),\n minimumTimeoutMs: Option.match(input.minimumTimeout, { onNone: () => fileConfig.minimumTimeoutMs ?? 20_000, onSome: (seconds) => Math.ceil(seconds * 1000) }),\n neverTimeoutMs: 1_000,\n outDir: input.output,\n }).pipe(Effect.mapError((error) => new UsageError({ message: String(error) })));\n if (config.jobs < 1 || config.timeoutMultiplier <= 0 || config.minimumTimeoutMs <= 0 || (config.timeoutMs !== undefined && config.timeoutMs <= 0)) {\n return yield* new UsageError({ message: \"Jobs and timeout values must be positive\" });\n }\n const source = yield* MutantSource;\n const generated = yield* Stream.runCollect(source.generate(config));\n const mutants = inDiff === undefined ? generated : yield* selectInDiff({ root, diffPath: inDiff, mutants: generated });\n if (input.list) {\n for (const mutant of mutants) yield* Console.log(mutantLine(mutant, config.root, path));\n if (options.onExit !== undefined) yield* options.onExit(0);\n return;\n }\n const reporter = yield* makeReporter({ root, outDir: config.outDir, mutants });\n const report = yield* options.run(config, mutants).pipe(Effect.provideService(Reporter, reporter));\n yield* reporter.write(report);\n if (options.onExit !== undefined) yield* options.onExit(reportExitCode(report));\n}));\n\n// The executable's runtime supplies core services. No engine or runner package is\n// imported here; the integration layer owns that choice.\nexport const runCli = Effect.fn(\"runCli\")(function*(options: {\n readonly root: string;\n readonly args: ReadonlyArray<string>;\n readonly run: Run;\n}) {\n const code = yield* Ref.make(0);\n const command = makeCommand({ ...options, onExit: (value) => Ref.set(code, value) });\n yield* Command.runWith(command, { version: \"0.1.1\" })(options.args).pipe(\n Effect.catch((error) => Effect.gen(function*() {\n yield* Console.error(String(error));\n yield* Ref.set(code, errorExitCode(error));\n })),\n Effect.catchDefect((defect) => Effect.gen(function*() {\n yield* Console.error(`Internal error: ${String(defect)}`);\n yield* Ref.set(code, 70);\n })),\n );\n return yield* Ref.get(code);\n});\n", "import { DiffParseError, type Mutant } from \"@mutant-cafe/core\";\nimport * as Effect from \"effect/Effect\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport * as Path from \"effect/Path\";\nimport * as Schema from \"effect/Schema\";\n\nexport class DiffMismatch extends Schema.TaggedError<DiffMismatch>()(\"DiffMismatch\", {\n path: Schema.String,\n message: Schema.String,\n}) {}\n\ninterface NewLine { readonly number: number; readonly text: string; readonly added: boolean; readonly noNewline: boolean }\ninterface FilePatch { readonly file: string; readonly lines: ReadonlyArray<NewLine> }\n\n// Counts, ordering and new-side text are checked, not merely the presence of @@.\nexport const parseDiff = (text: string, path: string) => Effect.try({\n try: (): ReadonlyArray<FilePatch> => {\n const fail = (message: string): never => { throw new DiffParseError({ path, message }); };\n if (text === \"\") return [];\n const input = text.split(\"\\n\");\n if (input.at(-1) === \"\") input.pop();\n const patches: FilePatch[] = [];\n let i = 0;\n let sawFile = false;\n while (i < input.length) {\n const line = input[i++]!;\n if (line.startsWith(\"diff --git \") || /^(index |new file mode |deleted file mode |old mode |new mode |similarity index |rename from |rename to )/.test(line)) continue;\n if (!line.startsWith(\"--- \")) fail(\"Expected a unified diff file header\");\n const next = input[i++];\n if (!next?.startsWith(\"+++ \")) fail(\"Missing new-side file header\");\n const raw = next!.slice(4).split(\"\\t\")[0]!;\n const decoded: unknown = raw.startsWith('\"') ? JSON.parse(raw) : raw;\n if (typeof decoded !== \"string\") fail(\"Invalid file path\");\n const file = String(decoded).replace(/^b\\//, \"\");\n const lines: NewLine[] = [];\n let hunks = 0;\n let previousEnd = 0;\n let previousOldEnd = 0;\n while (input[i]?.startsWith(\"@@\")) {\n const match = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@(?:.*)$/.exec(input[i++]!);\n if (!match) fail(\"Invalid hunk header\");\n let oldRemaining = Number(match![2] ?? 1);\n let newRemaining = Number(match![4] ?? 1);\n let newLine = Number(match![3]);\n const oldStart = Number(match![1]);\n const oldCount = oldRemaining;\n if (![oldStart, oldRemaining, newLine, newRemaining].every(Number.isSafeInteger)) fail(\"Hunk range is not a safe integer\");\n if ((oldRemaining > 0 && oldStart === 0) || (newRemaining > 0 && newLine === 0)) fail(\"Nonempty hunk cannot start at zero\");\n if (newLine < previousEnd || oldStart < previousOldEnd) fail(\"Overlapping or unordered hunks\");\n let previousPrefix = \"\";\n const markNoNewline = () => {\n if (previousPrefix === \"+\" || previousPrefix === \" \") {\n const last = lines.at(-1);\n if (last === undefined || last.noNewline) fail(\"Unexpected no-newline marker\");\n lines[lines.length - 1] = { ...last!, noNewline: true };\n } else if (previousPrefix !== \"-\") fail(\"Unexpected no-newline marker\");\n previousPrefix = \"\";\n };\n hunks++;\n while (oldRemaining > 0 || newRemaining > 0) {\n const body = input[i++];\n if (body === \"\\\\") { markNoNewline(); continue; }\n if (body === undefined) fail(\"Truncated hunk\");\n const prefix = body![0];\n if (prefix === \" \" || prefix === \"-\") oldRemaining--;\n if (prefix === \" \" || prefix === \"+\") {\n newRemaining--;\n lines.push({ number: newLine++, text: body!.slice(1), added: prefix === \"+\", noNewline: false });\n } else if (prefix !== \"-\") fail(\"Invalid hunk line\");\n previousPrefix = prefix!;\n if (oldRemaining < 0 || newRemaining < 0) fail(\"Hunk count does not match its body\");\n }\n if (input[i] === \"\\\\") { markNoNewline(); i++; }\n previousEnd = newLine;\n previousOldEnd = oldStart + oldCount;\n }\n if (hunks === 0) fail(\"File has no hunks\");\n sawFile = true;\n if (file !== \"/dev/null\") patches.push({ file, lines });\n }\n if (!sawFile) fail(\"No unified diff found\");\n return patches;\n },\n catch: (error) => Schema.is(DiffParseError)(error) ? error : new DiffParseError({ path, message: String(error) }),\n});\n\nexport const selectInDiff = Effect.fn(\"selectInDiff\")(function*(options: {\n readonly root: string;\n readonly diffPath: string;\n readonly mutants: ReadonlyArray<Mutant>;\n}) {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const diffPath = path.resolve(options.root, options.diffPath);\n const text = yield* fs.readFileString(diffPath).pipe(Effect.mapError((error) => new DiffParseError({ path: diffPath, message: String(error) })));\n const patches = yield* parseDiff(text, diffPath);\n const changed = new Map<string, Set<number>>();\n for (const patch of patches) {\n const absolute = path.resolve(options.root, patch.file);\n const relative = path.relative(options.root, absolute);\n if (relative === \"..\" || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {\n return yield* new DiffParseError({ path: diffPath, message: \"Diff path escapes project root\" });\n }\n const current = yield* fs.readFileString(absolute).pipe(Effect.mapError((error) => new DiffMismatch({ path: patch.file, message: String(error) })));\n const lines = current.split(\"\\n\");\n for (const line of patch.lines) {\n const finalLine = current.endsWith(\"\\n\") ? lines.length - 1 : lines.length;\n const newlineMismatch = line.noNewline\n ? line.number !== finalLine || current.endsWith(\"\\n\")\n : line.number === finalLine && !current.endsWith(\"\\n\");\n if (lines[line.number - 1] !== line.text || newlineMismatch) return yield* new DiffMismatch({ path: patch.file, message: `New-side line ${line.number} does not match tree` });\n }\n const added = changed.get(absolute) ?? new Set<number>();\n for (const line of patch.lines) if (line.added) added.add(line.number);\n changed.set(absolute, added);\n }\n return options.mutants.filter((mutant) => {\n const added = changed.get(path.resolve(options.root, mutant.file));\n const end = mutant.span.end.line - (mutant.span.end.column === 1 ? 1 : 0);\n return added !== undefined && [...added].some((line) => line >= mutant.span.start.line && line <= end);\n });\n});\n", "import type { RunReport } from \"@mutant-cafe/core\";\n\nexport const reportExitCode = (report: RunReport): number =>\n report.results.some((result) => result.outcome === \"missed\") ? 2 :\n report.results.some((result) => result.outcome === \"timeout\") ? 3 : 0;\n\nexport const errorExitCode = (error: { readonly _tag: string }): number => {\n switch (error._tag) {\n case \"BaselineFailed\": return 4;\n case \"DiffMismatch\": return 5;\n case \"DiffParseError\": return 6;\n case \"UsageError\": case \"ShowHelp\": case \"InvalidValue\": case \"MissingFlag\":\n case \"UnrecognizedArgument\": return 1;\n default: return 70;\n }\n};\n", "import { Reporter, ReportWriteError, RunReport, Mutant, type MutantResult } from \"@mutant-cafe/core\";\nimport * as Clock from \"effect/Clock\";\nimport * as Console from \"effect/Console\";\nimport * as Effect from \"effect/Effect\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport * as Layer from \"effect/Layer\";\nimport * as Path from \"effect/Path\";\nimport * as Schema from \"effect/Schema\";\nimport * as Semaphore from \"effect/Semaphore\";\n\nexport const mutantLine = (mutant: Mutant, root: string, path: Path.Path): string =>\n `${path.relative(root, path.resolve(root, mutant.file))}:${mutant.span.start.line}:${mutant.span.start.column}: ${mutant.description}`;\n\nconst outcomes = [\"caught\", \"missed\", \"timeout\", \"unviable\"] as const;\nconst jsonReport = Schema.encodeEffect(Schema.fromJsonString(RunReport));\nconst logText = (result: MutantResult): string => [\n ...(\"output\" in result && typeof result.output === \"string\" ? [result.output] : []),\n ...result.diagnostics,\n].join(\"\\n\");\n\n// A whole-file hunk is deliberately used: it is a valid patch even for replacements\n// spanning many lines, and it preserves the no-final-newline marker on both sides.\nconst unifiedDiff = (mutant: Mutant, original: string): string => {\n const replacement = mutant.replacement;\n const modified = original.slice(0, replacement.startOffset) + replacement.text + original.slice(replacement.endOffset);\n const body = (text: string, prefix: string): ReadonlyArray<string> => {\n if (text === \"\") return [];\n const lines = text.split(\"\\n\");\n if (lines.at(-1) === \"\") lines.pop();\n const result = lines.map((line) => prefix + line);\n if (!text.endsWith(\"\\n\")) result.push(\"\\\\");\n return result;\n };\n const count = (text: string) => text === \"\" ? 0 : text.split(\"\\n\").length - (text.endsWith(\"\\n\") ? 1 : 0);\n const oldCount = count(original);\n const newCount = count(modified);\n return [`--- a/${mutant.file}`, `+++ b/${mutant.file}`, `@@ -${oldCount === 0 ? 0 : 1},${oldCount} +${newCount === 0 ? 0 : 1},${newCount} @@`, ...body(original, \"-\"), ...body(modified, \"+\"), \"\"].join(\"\\n\");\n};\n\nexport const makeReporter = Effect.fn(\"makeReporter\")(function*(options: {\n readonly root: string;\n readonly outDir: string;\n readonly mutants: ReadonlyArray<Mutant>;\n}) {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const dir = path.resolve(options.root, options.outDir);\n const started = yield* Clock.currentTimeMillis;\n const semaphore = yield* Semaphore.make(1);\n const results: MutantResult[] = [];\n let pendingError: ReportWriteError | undefined;\n let summarized = false;\n const writeError = (error: unknown) => new ReportWriteError({ path: dir, message: String(error) });\n const ids = new Set<string>();\n for (const mutant of options.mutants) {\n if (!/^[A-Za-z0-9_-]+$/.test(mutant.id) || ids.has(mutant.id)) return yield* writeError(\"Mutant ids must be unique safe filenames\");\n ids.add(mutant.id);\n }\n yield* Effect.gen(function*() {\n // Rotating an ancestor would move the source tree. An unrelated output path\n // is allowed, but an old directory is removed only if it is our report.\n const relative = path.relative(dir, path.resolve(options.root));\n if (relative === \"\" || (relative !== \"..\" && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative))) {\n return yield* new ReportWriteError({ path: dir, message: \"Output cannot be the project root or an ancestor\" });\n }\n if (yield* fs.exists(dir)) {\n if (!(yield* fs.exists(path.join(dir, \"mutants.json\")))) return yield* writeError(\"Existing output is not a mutant report; choose another --output\");\n if (yield* fs.exists(`${dir}.old`)) {\n if (!(yield* fs.exists(path.join(`${dir}.old`, \"mutants.json\")))) return yield* writeError(\"Previous output is not a mutant report; choose another --output\");\n yield* fs.remove(`${dir}.old`, { recursive: true });\n }\n yield* fs.rename(dir, `${dir}.old`);\n }\n yield* fs.makeDirectory(path.join(dir, \"diff\"), { recursive: true });\n yield* fs.makeDirectory(path.join(dir, \"logs\"), { recursive: true });\n }).pipe(Effect.mapError(writeError));\n // Encode the actual core contract, not a second report shape.\n const encodedMutants = yield* Schema.encodeEffect(Schema.fromJsonString(Schema.Array(Mutant)))(options.mutants).pipe(Effect.mapError(writeError));\n yield* fs.writeFileString(path.join(dir, \"mutants.json\"), encodedMutants).pipe(Effect.mapError(writeError));\n yield* Effect.forEach(outcomes, (outcome) => fs.writeFileString(path.join(dir, `${outcome}.txt`), \"\"), { discard: true }).pipe(Effect.mapError(writeError));\n for (const mutant of options.mutants) {\n const original = yield* fs.readFileString(path.resolve(options.root, mutant.file)).pipe(Effect.mapError(writeError));\n yield* fs.writeFileString(path.join(dir, \"diff\", `${mutant.id}.diff`), unifiedDiff(mutant, original)).pipe(Effect.mapError(writeError));\n }\n const writeLists = (items: ReadonlyArray<MutantResult>) => Effect.forEach(outcomes, (outcome) => {\n const lines = items.filter((result) => result.outcome === outcome).map((result) => mutantLine(result.mutant, options.root, path));\n return fs.writeFileString(path.join(dir, `${outcome}.txt`), lines.length === 0 ? \"\" : lines.join(\"\\n\") + \"\\n\");\n }, { discard: true });\n const service = Reporter.of({\n progress: (result) => semaphore.withPermit(Effect.gen(function*() {\n results.push(result);\n yield* Console.log(`${result.outcome} ${mutantLine(result.mutant, options.root, path)} (${result.durationMs}ms)`);\n yield* Effect.gen(function*() {\n if (!ids.has(result.mutant.id)) return yield* writeError(\"Progress result does not belong to this report\");\n yield* writeLists(results);\n yield* fs.writeFileString(path.join(dir, \"logs\", `${result.mutant.id}.log`), logText(result));\n }).pipe(Effect.catch((error) => Effect.gen(function*() {\n if (pendingError === undefined) {\n pendingError = writeError(error);\n yield* Console.warn(`Report write failed: ${pendingError.message}`);\n }\n })));\n })),\n write: (report) => semaphore.withPermit(Effect.gen(function*() {\n if (pendingError !== undefined) return yield* pendingError;\n const encoded = yield* jsonReport(report).pipe(Effect.mapError(writeError));\n yield* fs.writeFileString(path.join(dir, \"outcomes.json.tmp\"), encoded).pipe(Effect.mapError(writeError));\n yield* fs.rename(path.join(dir, \"outcomes.json.tmp\"), path.join(dir, \"outcomes.json\")).pipe(Effect.mapError(writeError));\n yield* writeLists(report.results).pipe(Effect.mapError(writeError));\n for (const result of report.results) {\n if (!ids.has(result.mutant.id)) return yield* writeError(\"Final result does not belong to this report\");\n yield* fs.writeFileString(path.join(dir, \"logs\", `${result.mutant.id}.log`), logText(result)).pipe(Effect.mapError(writeError));\n }\n // The runner writes on completion or interrupt and the CLI writes again\n // as the owner of the final report; files are idempotent, the summary prints once.\n if (summarized) return;\n summarized = true;\n const elapsed = (yield* Clock.currentTimeMillis) - started;\n yield* Console.log(outcomes.map((outcome) => `${report.results.filter((result) => result.outcome === outcome).length} ${outcome}`).join(\", \") + `; ${(elapsed / 1000).toFixed(2)}s`);\n })),\n });\n return service;\n});\n\nexport const ReporterLive = (options: Parameters<typeof makeReporter>[0]) =>\n Layer.effect(Reporter, makeReporter(options));\n"],
|
|
5
|
+
"mappings": ";;;AACA,YAAY,iBAAiB;AAC7B,YAAY,kBAAkB;;;ACF9B,YAAY,YAAY;AAEjB,IAAM,YAAmB,cAAO;AAAA,EACrC,MAAa;AAAA,EACb,UAAiB;AAAA,EACjB,SAAgB,aAAa,aAAM;AAAA,EACnC,SAAgB,aAAa,aAAM;AAAA,EACnC,gBAAuB,aAAa,aAAM;AAAA,EAC1C,QAAe,gBAAgB,aAAM;AAAA,EACrC,MAAa;AAAA,EACb,WAAkB,gBAAgB,UAAG;AAAA,EACrC,mBAA0B;AAAA,EAC1B,kBAAyB;AAAA,EACzB,gBAAuB;AAAA,EACvB,QAAe;AACjB,CAAC;AAGM,IAAM,aAAoB,cAAO;AAAA,EACtC,SAAgB,gBAAgB,aAAa,aAAM,CAAC;AAAA,EACpD,SAAgB,gBAAgB,aAAa,aAAM,CAAC;AAAA,EACpD,gBAAuB,gBAAgB,aAAa,aAAM,CAAC;AAAA,EAC3D,MAAa,gBAAgB,UAAG;AAAA,EAChC,mBAA0B,gBAAgB,aAAM;AAAA,EAChD,kBAAyB,gBAAgB,UAAG;AAC9C,CAAC;;;ACzBD,YAAYA,aAAY;AAEjB,IAAM,mBAAN,cAAsC,oBAA8B,EAAE,oBAAoB;AAAA,EAC/F,UAAiB;AAAA,EACjB,aAAoB,cAAa,cAAM;AACzC,CAAC,EAAE;AAAC;AAEG,IAAM,iBAAN,cAAoC,oBAA4B,EAAE,kBAAkB;AAAA,EACzF,UAAiB;AAAA,EACjB,QAAe;AACjB,CAAC,EAAE;AAAC;AAEG,IAAM,eAAN,cAAkC,oBAA0B,EAAE,gBAAgB;AAAA,EACnF,WA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": ["Schema", "Schema", "Schema", "fn", "succeed", "fail", "catchTag", "error", "die", "gen", "make", "layer", "result", "name", "symbol", "fn", "error", "Effect", "Layer", "error", "dir", "relative", "effect", "Effect", "Layer", "Stream", "error", "run", "Effect", "Path", "Schema", "Stream", "state", "effect", "result", "run", "Effect", "Layer", "Stream", "Console", "Effect", "FileSystem", "Path", "Schema", "Stream", "Effect", "FileSystem", "Path", "Schema", "fail", "match", "error", "relative", "result", "error", "Clock", "Effect", "FileSystem", "Layer", "Path", "Schema", "result", "error", "relative", "error"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mutant-cafe",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Type-directed mutation testing for Effect TypeScript",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mutant-cafe": "./dist/bin.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=24"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/joelhooks/mutant-cafe.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://mutant.cafe",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "node build.mjs",
|
|
25
|
+
"prepack": "node build.mjs"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"effect": "4.1.2",
|
|
29
|
+
"@effect/platform-node": "4.1.2",
|
|
30
|
+
"typescript": "6.0.2",
|
|
31
|
+
"xstate": "6.0.0-alpha.73",
|
|
32
|
+
"@xstate/effect": "1.0.0-alpha.12"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"esbuild-wasm": "0.28.2"
|
|
36
|
+
}
|
|
37
|
+
}
|