ruvnet/ruflo · error · Error
bootstrap iterations must be >= 100
Error message
bootstrap iterations must be >= 100
What it means
Input validation in computePromotionStatistics(): the bootstrap iterations argument is not an integer or is below 100, which would make percentile estimates statistically meaningless. Unlike the default of 10,000, an explicitly invalid value throws and aborts receipt computation.
Solutions
- Set bootstrap iterations to 100 or higher for statistical validity
Example fix
Set bootstrap iterations to a value >= 100 in the flywheel receipt configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/@claude-flow/cli/src/services/flywheel-receipt.ts:263 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@2602b642d9 (2026-08-18).
Data as JSON: /api/errors/bf04c94b1aaa4d2f.
Report an issue: GitHub.
Appendix: source
Thrown at v3/@claude-flow/cli/src/services/flywheel-receipt.ts:412
else return values[k];
}
return values[k] ?? 0;
}
export function computePromotionStatistics(input: {
baselineScore: number;
candidateScore: number;
heldOutDeltas: number[];
frozenAnchorRegression: number;
corpusHash: string;
candidateId: string;
baselineRef: string;
evaluationRunId: string;
iterations?: number;
metricEpsilon?: number;
}): PromotionStatistics {
const iterations = input.iterations ?? 10_000;
if (!Number.isInteger(iterations) || iterations < 100) throw new Error('bootstrap iterations must be >= 100');
const n = input.heldOutDeltas.length;
const metricEpsilon = input.metricEpsilon ?? 1e-12;
const relativeLift = (input.candidateScore - input.baselineScore) / Math.max(Math.abs(input.baselineScore), metricEpsilon);
const seeded = seedFrom([
'ruflo/bootstrap/v1',
input.corpusHash,
input.candidateId,
input.baselineRef,
input.evaluationRunId,
]);
let state = seeded.seed >>> 0;
const rnd = () => {
state = (1664525 * state + 1013904223) >>> 0;
return state / 4294967296;
};
const means = new Array<number>(iterations);
let positiveMeans = 0;
if (n === 0) {View on GitHub (pinned to 2602b642d9)