/** * What a flow DECLARED it depends on, and the two things worth doing with that. * * Both live here because both answer the same question first — which endpoints did this flow name * in its own words, at record time — and then diverge only in what they do next: break one * (mutation), or slow them all by different amounts (perturbation). Splitting them would let two * files drift about what "declared" means, which is the one thing neither can afford. * * This is the decision that makes a mutation score mean anything, and the single place it can * quietly stop meaning anything. Break an endpoint the flow never touches and the flow survives — * which reads as *"this test is worthless"* and is really *"we broke the wrong thing"*. A mutation * set that aims badly reports a suite full of bad tests and is itself the bug. * * A flow that declared a network consequence has already said what it depends on, in its own words, * at record time. That declaration is the target: break exactly what the flow claims to need, and a * flow that still passes has genuinely proved nothing about it. * * A flow that declared none yields NOTHING, and that is a finding rather than a gap to paper over. * Guessing a target would manufacture the demotion instead of measuring it. */ import type { FlowFile } from './flow-types.js'; /** Every endpoint this flow's own declarations name, in order, once each. */ export declare function mutationTargetsFor(flow: FlowFile): string[]; /** The shape a network mock needs from us: which endpoint, and how much later. Nothing else. */ export interface Perturbation { urlContains: string; delayMs: number; } /** * Which endpoints to slow, and by how much, for this seed. * * Every endpoint the flow DECLARED it depends on gets its own delay, drawn independently, so the * spread is what reorders them. One uniform delay would slow everything equally and race nothing — * the app would see the same order it always sees, just later. * * `targets` comes from what the flow itself declared (`mutationTargetsFor`), so chaos is applied to * the endpoints the flow claims to care about rather than to traffic it never mentioned. */ export declare function perturbationFor(seed: number, targets: readonly string[]): Perturbation[];