{"record":{"id":"e9a4274306d6bb0a","repo":"ruvnet/RuView","slug":"unsupported-verification-profile-profile","errorCode":null,"errorMessage":"Unsupported verification profile: ${profile}","messagePattern":"Unsupported verification profile: (.+?)","errorType":"validation","errorClass":"RangeError","httpStatus":null,"severity":"error","filePath":"harness/homecore/src/tools.js","lineNumber":185,"sourceCode":"      cargo: executableOnPath('cargo'),\n      rustc: executableOnPath('rustc'),\n      codex: executableOnPath('codex'),\n      claude: executableOnPath('claude'),\n    },\n  };\n}\n\nfunction commandsForProfile(profile) {\n  if (profile === 'full') {\n    return [...PROFILE_COMMANDS.core, ...PROFILE_COMMANDS.wasm, ...PROFILE_COMMANDS.hap];\n  }\n  return PROFILE_COMMANDS[profile];\n}\n\nexport async function runVerification(args = {}, context = {}) {\n  const profile = args.profile || 'core';\n  const commands = commandsForProfile(profile);\n  if (!commands) throw new RangeError(`Unsupported verification profile: ${profile}`);\n  const root = resolveRepo(args.repo, context);\n  if (!root) throw new Error('A trusted RuView checkout is required; pass repo.');\n  const timeoutMs = args.timeout_ms || 900_000;\n  const runner = context.runner || runProcess;\n  const results = [];\n  for (const commandArgs of commands) {\n    const result = await runner('cargo', commandArgs, {\n      cwd: root,\n      timeoutMs,\n      signal: context.signal,\n      maxOutputBytes: 2_097_152,\n    });\n    results.push({\n      command: ['cargo', ...commandArgs],\n      code: result.code,\n      stdout: result.stdout,\n      stderr: result.stderr,\n      truncated: result.truncated,","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/harness/homecore/src/tools.js#L167-L203","documentation":"runVerification maps args.profile to the PROFILE_COMMANDS table, which defines exactly core, wasm, and hap, plus the special-cased 'full' that concatenates all three. Any other value returns undefined commands and throws this RangeError. Omitting profile is safe (defaults to 'core').","triggerScenarios":"verify --profile all, --profile rust, --profile Core (capital C), or any profile string read from env/config that is not one of core|wasm|hap|full.","commonSituations":"Guessing profile names from other tools ('all', 'default', 'quick'), stale scripts from older harness versions, profile names copied from CI workflow identifiers.","solutions":["Use one of: core, wasm, hap, or full","Omit --profile entirely to get the default 'core' profile","Validate against the allowlist before invoking: ['core','wasm','hap','full'].includes(profile)"],"exampleFix":"// before\nawait runVerification({ profile: 'all' });\n\n// after\nawait runVerification({ profile: 'full' });","handlingStrategy":"type-guard","validationCode":"const VERIFICATION_PROFILES = new Set(['core', 'wasm', 'hap', 'full']);\nfunction normalizeProfile(value) {\n  const p = typeof value === 'string' ? value.toLowerCase() : 'core';\n  return VERIFICATION_PROFILES.has(p) ? p : null;\n}\n// use: const profile = normalizeProfile(args.profile); if (!profile) failFast();","typeGuard":"/** @param {unknown} v @returns {v is 'core'|'wasm'|'hap'|'full'} */\nfunction isVerificationProfile(v) {\n  return v === 'core' || v === 'wasm' || v === 'hap' || v === 'full';\n}","tryCatchPattern":null,"preventionTips":["Treat the profile list as a closed enum: core, wasm, hap, full","Validate profile strings from env/config against the allowlist before invoking verify","Omit the profile argument when the default core profile is intended"],"tags":["validation","rangeerror","cli","homecore","verification"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}