ruvnet/ruflo · error · RangeError
unknown scheme "${v}" (tournament | tournament_nd | gumbel)
Error message
unknown scheme "${v}" (tournament | tournament_nd | gumbel) What it means
normScheme() found the supplied watermarking scheme string is not one of the supported set (tournament, tournament_nd, gumbel). The empty string defaults to gumbel, so this specifically means a non-empty unrecognized scheme name was passed.
Source
Thrown at v3/@claude-flow/watermark/web/index.mjs:43
}
/** True once `init()` has completed. */
export function isReady() {
return _ready;
}
function assertReady() {
if (!_ready) throw new Error('@claude-flow/watermark/web: call `await init()` before use');
}
const SCHEMES = new Set(['tournament', 'tournament_nd', 'gumbel']);
const enc = new TextEncoder();
const toKeyBytes = (k) => (typeof k === 'string' ? enc.encode(k) : k);
const toU32 = (a) => (a instanceof Uint32Array ? a : Uint32Array.from(a));
const toF32 = (a) => (a instanceof Float32Array ? a : Float32Array.from(a));
function normScheme(s) {
const v = s || 'gumbel';
if (!SCHEMES.has(v)) throw new RangeError(`unknown scheme "${v}" (tournament | tournament_nd | gumbel)`);
return v;
}
function shape(r) {
const out = {
zScore: r.z_score,
pValue: r.p_value,
log10P: r.log10_p,
scoredPositions: r.scored_positions,
isWatermarked(alpha = 1e-6) {
return out.log10P <= Math.log10(alpha);
},
};
r.free();
return out;
}
/** Streaming watermarked sampler (call `await init()` first). */
export class Watermarker {View on GitHub (pinned to fa13ee4ad6)
Solutions
- Use one of the supported schemes listed in the message (tournament, tournament_nd, gumbel).
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/@claude-flow/watermark/web/index.mjs:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/4a0b4b7507a5f4c0.
Report an issue: GitHub.