{"record":{"id":"287fadb2990e6a37","repo":"ruvnet/ruflo","slug":"unknown-scheme-s-use-tournament-tournament","errorCode":null,"errorMessage":"unknown scheme \"${s}\" (use tournament | tournament_nd | gumbel)","messagePattern":"unknown scheme \"(.+?)\" \\(use tournament \\| tournament_nd \\| gumbel\\)","errorType":"exception","errorClass":"RangeError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/watermark/index.js","lineNumber":27,"sourceCode":"\nconst wasm = require('./wasm/ruflo_watermark.js');\n\nconst SCHEMES = new Set(['tournament', 'tournament_nd', 'gumbel']);\n\nfunction toKeyBytes(key) {\n  if (typeof key === 'string') return new TextEncoder().encode(key);\n  if (key instanceof Uint8Array) return key;\n  throw new TypeError('key must be a string or Uint8Array');\n}\nfunction toU32(a) {\n  return a instanceof Uint32Array ? a : Uint32Array.from(a);\n}\nfunction toF32(a) {\n  return a instanceof Float32Array ? a : Float32Array.from(a);\n}\nfunction normScheme(scheme) {\n  const s = scheme || 'gumbel';\n  if (!SCHEMES.has(s)) throw new RangeError(`unknown scheme \"${s}\" (use tournament | tournament_nd | gumbel)`);\n  return s;\n}\n\n/** Shape a raw WasmDetection into a plain object with an `isWatermarked` helper. */\nfunction shape(r) {\n  const out = {\n    zScore: r.z_score,\n    pValue: r.p_value,\n    log10P: r.log10_p,\n    scoredPositions: r.scored_positions,\n    /** True if the evidence clears the given false-positive rate (e.g. 1e-6). */\n    isWatermarked(alpha = 1e-6) {\n      return out.log10P <= Math.log10(alpha);\n    },\n  };\n  r.free();\n  return out;\n}","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/watermark/index.js#L9-L45","documentation":"normScheme guard: the watermarking scheme argument is not one of the supported set — 'tournament', 'tournament_nd', or 'gumbel' (with 'gumbel' as default when falsy). An unknown scheme string is rejected with a RangeError because the WASM core has no matching algorithm.","triggerScenarios":"Thrown at v3/@claude-flow/watermark/index.js:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported schemes: tournament, tournament_nd, or gumbel.","Fix the scheme configuration value; it likely contains a typo."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}